@streamoid/settings 0.19.0 → 0.20.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.
package/dist/index.d.mts CHANGED
@@ -60,7 +60,9 @@ type SettingsTab = "profile"
60
60
  /** Account › Connected apps — apps (ChatGPT, Codex) acting for you. */
61
61
  | "connectedApps"
62
62
  /** Organization › Integrations — org admins turn apps on and revoke them. */
63
- | "organizationIntegrations";
63
+ | "organizationIntegrations"
64
+ /** Organization › Login methods — org admins choose email code and/or company SSO. */
65
+ | "organizationLoginMethods";
64
66
  /** Which entity a tab acts on. Drives the nav grouping and the breadcrumb. */
65
67
  type SettingsScope = "account" | "workspace" | "organization" | "global";
66
68
  declare const TAB_SCOPE: Record<SettingsTab, SettingsScope>;
@@ -1282,6 +1284,65 @@ interface SettingsIntegrationsAdapter {
1282
1284
  enabled: boolean;
1283
1285
  }>;
1284
1286
  }
1287
+ /**
1288
+ * Organization › Login methods: which ways in the org allows for people on its
1289
+ * email domains. Mirrors unified-backend's
1290
+ * `GET|PUT /organization/:organizationId/login-methods`.
1291
+ */
1292
+ interface LoginMethodsMember {
1293
+ userId: string;
1294
+ name: string | null;
1295
+ email: string;
1296
+ role: string;
1297
+ }
1298
+ interface LoginMethodsSettings {
1299
+ /** Email code, plus Google and Microsoft sign-in. */
1300
+ emailCode: boolean;
1301
+ /** The org's company SSO (SAML) connection. */
1302
+ sso: boolean;
1303
+ /** "org": saved by an admin. "env": deployment default. "default": neither. */
1304
+ source: "org" | "env" | "default";
1305
+ /** The setting says SSO only, but SSO is broken, so email codes still work. */
1306
+ failOpen: boolean;
1307
+ connection: {
1308
+ id: string;
1309
+ displayName: string;
1310
+ valid: boolean;
1311
+ } | null;
1312
+ /** The org's email domains its SSO connection covers. */
1313
+ coveredDomains: string[];
1314
+ updatedBy: {
1315
+ userId?: string;
1316
+ email?: string;
1317
+ } | null;
1318
+ updatedAt: string | null;
1319
+ constraints: {
1320
+ canDisableEmailCode: boolean;
1321
+ canEnableSso: boolean;
1322
+ /** Why email codes can't go off: no connection, or SSO is off. */
1323
+ reason: "NO_SSO_CONNECTION" | "SSO_OFF" | null;
1324
+ /** The caller must sign in with SSO once before turning email codes off. */
1325
+ selfLockoutGuard: boolean;
1326
+ };
1327
+ /** Who has signed in through the connection. Null without a connection. */
1328
+ readiness: {
1329
+ connectionId: string;
1330
+ affectedTotal: number;
1331
+ signedInWithSso: number;
1332
+ /** Would be locked out if email codes went off now. */
1333
+ notYet: LoginMethodsMember[];
1334
+ /** Members on other domains, whom the switches don't affect. */
1335
+ notAffected: number;
1336
+ } | null;
1337
+ }
1338
+ interface SettingsLoginMethodsAdapter {
1339
+ get: (organizationId: string, signal?: AbortSignal) => Promise<LoginMethodsSettings>;
1340
+ /** Rejects with the backend's message when a rule refuses the change. */
1341
+ update: (organizationId: string, next: {
1342
+ emailCode: boolean;
1343
+ sso: boolean;
1344
+ }) => Promise<LoginMethodsSettings>;
1345
+ }
1285
1346
  interface SettingsAdapters {
1286
1347
  auth: SettingsAuthAdapter;
1287
1348
  workspace: SettingsWorkspaceAdapter;
@@ -1292,6 +1353,8 @@ interface SettingsAdapters {
1292
1353
  imageUpload: SettingsImageUploadAdapter;
1293
1354
  /** Optional. Without it the Connected apps and Integrations tabs are hidden. */
1294
1355
  integrations?: SettingsIntegrationsAdapter;
1356
+ /** Optional. Without it the Login methods tab is hidden. */
1357
+ loginMethods?: SettingsLoginMethodsAdapter;
1295
1358
  }
1296
1359
 
1297
1360
  /**
@@ -1878,6 +1941,26 @@ declare function ConnectedAppsContent(): react.JSX.Element;
1878
1941
  */
1879
1942
  declare function OrganizationIntegrationsContent(): react.JSX.Element;
1880
1943
 
1944
+ interface LoginMethodsSwitchState {
1945
+ emailCode: {
1946
+ checked: boolean;
1947
+ disabled: boolean;
1948
+ hint: string | null;
1949
+ };
1950
+ sso: {
1951
+ checked: boolean;
1952
+ disabled: boolean;
1953
+ hint: string | null;
1954
+ };
1955
+ }
1956
+ /**
1957
+ * Which switch may move, and why not. The last one on is locked; email codes
1958
+ * can't go off without working SSO, nor (for an admin on the org's own domain)
1959
+ * before they have signed in with it; SSO can't go on without a connection.
1960
+ */
1961
+ declare function loginMethodsSwitchState(data: LoginMethodsSettings): LoginMethodsSwitchState;
1962
+ declare function OrganizationLoginMethodsContent(): react.JSX.Element;
1963
+
1881
1964
  /**
1882
1965
  * "Last used" reads as recency, not as a date: "2h ago" says whether the app
1883
1966
  * is live; "Oct 5, 2026" makes you do arithmetic. Past a week the date is
@@ -2704,12 +2787,14 @@ interface AdministrationOverviewProps {
2704
2787
  /** The signed-in user has a referral code to share. */
2705
2788
  showReferral?: boolean;
2706
2789
  showIntegrations: boolean;
2790
+ /** Org admin, and the host wired the login-methods adapter. */
2791
+ showLoginMethods?: boolean;
2707
2792
  canInvite: boolean;
2708
2793
  onNavigate: (tab: SettingsTab) => void;
2709
2794
  onInvitePeople?: () => void;
2710
2795
  }
