@streamoid/settings 0.12.4 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +164 -8
- package/dist/index.d.ts +164 -8
- package/dist/index.js +392 -69
- package/dist/index.mjs +390 -67
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -673,7 +673,9 @@ interface SharedPoolBalance {
|
|
|
673
673
|
remaining: number;
|
|
674
674
|
/** When the sponsor's billing cycle ends and the allowance starts again. */
|
|
675
675
|
cycleEnd: string;
|
|
676
|
-
/**
|
|
676
|
+
/** When the share stops on its own (ISO); null or absent when it runs until removed. */
|
|
677
|
+
endsAt?: string | null;
|
|
678
|
+
/** The member's own credits, spent before the pool's. */
|
|
677
679
|
ownCredits?: number;
|
|
678
680
|
}
|
|
679
681
|
interface AvailableCreditsResponse {
|
|
@@ -703,8 +705,28 @@ interface BillingSubscription {
|
|
|
703
705
|
/** Stripe product id; used to look up the matching product in fetched plans. */
|
|
704
706
|
stripeProductId?: string;
|
|
705
707
|
}
|
|
708
|
+
/**
|
|
709
|
+
* Whether the workspace gets paid features, and why: `plan` (its own paid
|
|
710
|
+
* plan) or `pool` (it spends a sponsor's shared credits, on its free plan).
|
|
711
|
+
* The plan and billing actions are unchanged by it; see `./entitlement`.
|
|
712
|
+
*/
|
|
713
|
+
interface BillingEntitlement {
|
|
714
|
+
paid: boolean;
|
|
715
|
+
source: "plan" | "pool" | null;
|
|
716
|
+
/** The sponsor's workspace id, for `pool`. */
|
|
717
|
+
sponsorWorkspaceId?: string;
|
|
718
|
+
sponsorName?: string;
|
|
719
|
+
/** When the sharing ends (ISO); null or absent when it runs until removed. */
|
|
720
|
+
endsAt?: string | null;
|
|
721
|
+
}
|
|
706
722
|
interface SubscriptionResponse {
|
|
707
723
|
data: BillingSubscription | null;
|
|
724
|
+
/**
|
|
725
|
+
* Billing's top-level `entitlement` (beside `data`), passed through.
|
|
726
|
+
* Absent on servers from before it, and from hosts that drop it: then the
|
|
727
|
+
* plan alone decides, as before.
|
|
728
|
+
*/
|
|
729
|
+
entitlement?: BillingEntitlement | null;
|
|
708
730
|
}
|
|
709
731
|
interface PriceMetadata {
|
|
710
732
|
name: string;
|
|
@@ -894,6 +916,8 @@ interface CreditPoolMember {
|
|
|
894
916
|
end: string;
|
|
895
917
|
base: number;
|
|
896
918
|
};
|
|
919
|
+
/** When the share stops on its own (ISO); null or absent when it runs until removed. */
|
|
920
|
+
endsAt?: string | null;
|
|
897
921
|
note?: string;
|
|
898
922
|
requestedBy?: string;
|
|
899
923
|
createdBy?: string;
|
|
@@ -926,10 +950,14 @@ interface AddCreditPoolMemberInput {
|
|
|
926
950
|
value: number;
|
|
927
951
|
/** Why — required, at most 500 characters. */
|
|
928
952
|
note: string;
|
|
953
|
+
/** When the share stops on its own (an ISO date in the future); null or absent for never. */
|
|
954
|
+
endsAt?: string | null;
|
|
929
955
|
}
|
|
930
956
|
interface UpdateCreditPoolMemberInput {
|
|
931
957
|
mode: CreditPoolMode;
|
|
932
958
|
value: number;
|
|
959
|
+
/** A new end date (ISO, in the future), or null to clear it; absent leaves it as it is. */
|
|
960
|
+
endsAt?: string | null;
|
|
933
961
|
}
|
|
934
962
|
/** A workspace credits can be shared with (another workspace of the organization). */
|
|
935
963
|
interface CreditPoolCandidate {
|
|
@@ -957,7 +985,10 @@ interface SettingsApiAdapter {
|
|
|
957
985
|
fetchPlans: () => Promise<ProductsResponse>;
|
|
958
986
|
/**
|
|
959
987
|
* Current active subscription. Returns `{ data: null }` when the workspace
|
|
960
|
-
* has no plan yet (free tier).
|
|
988
|
+
* has no plan yet (free tier). Pass billing's top-level `entitlement`
|
|
989
|
+
* through as `entitlement`. For billing's 404 (no subscription) that carries
|
|
990
|
+
* one, resolve `{ data: null, entitlement }`, or throw an error that keeps
|
|
991
|
+
* the response body (`body`, `data` or `response.data`).
|
|
961
992
|
*/
|
|
962
993
|
fetchCurrentPlan: () => Promise<SubscriptionResponse>;
|
|
963
994
|
/** Available credit balance for the active workspace. */
|
|
@@ -1416,7 +1447,7 @@ type IconProps = Omit<SVGProps<SVGSVGElement>, 'color' | 'strokeWidth' | 'width'
|
|
|
1416
1447
|
};
|
|
1417
1448
|
declare const SiconKey: ({ color, strokeWidth, size, ...props }: IconProps) => react.JSX.Element;
|
|
1418
1449
|
|
|
1419
|
-
declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlansChange, showPerUserLimits: showPerUserLimitsProp, onShowPerUserLimitsChange, showSharedCredits: showSharedCreditsProp, onShowSharedCreditsChange, }?: {
|
|
1450
|
+
declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlansChange, showPerUserLimits: showPerUserLimitsProp, onShowPerUserLimitsChange, showSharedCredits: showSharedCreditsProp, onShowSharedCreditsChange, onEntitlementChange, }?: {
|
|
1420
1451
|
embedded?: boolean;
|
|
1421
1452
|
/** Controlled "plans" sub-view flag. When provided, the host (settings
|
|
1422
1453
|
* wrapper) owns it so it can hide the sub-nav + show the Plans breadcrumb. */
|
|
@@ -1431,6 +1462,14 @@ declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlan
|
|
|
1431
1462
|
* workspace is in an organization. */
|
|
1432
1463
|
showSharedCredits?: boolean;
|
|
1433
1464
|
onShowSharedCreditsChange?: (open: boolean) => void;
|
|
1465
|
+
/** Called once the current plan has loaded, and again when it changes:
|
|
1466
|
+
* billing's `entitlement` (null from servers without it) and whether the
|
|
1467
|
+
* workspace gets paid features. A workspace spending a sponsor's shared
|
|
1468
|
+
* credits is `paid` on its free plan; gate features on this, not the plan. */
|
|
1469
|
+
onEntitlementChange?: (state: {
|
|
1470
|
+
entitlement: BillingEntitlement | null;
|
|
1471
|
+
paid: boolean;
|
|
1472
|
+
}) => void;
|
|
1434
1473
|
}): react__default.JSX.Element;
|
|
1435
1474
|
|
|
1436
1475
|
/**
|
|
@@ -2082,18 +2121,63 @@ declare function formatPoolSplit(split: {
|
|
|
2082
2121
|
}): string;
|
|
2083
2122
|
/** "20% · 200 credits this cycle", or "200 credits this cycle" for a fixed share. */
|
|
2084
2123
|
declare function describeAllowance(member: Pick<CreditPoolMember, "mode" | "value" | "allowance">): string;
|
|
2124
|
+
/**
|
|
2125
|
+
* When a share stops on its own, as the Ends field picks it. `never` is
|
|
2126
|
+
* today's behaviour: the share renews every cycle until it is removed.
|
|
2127
|
+
*/
|
|
2128
|
+
type PoolExpiryChoice = {
|
|
2129
|
+
kind: "never";
|
|
2130
|
+
} | {
|
|
2131
|
+
kind: "month";
|
|
2132
|
+
} | {
|
|
2133
|
+
kind: "months";
|
|
2134
|
+
months: number;
|
|
2135
|
+
} | {
|
|
2136
|
+
kind: "year";
|
|
2137
|
+
}
|
|
2138
|
+
/** A local calendar day, `YYYY-MM-DD` (what `<input type="date">` gives). */
|
|
2139
|
+
| {
|
|
2140
|
+
kind: "date";
|
|
2141
|
+
date: string;
|
|
2142
|
+
};
|
|
2143
|
+
declare const POOL_EXPIRY_MAX_MONTHS = 120;
|
|
2144
|
+
/** A local calendar day as `YYYY-MM-DD`. */
|
|
2145
|
+
declare function toLocalDateInput(date: Date): string;
|
|
2146
|
+
/** The earliest day the date picker allows: tomorrow, in local time. */
|
|
2147
|
+
declare function minPoolEndDate(now?: Date): string;
|
|
2148
|
+
type PoolEndsAtResult = {
|
|
2149
|
+
ok: true;
|
|
2150
|
+
value: string | null;
|
|
2151
|
+
} | {
|
|
2152
|
+
ok: false;
|
|
2153
|
+
reason: string;
|
|
2154
|
+
};
|
|
2155
|
+
/**
|
|
2156
|
+
* The `endsAt` to send for a choice, as an ISO string, or `null` for Never.
|
|
2157
|
+
* Months and a year count from `now`; a date is the start of that day in the
|
|
2158
|
+
* admin's local time and must be after today.
|
|
2159
|
+
*/
|
|
2160
|
+
declare function poolEndsAtFrom(choice: PoolExpiryChoice, now?: Date): PoolEndsAtResult;
|
|
2161
|
+
/** The Ends field's starting choice for a share: Never, or its end date's day. */
|
|
2162
|
+
declare function expiryChoiceFor(member: Pick<CreditPoolMember, "endsAt"> | null | undefined): PoolExpiryChoice;
|
|
2163
|
+
/** When a share ends: "Mar 1, 2027", or "Never" when it runs until removed. */
|
|
2164
|
+
declare function formatPoolEndsAt(endsAt: string | null | undefined): string;
|
|
2165
|
+
/** The member banner's line on when sharing stops: "Sharing ends on Mar 1, 2027." or "Sharing ends: Never." */
|
|
2166
|
+
declare function sharedPoolEndsText(pool: Pick<SharedPoolBalance, "endsAt">): string;
|
|
2167
|
+
/** Whether the allowance starts again at `cycleEnd`: not when the share has ended by then. */
|
|
2168
|
+
declare function poolRenewsAtCycleEnd(pool: Pick<SharedPoolBalance, "endsAt" | "cycleEnd">): boolean;
|
|
2085
2169
|
/** The other workspace's name, or a stand-in when it could not be resolved. */
|
|
2086
2170
|
declare function poolWorkspaceName(name: string | null | undefined): string;
|
|
2087
2171
|
/** The member's Billing banner: "Credits shared by Agency: 80 of 200 left this cycle". */
|
|
2088
2172
|
declare function sharedPoolBannerText(pool: Pick<SharedPoolBalance, "sponsorName" | "allowance" | "remaining">): string;
|
|
2089
2173
|
/**
|
|
2090
|
-
*
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2174
|
+
* Was the line saying a member's own credits were paused while it used the
|
|
2175
|
+
* pool's. Billing spends them first, so it now answers `ownCreditsFirstText`
|
|
2176
|
+
* for hosts that still call it.
|
|
2093
2177
|
*
|
|
2094
2178
|
* @deprecated Use `ownCreditsFirstText`.
|
|
2095
2179
|
*/
|
|
2096
|
-
declare function pausedOwnCreditsText(
|
|
2180
|
+
declare function pausedOwnCreditsText(_pool?: Pick<SharedPoolBalance, "ownCredits">): string;
|
|
2097
2181
|
/** The line under the member's banner: whose credits a job spends, in order. */
|
|
2098
2182
|
declare function ownCreditsFirstText(): string;
|
|
2099
2183
|
interface CreditsMeter {
|
|
@@ -2151,6 +2235,78 @@ declare function poolErrorMessage(failure: unknown): string | null;
|
|
|
2151
2235
|
*/
|
|
2152
2236
|
declare function SharedCreditsView(): react.JSX.Element;
|
|
2153
2237
|
|
|
2238
|
+
/**
|
|
2239
|
+
* Whether a workspace gets paid features, and why. Billing reports it at the
|
|
2240
|
+
* top level of the current-subscription answer, beside `data` (200:
|
|
2241
|
+
* `{ success, data, entitlement }`; 404: `{ error, entitlement }`), and
|
|
2242
|
+
* leaves the plan as it is: a workspace spending another's shared credits (a
|
|
2243
|
+
* "sponsored" workspace) still shows the free plan, with
|
|
2244
|
+
* `entitlement.source: 'pool'`.
|
|
2245
|
+
*
|
|
2246
|
+
* So the plan — and every billing action: Upgrade, Cancel downgrade, Buy
|
|
2247
|
+
* credits — stays decided by the plan's amount, and only features are gated
|
|
2248
|
+
* on `entitlement.paid`. Billing servers from before entitlement send none;
|
|
2249
|
+
* then a workspace is paid exactly when its plan is, as before.
|
|
2250
|
+
*/
|
|
2251
|
+
/** `entitlement` as billing sends it, or null when it is absent or malformed. */
|
|
2252
|
+
declare function parseBillingEntitlement(value: unknown): BillingEntitlement | null;
|
|
2253
|
+
/**
|
|
2254
|
+
* The `entitlement` of a current-subscription answer: `body.entitlement`,
|
|
2255
|
+
* never `body.data.entitlement` (`data` is the subscription).
|
|
2256
|
+
*/
|
|
2257
|
+
declare function entitlementFromBody(body: unknown): BillingEntitlement | null;
|
|
2258
|
+
/**
|
|
2259
|
+
* The entitlement a failed read carries: billing's 404 for a workspace with
|
|
2260
|
+
* no subscription of its own still says whether a pool entitles it. The body
|
|
2261
|
+
* is looked for where hosts keep it — the failure itself, `body`, `data`
|
|
2262
|
+
* (`UserFacingError`), `response.data` (axios) and `cause` — to a shallow
|
|
2263
|
+
* depth. Null when there is none.
|
|
2264
|
+
*/
|
|
2265
|
+
declare function entitlementFromFailure(failure: unknown): BillingEntitlement | null;
|
|
2266
|
+
/** Paid by the workspace's own plan: what Buy credits and the plan actions go by. */
|
|
2267
|
+
declare function isPaidPlan(subscription: Pick<BillingSubscription, "plan"> | null | undefined): boolean;
|
|
2268
|
+
/**
|
|
2269
|
+
* Whether the workspace gets paid features: `entitlement.paid` when billing
|
|
2270
|
+
* sent one, else its own plan being paid (servers from before entitlement).
|
|
2271
|
+
*/
|
|
2272
|
+
declare function hasPaidFeatures({ entitlement, subscription, }: {
|
|
2273
|
+
entitlement: BillingEntitlement | null | undefined;
|
|
2274
|
+
subscription: Pick<BillingSubscription, "plan"> | null | undefined;
|
|
2275
|
+
}): boolean;
|
|
2276
|
+
/** A workspace spending another's shared credits, by its entitlement. */
|
|
2277
|
+
declare function isSponsoredEntitlement(entitlement: BillingEntitlement | null | undefined): entitlement is BillingEntitlement & {
|
|
2278
|
+
source: "pool";
|
|
2279
|
+
};
|
|
2280
|
+
/** "Credits shared by Agency." plus " Sharing ends on Mar 1, 2027." when it ends on its own. */
|
|
2281
|
+
declare function sponsoredCreditsText(entitlement: Pick<BillingEntitlement, "sponsorName" | "endsAt">): string;
|
|
2282
|
+
interface CurrentPlanState {
|
|
2283
|
+
/** The workspace's own subscription; null without one. */
|
|
2284
|
+
subscription: BillingSubscription | null;
|
|
2285
|
+
/** Null when billing sent none (servers from before entitlement). */
|
|
2286
|
+
entitlement: BillingEntitlement | null;
|
|
2287
|
+
/** Gate features on this; see `hasPaidFeatures`. */
|
|
2288
|
+
paid: boolean;
|
|
2289
|
+
}
|
|
2290
|
+
/**
|
|
2291
|
+
* Read the current plan and its entitlement through the host's
|
|
2292
|
+
* `fetchCurrentPlan`. A failure that carries an entitlement — billing's 404
|
|
2293
|
+
* for a sponsored workspace with no subscription of its own — is not an
|
|
2294
|
+
* error: it answers no subscription with that entitlement. Any other failure
|
|
2295
|
+
* is thrown, as before.
|
|
2296
|
+
*/
|
|
2297
|
+
declare function loadCurrentPlan(fetchCurrentPlan: () => Promise<SubscriptionResponse>): Promise<CurrentPlanState>;
|
|
2298
|
+
|
|
2299
|
+
/**
|
|
2300
|
+
* `loadCurrentPlan` as a hook, for a host gating features on `paid`. Reloads
|
|
2301
|
+
* when `key` (e.g. the workspace id) changes; `fetchCurrentPlan` may be a new
|
|
2302
|
+
* function every render. `state` is null while loading, after a failure, and
|
|
2303
|
+
* while `key` is null.
|
|
2304
|
+
*/
|
|
2305
|
+
declare function useBillingEntitlement(fetchCurrentPlan: (() => Promise<SubscriptionResponse>) | null | undefined, key: string | null | undefined): {
|
|
2306
|
+
state: CurrentPlanState | null;
|
|
2307
|
+
loading: boolean;
|
|
2308
|
+
};
|
|
2309
|
+
|
|
2154
2310
|
type CreditPoolMemberModalProps = {
|
|
2155
2311
|
kind: "add";
|
|
2156
2312
|
/** Workspaces credits can be shared with. */
|
|
@@ -2278,4 +2434,4 @@ interface AppSettingsRowProps {
|
|
|
2278
2434
|
}
|
|
2279
2435
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2280
2436
|
|
|
2281
|
-
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, BillingContent, 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 CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolErrorCode, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralTab, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, 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, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolSplit, groupWorkspaceList, isLimitBelowUsage, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadWorkspaceOrganization, memberRoleUpdate, minimumCreditLimit, ownCreditsFirstText, pausedOwnCreditsText, poolErrorMessage, poolWorkspaceName, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
|
2437
|
+
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, 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, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralTab, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, 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, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, pausedOwnCreditsText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolWorkspaceName, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sponsoredCreditsText, toLocalDateInput, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -673,7 +673,9 @@ interface SharedPoolBalance {
|
|
|
673
673
|
remaining: number;
|
|
674
674
|
/** When the sponsor's billing cycle ends and the allowance starts again. */
|
|
675
675
|
cycleEnd: string;
|
|
676
|
-
/**
|
|
676
|
+
/** When the share stops on its own (ISO); null or absent when it runs until removed. */
|
|
677
|
+
endsAt?: string | null;
|
|
678
|
+
/** The member's own credits, spent before the pool's. */
|
|
677
679
|
ownCredits?: number;
|
|
678
680
|
}
|
|
679
681
|
interface AvailableCreditsResponse {
|
|
@@ -703,8 +705,28 @@ interface BillingSubscription {
|
|
|
703
705
|
/** Stripe product id; used to look up the matching product in fetched plans. */
|
|
704
706
|
stripeProductId?: string;
|
|
705
707
|
}
|
|
708
|
+
/**
|
|
709
|
+
* Whether the workspace gets paid features, and why: `plan` (its own paid
|
|
710
|
+
* plan) or `pool` (it spends a sponsor's shared credits, on its free plan).
|
|
711
|
+
* The plan and billing actions are unchanged by it; see `./entitlement`.
|
|
712
|
+
*/
|
|
713
|
+
interface BillingEntitlement {
|
|
714
|
+
paid: boolean;
|
|
715
|
+
source: "plan" | "pool" | null;
|
|
716
|
+
/** The sponsor's workspace id, for `pool`. */
|
|
717
|
+
sponsorWorkspaceId?: string;
|
|
718
|
+
sponsorName?: string;
|
|
719
|
+
/** When the sharing ends (ISO); null or absent when it runs until removed. */
|
|
720
|
+
endsAt?: string | null;
|
|
721
|
+
}
|
|
706
722
|
interface SubscriptionResponse {
|
|
707
723
|
data: BillingSubscription | null;
|
|
724
|
+
/**
|
|
725
|
+
* Billing's top-level `entitlement` (beside `data`), passed through.
|
|
726
|
+
* Absent on servers from before it, and from hosts that drop it: then the
|
|
727
|
+
* plan alone decides, as before.
|
|
728
|
+
*/
|
|
729
|
+
entitlement?: BillingEntitlement | null;
|
|
708
730
|
}
|
|
709
731
|
interface PriceMetadata {
|
|
710
732
|
name: string;
|
|
@@ -894,6 +916,8 @@ interface CreditPoolMember {
|
|
|
894
916
|
end: string;
|
|
895
917
|
base: number;
|
|
896
918
|
};
|
|
919
|
+
/** When the share stops on its own (ISO); null or absent when it runs until removed. */
|
|
920
|
+
endsAt?: string | null;
|
|
897
921
|
note?: string;
|
|
898
922
|
requestedBy?: string;
|
|
899
923
|
createdBy?: string;
|
|
@@ -926,10 +950,14 @@ interface AddCreditPoolMemberInput {
|
|
|
926
950
|
value: number;
|
|
927
951
|
/** Why — required, at most 500 characters. */
|
|
928
952
|
note: string;
|
|
953
|
+
/** When the share stops on its own (an ISO date in the future); null or absent for never. */
|
|
954
|
+
endsAt?: string | null;
|
|
929
955
|
}
|
|
930
956
|
interface UpdateCreditPoolMemberInput {
|
|
931
957
|
mode: CreditPoolMode;
|
|
932
958
|
value: number;
|
|
959
|
+
/** A new end date (ISO, in the future), or null to clear it; absent leaves it as it is. */
|
|
960
|
+
endsAt?: string | null;
|
|
933
961
|
}
|
|
934
962
|
/** A workspace credits can be shared with (another workspace of the organization). */
|
|
935
963
|
interface CreditPoolCandidate {
|
|
@@ -957,7 +985,10 @@ interface SettingsApiAdapter {
|
|
|
957
985
|
fetchPlans: () => Promise<ProductsResponse>;
|
|
958
986
|
/**
|
|
959
987
|
* Current active subscription. Returns `{ data: null }` when the workspace
|
|
960
|
-
* has no plan yet (free tier).
|
|
988
|
+
* has no plan yet (free tier). Pass billing's top-level `entitlement`
|
|
989
|
+
* through as `entitlement`. For billing's 404 (no subscription) that carries
|
|
990
|
+
* one, resolve `{ data: null, entitlement }`, or throw an error that keeps
|
|
991
|
+
* the response body (`body`, `data` or `response.data`).
|
|
961
992
|
*/
|
|
962
993
|
fetchCurrentPlan: () => Promise<SubscriptionResponse>;
|
|
963
994
|
/** Available credit balance for the active workspace. */
|
|
@@ -1416,7 +1447,7 @@ type IconProps = Omit<SVGProps<SVGSVGElement>, 'color' | 'strokeWidth' | 'width'
|
|
|
1416
1447
|
};
|
|
1417
1448
|
declare const SiconKey: ({ color, strokeWidth, size, ...props }: IconProps) => react.JSX.Element;
|
|
1418
1449
|
|
|
1419
|
-
declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlansChange, showPerUserLimits: showPerUserLimitsProp, onShowPerUserLimitsChange, showSharedCredits: showSharedCreditsProp, onShowSharedCreditsChange, }?: {
|
|
1450
|
+
declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlansChange, showPerUserLimits: showPerUserLimitsProp, onShowPerUserLimitsChange, showSharedCredits: showSharedCreditsProp, onShowSharedCreditsChange, onEntitlementChange, }?: {
|
|
1420
1451
|
embedded?: boolean;
|
|
1421
1452
|
/** Controlled "plans" sub-view flag. When provided, the host (settings
|
|
1422
1453
|
* wrapper) owns it so it can hide the sub-nav + show the Plans breadcrumb. */
|
|
@@ -1431,6 +1462,14 @@ declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlan
|
|
|
1431
1462
|
* workspace is in an organization. */
|
|
1432
1463
|
showSharedCredits?: boolean;
|
|
1433
1464
|
onShowSharedCreditsChange?: (open: boolean) => void;
|
|
1465
|
+
/** Called once the current plan has loaded, and again when it changes:
|
|
1466
|
+
* billing's `entitlement` (null from servers without it) and whether the
|
|
1467
|
+
* workspace gets paid features. A workspace spending a sponsor's shared
|
|
1468
|
+
* credits is `paid` on its free plan; gate features on this, not the plan. */
|
|
1469
|
+
onEntitlementChange?: (state: {
|
|
1470
|
+
entitlement: BillingEntitlement | null;
|
|
1471
|
+
paid: boolean;
|
|
1472
|
+
}) => void;
|
|
1434
1473
|
}): react__default.JSX.Element;
|
|
1435
1474
|
|
|
1436
1475
|
/**
|
|
@@ -2082,18 +2121,63 @@ declare function formatPoolSplit(split: {
|
|
|
2082
2121
|
}): string;
|
|
2083
2122
|
/** "20% · 200 credits this cycle", or "200 credits this cycle" for a fixed share. */
|
|
2084
2123
|
declare function describeAllowance(member: Pick<CreditPoolMember, "mode" | "value" | "allowance">): string;
|
|
2124
|
+
/**
|
|
2125
|
+
* When a share stops on its own, as the Ends field picks it. `never` is
|
|
2126
|
+
* today's behaviour: the share renews every cycle until it is removed.
|
|
2127
|
+
*/
|
|
2128
|
+
type PoolExpiryChoice = {
|
|
2129
|
+
kind: "never";
|
|
2130
|
+
} | {
|
|
2131
|
+
kind: "month";
|
|
2132
|
+
} | {
|
|
2133
|
+
kind: "months";
|
|
2134
|
+
months: number;
|
|
2135
|
+
} | {
|
|
2136
|
+
kind: "year";
|
|
2137
|
+
}
|
|
2138
|
+
/** A local calendar day, `YYYY-MM-DD` (what `<input type="date">` gives). */
|
|
2139
|
+
| {
|
|
2140
|
+
kind: "date";
|
|
2141
|
+
date: string;
|
|
2142
|
+
};
|
|
2143
|
+
declare const POOL_EXPIRY_MAX_MONTHS = 120;
|
|
2144
|
+
/** A local calendar day as `YYYY-MM-DD`. */
|
|
2145
|
+
declare function toLocalDateInput(date: Date): string;
|
|
2146
|
+
/** The earliest day the date picker allows: tomorrow, in local time. */
|
|
2147
|
+
declare function minPoolEndDate(now?: Date): string;
|
|
2148
|
+
type PoolEndsAtResult = {
|
|
2149
|
+
ok: true;
|
|
2150
|
+
value: string | null;
|
|
2151
|
+
} | {
|
|
2152
|
+
ok: false;
|
|
2153
|
+
reason: string;
|
|
2154
|
+
};
|
|
2155
|
+
/**
|
|
2156
|
+
* The `endsAt` to send for a choice, as an ISO string, or `null` for Never.
|
|
2157
|
+
* Months and a year count from `now`; a date is the start of that day in the
|
|
2158
|
+
* admin's local time and must be after today.
|
|
2159
|
+
*/
|
|
2160
|
+
declare function poolEndsAtFrom(choice: PoolExpiryChoice, now?: Date): PoolEndsAtResult;
|
|
2161
|
+
/** The Ends field's starting choice for a share: Never, or its end date's day. */
|
|
2162
|
+
declare function expiryChoiceFor(member: Pick<CreditPoolMember, "endsAt"> | null | undefined): PoolExpiryChoice;
|
|
2163
|
+
/** When a share ends: "Mar 1, 2027", or "Never" when it runs until removed. */
|
|
2164
|
+
declare function formatPoolEndsAt(endsAt: string | null | undefined): string;
|
|
2165
|
+
/** The member banner's line on when sharing stops: "Sharing ends on Mar 1, 2027." or "Sharing ends: Never." */
|
|
2166
|
+
declare function sharedPoolEndsText(pool: Pick<SharedPoolBalance, "endsAt">): string;
|
|
2167
|
+
/** Whether the allowance starts again at `cycleEnd`: not when the share has ended by then. */
|
|
2168
|
+
declare function poolRenewsAtCycleEnd(pool: Pick<SharedPoolBalance, "endsAt" | "cycleEnd">): boolean;
|
|
2085
2169
|
/** The other workspace's name, or a stand-in when it could not be resolved. */
|
|
2086
2170
|
declare function poolWorkspaceName(name: string | null | undefined): string;
|
|
2087
2171
|
/** The member's Billing banner: "Credits shared by Agency: 80 of 200 left this cycle". */
|
|
2088
2172
|
declare function sharedPoolBannerText(pool: Pick<SharedPoolBalance, "sponsorName" | "allowance" | "remaining">): string;
|
|
2089
2173
|
/**
|
|
2090
|
-
*
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2174
|
+
* Was the line saying a member's own credits were paused while it used the
|
|
2175
|
+
* pool's. Billing spends them first, so it now answers `ownCreditsFirstText`
|
|
2176
|
+
* for hosts that still call it.
|
|
2093
2177
|
*
|
|
2094
2178
|
* @deprecated Use `ownCreditsFirstText`.
|
|
2095
2179
|
*/
|
|
2096
|
-
declare function pausedOwnCreditsText(
|
|
2180
|
+
declare function pausedOwnCreditsText(_pool?: Pick<SharedPoolBalance, "ownCredits">): string;
|
|
2097
2181
|
/** The line under the member's banner: whose credits a job spends, in order. */
|
|
2098
2182
|
declare function ownCreditsFirstText(): string;
|
|
2099
2183
|
interface CreditsMeter {
|
|
@@ -2151,6 +2235,78 @@ declare function poolErrorMessage(failure: unknown): string | null;
|
|
|
2151
2235
|
*/
|
|
2152
2236
|
declare function SharedCreditsView(): react.JSX.Element;
|
|
2153
2237
|
|
|
2238
|
+
/**
|
|
2239
|
+
* Whether a workspace gets paid features, and why. Billing reports it at the
|
|
2240
|
+
* top level of the current-subscription answer, beside `data` (200:
|
|
2241
|
+
* `{ success, data, entitlement }`; 404: `{ error, entitlement }`), and
|
|
2242
|
+
* leaves the plan as it is: a workspace spending another's shared credits (a
|
|
2243
|
+
* "sponsored" workspace) still shows the free plan, with
|
|
2244
|
+
* `entitlement.source: 'pool'`.
|
|
2245
|
+
*
|
|
2246
|
+
* So the plan — and every billing action: Upgrade, Cancel downgrade, Buy
|
|
2247
|
+
* credits — stays decided by the plan's amount, and only features are gated
|
|
2248
|
+
* on `entitlement.paid`. Billing servers from before entitlement send none;
|
|
2249
|
+
* then a workspace is paid exactly when its plan is, as before.
|
|
2250
|
+
*/
|
|
2251
|
+
/** `entitlement` as billing sends it, or null when it is absent or malformed. */
|
|
2252
|
+
declare function parseBillingEntitlement(value: unknown): BillingEntitlement | null;
|
|
2253
|
+
/**
|
|
2254
|
+
* The `entitlement` of a current-subscription answer: `body.entitlement`,
|
|
2255
|
+
* never `body.data.entitlement` (`data` is the subscription).
|
|
2256
|
+
*/
|
|
2257
|
+
declare function entitlementFromBody(body: unknown): BillingEntitlement | null;
|
|
2258
|
+
/**
|
|
2259
|
+
* The entitlement a failed read carries: billing's 404 for a workspace with
|
|
2260
|
+
* no subscription of its own still says whether a pool entitles it. The body
|
|
2261
|
+
* is looked for where hosts keep it — the failure itself, `body`, `data`
|
|
2262
|
+
* (`UserFacingError`), `response.data` (axios) and `cause` — to a shallow
|
|
2263
|
+
* depth. Null when there is none.
|
|
2264
|
+
*/
|
|
2265
|
+
declare function entitlementFromFailure(failure: unknown): BillingEntitlement | null;
|
|
2266
|
+
/** Paid by the workspace's own plan: what Buy credits and the plan actions go by. */
|
|
2267
|
+
declare function isPaidPlan(subscription: Pick<BillingSubscription, "plan"> | null | undefined): boolean;
|
|
2268
|
+
/**
|
|
2269
|
+
* Whether the workspace gets paid features: `entitlement.paid` when billing
|
|
2270
|
+
* sent one, else its own plan being paid (servers from before entitlement).
|
|
2271
|
+
*/
|
|
2272
|
+
declare function hasPaidFeatures({ entitlement, subscription, }: {
|
|
2273
|
+
entitlement: BillingEntitlement | null | undefined;
|
|
2274
|
+
subscription: Pick<BillingSubscription, "plan"> | null | undefined;
|
|
2275
|
+
}): boolean;
|
|
2276
|
+
/** A workspace spending another's shared credits, by its entitlement. */
|
|
2277
|
+
declare function isSponsoredEntitlement(entitlement: BillingEntitlement | null | undefined): entitlement is BillingEntitlement & {
|
|
2278
|
+
source: "pool";
|
|
2279
|
+
};
|
|
2280
|
+
/** "Credits shared by Agency." plus " Sharing ends on Mar 1, 2027." when it ends on its own. */
|
|
2281
|
+
declare function sponsoredCreditsText(entitlement: Pick<BillingEntitlement, "sponsorName" | "endsAt">): string;
|
|
2282
|
+
interface CurrentPlanState {
|
|
2283
|
+
/** The workspace's own subscription; null without one. */
|
|
2284
|
+
subscription: BillingSubscription | null;
|
|
2285
|
+
/** Null when billing sent none (servers from before entitlement). */
|
|
2286
|
+
entitlement: BillingEntitlement | null;
|
|
2287
|
+
/** Gate features on this; see `hasPaidFeatures`. */
|
|
2288
|
+
paid: boolean;
|
|
2289
|
+
}
|
|
2290
|
+
/**
|
|
2291
|
+
* Read the current plan and its entitlement through the host's
|
|
2292
|
+
* `fetchCurrentPlan`. A failure that carries an entitlement — billing's 404
|
|
2293
|
+
* for a sponsored workspace with no subscription of its own — is not an
|
|
2294
|
+
* error: it answers no subscription with that entitlement. Any other failure
|
|
2295
|
+
* is thrown, as before.
|
|
2296
|
+
*/
|
|
2297
|
+
declare function loadCurrentPlan(fetchCurrentPlan: () => Promise<SubscriptionResponse>): Promise<CurrentPlanState>;
|
|
2298
|
+
|
|
2299
|
+
/**
|
|
2300
|
+
* `loadCurrentPlan` as a hook, for a host gating features on `paid`. Reloads
|
|
2301
|
+
* when `key` (e.g. the workspace id) changes; `fetchCurrentPlan` may be a new
|
|
2302
|
+
* function every render. `state` is null while loading, after a failure, and
|
|
2303
|
+
* while `key` is null.
|
|
2304
|
+
*/
|
|
2305
|
+
declare function useBillingEntitlement(fetchCurrentPlan: (() => Promise<SubscriptionResponse>) | null | undefined, key: string | null | undefined): {
|
|
2306
|
+
state: CurrentPlanState | null;
|
|
2307
|
+
loading: boolean;
|
|
2308
|
+
};
|
|
2309
|
+
|
|
2154
2310
|
type CreditPoolMemberModalProps = {
|
|
2155
2311
|
kind: "add";
|
|
2156
2312
|
/** Workspaces credits can be shared with. */
|
|
@@ -2278,4 +2434,4 @@ interface AppSettingsRowProps {
|
|
|
2278
2434
|
}
|
|
2279
2435
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2280
2436
|
|
|
2281
|
-
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, BillingContent, 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 CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolErrorCode, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralTab, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, 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, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolSplit, groupWorkspaceList, isLimitBelowUsage, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadWorkspaceOrganization, memberRoleUpdate, minimumCreditLimit, ownCreditsFirstText, pausedOwnCreditsText, poolErrorMessage, poolWorkspaceName, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
|
2437
|
+
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, 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, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralTab, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, 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, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, pausedOwnCreditsText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolWorkspaceName, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sponsoredCreditsText, toLocalDateInput, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|