authhero 8.14.0 → 8.15.0

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.
@@ -1,6 +1,6 @@
1
1
  import * as hono_utils_types from 'hono/utils/types';
2
2
  import * as _authhero_adapter_interfaces from '@authhero/adapter-interfaces';
3
- import { LoginSession, DataAdapters, RolePermissionInsert, AuthorizationResponseMode, AuthorizationResponseType, User, CustomDomain, ProxyRoute, ResourceServer, ResourceServerInsert, Role, RoleInsert, Connection, ConnectionInsert, Tenant, CreateTenantParams, Hook, CodeExecutor, SigningKey, Theme, Branding, AuthParams, CacheAdapter, EmailServiceAdapter, EmailServiceSendParams, AuditEvent, OutboxAdapter, HooksAdapter, LogsDataAdapter, LogInsert, UserDataAdapter, CustomDomainsAdapter, ProxyRoutesAdapter, ListParams, KeysAdapter, CodeExecutionResult } from '@authhero/adapter-interfaces';
3
+ import { LoginSession, DataAdapters, RolePermissionInsert, AuthorizationResponseMode, AuthorizationResponseType, User, CustomDomain, ProxyRoute, ResourceServer, ResourceServerInsert, Role, RoleInsert, Connection, ConnectionInsert, Tenant, CreateTenantParams, Hook, TenantOperationKind, TenantOperation, CodeExecutor, SigningKey, Theme, Branding, AuthParams, CacheAdapter, EmailServiceAdapter, EmailServiceSendParams, AuditEvent, OutboxAdapter, HooksAdapter, LogsDataAdapter, LogInsert, UserDataAdapter, CustomDomainsAdapter, ProxyRoutesAdapter, ListParams, KeysAdapter, CodeExecutionResult } from '@authhero/adapter-interfaces';
4
4
  export * from '@authhero/adapter-interfaces';
5
5
  import * as hono_types from 'hono/types';
6
6
  import * as hono_utils_http_status from 'hono/utils/http-status';
@@ -1008,6 +1008,21 @@ interface ManagementApiExtension {
1008
1008
  */
1009
1009
  router: OpenAPIHono<any, any, any>;
1010
1010
  }
1011
+ /**
1012
+ * Enqueues a durable tenant lifecycle operation (issue #1026): creates
1013
+ * the `tenant_operations` row and starts execution on the configured
1014
+ * engine. The inline engine resolves with a terminal row; durable engines
1015
+ * resolve as soon as the run is enqueued — clients poll
1016
+ * `GET /api/v2/operations/{id}`.
1017
+ */
1018
+ interface TenantOperationExecutorBinding {
1019
+ engine: string;
1020
+ enqueue(params: {
1021
+ kind: TenantOperationKind;
1022
+ tenant_id: string | null;
1023
+ initiated_by?: string;
1024
+ }): Promise<TenantOperation>;
1025
+ }
1011
1026
  /**
1012
1027
  * Configuration for the transactional outbox pattern.
1013
1028
  * When enabled, audit events are written atomically with entity mutations
@@ -1289,6 +1304,16 @@ interface AuthHeroConfig {
1289
1304
  * ```
1290
1305
  */
1291
1306
  tenantUpgrade?: (tenantId: string) => Promise<void>;
