@streamoid/settings 0.20.1 → 0.21.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/README.md CHANGED
@@ -165,6 +165,9 @@ Billing hides an entry whose adapter method is absent:
165
165
 
166
166
  - **Per-user usage limits:** `api.fetchMemberCreditLimits` (plus
167
167
  `setMemberCreditLimit`, `removeMemberCreditLimit`, `setDefaultCreditLimit`).
168
+ - **Workspace credit limit:** `api.fetchWorkspaceCreditLimit` (plus
169
+ `setWorkspaceCreditLimit` for Edit). The card sits on the per-user limits
170
+ page, or on Billing itself when there is no `fetchMemberCreditLimits`.
168
171
  - **Shared credits:** `api.fetchCreditPool`, and the workspace must be in an
169
172
  organization. `addCreditPoolMember`, `updateCreditPoolMember`,
170
173
  `removeCreditPoolMember` and `fetchCreditPoolCandidates` light up the rest.
package/dist/index.d.mts CHANGED
@@ -919,6 +919,22 @@ interface MemberCreditLimitsResponse {
919
919
  /** Only members with an override or with usage; the rest follow the default. */
920
920
  users: MemberCreditLimit[];
921
921
  }
922
+ /**
923
+ * The cap on what the whole workspace may spend per billing cycle, and its
924
+ * usage this cycle. Mirrors billing's `GET /workspace-credit-limit/:id`.
925
+ */
926
+ interface WorkspaceCreditLimit {
927
+ /** `null` = no limit: the workspace may spend all its credits. */
928
+ limit: number | null;
929
+ /** Credits the workspace's own members spent this cycle. */
930
+ used: number;
931
+ /** Used this cycle plus the available balance: the most a limit can be. */
932
+ totalCredits: number;
933
+ /** `limit - used`; `null` when there is no limit. */
934
+ remaining: number | null;
935
+ setBy?: string;
936
+ updatedAt?: string;
937
+ }
922
938
  type CreditPoolMode = "fixed" | "percent";
923
939
  type CreditPoolMemberStatus = "active" | "canceled";
924
940
  /**
@@ -1148,6 +1164,17 @@ interface SettingsApiAdapter {
1148
1164
  /** Set the workspace default per-member limit; `null` means Unlimited.
1149
1165
  * Applies to members without their own override. Throws on error. */
1150
1166
  setDefaultCreditLimit?: (limit: number | null) => Promise<void>;