2711
2796
  /** Scope-first navigation into the existing forms; contains no mutation logic. */
2712
- declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, showReferral, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2797
+ declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, showLoginMethods, showReferral, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2713
2798
 
2714
2799
  /** Shared invitation rule. A result belongs to one authenticated workspace;
2715
2800
  * callers must explicitly mark it ready after that workspace's reads settle. */
@@ -2780,4 +2865,4 @@ interface AppSettingsRowProps {
2780
2865
  }
2781
2866
  declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
2782
2867
 
2783
- export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, InviteUpdateModal, type InvoicePdfResponse, MOCK_REFERRED_USERS, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralHistoryView, type ReferralHistoryViewProps, ReferralTab, type ReferredUser, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, parseInviteEmails, pausedOwnCreditsText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
2868
+ export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, InviteUpdateModal, type InvoicePdfResponse, type LoginMethodsMember, type LoginMethodsSettings, type LoginMethodsSwitchState, MOCK_REFERRED_USERS, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, OrganizationLoginMethodsContent, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralHistoryView, type ReferralHistoryViewProps, ReferralTab, type ReferredUser, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsLoginMethodsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, loginMethodsSwitchState, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, parseInviteEmails, pausedOwnCreditsText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
package/dist/index.d.ts CHANGED
@@ -60,7 +60,9 @@ type SettingsTab = "profile"
60
60
  /** Account › Connected apps — apps (ChatGPT, Codex) acting for you. */
61
61
  | "connectedApps"
62
62
  /** Organization › Integrations — org admins turn apps on and revoke them. */
63
- | "organizationIntegrations";
63
+ | "organizationIntegrations"
64
+ /** Organization › Login methods — org admins choose email code and/or company SSO. */
65
+ | "organizationLoginMethods";
64
66
  /** Which entity a tab acts on. Drives the nav grouping and the breadcrumb. */
65
67
  type SettingsScope = "account" | "workspace" | "organization" | "global";
66
68
  declare const TAB_SCOPE: Record<SettingsTab, SettingsScope>;
@@ -1282,6 +1284,65 @@ interface SettingsIntegrationsAdapter {
1282
1284
  enabled: boolean;
1283
1285
  }>;
1284
1286
  }