1307
+ /**
1308
+ * Optional executor for durable tenant lifecycle operations (issue
1309
+ * #1026). When set together with the `tenantOperations` /
1310
+ * `tenantOperationEvents` adapters, `POST /api/v2/tenants/{id}/operations`
1311
+ * enqueues operations through it. Kept structural so authhero core
1312
+ * depends on neither `@authhero/multi-tenancy` nor any engine —
1313
+ * `@authhero/multi-tenancy`'s `enqueueTenantOperation` + executors
1314
+ * satisfy this shape.
1315
+ */
1316
+ tenantOperationExecutor?: TenantOperationExecutorBinding;
1292
1317
  /**
1293
1318
  * Optional powered-by logo to display at the bottom left of the login widget.
1294
1319
  * This is only configurable in code, not stored in the database.
@@ -1554,6 +1579,7 @@ type Bindings = {
1554
1579
  codeExecutor?: CodeExecutor;
1555
1580
  webhookInvoker?: WebhookInvoker;
1556
1581
  tenantUpgrade?: (tenantId: string) => Promise<void>;
1582
+ tenantOperationExecutor?: TenantOperationExecutorBinding;
1557
1583
  outbox?: OutboxConfig;
1558
1584
  userLinkingMode?: UserLinkingModeOption;
1559
1585
  usernamePasswordProvider?: UsernamePasswordProviderResolver;
@@ -19755,4 +19781,4 @@ declare function init(config: AuthHeroConfig): {
19755
19781
  };
19756
19782
 
19757
19783
  export { AppLogo, AuthLayout, Button$1 as Button, Button as ButtonUI, CONTROL_PLANE_SYNC_EVENT_PREFIX, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Card as CardUI, ControlPlaneSyncDestination, EmailValidatedPage, EnterCodePage, EnterPasswordPage, ErrorMessage, Footer, ForgotPasswordPage, ForgotPasswordSentPage, FormComponent, GoBack, Google as GoogleLogo, Icon, IdentifierForm, IdentifierPage, Input as InputUI, InvalidSessionPage as InvalidSession, Label as LabelUI, Layout, LocalCodeExecutor, LogsDestination, MANAGEMENT_API_AUDIENCE, MANAGEMENT_API_SCOPES, MailgunEmailService, MessagePage as Message, PostmarkEmailService, PreSignUpConfirmationPage, PreSignupPage as PreSignUpPage, RegistrationFinalizerDestination, ResendEmailService, ResetPasswordPage, SignupPage as SignUpPage, SocialButton, Spinner, Trans, USERNAME_PASSWORD_PROVIDER, UnverifiedEmailPage, UserNotFound as UserNotFoundPage, VippsLogo, WebhookDestination, addEntityHooks, backfillProxyHostsToKv, cleanupOutbox, cleanupSessions, cleanupUserSessions, clientInfoMiddleware, createApplySyncEvents, createAuthMiddleware, createDefaultDestinations, createEncryptedDataAdapter, createEncryptedDataAdapterWithKeyRing, createInMemoryCache, decryptField, decryptFieldWithRing, deepMergePatch, drainOutbox, encryptField, encryptFieldWithRing, ensureMutableResponse, fetchAll, init, injectTailwindCSS, isAllowedIssuer, isEncrypted, listControlPlaneKeys, loadEncryptionKey, mailgunCredentialsSchema, parseKeyId, postmarkCredentialsSchema, index_d as preDefinedHooks, resendCredentialsSchema, resolveSigningKeyMode, resolveSigningKeys, runOutboxRelay, seed, tailwindCss, tenantMiddleware, toMutableResponse, verifyControlPlaneToken, waitUntil, wrapProxyAdaptersWithKvPublish };
19758
- export type { AuthHeroConfig, BackfillProxyHostsOptions, BackfillResult, ControlPlaneSyncDestinationOptions, CreateApplySyncEventsOptions, CreateDefaultDestinationsConfig, EncryptKeyIdResolver, EnsureUsernameOptions, EntityHookContext, EntityHooks, EntityHooksConfig, EventDestination, FetchAllOptions, GetServiceToken, HookEvent, HookRequest, Hooks, InMemoryCacheConfig, IssuerResolver, KeyRing, KvPublishOptions, MailgunCredentials, MailgunEmailServiceOptions, ManagementApiExtension, ManagementAudienceResolver, OnExecuteCredentialsExchange, OnExecuteCredentialsExchangeAPI, OnExecutePostLogin, OnExecutePostLoginAPI, OnExecutePostUserDeletion, OnExecutePostUserDeletionAPI, OnExecutePostUserRegistration, OnExecutePostUserRegistrationAPI, OnExecutePostUserUpdate, OnExecutePostUserUpdateAPI, OnExecutePreUserDeletion, OnExecutePreUserDeletionAPI, OnExecutePreUserRegistration, OnExecutePreUserRegistrationAPI, OnExecutePreUserUpdate, OnExecutePreUserUpdateAPI, OnExecuteValidateRegistrationUsername, OnExecuteValidateRegistrationUsernameAPI, OnFetchUserInfo, OnFetchUserInfoAPI, OutboxCleanupParams, OutboxConfig, PostmarkCredentials, PostmarkEmailServiceOptions, ResendCredentials, ResendEmailServiceOptions, ResolveSigningKeysOptions, RolePermissionHooks, RunOutboxRelayConfig, SeedOptions, SeedResult, SigningKeyMode, SigningKeyModeOption, SigningKeyModeResolver, SyncEntity, SyncEvent, SyncOp, TokenAPI, Transaction, UserInfoEvent, UserLinkingMode, UserLinkingModeOption, UserLinkingModeResolver, UserSessionCleanupParams, UsernamePasswordProviderResolver, VerifyControlPlaneTokenOptions, VerifyControlPlaneTokenResult, WebhookDestinationOptions, WebhookInvoker, WebhookInvokerParams, WrappedProxyAdapters };
19784
+ export type { AuthHeroConfig, BackfillProxyHostsOptions, BackfillResult, ControlPlaneSyncDestinationOptions, CreateApplySyncEventsOptions, CreateDefaultDestinationsConfig, EncryptKeyIdResolver, EnsureUsernameOptions, EntityHookContext, EntityHooks, EntityHooksConfig, EventDestination, FetchAllOptions, GetServiceToken, HookEvent, HookRequest, Hooks, InMemoryCacheConfig, IssuerResolver, KeyRing, KvPublishOptions, MailgunCredentials, MailgunEmailServiceOptions, ManagementApiExtension, ManagementAudienceResolver, OnExecuteCredentialsExchange, OnExecuteCredentialsExchangeAPI, OnExecutePostLogin, OnExecutePostLoginAPI, OnExecutePostUserDeletion, OnExecutePostUserDeletionAPI, OnExecutePostUserRegistration, OnExecutePostUserRegistrationAPI, OnExecutePostUserUpdate, OnExecutePostUserUpdateAPI, OnExecutePreUserDeletion, OnExecutePreUserDeletionAPI, OnExecutePreUserRegistration, OnExecutePreUserRegistrationAPI, OnExecutePreUserUpdate, OnExecutePreUserUpdateAPI, OnExecuteValidateRegistrationUsername, OnExecuteValidateRegistrationUsernameAPI, OnFetchUserInfo, OnFetchUserInfoAPI, OutboxCleanupParams, OutboxConfig, PostmarkCredentials, PostmarkEmailServiceOptions, ResendCredentials, ResendEmailServiceOptions, ResolveSigningKeysOptions, RolePermissionHooks, RunOutboxRelayConfig, SeedOptions, SeedResult, SigningKeyMode, SigningKeyModeOption, SigningKeyModeResolver, SyncEntity, SyncEvent, SyncOp, TenantOperationExecutorBinding, TokenAPI, Transaction, UserInfoEvent, UserLinkingMode, UserLinkingModeOption, UserLinkingModeResolver, UserSessionCleanupParams, UsernamePasswordProviderResolver, VerifyControlPlaneTokenOptions, VerifyControlPlaneTokenResult, WebhookDestinationOptions, WebhookInvoker, WebhookInvokerParams, WrappedProxyAdapters };