1167
+ /**
1168
+ * The workspace-wide credit limit for the current billing cycle. Shown on
1169
+ * the per-user limits page, or on Billing itself when the host has no
1170
+ * `fetchMemberCreditLimits`. When omitted, there is no "Workspace credit
1171
+ * limit" card.
1172
+ */
1173
+ fetchWorkspaceCreditLimit?: () => Promise<WorkspaceCreditLimit>;
1174
+ /** Set the workspace limit; `null` = no limit. Rejects with code
1175
+ * `LIMIT_BELOW_USAGE` (under `used`) or `LIMIT_ABOVE_TOTAL` (over
1176
+ * `totalCredits`), each carrying `used`, `limit` and `totalCredits`. */
1177
+ setWorkspaceCreditLimit?: (limit: number | null) => Promise<void>;
1151
1178
  /**
1152
1179
  * Who this workspace shares its credits with, or whose it spends. When
1153
1180
  * omitted, Billing hides the "Shared credits" entry.
@@ -2385,6 +2412,12 @@ interface ExportDateModalProps {
2385
2412
  declare function ExportDateModal({ title, onClose, onExport, busy, busyText, notice, }: ExportDateModalProps): react.JSX.Element;
2386
2413
 
2387
2414
  type CreditCycleUnit = "month" | "year";
2415
+ /**
2416
+ * The unit a limit is shown in: "cycle" when the cycle's length isn't known
2417
+ * (an org admin who isn't a workspace admin can't read the per-user limits,
2418
+ * which carry it).
2419
+ */
2420
+ type CreditLimitUnit = CreditCycleUnit | "cycle";
2388
2421
  type CreditLimitValidation = {
2389
2422
  ok: true;
2390
2423
  value: number;
@@ -2430,8 +2463,15 @@ declare function validateDefaultCreditLimitInput(raw: string): CreditLimitValida
2430
2463
  * 4005.
2431
2464
  */
2432
2465
  declare function cleanCreditLimitInput(value: string): string;
2433
- /** Digits-only input, an integer, and not below what was already used. */
2434
- declare function validateCreditLimitInput(raw: string, used: number): CreditLimitValidation;
2466
+ /** The largest whole-number limit allowed under `total`: what the input can take. */
2467
+ declare function maximumCreditLimit(total: number): number;
2468
+ /**
2469
+ * Digits-only input, an integer, not below what was already used and, when
2470
+ * `total` is given (the workspace limit), not above the workspace's total credits.
2471
+ */
2472
+ declare function validateCreditLimitInput(raw: string, used: number, total?: number): CreditLimitValidation;
2473
+ /** Why a workspace limit was refused for being over its `total` credits, naming the most it can be. */
2474
+ declare function aboveTotalReason(total: number): string;
2435
2475
  /** Why a limit was refused for being under `used`, naming the least it can be. */
2436
2476
  declare function belowUsageReason(used: number): string;
2437
2477
  /** The default limit as text: "500 credits / month", or "Unlimited" (also when unset). */
@@ -2445,6 +2485,38 @@ declare function limitSourceLabel(row: Pick<MemberCreditLimitRow, "source">): "C
2445
2485
  * follow the workspace default (none set = unlimited), with no usage.
2446
2486
  */
2447
2487
  declare function joinMembersWithLimits(members: WorkspaceMember[], response: MemberCreditLimitsResponse | null | undefined): MemberCreditLimitRow[];
2488
+ /** The workspace credit limit as the card shows it. */
2489
+ interface WorkspaceCreditLimitSummary {
2490
+ /** "30,000 credits / month"; with no limit, the total credits. */
2491
+ limitText: string;
2492
+ /** No limit set: the workspace may spend all its credits. */
2493
+ noLimit: boolean;
2494
+ usedText: string;
2495
+ remainingText: string;
2496
+ /** A limit is set and this cycle's usage has reached it: generation is refused. */
2497
+ reached: boolean;
2498
+ }
2499
+ /**
2500
+ * No limit reads as the total credits (and says so); remaining is what is left
2501
+ * under the limit, or of the total when there is none — never below zero.
2502
+ */
2503
+ declare function describeWorkspaceCreditLimit(state: WorkspaceCreditLimit, unit: CreditLimitUnit): WorkspaceCreditLimitSummary;
2504
+ /**
2505
+ * An org admin of the workspace's own organization who is not a workspace
2506
+ * admin: Billing shows them the workspace credit limit and nothing else.
2507
+ * Hosts can fall back to another organization the user belongs to as
2508
+ * `organization.current`, so its id must be the workspace's organization.
2509
+ */
2510
+ declare function canManageOnlyWorkspaceCreditLimit({ isWorkspaceAdmin, organization, workspaceOrganizationId, hasWorkspaceCreditLimit, }: {
2511
+ isWorkspaceAdmin: boolean;
2512
+ organization: {
2513
+ id: string;
2514
+ role?: string;
2515
+ } | null | undefined;
2516
+ workspaceOrganizationId: string | null | undefined;
2517
+ /** The host passed `api.fetchWorkspaceCreditLimit`. */
2518
+ hasWorkspaceCreditLimit: boolean;
2519
+ }): boolean;
2448
2520
 
2449
2521
  /**
2450
2522
  * True when a per-user credit limit was rejected for being under what the
@@ -2460,6 +2532,19 @@ declare function isLimitBelowUsage(failure: unknown): boolean;
2460
2532
  * spent more since. `null` when the failure is not one, or carries no figure.
2461
2533
  */
2462
2534
  declare function limitBelowUsageUsed(failure: unknown): number | null;
2535
+ /** True when a workspace credit limit was rejected for being over the workspace's total credits. */
2536
+ declare function isLimitAboveTotal(failure: unknown): boolean;
2537
+ /**
2538
+ * The workspace's total credits from a `LIMIT_ABOVE_TOTAL` rejection: fresher
2539
+ * than the figure the page loaded with, if credits were spent or bought since.
2540
+ * `null` when the failure is not one, or carries no figure.
2541
+ */
2542
+ declare function limitAboveTotalTotal(failure: unknown): number | null;
2543
+ declare const WORKSPACE_CREDIT_LIMIT_REACHED = "WORKSPACE_CREDIT_LIMIT_REACHED";
2544
+ /** What to tell a member whose generation the workspace credit limit refused. */
2545
+ declare const WORKSPACE_CREDIT_LIMIT_REACHED_MESSAGE = "Your workspace has reached its credit limit for this cycle. Ask an admin to raise it.";
2546
+ /** True when a deduct was refused because the workspace reached its credit limit this cycle. */
2547
+ declare function isWorkspaceCreditLimitReached(failure: unknown): boolean;
2463
2548
  /**
2464
2549
  * The error object carrying one of the billing `codes`, wherever the failure
2465
2550
  * keeps it. `UserFacingError` rewrites `err.code` to a category, so the
@@ -2486,11 +2571,19 @@ interface MemberCreditLimitModalProps {
2486
2571
  resetKey?: string;
2487
2572
  /** Credits used this billing cycle; 0 for the default, so no "at least" rule. */
2488
2573
  used: number;
2574
+ /**
2575
+ * The workspace's total credits this cycle: the most the limit can be. Only
2576
+ * for the workspace limit, which then also shows usage against it; omit for
2577
+ * member limits, which have no upper bound.
2578
+ */
2579
+ total?: number;
2489
2580
  /** Limit to pre-select; `null` = Unlimited. */
2490
2581
  initialLimit: number | null;
2491
2582
  /** Whether a stored value exists. When false, saving is always allowed (it creates one). */
2492
2583
  isSet: boolean;
2493
- unit: CreditCycleUnit;
2584
+ unit: CreditLimitUnit;
2585
+ /** Label of the no-limit choice; defaults to "Unlimited usage". */
2586
+ unlimitedLabel?: string;
2494
2587
  /** Persist the limit (`null` = Unlimited). Throw on failure. */
2495
2588
  onSave: (limit: number | null) => Promise<void>;
2496
2589
  /** Persist removal. When omitted, no Remove button. */
@@ -2508,7 +2601,17 @@ interface MemberCreditLimitModalProps {
2508
2601
  onStale?: () => void;
2509
2602
  }
2510
2603
  /** A fixed number of credits per cycle, or unlimited — for one member or the workspace default. */
2511
- declare function MemberCreditLimitModal({ open, title, description, subject, resetKey, used, initialLimit, isSet, unit, onSave, onRemove, removeLabel, removeHint, saveSuccessMessage, removeSuccessMessage, onClose, onSaved, onStale, }: MemberCreditLimitModalProps): react.JSX.Element | null;
2604
+ declare function MemberCreditLimitModal({ open, title, description, subject, resetKey, used, total, initialLimit, isSet, unit, unlimitedLabel, onSave, onRemove, removeLabel, removeHint, saveSuccessMessage, removeSuccessMessage, onClose, onSaved, onStale, }: MemberCreditLimitModalProps): react.JSX.Element | null;
2605
+
2606
+ /**
2607
+ * The cap on what the whole workspace may spend per billing cycle: limit, used
2608
+ * and remaining, and Edit for hosts that can change it. Renders nothing when the
2609
+ * host has no `api.fetchWorkspaceCreditLimit`. Without `unit` (the cycle's
2610
+ * length isn't known) amounts read "credits / cycle".
2611
+ */
2612
+ declare function WorkspaceCreditLimitCard({ unit: cycleUnit }: {
2613
+ unit?: CreditCycleUnit;
2614
+ }): react.JSX.Element | null;
2512
2615
 
2513
2616
  /**
2514
2617
  * Shared credit pool rules and copy, kept out of the components so a host can
@@ -2789,6 +2892,8 @@ interface AdministrationOverviewProps {
2789
2892
  hasWorkspace: boolean;
2790
2893
  hasOrganization: boolean;
2791
2894
  isWorkspaceAdmin: boolean;
2895
+ /** An org admin who isn't a workspace admin: Billing, holding only the workspace credit limit. */
2896
+ showWorkspaceCreditLimitOnly?: boolean;
2792
2897
  showConnectedApps: boolean;
2793
2898
  /** The signed-in user has a referral code to share. */
2794
2899
  showReferral?: boolean;
@@ -2800,7 +2905,7 @@ interface AdministrationOverviewProps {
2800
2905
  onInvitePeople?: () => void;
2801
2906
  }
2802
2907
  /** Scope-first navigation into the existing forms; contains no mutation logic. */
2803
- declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, showLoginMethods, showReferral, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2908
+ declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showWorkspaceCreditLimitOnly, showConnectedApps, showIntegrations, showLoginMethods, showReferral, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2804
2909
 
2805
2910
  /** Shared invitation rule. A result belongs to one authenticated workspace;
2806
2911
  * callers must explicitly mark it ready after that workspace's reads settle. */
@@ -2871,4 +2976,4 @@ interface AppSettingsRowProps {
2871
2976
  }
2872
2977
  declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
2873
2978
 
2874
- 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, ssoLabel, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
2979
+ 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 CreditLimitUnit, 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_CREDIT_LIMIT_REACHED, WORKSPACE_CREDIT_LIMIT_REACHED_MESSAGE, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceCreditLimit, WorkspaceCreditLimitCard, type WorkspaceCreditLimitSummary, 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, aboveTotalReason, belowUsageReason, canManageOnlyWorkspaceCreditLimit, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, describeWorkspaceCreditLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, isLimitAboveTotal, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, isWorkspaceCreditLimitReached, joinMembersWithLimits, lastUsedLabel, limitAboveTotalTotal, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, loginMethodsSwitchState, maximumCreditLimit, 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, ssoLabel, 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
@@ -919,6 +919,22 @@ interface MemberCreditLimitsResponse {
919
919
  /** Only members with an override or with usage; the rest follow the default. */
920
920
  users: MemberCreditLimit[];
921
921
  }
922
+ /**
923
+ * The cap on what the whole workspace may spend per billing cycle, and its
924
+ * usage this cycle. Mirrors billing's `GET /workspace-credit-limit/:id`.
925
+ */
926
+ interface WorkspaceCreditLimit {
927
+ /** `null` = no limit: the workspace may spend all its credits. */
928
+ limit: number | null;
929
+ /** Credits the workspace's own members spent this cycle. */
930
+ used: number;
931
+ /** Used this cycle plus the available balance: the most a limit can be. */
932
+ totalCredits: number;
933
+ /** `limit - used`; `null` when there is no limit. */
934
+ remaining: number | null;
935
+ setBy?: string;
936
+ updatedAt?: string;
937
+ }
922
938
  type CreditPoolMode = "fixed" | "percent";
923
939
  type CreditPoolMemberStatus = "active" | "canceled";
924
940
  /**
@@ -1148,6 +1164,17 @@ interface SettingsApiAdapter {
1148
1164
  /** Set the workspace default per-member limit; `null` means Unlimited.
1149
1165
  * Applies to members without their own override. Throws on error. */
1150
1166
  setDefaultCreditLimit?: (limit: number | null) => Promise<void>;
1167
+ /**
1168
+ * The workspace-wide credit limit for the current billing cycle. Shown on
1169
+ * the per-user limits page, or on Billing itself when the host has no
1170
+ * `fetchMemberCreditLimits`. When omitted, there is no "Workspace credit
1171
+ * limit" card.
1172
+ */
1173
+ fetchWorkspaceCreditLimit?: () => Promise<WorkspaceCreditLimit>;
1174
+ /** Set the workspace limit; `null` = no limit. Rejects with code
1175
+ * `LIMIT_BELOW_USAGE` (under `used`) or `LIMIT_ABOVE_TOTAL` (over
1176
+ * `totalCredits`), each carrying `used`, `limit` and `totalCredits`. */
1177
+ setWorkspaceCreditLimit?: (limit: number | null) => Promise<void>;
1151
1178
  /**
1152
1179
  * Who this workspace shares its credits with, or whose it spends. When
1153
1180
  * omitted, Billing hides the "Shared credits" entry.
@@ -2385,6 +2412,12 @@ interface ExportDateModalProps {
2385
2412
  declare function ExportDateModal({ title, onClose, onExport, busy, busyText, notice, }: ExportDateModalProps): react.JSX.Element;
2386
2413
 
2387
2414
  type CreditCycleUnit = "month" | "year";
2415
+ /**
2416
+ * The unit a limit is shown in: "cycle" when the cycle's length isn't known
2417
+ * (an org admin who isn't a workspace admin can't read the per-user limits,
2418
+ * which carry it).
2419
+ */
2420
+ type CreditLimitUnit = CreditCycleUnit | "cycle";
2388
2421
  type CreditLimitValidation = {
2389
2422
  ok: true;
2390
2423
  value: number;
@@ -2430,8 +2463,15 @@ declare function validateDefaultCreditLimitInput(raw: string): CreditLimitValida
2430
2463
  * 4005.
2431
2464
  */
2432
2465
  declare function cleanCreditLimitInput(value: string): string;
2433
- /** Digits-only input, an integer, and not below what was already used. */
2434
- declare function validateCreditLimitInput(raw: string, used: number): CreditLimitValidation;
2466
+ /** The largest whole-number limit allowed under `total`: what the input can take. */
2467
+ declare function maximumCreditLimit(total: number): number;
2468
+ /**
2469
+ * Digits-only input, an integer, not below what was already used and, when
2470
+ * `total` is given (the workspace limit), not above the workspace's total credits.
2471
+ */
2472
+ declare function validateCreditLimitInput(raw: string, used: number, total?: number): CreditLimitValidation;
2473
+ /** Why a workspace limit was refused for being over its `total` credits, naming the most it can be. */
2474
+ declare function aboveTotalReason(total: number): string;
2435
2475
  /** Why a limit was refused for being under `used`, naming the least it can be. */
2436
2476
  declare function belowUsageReason(used: number): string;
2437
2477
  /** The default limit as text: "500 credits / month", or "Unlimited" (also when unset). */
@@ -2445,6 +2485,38 @@ declare function limitSourceLabel(row: Pick<MemberCreditLimitRow, "source">): "C
2445
2485
  * follow the workspace default (none set = unlimited), with no usage.
2446
2486
  */
2447
2487
  declare function joinMembersWithLimits(members: WorkspaceMember[], response: MemberCreditLimitsResponse | null | undefined): MemberCreditLimitRow[];
2488
+ /** The workspace credit limit as the card shows it. */
2489
+ interface WorkspaceCreditLimitSummary {
2490
+ /** "30,000 credits / month"; with no limit, the total credits. */
2491
+ limitText: string;
2492
+ /** No limit set: the workspace may spend all its credits. */
2493
+ noLimit: boolean;
2494
+ usedText: string;
2495
+ remainingText: string;
2496
+ /** A limit is set and this cycle's usage has reached it: generation is refused. */
2497
+ reached: boolean;
2498
+ }
2499
+ /**
2500
+ * No limit reads as the total credits (and says so); remaining is what is left
2501
+ * under the limit, or of the total when there is none — never below zero.
2502
+ */
2503
+ declare function describeWorkspaceCreditLimit(state: WorkspaceCreditLimit, unit: CreditLimitUnit): WorkspaceCreditLimitSummary;
2504
+ /**
2505
+ * An org admin of the workspace's own organization who is not a workspace
2506
+ * admin: Billing shows them the workspace credit limit and nothing else.
2507
+ * Hosts can fall back to another organization the user belongs to as
2508
+ * `organization.current`, so its id must be the workspace's organization.
2509
+ */
2510
+ declare function canManageOnlyWorkspaceCreditLimit({ isWorkspaceAdmin, organization, workspaceOrganizationId, hasWorkspaceCreditLimit, }: {
2511
+ isWorkspaceAdmin: boolean;
2512
+ organization: {
2513
+ id: string;
2514
+ role?: string;
2515
+ } | null | undefined;
2516
+ workspaceOrganizationId: string | null | undefined;
2517
+ /** The host passed `api.fetchWorkspaceCreditLimit`. */
2518
+ hasWorkspaceCreditLimit: boolean;
2519
+ }): boolean;
2448
2520
 
2449
2521
  /**
2450
2522
  * True when a per-user credit limit was rejected for being under what the
@@ -2460,6 +2532,19 @@ declare function isLimitBelowUsage(failure: unknown): boolean;
2460
2532
  * spent more since. `null` when the failure is not one, or carries no figure.
2461
2533
  */
2462
2534
  declare function limitBelowUsageUsed(failure: unknown): number | null;
2535
+ /** True when a workspace credit limit was rejected for being over the workspace's total credits. */
2536
+ declare function isLimitAboveTotal(failure: unknown): boolean;
2537
+ /**
2538
+ * The workspace's total credits from a `LIMIT_ABOVE_TOTAL` rejection: fresher
2539
+ * than the figure the page loaded with, if credits were spent or bought since.
2540
+ * `null` when the failure is not one, or carries no figure.
2541
+ */
2542
+ declare function limitAboveTotalTotal(failure: unknown): number | null;
2543
+ declare const WORKSPACE_CREDIT_LIMIT_REACHED = "WORKSPACE_CREDIT_LIMIT_REACHED";
2544
+ /** What to tell a member whose generation the workspace credit limit refused. */
2545
+ declare const WORKSPACE_CREDIT_LIMIT_REACHED_MESSAGE = "Your workspace has reached its credit limit for this cycle. Ask an admin to raise it.";
2546
+ /** True when a deduct was refused because the workspace reached its credit limit this cycle. */
2547
+ declare function isWorkspaceCreditLimitReached(failure: unknown): boolean;
2463
2548
  /**
2464
2549
  * The error object carrying one of the billing `codes`, wherever the failure
2465
2550
  * keeps it. `UserFacingError` rewrites `err.code` to a category, so the
@@ -2486,11 +2571,19 @@ interface MemberCreditLimitModalProps {
2486
2571
  resetKey?: string;
2487
2572
  /** Credits used this billing cycle; 0 for the default, so no "at least" rule. */
2488
2573
  used: number;
2574
+ /**
2575
+ * The workspace's total credits this cycle: the most the limit can be. Only
2576
+ * for the workspace limit, which then also shows usage against it; omit for
2577
+ * member limits, which have no upper bound.
2578
+ */
2579
+ total?: number;
2489
2580
  /** Limit to pre-select; `null` = Unlimited. */
2490
2581
  initialLimit: number | null;
2491
2582
  /** Whether a stored value exists. When false, saving is always allowed (it creates one). */
2492
2583
  isSet: boolean;
2493
- unit: CreditCycleUnit;
2584
+ unit: CreditLimitUnit;
2585
+ /** Label of the no-limit choice; defaults to "Unlimited usage". */
2586
+ unlimitedLabel?: string;
2494
2587
  /** Persist the limit (`null` = Unlimited). Throw on failure. */
2495
2588
  onSave: (limit: number | null) => Promise<void>;
2496
2589
  /** Persist removal. When omitted, no Remove button. */
@@ -2508,7 +2601,17 @@ interface MemberCreditLimitModalProps {
2508
2601
  onStale?: () => void;
2509
2602
  }
2510
2603
  /** A fixed number of credits per cycle, or unlimited — for one member or the workspace default. */
2511
- declare function MemberCreditLimitModal({ open, title, description, subject, resetKey, used, initialLimit, isSet, unit, onSave, onRemove, removeLabel, removeHint, saveSuccessMessage, removeSuccessMessage, onClose, onSaved, onStale, }: MemberCreditLimitModalProps): react.JSX.Element | null;
2604
+ declare function MemberCreditLimitModal({ open, title, description, subject, resetKey, used, total, initialLimit, isSet, unit, unlimitedLabel, onSave, onRemove, removeLabel, removeHint, saveSuccessMessage, removeSuccessMessage, onClose, onSaved, onStale, }: MemberCreditLimitModalProps): react.JSX.Element | null;
2605
+
2606
+ /**
2607
+ * The cap on what the whole workspace may spend per billing cycle: limit, used
2608
+ * and remaining, and Edit for hosts that can change it. Renders nothing when the
2609
+ * host has no `api.fetchWorkspaceCreditLimit`. Without `unit` (the cycle's
2610
+ * length isn't known) amounts read "credits / cycle".
2611
+ */
2612
+ declare function WorkspaceCreditLimitCard({ unit: cycleUnit }: {
2613
+ unit?: CreditCycleUnit;
2614
+ }): react.JSX.Element | null;
2512
2615
 
2513
2616
  /**
2514
2617
  * Shared credit pool rules and copy, kept out of the components so a host can
@@ -2789,6 +2892,8 @@ interface AdministrationOverviewProps {
2789
2892
  hasWorkspace: boolean;
2790
2893
  hasOrganization: boolean;
2791
2894
  isWorkspaceAdmin: boolean;
2895
+ /** An org admin who isn't a workspace admin: Billing, holding only the workspace credit limit. */
2896
+ showWorkspaceCreditLimitOnly?: boolean;
2792
2897
  showConnectedApps: boolean;
2793
2898
  /** The signed-in user has a referral code to share. */
2794
2899
  showReferral?: boolean;
@@ -2800,7 +2905,7 @@ interface AdministrationOverviewProps {
2800
2905
  onInvitePeople?: () => void;
2801
2906
  }
2802
2907
  /** Scope-first navigation into the existing forms; contains no mutation logic. */
2803
- declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, showLoginMethods, showReferral, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2908
+ declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showWorkspaceCreditLimitOnly, showConnectedApps, showIntegrations, showLoginMethods, showReferral, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2804
2909
 
2805
2910
  /** Shared invitation rule. A result belongs to one authenticated workspace;
2806
2911
  * callers must explicitly mark it ready after that workspace's reads settle. */
@@ -2871,4 +2976,4 @@ interface AppSettingsRowProps {
2871
2976
  }
2872
2977
  declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
2873
2978
 
2874
- 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, ssoLabel, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
2979
+ 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 CreditLimitUnit, 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_CREDIT_LIMIT_REACHED, WORKSPACE_CREDIT_LIMIT_REACHED_MESSAGE, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceCreditLimit, WorkspaceCreditLimitCard, type WorkspaceCreditLimitSummary, 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, aboveTotalReason, belowUsageReason, canManageOnlyWorkspaceCreditLimit, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, describeWorkspaceCreditLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, isLimitAboveTotal, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, isWorkspaceCreditLimitReached, joinMembersWithLimits, lastUsedLabel, limitAboveTotalTotal, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, loginMethodsSwitchState, maximumCreditLimit, 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, ssoLabel, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };