@streamoid/settings 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +207 -5
- package/dist/index.d.ts +207 -5
- package/dist/index.js +532 -66
- package/dist/index.mjs +533 -66
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -770,8 +770,32 @@ interface UsageHistoryItem {
|
|
|
770
770
|
/** Stripe transaction id when present. Some usage rows (e.g. internal returns) are emitted without one. */
|
|
771
771
|
transactionId?: string;
|
|
772
772
|
}
|
|
773
|
+
/** Billing's page block on a usage-history response asked for with `limit`. */
|
|
774
|
+
interface UsageHistoryPagination {
|
|
775
|
+
page: number;
|
|
776
|
+
limit: number;
|
|
777
|
+
total: number;
|
|
778
|
+
totalPages: number;
|
|
779
|
+
hasNextPage: boolean;
|
|
780
|
+
hasPreviousPage: boolean;
|
|
781
|
+
skip?: number;
|
|
782
|
+
}
|
|
773
783
|
interface UsageHistoryResponse {
|
|
774
784
|
data: UsageHistoryItem[];
|
|
785
|
+
/** Present when the request carried `limit`; absent from an unpaged one. */
|
|
786
|
+
pagination?: UsageHistoryPagination;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* `fetchUsageLogs`'s query. Pass each through to billing
|
|
790
|
+
* (`get-usage-history`'s `page`, `limit` (≤ 100), `startDate`, `endDate`;
|
|
791
|
+
* dates are ISO strings, both ends inclusive) and return its `pagination`.
|
|
792
|
+
*/
|
|
793
|
+
interface UsageLogsQuery {
|
|
794
|
+
/** 1-based. */
|
|
795
|
+
page?: number;
|
|
796
|
+
limit?: number;
|
|
797
|
+
startDate?: string;
|
|
798
|
+
endDate?: string;
|
|
775
799
|
}
|
|
776
800
|
interface InvoicePdfResponse {
|
|
777
801
|
data: {
|
|
@@ -1001,8 +1025,14 @@ interface SettingsApiAdapter {
|
|
|
1001
1025
|
buyCredits: (input: BuyCreditsPayload) => Promise<BuyCreditsResponse | {
|
|
1002
1026
|
data: BuyCreditsResponse;
|
|
1003
1027
|
}>;
|
|
1004
|
-
/**
|
|
1005
|
-
|
|
1028
|
+
/**
|
|
1029
|
+
* Per-credit usage / deduction logs (CXO: `getUsageHistory(_, "deduct,return")`).
|
|
1030
|
+
* Billing asks for one page at a time (`query`) and expects `pagination`
|
|
1031
|
+
* back. An adapter that ignores `query` and returns every row still works:
|
|
1032
|
+
* Billing pages those itself, but the whole history is still downloaded.
|
|
1033
|
+
* Rejecting shows an inline error in the table.
|
|
1034
|
+
*/
|
|
1035
|
+
fetchUsageLogs?: (query?: UsageLogsQuery) => Promise<UsageHistoryResponse>;
|
|
1006
1036
|
/** Upgrade or downgrade a subscription. Returns checkout URL when applicable. */
|
|
1007
1037
|
updateSubscription?: (payload: UpdateSubscriptionPayload) => Promise<UpdateSubscriptionResponse>;
|
|
1008
1038
|
/** CXO-only: undo a pending plan downgrade before it takes effect. */
|
|
@@ -1447,6 +1477,17 @@ type IconProps = Omit<SVGProps<SVGSVGElement>, 'color' | 'strokeWidth' | 'width'
|
|
|
1447
1477
|
};
|
|
1448
1478
|
declare const SiconKey: ({ color, strokeWidth, size, ...props }: IconProps) => react.JSX.Element;
|
|
1449
1479
|
|
|
1480
|
+
/** Previous / Next under the Usage logs table, with the page and the total. */
|
|
1481
|
+
declare function UsageLogsPager({ page, totalPages, total, loading, onPageChange, }: {
|
|
1482
|
+
/** 1-based. */
|
|
1483
|
+
page: number;
|
|
1484
|
+
totalPages: number;
|
|
1485
|
+
/** Logs across every page. */
|
|
1486
|
+
total: number;
|
|
1487
|
+
/** Disables both buttons while a page loads. */
|
|
1488
|
+
loading?: boolean;
|
|
1489
|
+
onPageChange: (page: number) => void;
|
|
1490
|
+
}): react__default.JSX.Element | null;
|
|
1450
1491
|
declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlansChange, showPerUserLimits: showPerUserLimitsProp, onShowPerUserLimitsChange, showSharedCredits: showSharedCreditsProp, onShowSharedCreditsChange, onEntitlementChange, }?: {
|
|
1451
1492
|
embedded?: boolean;
|
|
1452
1493
|
/** Controlled "plans" sub-view flag. When provided, the host (settings
|
|
@@ -1472,6 +1513,161 @@ declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlan
|
|
|
1472
1513
|
}) => void;
|
|
1473
1514
|
}): react__default.JSX.Element;
|
|
1474
1515
|
|
|
1516
|
+
/** Rows on one page of Billing's Usage logs table. */
|
|
1517
|
+
declare const USAGE_LOGS_PAGE_SIZE = 50;
|
|
1518
|
+
/** Rows per request while exporting: billing's own `limit` ceiling. */
|
|
1519
|
+
declare const USAGE_LOGS_EXPORT_BATCH_SIZE = 100;
|
|
1520
|
+
/** The most rows one CSV export fetches; a larger range is refused. */
|
|
1521
|
+
declare const USAGE_LOGS_EXPORT_MAX_ROWS = 20000;
|
|
1522
|
+
/**
|
|
1523
|
+
* Requests an export may make past the pages `USAGE_LOGS_EXPORT_MAX_ROWS`
|
|
1524
|
+
* needs, to pick up rows that writes during the export pushed further back.
|
|
1525
|
+
*/
|
|
1526
|
+
declare const USAGE_LOGS_EXPORT_EXTRA_REQUESTS = 10;
|
|
1527
|
+
type FetchUsageLogs = (query?: UsageLogsQuery) => Promise<UsageHistoryResponse>;
|
|
1528
|
+
/** One page of the Usage logs table. `page` is 1-based. */
|
|
1529
|
+
interface UsageLogsPage {
|
|
1530
|
+
rows: UsageHistoryItem[];
|
|
1531
|
+
page: number;
|
|
1532
|
+
totalPages: number;
|
|
1533
|
+
total: number;
|
|
1534
|
+
/**
|
|
1535
|
+
* Every row, when the adapter ignored paging and sent them all: Billing
|
|
1536
|
+
* turns pages over these without asking again. Null when billing paged.
|
|
1537
|
+
*/
|
|
1538
|
+
unpaged: UsageHistoryItem[] | null;
|
|
1539
|
+
}
|
|
1540
|
+
/** A page of rows already in hand: an adapter that returned the whole history. */
|
|
1541
|
+
declare function sliceUsageLogsPage(all: UsageHistoryItem[], page: number, pageSize?: number): UsageLogsPage;
|
|
1542
|
+
/**
|
|
1543
|
+
* The table page for `fetchUsageLogs`'s answer to `{ page, limit: pageSize }`.
|
|
1544
|
+
* With billing's `pagination` it is that page as is; without it the adapter
|
|
1545
|
+
* sent everything, and this is `page` of those. Never more than `pageSize` rows.
|
|
1546
|
+
*/
|
|
1547
|
+
declare function usageLogsPage(res: UsageHistoryResponse | null | undefined, page: number, pageSize?: number): UsageLogsPage;
|
|
1548
|
+
declare const EMPTY_USAGE_LOGS_PAGE: UsageLogsPage;
|
|
1549
|
+
/** Billing's Usage logs table: the page on screen and the request behind it. */
|
|
1550
|
+
interface UsageLogsState {
|
|
1551
|
+
logs: UsageLogsPage;
|
|
1552
|
+
/** The page last asked for; Try again asks for it again, not the one on screen. */
|
|
1553
|
+
requestedPage: number;
|
|
1554
|
+
loading: boolean;
|
|
1555
|
+
error: string | null;
|
|
1556
|
+
}
|
|
1557
|
+
declare const INITIAL_USAGE_LOGS_STATE: UsageLogsState;
|
|
1558
|
+
type UsageLogsAction =
|
|
1559
|
+
/** A page was asked for. */
|
|
1560
|
+
{
|
|
1561
|
+
type: "request";
|
|
1562
|
+
page: number;
|
|
1563
|
+
}
|
|
1564
|
+
/** The page asked for arrived. */
|
|
1565
|
+
| {
|
|
1566
|
+
type: "loaded";
|
|
1567
|
+
logs: UsageLogsPage;
|
|
1568
|
+
}
|
|
1569
|
+
/** The page asked for did not; the one on screen stays. */
|
|
1570
|
+
| {
|
|
1571
|
+
type: "failed";
|
|
1572
|
+
error: string;
|
|
1573
|
+
}
|
|
1574
|
+
/** Turn to `page` of the rows an unpaged adapter already sent. */
|
|
1575
|
+
| {
|
|
1576
|
+
type: "turn";
|
|
1577
|
+
page: number;
|
|
1578
|
+
}
|
|
1579
|
+
/** Another workspace: start over at page 1. */
|
|
1580
|
+
| {
|
|
1581
|
+
type: "reset";
|
|
1582
|
+
};
|
|
1583
|
+
declare function usageLogsReducer(state: UsageLogsState, action: UsageLogsAction): UsageLogsState;
|
|
1584
|
+
/**
|
|
1585
|
+
* Whether the usage logs in hand have a row another workspace spent from this
|
|
1586
|
+
* one's shared credits. Every row an unpaged adapter sent counts, not only the
|
|
1587
|
+
* page on screen.
|
|
1588
|
+
*/
|
|
1589
|
+
declare function usageLogsSpentByOthers(logs: UsageLogsPage, workspaceId: string | null | undefined): boolean;
|
|
1590
|
+
interface UsedByNamesLoader {
|
|
1591
|
+
/** Look up `workspaceId`'s names, unless they are saved or being looked up. */
|
|
1592
|
+
load: (workspaceId: string, fetchCreditPool: () => Promise<CreditPoolResponse>) => Promise<void>;
|
|
1593
|
+
/**
|
|
1594
|
+
* Forget what was saved, with the names it saved: the next `load` looks up
|
|
1595
|
+
* again, and an answer still out from before is not saved.
|
|
1596
|
+
*/
|
|
1597
|
+
reset: () => void;
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Looks up the names of the workspaces that spent a workspace's shared
|
|
1601
|
+
* credits, once per workspace. `save` gets each answer and says whether it
|
|
1602
|
+
* kept it (false: that workspace is no longer shown); only a kept answer ends
|
|
1603
|
+
* the lookups for that workspace. A failed or unkept lookup is tried again on
|
|
1604
|
+
* the next call; a call while one for the same workspace is under way starts
|
|
1605
|
+
* no other.
|
|
1606
|
+
*/
|
|
1607
|
+
declare function createUsedByNamesLoader(save: (workspaceId: string, names: Record<string, string>) => boolean): UsedByNamesLoader;
|
|
1608
|
+
/** The CSV file name for a picked day range, from its local calendar days. */
|
|
1609
|
+
declare function usageLogsExportFileName(start: Date, end: Date): string;
|
|
1610
|
+
/**
|
|
1611
|
+
* ISO bounds for a picked day range in the user's time zone: from the start
|
|
1612
|
+
* of `start`'s day to the last millisecond of `end`'s.
|
|
1613
|
+
*/
|
|
1614
|
+
declare function usageLogsDateRange(start: Date, end: Date): {
|
|
1615
|
+
startDate: string;
|
|
1616
|
+
endDate: string;
|
|
1617
|
+
};
|
|
1618
|
+
type UsageLogsExportResult = {
|
|
1619
|
+
status: "ok";
|
|
1620
|
+
rows: UsageHistoryItem[];
|
|
1621
|
+
total: number;
|
|
1622
|
+
}
|
|
1623
|
+
/** More than `maxRows` rows in the range, by the first count or a later one. */
|
|
1624
|
+
| {
|
|
1625
|
+
status: "too-large";
|
|
1626
|
+
total: number;
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1629
|
+
* Rows were still missing after `maxRequests` requests: writes kept
|
|
1630
|
+
* shifting billing's pages. Nothing to download.
|
|
1631
|
+
*/
|
|
1632
|
+
| {
|
|
1633
|
+
status: "incomplete";
|
|
1634
|
+
fetched: number;
|
|
1635
|
+
total: number;
|
|
1636
|
+
} | {
|
|
1637
|
+
status: "cancelled";
|
|
1638
|
+
};
|
|
1639
|
+
interface FetchUsageLogsInRangeOptions {
|
|
1640
|
+
batchSize?: number;
|
|
1641
|
+
maxRows?: number;
|
|
1642
|
+
/**
|
|
1643
|
+
* The most requests, the first included. Default: the pages `maxRows`
|
|
1644
|
+
* needs at billing's limit, plus `USAGE_LOGS_EXPORT_EXTRA_REQUESTS`.
|
|
1645
|
+
*/
|
|
1646
|
+
maxRequests?: number;
|
|
1647
|
+
/** After each request: rows so far, and the range's total. */
|
|
1648
|
+
onProgress?: (fetched: number, total: number) => void;
|
|
1649
|
+
/** Stops between requests. */
|
|
1650
|
+
signal?: AbortSignal;
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Every usage log in `range`, fetched `batchSize` at a time. Refuses (status
|
|
1654
|
+
* `too-large`) a range with more than `maxRows`, after one request. Billing
|
|
1655
|
+
* pages newest first by offset, so a row written during the export pushes
|
|
1656
|
+
* older ones onto a later page: it keeps asking while billing says there is a
|
|
1657
|
+
* next page and fewer distinct rows than the range's latest total are in
|
|
1658
|
+
* hand, up to `maxRequests` (then status `incomplete`). An adapter that
|
|
1659
|
+
* ignores the query is asked once, and its rows filtered to the range.
|
|
1660
|
+
* Rejects when a request does.
|
|
1661
|
+
*/
|
|
1662
|
+
declare function fetchUsageLogsInRange(fetchUsageLogs: FetchUsageLogs, range: {
|
|
1663
|
+
startDate: string;
|
|
1664
|
+
endDate: string;
|
|
1665
|
+
}, { batchSize, maxRows, maxRequests, onProgress, signal, }?: FetchUsageLogsInRangeOptions): Promise<UsageLogsExportResult>;
|
|
1666
|
+
/** Header and one row per log, as the Usage logs CSV export writes them. */
|
|
1667
|
+
declare function usageLogsCsvRows(logs: UsageHistoryItem[], userMap: Record<string, string>, formatDate: (iso: string) => string): string[][];
|
|
1668
|
+
/** CSV text: every cell quoted, quotes doubled. */
|
|
1669
|
+
declare function toCsv(rows: string[][]): string;
|
|
1670
|
+
|
|
1475
1671
|
/**
|
|
1476
1672
|
* The one `updateMemberRole` request that saving a member sends, or `null`
|
|
1477
1673
|
* when there is nothing to save.
|
|
@@ -1950,8 +2146,14 @@ interface ExportDateModalProps {
|
|
|
1950
2146
|
title: string;
|
|
1951
2147
|
onClose: () => void;
|
|
1952
2148
|
onExport: (startDate: Date, endDate: Date) => void;
|
|
1953
|
-
|
|
1954
|
-
|
|
2149
|
+
/** An export is running: the button is disabled and reads `busyText`. */
|
|
2150
|
+
busy?: boolean;
|
|
2151
|
+
/** Shown in place of the range while busy, e.g. "Fetched 200 of 1,000 logs…". */
|
|
2152
|
+
busyText?: string;
|
|
2153
|
+
/** Shown under the range, e.g. why the last export did not run. */
|
|
2154
|
+
notice?: string | null;
|
|
2155
|
+
}
|
|
2156
|
+
declare function ExportDateModal({ title, onClose, onExport, busy, busyText, notice, }: ExportDateModalProps): react.JSX.Element;
|
|
1955
2157
|
|
|
1956
2158
|
type CreditCycleUnit = "month" | "year";
|
|
1957
2159
|
type CreditLimitValidation = {
|
|
@@ -2434,4 +2636,4 @@ interface AppSettingsRowProps {
|
|
|
2434
2636
|
}
|
|
2435
2637
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2436
2638
|
|
|
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 };
|
|
2639
|
+
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, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, 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, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, 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, sliceUsageLogsPage, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -770,8 +770,32 @@ interface UsageHistoryItem {
|
|
|
770
770
|
/** Stripe transaction id when present. Some usage rows (e.g. internal returns) are emitted without one. */
|
|
771
771
|
transactionId?: string;
|
|
772
772
|
}
|
|
773
|
+
/** Billing's page block on a usage-history response asked for with `limit`. */
|
|
774
|
+
interface UsageHistoryPagination {
|
|
775
|
+
page: number;
|
|
776
|
+
limit: number;
|
|
777
|
+
total: number;
|
|
778
|
+
totalPages: number;
|
|
779
|
+
hasNextPage: boolean;
|
|
780
|
+
hasPreviousPage: boolean;
|
|
781
|
+
skip?: number;
|
|
782
|
+
}
|
|
773
783
|
interface UsageHistoryResponse {
|
|
774
784
|
data: UsageHistoryItem[];
|
|
785
|
+
/** Present when the request carried `limit`; absent from an unpaged one. */
|
|
786
|
+
pagination?: UsageHistoryPagination;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* `fetchUsageLogs`'s query. Pass each through to billing
|
|
790
|
+
* (`get-usage-history`'s `page`, `limit` (≤ 100), `startDate`, `endDate`;
|
|
791
|
+
* dates are ISO strings, both ends inclusive) and return its `pagination`.
|
|
792
|
+
*/
|
|
793
|
+
interface UsageLogsQuery {
|
|
794
|
+
/** 1-based. */
|
|
795
|
+
page?: number;
|
|
796
|
+
limit?: number;
|
|
797
|
+
startDate?: string;
|
|
798
|
+
endDate?: string;
|
|
775
799
|
}
|
|
776
800
|
interface InvoicePdfResponse {
|
|
777
801
|
data: {
|
|
@@ -1001,8 +1025,14 @@ interface SettingsApiAdapter {
|
|
|
1001
1025
|
buyCredits: (input: BuyCreditsPayload) => Promise<BuyCreditsResponse | {
|
|
1002
1026
|
data: BuyCreditsResponse;
|
|
1003
1027
|
}>;
|
|
1004
|
-
/**
|
|
1005
|
-
|
|
1028
|
+
/**
|
|
1029
|
+
* Per-credit usage / deduction logs (CXO: `getUsageHistory(_, "deduct,return")`).
|
|
1030
|
+
* Billing asks for one page at a time (`query`) and expects `pagination`
|
|
1031
|
+
* back. An adapter that ignores `query` and returns every row still works:
|
|
1032
|
+
* Billing pages those itself, but the whole history is still downloaded.
|
|
1033
|
+
* Rejecting shows an inline error in the table.
|
|
1034
|
+
*/
|
|
1035
|
+
fetchUsageLogs?: (query?: UsageLogsQuery) => Promise<UsageHistoryResponse>;
|
|
1006
1036
|
/** Upgrade or downgrade a subscription. Returns checkout URL when applicable. */
|
|
1007
1037
|
updateSubscription?: (payload: UpdateSubscriptionPayload) => Promise<UpdateSubscriptionResponse>;
|
|
1008
1038
|
/** CXO-only: undo a pending plan downgrade before it takes effect. */
|
|
@@ -1447,6 +1477,17 @@ type IconProps = Omit<SVGProps<SVGSVGElement>, 'color' | 'strokeWidth' | 'width'
|
|
|
1447
1477
|
};
|
|
1448
1478
|
declare const SiconKey: ({ color, strokeWidth, size, ...props }: IconProps) => react.JSX.Element;
|
|
1449
1479
|
|
|
1480
|
+
/** Previous / Next under the Usage logs table, with the page and the total. */
|
|
1481
|
+
declare function UsageLogsPager({ page, totalPages, total, loading, onPageChange, }: {
|
|
1482
|
+
/** 1-based. */
|
|
1483
|
+
page: number;
|
|
1484
|
+
totalPages: number;
|
|
1485
|
+
/** Logs across every page. */
|
|
1486
|
+
total: number;
|
|
1487
|
+
/** Disables both buttons while a page loads. */
|
|
1488
|
+
loading?: boolean;
|
|
1489
|
+
onPageChange: (page: number) => void;
|
|
1490
|
+
}): react__default.JSX.Element | null;
|
|
1450
1491
|
declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlansChange, showPerUserLimits: showPerUserLimitsProp, onShowPerUserLimitsChange, showSharedCredits: showSharedCreditsProp, onShowSharedCreditsChange, onEntitlementChange, }?: {
|
|
1451
1492
|
embedded?: boolean;
|
|
1452
1493
|
/** Controlled "plans" sub-view flag. When provided, the host (settings
|
|
@@ -1472,6 +1513,161 @@ declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlan
|
|
|
1472
1513
|
}) => void;
|
|
1473
1514
|
}): react__default.JSX.Element;
|
|
1474
1515
|
|
|
1516
|
+
/** Rows on one page of Billing's Usage logs table. */
|
|
1517
|
+
declare const USAGE_LOGS_PAGE_SIZE = 50;
|
|
1518
|
+
/** Rows per request while exporting: billing's own `limit` ceiling. */
|
|
1519
|
+
declare const USAGE_LOGS_EXPORT_BATCH_SIZE = 100;
|
|
1520
|
+
/** The most rows one CSV export fetches; a larger range is refused. */
|
|
1521
|
+
declare const USAGE_LOGS_EXPORT_MAX_ROWS = 20000;
|
|
1522
|
+
/**
|
|
1523
|
+
* Requests an export may make past the pages `USAGE_LOGS_EXPORT_MAX_ROWS`
|
|
1524
|
+
* needs, to pick up rows that writes during the export pushed further back.
|
|
1525
|
+
*/
|
|
1526
|
+
declare const USAGE_LOGS_EXPORT_EXTRA_REQUESTS = 10;
|
|
1527
|
+
type FetchUsageLogs = (query?: UsageLogsQuery) => Promise<UsageHistoryResponse>;
|
|
1528
|
+
/** One page of the Usage logs table. `page` is 1-based. */
|
|
1529
|
+
interface UsageLogsPage {
|
|
1530
|
+
rows: UsageHistoryItem[];
|
|
1531
|
+
page: number;
|
|
1532
|
+
totalPages: number;
|
|
1533
|
+
total: number;
|
|
1534
|
+
/**
|
|
1535
|
+
* Every row, when the adapter ignored paging and sent them all: Billing
|
|
1536
|
+
* turns pages over these without asking again. Null when billing paged.
|
|
1537
|
+
*/
|
|
1538
|
+
unpaged: UsageHistoryItem[] | null;
|
|
1539
|
+
}
|
|
1540
|
+
/** A page of rows already in hand: an adapter that returned the whole history. */
|
|
1541
|
+
declare function sliceUsageLogsPage(all: UsageHistoryItem[], page: number, pageSize?: number): UsageLogsPage;
|
|
1542
|
+
/**
|
|
1543
|
+
* The table page for `fetchUsageLogs`'s answer to `{ page, limit: pageSize }`.
|
|
1544
|
+
* With billing's `pagination` it is that page as is; without it the adapter
|
|
1545
|
+
* sent everything, and this is `page` of those. Never more than `pageSize` rows.
|
|
1546
|
+
*/
|
|
1547
|
+
declare function usageLogsPage(res: UsageHistoryResponse | null | undefined, page: number, pageSize?: number): UsageLogsPage;
|
|
1548
|
+
declare const EMPTY_USAGE_LOGS_PAGE: UsageLogsPage;
|
|
1549
|
+
/** Billing's Usage logs table: the page on screen and the request behind it. */
|
|
1550
|
+
interface UsageLogsState {
|
|
1551
|
+
logs: UsageLogsPage;
|
|
1552
|
+
/** The page last asked for; Try again asks for it again, not the one on screen. */
|
|
1553
|
+
requestedPage: number;
|
|
1554
|
+
loading: boolean;
|
|
1555
|
+
error: string | null;
|
|
1556
|
+
}
|
|
1557
|
+
declare const INITIAL_USAGE_LOGS_STATE: UsageLogsState;
|
|
1558
|
+
type UsageLogsAction =
|
|
1559
|
+
/** A page was asked for. */
|
|
1560
|
+
{
|
|
1561
|
+
type: "request";
|
|
1562
|
+
page: number;
|
|
1563
|
+
}
|
|
1564
|
+
/** The page asked for arrived. */
|
|
1565
|
+
| {
|
|
1566
|
+
type: "loaded";
|
|
1567
|
+
logs: UsageLogsPage;
|
|
1568
|
+
}
|
|
1569
|
+
/** The page asked for did not; the one on screen stays. */
|
|
1570
|
+
| {
|
|
1571
|
+
type: "failed";
|
|
1572
|
+
error: string;
|
|
1573
|
+
}
|
|
1574
|
+
/** Turn to `page` of the rows an unpaged adapter already sent. */
|
|
1575
|
+
| {
|
|
1576
|
+
type: "turn";
|
|
1577
|
+
page: number;
|
|
1578
|
+
}
|
|
1579
|
+
/** Another workspace: start over at page 1. */
|
|
1580
|
+
| {
|
|
1581
|
+
type: "reset";
|
|
1582
|
+
};
|
|
1583
|
+
declare function usageLogsReducer(state: UsageLogsState, action: UsageLogsAction): UsageLogsState;
|
|
1584
|
+
/**
|
|
1585
|
+
* Whether the usage logs in hand have a row another workspace spent from this
|
|
1586
|
+
* one's shared credits. Every row an unpaged adapter sent counts, not only the
|
|
1587
|
+
* page on screen.
|
|
1588
|
+
*/
|
|
1589
|
+
declare function usageLogsSpentByOthers(logs: UsageLogsPage, workspaceId: string | null | undefined): boolean;
|
|
1590
|
+
interface UsedByNamesLoader {
|
|
1591
|
+
/** Look up `workspaceId`'s names, unless they are saved or being looked up. */
|
|
1592
|
+
load: (workspaceId: string, fetchCreditPool: () => Promise<CreditPoolResponse>) => Promise<void>;
|
|
1593
|
+
/**
|
|
1594
|
+
* Forget what was saved, with the names it saved: the next `load` looks up
|
|
1595
|
+
* again, and an answer still out from before is not saved.
|
|
1596
|
+
*/
|
|
1597
|
+
reset: () => void;
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Looks up the names of the workspaces that spent a workspace's shared
|
|
1601
|
+
* credits, once per workspace. `save` gets each answer and says whether it
|
|
1602
|
+
* kept it (false: that workspace is no longer shown); only a kept answer ends
|
|
1603
|
+
* the lookups for that workspace. A failed or unkept lookup is tried again on
|
|
1604
|
+
* the next call; a call while one for the same workspace is under way starts
|
|
1605
|
+
* no other.
|
|
1606
|
+
*/
|
|
1607
|
+
declare function createUsedByNamesLoader(save: (workspaceId: string, names: Record<string, string>) => boolean): UsedByNamesLoader;
|
|
1608
|
+
/** The CSV file name for a picked day range, from its local calendar days. */
|
|
1609
|
+
declare function usageLogsExportFileName(start: Date, end: Date): string;
|
|
1610
|
+
/**
|
|
1611
|
+
* ISO bounds for a picked day range in the user's time zone: from the start
|
|
1612
|
+
* of `start`'s day to the last millisecond of `end`'s.
|
|
1613
|
+
*/
|
|
1614
|
+
declare function usageLogsDateRange(start: Date, end: Date): {
|
|
1615
|
+
startDate: string;
|
|
1616
|
+
endDate: string;
|
|
1617
|
+
};
|
|
1618
|
+
type UsageLogsExportResult = {
|
|
1619
|
+
status: "ok";
|
|
1620
|
+
rows: UsageHistoryItem[];
|
|
1621
|
+
total: number;
|
|
1622
|
+
}
|
|
1623
|
+
/** More than `maxRows` rows in the range, by the first count or a later one. */
|
|
1624
|
+
| {
|
|
1625
|
+
status: "too-large";
|
|
1626
|
+
total: number;
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1629
|
+
* Rows were still missing after `maxRequests` requests: writes kept
|
|
1630
|
+
* shifting billing's pages. Nothing to download.
|
|
1631
|
+
*/
|
|
1632
|
+
| {
|
|
1633
|
+
status: "incomplete";
|
|
1634
|
+
fetched: number;
|
|
1635
|
+
total: number;
|
|
1636
|
+
} | {
|
|
1637
|
+
status: "cancelled";
|
|
1638
|
+
};
|
|
1639
|
+
interface FetchUsageLogsInRangeOptions {
|
|
1640
|
+
batchSize?: number;
|
|
1641
|
+
maxRows?: number;
|
|
1642
|
+
/**
|
|
1643
|
+
* The most requests, the first included. Default: the pages `maxRows`
|
|
1644
|
+
* needs at billing's limit, plus `USAGE_LOGS_EXPORT_EXTRA_REQUESTS`.
|
|
1645
|
+
*/
|
|
1646
|
+
maxRequests?: number;
|
|
1647
|
+
/** After each request: rows so far, and the range's total. */
|
|
1648
|
+
onProgress?: (fetched: number, total: number) => void;
|
|
1649
|
+
/** Stops between requests. */
|
|
1650
|
+
signal?: AbortSignal;
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Every usage log in `range`, fetched `batchSize` at a time. Refuses (status
|
|
1654
|
+
* `too-large`) a range with more than `maxRows`, after one request. Billing
|
|
1655
|
+
* pages newest first by offset, so a row written during the export pushes
|
|
1656
|
+
* older ones onto a later page: it keeps asking while billing says there is a
|
|
1657
|
+
* next page and fewer distinct rows than the range's latest total are in
|
|
1658
|
+
* hand, up to `maxRequests` (then status `incomplete`). An adapter that
|
|
1659
|
+
* ignores the query is asked once, and its rows filtered to the range.
|
|
1660
|
+
* Rejects when a request does.
|
|
1661
|
+
*/
|
|
1662
|
+
declare function fetchUsageLogsInRange(fetchUsageLogs: FetchUsageLogs, range: {
|
|
1663
|
+
startDate: string;
|
|
1664
|
+
endDate: string;
|
|
1665
|
+
}, { batchSize, maxRows, maxRequests, onProgress, signal, }?: FetchUsageLogsInRangeOptions): Promise<UsageLogsExportResult>;
|
|
1666
|
+
/** Header and one row per log, as the Usage logs CSV export writes them. */
|
|
1667
|
+
declare function usageLogsCsvRows(logs: UsageHistoryItem[], userMap: Record<string, string>, formatDate: (iso: string) => string): string[][];
|
|
1668
|
+
/** CSV text: every cell quoted, quotes doubled. */
|
|
1669
|
+
declare function toCsv(rows: string[][]): string;
|
|
1670
|
+
|
|
1475
1671
|
/**
|
|
1476
1672
|
* The one `updateMemberRole` request that saving a member sends, or `null`
|
|
1477
1673
|
* when there is nothing to save.
|
|
@@ -1950,8 +2146,14 @@ interface ExportDateModalProps {
|
|
|
1950
2146
|
title: string;
|
|
1951
2147
|
onClose: () => void;
|
|
1952
2148
|
onExport: (startDate: Date, endDate: Date) => void;
|
|
1953
|
-
|
|
1954
|
-
|
|
2149
|
+
/** An export is running: the button is disabled and reads `busyText`. */
|
|
2150
|
+
busy?: boolean;
|
|
2151
|
+
/** Shown in place of the range while busy, e.g. "Fetched 200 of 1,000 logs…". */
|
|
2152
|
+
busyText?: string;
|
|
2153
|
+
/** Shown under the range, e.g. why the last export did not run. */
|
|
2154
|
+
notice?: string | null;
|
|
2155
|
+
}
|
|
2156
|
+
declare function ExportDateModal({ title, onClose, onExport, busy, busyText, notice, }: ExportDateModalProps): react.JSX.Element;
|
|
1955
2157
|
|
|
1956
2158
|
type CreditCycleUnit = "month" | "year";
|
|
1957
2159
|
type CreditLimitValidation = {
|
|
@@ -2434,4 +2636,4 @@ interface AppSettingsRowProps {
|
|
|
2434
2636
|
}
|
|
2435
2637
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2436
2638
|
|
|
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 };
|
|
2639
|
+
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, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, 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, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, 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, sliceUsageLogsPage, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|