1287
+ /**
1288
+ * Organization › Login methods: which ways in the org allows for people on its
1289
+ * email domains. Mirrors unified-backend's
1290
+ * `GET|PUT /organization/:organizationId/login-methods`.
1291
+ */
1292
+ interface LoginMethodsMember {
1293
+ userId: string;
1294
+ name: string | null;
1295
+ email: string;
1296
+ role: string;
1297
+ }
1298
+ interface LoginMethodsSettings {
1299
+ /** Email code, plus Google and Microsoft sign-in. */
1300
+ emailCode: boolean;
1301
+ /** The org's company SSO (SAML) connection. */
1302
+ sso: boolean;
1303
+ /** "org": saved by an admin. "env": deployment default. "default": neither. */
1304
+ source: "org" | "env" | "default";
1305
+ /** The setting says SSO only, but SSO is broken, so email codes still work. */
1306
+ failOpen: boolean;
1307
+ connection: {
1308
+ id: string;
1309
+ displayName: string;
1310
+ valid: boolean;
1311
+ } | null;
1312
+ /** The org's email domains its SSO connection covers. */
1313
+ coveredDomains: string[];
1314
+ updatedBy: {
1315
+ userId?: string;
1316
+ email?: string;
1317
+ } | null;
1318
+ updatedAt: string | null;
1319
+ constraints: {
1320
+ canDisableEmailCode: boolean;
1321
+ canEnableSso: boolean;
1322
+ /** Why email codes can't go off: no connection, or SSO is off. */
1323
+ reason: "NO_SSO_CONNECTION" | "SSO_OFF" | null;
1324
+ /** The caller must sign in with SSO once before turning email codes off. */
1325
+ selfLockoutGuard: boolean;
1326
+ };
1327
+ /** Who has signed in through the connection. Null without a connection. */
1328
+ readiness: {
1329
+ connectionId: string;
1330
+ affectedTotal: number;
1331
+ signedInWithSso: number;
1332
+ /** Would be locked out if email codes went off now. */
1333
+ notYet: LoginMethodsMember[];
1334
+ /** Members on other domains, whom the switches don't affect. */
1335
+ notAffected: number;
1336
+ } | null;
1337
+ }
1338
+ interface SettingsLoginMethodsAdapter {
1339
+ get: (organizationId: string, signal?: AbortSignal) => Promise<LoginMethodsSettings>;
1340
+ /** Rejects with the backend's message when a rule refuses the change. */
1341
+ update: (organizationId: string, next: {
1342
+ emailCode: boolean;
1343
+ sso: boolean;
1344
+ }) => Promise<LoginMethodsSettings>;
1345
+ }
1285
1346
  interface SettingsAdapters {
1286
1347
  auth: SettingsAuthAdapter;
1287
1348
  workspace: SettingsWorkspaceAdapter;
@@ -1292,6 +1353,8 @@ interface SettingsAdapters {
1292
1353
  imageUpload: SettingsImageUploadAdapter;
1293
1354
  /** Optional. Without it the Connected apps and Integrations tabs are hidden. */
1294
1355
  integrations?: SettingsIntegrationsAdapter;
1356
+ /** Optional. Without it the Login methods tab is hidden. */
1357
+ loginMethods?: SettingsLoginMethodsAdapter;
1295
1358
  }
1296
1359
 
1297
1360
  /**
@@ -1878,6 +1941,26 @@ declare function ConnectedAppsContent(): react.JSX.Element;
1878
1941
  */
1879
1942
  declare function OrganizationIntegrationsContent(): react.JSX.Element;
1880
1943
 
1944
+ interface LoginMethodsSwitchState {
1945
+ emailCode: {
1946
+ checked: boolean;
1947
+ disabled: boolean;
1948
+ hint: string | null;
1949
+ };
1950
+ sso: {
1951
+ checked: boolean;
1952
+ disabled: boolean;
1953
+ hint: string | null;
1954
+ };
1955
+ }
1956
+ /**
1957
+ * Which switch may move, and why not. The last one on is locked; email codes
1958
+ * can't go off without working SSO, nor (for an admin on the org's own domain)
1959
+ * before they have signed in with it; SSO can't go on without a connection.
1960
+ */
1961
+ declare function loginMethodsSwitchState(data: LoginMethodsSettings): LoginMethodsSwitchState;
1962
+ declare function OrganizationLoginMethodsContent(): react.JSX.Element;
1963
+
1881
1964
  /**
1882
1965
  * "Last used" reads as recency, not as a date: "2h ago" says whether the app
1883
1966
  * is live; "Oct 5, 2026" makes you do arithmetic. Past a week the date is
@@ -2704,12 +2787,14 @@ interface AdministrationOverviewProps {
2704
2787
  /** The signed-in user has a referral code to share. */
2705
2788
  showReferral?: boolean;
2706
2789
  showIntegrations: boolean;
2790
+ /** Org admin, and the host wired the login-methods adapter. */
2791
+ showLoginMethods?: boolean;
2707
2792
  canInvite: boolean;
2708
2793
  onNavigate: (tab: SettingsTab) => void;
2709
2794
  onInvitePeople?: () => void;
2710
2795
  }
2711
2796
  /** Scope-first navigation into the existing forms; contains no mutation logic. */
2712
- declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, showReferral, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2797
+ declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, showLoginMethods, showReferral, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2713
2798
 
2714
2799
  /** Shared invitation rule. A result belongs to one authenticated workspace;
2715
2800
  * callers must explicitly mark it ready after that workspace's reads settle. */
@@ -2780,4 +2865,4 @@ interface AppSettingsRowProps {
2780
2865
  }
2781
2866
  declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
2782
2867
 
2783
- export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, InviteUpdateModal, type InvoicePdfResponse, MOCK_REFERRED_USERS, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralHistoryView, type ReferralHistoryViewProps, ReferralTab, type ReferredUser, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, parseInviteEmails, pausedOwnCreditsText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
2868
+ export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, InviteUpdateModal, type InvoicePdfResponse, type LoginMethodsMember, type LoginMethodsSettings, type LoginMethodsSwitchState, MOCK_REFERRED_USERS, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, OrganizationLoginMethodsContent, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralHistoryView, type ReferralHistoryViewProps, ReferralTab, type ReferredUser, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsLoginMethodsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, loginMethodsSwitchState, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, parseInviteEmails, pausedOwnCreditsText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };