@streamoid/settings 0.21.0 → 0.22.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 +8 -0
- package/dist/index.d.mts +133 -12
- package/dist/index.d.ts +133 -12
- package/dist/index.js +318 -29
- package/dist/index.mjs +318 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -175,6 +175,14 @@ Billing hides an entry whose adapter method is absent:
|
|
|
175
175
|
A member's balance (`fetchAvailableCredits`) carries `sharedPool`, which
|
|
176
176
|
Billing shows as a banner; usage rows with `meta.usedBy` get a Workspace
|
|
177
177
|
column, named from the pool's `members` and `formerMembers`.
|
|
178
|
+
`setCreditPoolSelfShare` and `removeCreditPoolSelfShare` (mirroring
|
|
179
|
+
`PUT|DELETE /workspace/:id/credit-pool/self`) add a "This workspace" row:
|
|
180
|
+
the share the sponsor keeps for itself. A percent self share counts in the
|
|
181
|
+
same 100% as the members' percent shares (`self`, `allocatedPercent`,
|
|
182
|
+
`unallocatedPercent` on the pool response). Without them the row is hidden,
|
|
183
|
+
unless billing already returns a `self` share, which is then shown read-only.
|
|
184
|
+
A sponsor's balance may carry `sponsorShare: { allowance, used, remaining }`;
|
|
185
|
+
Billing then measures "Credits used" against it and shows what is left of it.
|
|
178
186
|
|
|
179
187
|
## Status
|
|
180
188
|
|
package/dist/index.d.mts
CHANGED
|
@@ -680,9 +680,22 @@ interface SharedPoolBalance {
|
|
|
680
680
|
/** The member's own credits, spent before the pool's. */
|
|
681
681
|
ownCredits?: number;
|
|
682
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* The share a sponsor keeps for itself this cycle (`CreditPoolSelfShare`, as
|
|
685
|
+
* the balance carries it). Present only on a sponsor's balance with a self
|
|
686
|
+
* share: its `availableCredits` are then never more than `remaining`.
|
|
687
|
+
*/
|
|
688
|
+
interface SponsorShareBalance {
|
|
689
|
+
/** What this workspace may spend itself this cycle. */
|
|
690
|
+
allowance: number;
|
|
691
|
+
used: number;
|
|
692
|
+
remaining: number;
|
|
693
|
+
}
|
|
683
694
|
interface AvailableCreditsResponse {
|
|
684
695
|
availableCredits: number;
|
|
685
696
|
sharedPool?: SharedPoolBalance;
|
|
697
|
+
/** A sponsor's own share; optional, older billing omits it. */
|
|
698
|
+
sponsorShare?: SponsorShareBalance;
|
|
686
699
|
}
|
|
687
700
|
interface SubscriptionPlan {
|
|
688
701
|
id: string;
|
|
@@ -976,11 +989,41 @@ interface CreditPoolFormerMember {
|
|
|
976
989
|
memberWorkspaceKey: string;
|
|
977
990
|
memberWorkspaceName: string | null;
|
|
978
991
|
}
|
|
992
|
+
/**
|
|
993
|
+
* The share of its own credits a sponsor keeps for itself each billing cycle.
|
|
994
|
+
* A percent share counts in the same 100% as its members' percent shares; the
|
|
995
|
+
* rest stays unallocated for workspaces it may share with later.
|
|
996
|
+
*/
|
|
997
|
+
interface CreditPoolSelfShare {
|
|
998
|
+
mode: CreditPoolMode;
|
|
999
|
+
/** Credits per cycle for `fixed`; a share of the workspace's plan credits, (0–100], for `percent`. */
|
|
1000
|
+
value: number;
|
|
1001
|
+
/** What this workspace may spend itself this cycle. */
|
|
1002
|
+
allowance: number;
|
|
1003
|
+
used: number;
|
|
1004
|
+
remaining: number;
|
|
1005
|
+
cycle?: {
|
|
1006
|
+
start: string;
|
|
1007
|
+
end: string;
|
|
1008
|
+
};
|
|
1009
|
+
/** When the share stops on its own (ISO); null or absent when it runs until removed. */
|
|
1010
|
+
endsAt?: string | null;
|
|
1011
|
+
note?: string;
|
|
1012
|
+
}
|
|
979
1013
|
interface CreditPoolResponse {
|
|
980
1014
|
/** Workspaces this one shares its credits with (active only), oldest first. */
|
|
981
1015
|
members: CreditPoolMember[];
|
|
982
1016
|
/** When this workspace spends another's credits: that membership. */
|
|
983
1017
|
sponsor: CreditPoolMember | null;
|
|
1018
|
+
/**
|
|
1019
|
+
* The share this workspace keeps for itself, or null when it may spend its
|
|
1020
|
+
* whole balance. Optional: older hosts omit it.
|
|
1021
|
+
*/
|
|
1022
|
+
self?: CreditPoolSelfShare | null;
|
|
1023
|
+
/** This workspace's percent share plus its members' percent shares (0–100). Optional: older hosts omit it. */
|
|
1024
|
+
allocatedPercent?: number;
|
|
1025
|
+
/** `100 - allocatedPercent`. Optional: older hosts omit it. */
|
|
1026
|
+
unallocatedPercent?: number;
|
|
984
1027
|
/**
|
|
985
1028
|
* Workspaces this one stopped sharing with. Its usage history still has
|
|
986
1029
|
* their rows, so they are named there. Optional: older hosts omit it.
|
|
@@ -1004,6 +1047,14 @@ interface UpdateCreditPoolMemberInput {
|
|
|
1004
1047
|
/** A new end date (ISO, in the future), or null to clear it; absent leaves it as it is. */
|
|
1005
1048
|
endsAt?: string | null;
|
|
1006
1049
|
}
|
|
1050
|
+
interface SetCreditPoolSelfShareInput {
|
|
1051
|
+
mode: CreditPoolMode;
|
|
1052
|
+
value: number;
|
|
1053
|
+
/** Why — required, at most 500 characters. */
|
|
1054
|
+
note: string;
|
|
1055
|
+
/** When the share stops on its own (an ISO date in the future); null or absent for never. */
|
|
1056
|
+
endsAt?: string | null;
|
|
1057
|
+
}
|
|
1007
1058
|
/** A workspace credits can be shared with (another workspace of the organization). */
|
|
1008
1059
|
interface CreditPoolCandidate {
|
|
1009
1060
|
id: string;
|
|
@@ -1189,6 +1240,15 @@ interface SettingsApiAdapter {
|
|
|
1189
1240
|
removeCreditPoolMember?: (memberId: string, reason: string) => Promise<CreditPoolMember>;
|
|
1190
1241
|
/** Workspaces this one may share with: its organization's others. */
|
|
1191
1242
|
fetchCreditPoolCandidates?: () => Promise<CreditPoolCandidate[]>;
|
|
1243
|
+
/**
|
|
1244
|
+
* Set or change the share this workspace keeps for itself
|
|
1245
|
+
* (`PUT /workspace/:id/credit-pool/self`). Organization admins only. Rejects
|
|
1246
|
+
* like `addCreditPoolMember`. When omitted, Shared credits has no
|
|
1247
|
+
* "This workspace" controls.
|
|
1248
|
+
*/
|
|
1249
|
+
setCreditPoolSelfShare?: (input: SetCreditPoolSelfShareInput) => Promise<unknown>;
|
|
1250
|
+
/** Remove the self share: this workspace may spend its whole balance again. */
|
|
1251
|
+
removeCreditPoolSelfShare?: () => Promise<unknown>;
|
|
1192
1252
|
fetchTokens: (params?: {
|
|
1193
1253
|
showRevoked?: boolean;
|
|
1194
1254
|
}) => Promise<ApiToken[]>;
|
|
@@ -2648,6 +2708,30 @@ declare function validatePoolText(raw: string, max: number): {
|
|
|
2648
2708
|
ok: false;
|
|
2649
2709
|
reason: string;
|
|
2650
2710
|
};
|
|
2711
|
+
/**
|
|
2712
|
+
* The percent of this workspace's plan credits already given out: its own
|
|
2713
|
+
* percent share plus its members' percent shares. Fixed shares don't count.
|
|
2714
|
+
* `exclude` leaves out the share being edited (a member's `_id`, or `"self"`),
|
|
2715
|
+
* so its new value is checked against the rest.
|
|
2716
|
+
*/
|
|
2717
|
+
declare function poolAllocatedPercent(pool: Pick<CreditPoolResponse, "members" | "self" | "allocatedPercent"> | null | undefined, exclude?: string): number;
|
|
2718
|
+
/** What is left of the 100%: `100 - poolAllocatedPercent`, never below 0. */
|
|
2719
|
+
declare function poolUnallocatedPercent(pool: Pick<CreditPoolResponse, "members" | "self" | "allocatedPercent"> | null | undefined, exclude?: string): number;
|
|
2720
|
+
/**
|
|
2721
|
+
* Whether a percent share fits in what is unallocated: the self share and the
|
|
2722
|
+
* members' percent shares together are at most 100. A fixed share always fits.
|
|
2723
|
+
*/
|
|
2724
|
+
declare function checkPoolPercentTotal(split: {
|
|
2725
|
+
mode: CreditPoolMode;
|
|
2726
|
+
value: number;
|
|
2727
|
+
}, unallocatedPercent: number): {
|
|
2728
|
+
ok: true;
|
|
2729
|
+
} | {
|
|
2730
|
+
ok: false;
|
|
2731
|
+
reason: string;
|
|
2732
|
+
};
|
|
2733
|
+
/** "Allocated 70% · Unallocated 30%". */
|
|
2734
|
+
declare function poolAllocationText(pool: Pick<CreditPoolResponse, "members" | "self" | "allocatedPercent"> | null | undefined): string;
|
|
2651
2735
|
/** `fixed 500` → "500 credits"; `percent 20` → "20%". */
|
|
2652
2736
|
declare function formatPoolSplit(split: {
|
|
2653
2737
|
mode: CreditPoolMode;
|
|
@@ -2704,6 +2788,15 @@ declare function poolRenewsAtCycleEnd(pool: Pick<SharedPoolBalance, "endsAt" | "
|
|
|
2704
2788
|
declare function poolWorkspaceName(name: string | null | undefined): string;
|
|
2705
2789
|
/** The member's Billing banner: "Credits shared by Agency: 80 of 200 left this cycle". */
|
|
2706
2790
|
declare function sharedPoolBannerText(pool: Pick<SharedPoolBalance, "sponsorName" | "allowance" | "remaining">): string;
|
|
2791
|
+
/** The Billing line once a sponsor has spent its own share this cycle. */
|
|
2792
|
+
declare function sponsorShareSpentText(): string;
|
|
2793
|
+
/**
|
|
2794
|
+
* A sponsor's Billing banner for its own share: "This workspace's share:
|
|
2795
|
+
* 20,000 of 30,000 credits left this cycle", or `sponsorShareSpentText` when none is left.
|
|
2796
|
+
*/
|
|
2797
|
+
declare function sponsorShareBannerText(share: Pick<SponsorShareBalance, "allowance" | "remaining">): string;
|
|
2798
|
+
/** The line under the sponsor's banner: why it can't spend all its credits. */
|
|
2799
|
+
declare function sponsorShareDetailText(): string;
|
|
2707
2800
|
/**
|
|
2708
2801
|
* Was the line saying a member's own credits were paused while it used the
|
|
2709
2802
|
* pool's. Billing spends them first, so it now answers `ownCreditsFirstText`
|
|
@@ -2728,12 +2821,14 @@ interface CreditsMeter {
|
|
|
2728
2821
|
* The Billing overview's "Credits used" meter. A workspace spending shared
|
|
2729
2822
|
* credits is measured against its allowance this cycle: its balance is the
|
|
2730
2823
|
* sponsor's, so subtracting it from this workspace's own unexpired credits
|
|
2731
|
-
* says nothing.
|
|
2824
|
+
* says nothing. A sponsor with a self share is measured against that share,
|
|
2825
|
+
* which caps its balance. Otherwise used = own unexpired credits − balance.
|
|
2732
2826
|
*/
|
|
2733
|
-
declare function creditsMeter({ availableCredits, totalCredits, sharedPool, }: {
|
|
2827
|
+
declare function creditsMeter({ availableCredits, totalCredits, sharedPool, sponsorShare, }: {
|
|
2734
2828
|
availableCredits: number | null;
|
|
2735
2829
|
totalCredits: number | null;
|
|
2736
2830
|
sharedPool: Pick<SharedPoolBalance, "allowance" | "used" | "remaining"> | null;
|
|
2831
|
+
sponsorShare?: Pick<SponsorShareBalance, "allowance" | "used" | "remaining"> | null;
|
|
2737
2832
|
}): CreditsMeter;
|
|
2738
2833
|
/**
|
|
2739
2834
|
* The workspace a usage row was spent by, when it is not `currentWorkspaceId`:
|
|
@@ -2843,23 +2938,38 @@ declare function useBillingEntitlement(fetchCurrentPlan: (() => Promise<Subscrip
|
|
|
2843
2938
|
loading: boolean;
|
|
2844
2939
|
};
|
|
2845
2940
|
|
|
2846
|
-
type
|
|
2941
|
+
type PoolModalCommon = {
|
|
2942
|
+
onClose: () => void;
|
|
2943
|
+
/** After a save; the parent refetches. */
|
|
2944
|
+
onSaved: () => void;
|
|
2945
|
+
/**
|
|
2946
|
+
* What is left of the 100% for this share, the share itself left out
|
|
2947
|
+
* (`poolUnallocatedPercent(pool, exclude)`). A percent share over it can't
|
|
2948
|
+
* be saved. Absent skips the check; billing still enforces it.
|
|
2949
|
+
*/
|
|
2950
|
+
unallocatedPercent?: number;
|
|
2951
|
+
};
|
|
2952
|
+
type CreditPoolMemberModalProps = (PoolModalCommon & {
|
|
2847
2953
|
kind: "add";
|
|
2848
2954
|
/** Workspaces credits can be shared with. */
|
|
2849
2955
|
candidates: CreditPoolCandidate[];
|
|
2850
2956
|
onSave: (input: AddCreditPoolMemberInput) => Promise<CreditPoolMember>;
|
|
2851
|
-
|
|
2852
|
-
/** After a save; the parent refetches. */
|
|
2853
|
-
onSaved: () => void;
|
|
2854
|
-
} | {
|
|
2957
|
+
}) | (PoolModalCommon & {
|
|
2855
2958
|
kind: "edit";
|
|
2856
2959
|
member: CreditPoolMember;
|
|
2857
2960
|
memberName: string;
|
|
2858
2961
|
onSave: (patch: UpdateCreditPoolMemberInput) => Promise<CreditPoolMember>;
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2962
|
+
}) | (PoolModalCommon & {
|
|
2963
|
+
/** The share the sponsor keeps for itself: set (`self` null) or change it. */
|
|
2964
|
+
kind: "self";
|
|
2965
|
+
self: CreditPoolSelfShare | null;
|
|
2966
|
+
workspaceName: string;
|
|
2967
|
+
onSave: (input: SetCreditPoolSelfShareInput) => Promise<unknown>;
|
|
2968
|
+
});
|
|
2969
|
+
/**
|
|
2970
|
+
* Share credits with a workspace, change an active member's share, or set the
|
|
2971
|
+
* share the sponsor keeps for itself (`kind: "self"`).
|
|
2972
|
+
*/
|
|
2863
2973
|
declare function CreditPoolMemberModal(props: CreditPoolMemberModalProps): react.JSX.Element;
|
|
2864
2974
|
|
|
2865
2975
|
interface RemovePoolMemberModalProps {
|
|
@@ -2874,6 +2984,17 @@ interface RemovePoolMemberModalProps {
|
|
|
2874
2984
|
}
|
|
2875
2985
|
/** Confirm stopping a member spending this workspace's credits, with a reason. */
|
|
2876
2986
|
declare function RemovePoolMemberModal({ member, memberName, sponsorName, onRemove, onClose, onRemoved, }: RemovePoolMemberModalProps): react.JSX.Element;
|
|
2987
|
+
interface RemoveSelfShareModalProps {
|
|
2988
|
+
self: CreditPoolSelfShare;
|
|
2989
|
+
/** This workspace's name. */
|
|
2990
|
+
workspaceName: string;
|
|
2991
|
+
onRemove: () => Promise<unknown>;
|
|
2992
|
+
onClose: () => void;
|
|
2993
|
+
/** After the share was removed; the parent refetches. */
|
|
2994
|
+
onRemoved: () => void;
|
|
2995
|
+
}
|
|
2996
|
+
/** Confirm removing the share a sponsor keeps for itself: it may spend its whole balance again. */
|
|
2997
|
+
declare function RemoveSelfShareModal({ self, workspaceName, onRemove, onClose, onRemoved, }: RemoveSelfShareModalProps): react.JSX.Element;
|
|
2877
2998
|
|
|
2878
2999
|
declare function SettingsAdaptersProvider({ adapters, children, }: {
|
|
2879
3000
|
adapters: SettingsAdapters;
|
|
@@ -2976,4 +3097,4 @@ interface AppSettingsRowProps {
|
|
|
2976
3097
|
}
|
|
2977
3098
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2978
3099
|
|
|
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 };
|
|
3100
|
+
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 CreditPoolSelfShare, 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, RemoveSelfShareModal, type RemoveSelfShareModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SetCreditPoolSelfShareInput, 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 SponsorShareBalance, 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, checkPoolPercentTotal, 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, poolAllocatedPercent, poolAllocationText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolUnallocatedPercent, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsorShareBannerText, sponsorShareDetailText, sponsorShareSpentText, 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
|
@@ -680,9 +680,22 @@ interface SharedPoolBalance {
|
|
|
680
680
|
/** The member's own credits, spent before the pool's. */
|
|
681
681
|
ownCredits?: number;
|
|
682
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* The share a sponsor keeps for itself this cycle (`CreditPoolSelfShare`, as
|
|
685
|
+
* the balance carries it). Present only on a sponsor's balance with a self
|
|
686
|
+
* share: its `availableCredits` are then never more than `remaining`.
|
|
687
|
+
*/
|
|
688
|
+
interface SponsorShareBalance {
|
|
689
|
+
/** What this workspace may spend itself this cycle. */
|
|
690
|
+
allowance: number;
|
|
691
|
+
used: number;
|
|
692
|
+
remaining: number;
|
|
693
|
+
}
|
|
683
694
|
interface AvailableCreditsResponse {
|
|
684
695
|
availableCredits: number;
|
|
685
696
|
sharedPool?: SharedPoolBalance;
|
|
697
|
+
/** A sponsor's own share; optional, older billing omits it. */
|
|
698
|
+
sponsorShare?: SponsorShareBalance;
|
|
686
699
|
}
|
|
687
700
|
interface SubscriptionPlan {
|
|
688
701
|
id: string;
|
|
@@ -976,11 +989,41 @@ interface CreditPoolFormerMember {
|
|
|
976
989
|
memberWorkspaceKey: string;
|
|
977
990
|
memberWorkspaceName: string | null;
|
|
978
991
|
}
|
|
992
|
+
/**
|
|
993
|
+
* The share of its own credits a sponsor keeps for itself each billing cycle.
|
|
994
|
+
* A percent share counts in the same 100% as its members' percent shares; the
|
|
995
|
+
* rest stays unallocated for workspaces it may share with later.
|
|
996
|
+
*/
|
|
997
|
+
interface CreditPoolSelfShare {
|
|
998
|
+
mode: CreditPoolMode;
|
|
999
|
+
/** Credits per cycle for `fixed`; a share of the workspace's plan credits, (0–100], for `percent`. */
|
|
1000
|
+
value: number;
|
|
1001
|
+
/** What this workspace may spend itself this cycle. */
|
|
1002
|
+
allowance: number;
|
|
1003
|
+
used: number;
|
|
1004
|
+
remaining: number;
|
|
1005
|
+
cycle?: {
|
|
1006
|
+
start: string;
|
|
1007
|
+
end: string;
|
|
1008
|
+
};
|
|
1009
|
+
/** When the share stops on its own (ISO); null or absent when it runs until removed. */
|
|
1010
|
+
endsAt?: string | null;
|
|
1011
|
+
note?: string;
|
|
1012
|
+
}
|
|
979
1013
|
interface CreditPoolResponse {
|
|
980
1014
|
/** Workspaces this one shares its credits with (active only), oldest first. */
|
|
981
1015
|
members: CreditPoolMember[];
|
|
982
1016
|
/** When this workspace spends another's credits: that membership. */
|
|
983
1017
|
sponsor: CreditPoolMember | null;
|
|
1018
|
+
/**
|
|
1019
|
+
* The share this workspace keeps for itself, or null when it may spend its
|
|
1020
|
+
* whole balance. Optional: older hosts omit it.
|
|
1021
|
+
*/
|
|
1022
|
+
self?: CreditPoolSelfShare | null;
|
|
1023
|
+
/** This workspace's percent share plus its members' percent shares (0–100). Optional: older hosts omit it. */
|
|
1024
|
+
allocatedPercent?: number;
|
|
1025
|
+
/** `100 - allocatedPercent`. Optional: older hosts omit it. */
|
|
1026
|
+
unallocatedPercent?: number;
|
|
984
1027
|
/**
|
|
985
1028
|
* Workspaces this one stopped sharing with. Its usage history still has
|
|
986
1029
|
* their rows, so they are named there. Optional: older hosts omit it.
|
|
@@ -1004,6 +1047,14 @@ interface UpdateCreditPoolMemberInput {
|
|
|
1004
1047
|
/** A new end date (ISO, in the future), or null to clear it; absent leaves it as it is. */
|
|
1005
1048
|
endsAt?: string | null;
|
|
1006
1049
|
}
|
|
1050
|
+
interface SetCreditPoolSelfShareInput {
|
|
1051
|
+
mode: CreditPoolMode;
|
|
1052
|
+
value: number;
|
|
1053
|
+
/** Why — required, at most 500 characters. */
|
|
1054
|
+
note: string;
|
|
1055
|
+
/** When the share stops on its own (an ISO date in the future); null or absent for never. */
|
|
1056
|
+
endsAt?: string | null;
|
|
1057
|
+
}
|
|
1007
1058
|
/** A workspace credits can be shared with (another workspace of the organization). */
|
|
1008
1059
|
interface CreditPoolCandidate {
|
|
1009
1060
|
id: string;
|
|
@@ -1189,6 +1240,15 @@ interface SettingsApiAdapter {
|
|
|
1189
1240
|
removeCreditPoolMember?: (memberId: string, reason: string) => Promise<CreditPoolMember>;
|
|
1190
1241
|
/** Workspaces this one may share with: its organization's others. */
|
|
1191
1242
|
fetchCreditPoolCandidates?: () => Promise<CreditPoolCandidate[]>;
|
|
1243
|
+
/**
|
|
1244
|
+
* Set or change the share this workspace keeps for itself
|
|
1245
|
+
* (`PUT /workspace/:id/credit-pool/self`). Organization admins only. Rejects
|
|
1246
|
+
* like `addCreditPoolMember`. When omitted, Shared credits has no
|
|
1247
|
+
* "This workspace" controls.
|
|
1248
|
+
*/
|
|
1249
|
+
setCreditPoolSelfShare?: (input: SetCreditPoolSelfShareInput) => Promise<unknown>;
|
|
1250
|
+
/** Remove the self share: this workspace may spend its whole balance again. */
|
|
1251
|
+
removeCreditPoolSelfShare?: () => Promise<unknown>;
|
|
1192
1252
|
fetchTokens: (params?: {
|
|
1193
1253
|
showRevoked?: boolean;
|
|
1194
1254
|
}) => Promise<ApiToken[]>;
|
|
@@ -2648,6 +2708,30 @@ declare function validatePoolText(raw: string, max: number): {
|
|
|
2648
2708
|
ok: false;
|
|
2649
2709
|
reason: string;
|
|
2650
2710
|
};
|
|
2711
|
+
/**
|
|
2712
|
+
* The percent of this workspace's plan credits already given out: its own
|
|
2713
|
+
* percent share plus its members' percent shares. Fixed shares don't count.
|
|
2714
|
+
* `exclude` leaves out the share being edited (a member's `_id`, or `"self"`),
|
|
2715
|
+
* so its new value is checked against the rest.
|
|
2716
|
+
*/
|
|
2717
|
+
declare function poolAllocatedPercent(pool: Pick<CreditPoolResponse, "members" | "self" | "allocatedPercent"> | null | undefined, exclude?: string): number;
|
|
2718
|
+
/** What is left of the 100%: `100 - poolAllocatedPercent`, never below 0. */
|
|
2719
|
+
declare function poolUnallocatedPercent(pool: Pick<CreditPoolResponse, "members" | "self" | "allocatedPercent"> | null | undefined, exclude?: string): number;
|
|
2720
|
+
/**
|
|
2721
|
+
* Whether a percent share fits in what is unallocated: the self share and the
|
|
2722
|
+
* members' percent shares together are at most 100. A fixed share always fits.
|
|
2723
|
+
*/
|
|
2724
|
+
declare function checkPoolPercentTotal(split: {
|
|
2725
|
+
mode: CreditPoolMode;
|
|
2726
|
+
value: number;
|
|
2727
|
+
}, unallocatedPercent: number): {
|
|
2728
|
+
ok: true;
|
|
2729
|
+
} | {
|
|
2730
|
+
ok: false;
|
|
2731
|
+
reason: string;
|
|
2732
|
+
};
|
|
2733
|
+
/** "Allocated 70% · Unallocated 30%". */
|
|
2734
|
+
declare function poolAllocationText(pool: Pick<CreditPoolResponse, "members" | "self" | "allocatedPercent"> | null | undefined): string;
|
|
2651
2735
|
/** `fixed 500` → "500 credits"; `percent 20` → "20%". */
|
|
2652
2736
|
declare function formatPoolSplit(split: {
|
|
2653
2737
|
mode: CreditPoolMode;
|
|
@@ -2704,6 +2788,15 @@ declare function poolRenewsAtCycleEnd(pool: Pick<SharedPoolBalance, "endsAt" | "
|
|
|
2704
2788
|
declare function poolWorkspaceName(name: string | null | undefined): string;
|
|
2705
2789
|
/** The member's Billing banner: "Credits shared by Agency: 80 of 200 left this cycle". */
|
|
2706
2790
|
declare function sharedPoolBannerText(pool: Pick<SharedPoolBalance, "sponsorName" | "allowance" | "remaining">): string;
|
|
2791
|
+
/** The Billing line once a sponsor has spent its own share this cycle. */
|
|
2792
|
+
declare function sponsorShareSpentText(): string;
|
|
2793
|
+
/**
|
|
2794
|
+
* A sponsor's Billing banner for its own share: "This workspace's share:
|
|
2795
|
+
* 20,000 of 30,000 credits left this cycle", or `sponsorShareSpentText` when none is left.
|
|
2796
|
+
*/
|
|
2797
|
+
declare function sponsorShareBannerText(share: Pick<SponsorShareBalance, "allowance" | "remaining">): string;
|
|
2798
|
+
/** The line under the sponsor's banner: why it can't spend all its credits. */
|
|
2799
|
+
declare function sponsorShareDetailText(): string;
|
|
2707
2800
|
/**
|
|
2708
2801
|
* Was the line saying a member's own credits were paused while it used the
|
|
2709
2802
|
* pool's. Billing spends them first, so it now answers `ownCreditsFirstText`
|
|
@@ -2728,12 +2821,14 @@ interface CreditsMeter {
|
|
|
2728
2821
|
* The Billing overview's "Credits used" meter. A workspace spending shared
|
|
2729
2822
|
* credits is measured against its allowance this cycle: its balance is the
|
|
2730
2823
|
* sponsor's, so subtracting it from this workspace's own unexpired credits
|
|
2731
|
-
* says nothing.
|
|
2824
|
+
* says nothing. A sponsor with a self share is measured against that share,
|
|
2825
|
+
* which caps its balance. Otherwise used = own unexpired credits − balance.
|
|
2732
2826
|
*/
|
|
2733
|
-
declare function creditsMeter({ availableCredits, totalCredits, sharedPool, }: {
|
|
2827
|
+
declare function creditsMeter({ availableCredits, totalCredits, sharedPool, sponsorShare, }: {
|
|
2734
2828
|
availableCredits: number | null;
|
|
2735
2829
|
totalCredits: number | null;
|
|
2736
2830
|
sharedPool: Pick<SharedPoolBalance, "allowance" | "used" | "remaining"> | null;
|
|
2831
|
+
sponsorShare?: Pick<SponsorShareBalance, "allowance" | "used" | "remaining"> | null;
|
|
2737
2832
|
}): CreditsMeter;
|
|
2738
2833
|
/**
|
|
2739
2834
|
* The workspace a usage row was spent by, when it is not `currentWorkspaceId`:
|
|
@@ -2843,23 +2938,38 @@ declare function useBillingEntitlement(fetchCurrentPlan: (() => Promise<Subscrip
|
|
|
2843
2938
|
loading: boolean;
|
|
2844
2939
|
};
|
|
2845
2940
|
|
|
2846
|
-
type
|
|
2941
|
+
type PoolModalCommon = {
|
|
2942
|
+
onClose: () => void;
|
|
2943
|
+
/** After a save; the parent refetches. */
|
|
2944
|
+
onSaved: () => void;
|
|
2945
|
+
/**
|
|
2946
|
+
* What is left of the 100% for this share, the share itself left out
|
|
2947
|
+
* (`poolUnallocatedPercent(pool, exclude)`). A percent share over it can't
|
|
2948
|
+
* be saved. Absent skips the check; billing still enforces it.
|
|
2949
|
+
*/
|
|
2950
|
+
unallocatedPercent?: number;
|
|
2951
|
+
};
|
|
2952
|
+
type CreditPoolMemberModalProps = (PoolModalCommon & {
|
|
2847
2953
|
kind: "add";
|
|
2848
2954
|
/** Workspaces credits can be shared with. */
|
|
2849
2955
|
candidates: CreditPoolCandidate[];
|
|
2850
2956
|
onSave: (input: AddCreditPoolMemberInput) => Promise<CreditPoolMember>;
|
|
2851
|
-
|
|
2852
|
-
/** After a save; the parent refetches. */
|
|
2853
|
-
onSaved: () => void;
|
|
2854
|
-
} | {
|
|
2957
|
+
}) | (PoolModalCommon & {
|
|
2855
2958
|
kind: "edit";
|
|
2856
2959
|
member: CreditPoolMember;
|
|
2857
2960
|
memberName: string;
|
|
2858
2961
|
onSave: (patch: UpdateCreditPoolMemberInput) => Promise<CreditPoolMember>;
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2962
|
+
}) | (PoolModalCommon & {
|
|
2963
|
+
/** The share the sponsor keeps for itself: set (`self` null) or change it. */
|
|
2964
|
+
kind: "self";
|
|
2965
|
+
self: CreditPoolSelfShare | null;
|
|
2966
|
+
workspaceName: string;
|
|
2967
|
+
onSave: (input: SetCreditPoolSelfShareInput) => Promise<unknown>;
|
|
2968
|
+
});
|
|
2969
|
+
/**
|
|
2970
|
+
* Share credits with a workspace, change an active member's share, or set the
|
|
2971
|
+
* share the sponsor keeps for itself (`kind: "self"`).
|
|
2972
|
+
*/
|
|
2863
2973
|
declare function CreditPoolMemberModal(props: CreditPoolMemberModalProps): react.JSX.Element;
|
|
2864
2974
|
|
|
2865
2975
|
interface RemovePoolMemberModalProps {
|
|
@@ -2874,6 +2984,17 @@ interface RemovePoolMemberModalProps {
|
|
|
2874
2984
|
}
|
|
2875
2985
|
/** Confirm stopping a member spending this workspace's credits, with a reason. */
|
|
2876
2986
|
declare function RemovePoolMemberModal({ member, memberName, sponsorName, onRemove, onClose, onRemoved, }: RemovePoolMemberModalProps): react.JSX.Element;
|
|
2987
|
+
interface RemoveSelfShareModalProps {
|
|
2988
|
+
self: CreditPoolSelfShare;
|
|
2989
|
+
/** This workspace's name. */
|
|
2990
|
+
workspaceName: string;
|
|
2991
|
+
onRemove: () => Promise<unknown>;
|
|
2992
|
+
onClose: () => void;
|
|
2993
|
+
/** After the share was removed; the parent refetches. */
|
|
2994
|
+
onRemoved: () => void;
|
|
2995
|
+
}
|
|
2996
|
+
/** Confirm removing the share a sponsor keeps for itself: it may spend its whole balance again. */
|
|
2997
|
+
declare function RemoveSelfShareModal({ self, workspaceName, onRemove, onClose, onRemoved, }: RemoveSelfShareModalProps): react.JSX.Element;
|
|
2877
2998
|
|
|
2878
2999
|
declare function SettingsAdaptersProvider({ adapters, children, }: {
|
|
2879
3000
|
adapters: SettingsAdapters;
|
|
@@ -2976,4 +3097,4 @@ interface AppSettingsRowProps {
|
|
|
2976
3097
|
}
|
|
2977
3098
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2978
3099
|
|
|
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 };
|
|
3100
|
+
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 CreditPoolSelfShare, 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, RemoveSelfShareModal, type RemoveSelfShareModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SetCreditPoolSelfShareInput, 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 SponsorShareBalance, 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, checkPoolPercentTotal, 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, poolAllocatedPercent, poolAllocationText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolUnallocatedPercent, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsorShareBannerText, sponsorShareDetailText, sponsorShareSpentText, sponsoredCreditsText, ssoLabel, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|