@streamoid/settings 0.15.2 → 0.16.1
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 +46 -6
- package/dist/index.d.ts +46 -6
- package/dist/index.js +331 -56
- package/dist/index.mjs +361 -85
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -721,6 +721,9 @@ interface BillingEntitlement {
|
|
|
721
721
|
}
|
|
722
722
|
interface SubscriptionResponse {
|
|
723
723
|
data: BillingSubscription | null;
|
|
724
|
+
/** Set only after a successful lookup confirms there is no subscription.
|
|
725
|
+
* Legacy adapters may return data:null on failure, so null alone is unknown. */
|
|
726
|
+
noSubscription?: boolean;
|
|
724
727
|
/**
|
|
725
728
|
* Billing's top-level `entitlement` (beside `data`), passed through.
|
|
726
729
|
* Absent on servers from before it, and from hosts that drop it: then the
|
|
@@ -1161,6 +1164,8 @@ interface SettingsApiAdapter {
|
|
|
1161
1164
|
fetchReferrals?: () => Promise<unknown[]>;
|
|
1162
1165
|
}
|
|
1163
1166
|
interface SettingsNavigationAdapter {
|
|
1167
|
+
/** Read-only hosts can hand billing actions to their central dashboard. */
|
|
1168
|
+
manageBilling?: () => void;
|
|
1164
1169
|
/**
|
|
1165
1170
|
* Resolve a fully-qualified URL the host wants Stripe checkout to redirect
|
|
1166
1171
|
* back to after success / cancel. Both flows typically land on the billing
|
|
@@ -1273,7 +1278,7 @@ interface SettingsAdapters {
|
|
|
1273
1278
|
* Ordered as the dialog renders them. Exported because a host has to be able to
|
|
1274
1279
|
* name them in `hiddenApps` — see InviteUpdateModal.
|
|
1275
1280
|
*/
|
|
1276
|
-
declare const APP_KEYS: readonly ["artifax", "photogenix", "returns", "catalogix"];
|
|
1281
|
+
declare const APP_KEYS: readonly ["artifax", "tactix", "photogenix", "returns", "catalogix"];
|
|
1277
1282
|
type AppKey = (typeof APP_KEYS)[number];
|
|
1278
1283
|
interface UserPermissions {
|
|
1279
1284
|
artifax: boolean;
|
|
@@ -1288,6 +1293,13 @@ interface UserPermissions {
|
|
|
1288
1293
|
* group, which is what `permissionServiceIds` does.
|
|
1289
1294
|
*/
|
|
1290
1295
|
returns: boolean;
|
|
1296
|
+
/**
|
|
1297
|
+
* Tactix. Its services are named "tactix" in a "Tactix" group.
|
|
1298
|
+
*
|
|
1299
|
+
* Optional only so hosts that build a UserPermissions by hand keep compiling;
|
|
1300
|
+
* absent reads as "not granted".
|
|
1301
|
+
*/
|
|
1302
|
+
tactix?: boolean;
|
|
1291
1303
|
canUseCredits: boolean;
|
|
1292
1304
|
canInviteUser: boolean;
|
|
1293
1305
|
role: "admin" | "member";
|
|
@@ -1309,6 +1321,18 @@ interface TeamMember {
|
|
|
1309
1321
|
permissions: UserPermissions;
|
|
1310
1322
|
}
|
|
1311
1323
|
declare const DEFAULT_PERMISSIONS: UserPermissions;
|
|
1324
|
+
/**
|
|
1325
|
+
* Split the invite dialog's email field into addresses.
|
|
1326
|
+
*
|
|
1327
|
+
* The field takes several addresses separated by commas, semicolons, spaces or
|
|
1328
|
+
* new lines (a column pasted from a spreadsheet). Addresses are
|
|
1329
|
+
* lower-cased and de-duplicated. Anything that is not a plausible address
|
|
1330
|
+
* comes back in `invalid`, in the order typed, so the dialog can name it.
|
|
1331
|
+
*/
|
|
1332
|
+
declare function parseInviteEmails(input: string): {
|
|
1333
|
+
emails: string[];
|
|
1334
|
+
invalid: string[];
|
|
1335
|
+
};
|
|
1312
1336
|
|
|
1313
1337
|
type WorkspaceInfo = SettingsWorkspaceListItem & {
|
|
1314
1338
|
initials?: string;
|
|
@@ -2175,10 +2199,24 @@ interface InviteUpdateModalProps {
|
|
|
2175
2199
|
* members only. Defaults to true.
|
|
2176
2200
|
*/
|
|
2177
2201
|
allowAdminRole?: boolean;
|
|
2178
|
-
/**
|
|
2202
|
+
/**
|
|
2203
|
+
* Invite mode, preferred over `onInvite`: receives every address typed in
|
|
2204
|
+
* the field (comma, semicolon, space or newline separated), lower-cased and
|
|
2205
|
+
* de-duplicated. Resolve to `{ failed }` with the addresses that were not
|
|
2206
|
+
* invited; the dialog keeps just those in its field so they can be fixed.
|
|
2207
|
+
* While the promise is pending the submit button is disabled.
|
|
2208
|
+
*/
|
|
2209
|
+
onInviteMany?: (permissions: UserPermissions, emails: string[], organizationStanding?: OrganizationStanding) => Promise<{
|
|
2210
|
+
failed: string[];
|
|
2211
|
+
} | void> | void;
|
|
2212
|
+
/**
|
|
2213
|
+
* Called only in invite mode; receives (permissions, email, standing).
|
|
2214
|
+
* Kept for hosts that predate `onInviteMany`: without it, a list of
|
|
2215
|
+
* addresses is delivered as one call per address.
|
|
2216
|
+
*/
|
|
2179
2217
|
onInvite?: (permissions: UserPermissions, email: string, organizationStanding?: OrganizationStanding) => void;
|
|
2180
2218
|
}
|
|
2181
|
-
declare function InviteUpdateModal({ open, mode, userEmail, stores, hiddenApps, allowSubmitWithoutChanges, initialPermissions, onClose, onSave, onRemove, canRemove, showOrganizationStanding, organizationName, allowGuestStanding, initialOrganizationStanding, organizationDomain: _organizationDomain, allowAdminRole, onInvite, }: InviteUpdateModalProps): react.JSX.Element | null;
|
|
2219
|
+
declare function InviteUpdateModal({ open, mode, userEmail, stores, hiddenApps, allowSubmitWithoutChanges, initialPermissions, onClose, onSave, onRemove, canRemove, showOrganizationStanding, organizationName, allowGuestStanding, initialOrganizationStanding, organizationDomain: _organizationDomain, allowAdminRole, onInvite, onInviteMany, }: InviteUpdateModalProps): react.JSX.Element | null;
|
|
2182
2220
|
|
|
2183
2221
|
interface ExportDateModalProps {
|
|
2184
2222
|
title: string;
|
|
@@ -2526,13 +2564,15 @@ interface CurrentPlanState {
|
|
|
2526
2564
|
entitlement: BillingEntitlement | null;
|
|
2527
2565
|
/** Gate features on this; see `hasPaidFeatures`. */
|
|
2528
2566
|
paid: boolean;
|
|
2567
|
+
/** Explicit no-subscription evidence for display; legacy null stays compatible. */
|
|
2568
|
+
noSubscriptionConfirmed?: boolean;
|
|
2529
2569
|
}
|
|
2530
2570
|
/**
|
|
2531
2571
|
* Read the current plan and its entitlement through the host's
|
|
2532
2572
|
* `fetchCurrentPlan`. A failure that carries an entitlement — billing's 404
|
|
2533
2573
|
* for a sponsored workspace with no subscription of its own — is not an
|
|
2534
|
-
* error: it answers no subscription with that entitlement.
|
|
2535
|
-
*
|
|
2574
|
+
* error: it answers no subscription with that entitlement. A plain 404 also
|
|
2575
|
+
* means no subscription. Authorization, network and server errors still throw.
|
|
2536
2576
|
*/
|
|
2537
2577
|
declare function loadCurrentPlan(fetchCurrentPlan: () => Promise<SubscriptionResponse>): Promise<CurrentPlanState>;
|
|
2538
2578
|
|
|
@@ -2674,4 +2714,4 @@ interface AppSettingsRowProps {
|
|
|
2674
2714
|
}
|
|
2675
2715
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2676
2716
|
|
|
2677
|
-
export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, InviteUpdateModal, type InvoicePdfResponse, type 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, productsForCountry, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
|
2717
|
+
export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, InviteUpdateModal, type InvoicePdfResponse, type 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, parseInviteEmails, pausedOwnCreditsText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolWorkspaceName, productsForCountry, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -721,6 +721,9 @@ interface BillingEntitlement {
|
|
|
721
721
|
}
|
|
722
722
|
interface SubscriptionResponse {
|
|
723
723
|
data: BillingSubscription | null;
|
|
724
|
+
/** Set only after a successful lookup confirms there is no subscription.
|
|
725
|
+
* Legacy adapters may return data:null on failure, so null alone is unknown. */
|
|
726
|
+
noSubscription?: boolean;
|
|
724
727
|
/**
|
|
725
728
|
* Billing's top-level `entitlement` (beside `data`), passed through.
|
|
726
729
|
* Absent on servers from before it, and from hosts that drop it: then the
|
|
@@ -1161,6 +1164,8 @@ interface SettingsApiAdapter {
|
|
|
1161
1164
|
fetchReferrals?: () => Promise<unknown[]>;
|
|
1162
1165
|
}
|
|
1163
1166
|
interface SettingsNavigationAdapter {
|
|
1167
|
+
/** Read-only hosts can hand billing actions to their central dashboard. */
|
|
1168
|
+
manageBilling?: () => void;
|
|
1164
1169
|
/**
|
|
1165
1170
|
* Resolve a fully-qualified URL the host wants Stripe checkout to redirect
|
|
1166
1171
|
* back to after success / cancel. Both flows typically land on the billing
|
|
@@ -1273,7 +1278,7 @@ interface SettingsAdapters {
|
|
|
1273
1278
|
* Ordered as the dialog renders them. Exported because a host has to be able to
|
|
1274
1279
|
* name them in `hiddenApps` — see InviteUpdateModal.
|
|
1275
1280
|
*/
|
|
1276
|
-
declare const APP_KEYS: readonly ["artifax", "photogenix", "returns", "catalogix"];
|
|
1281
|
+
declare const APP_KEYS: readonly ["artifax", "tactix", "photogenix", "returns", "catalogix"];
|
|
1277
1282
|
type AppKey = (typeof APP_KEYS)[number];
|
|
1278
1283
|
interface UserPermissions {
|
|
1279
1284
|
artifax: boolean;
|
|
@@ -1288,6 +1293,13 @@ interface UserPermissions {
|
|
|
1288
1293
|
* group, which is what `permissionServiceIds` does.
|
|
1289
1294
|
*/
|
|
1290
1295
|
returns: boolean;
|
|
1296
|
+
/**
|
|
1297
|
+
* Tactix. Its services are named "tactix" in a "Tactix" group.
|
|
1298
|
+
*
|
|
1299
|
+
* Optional only so hosts that build a UserPermissions by hand keep compiling;
|
|
1300
|
+
* absent reads as "not granted".
|
|
1301
|
+
*/
|
|
1302
|
+
tactix?: boolean;
|
|
1291
1303
|
canUseCredits: boolean;
|
|
1292
1304
|
canInviteUser: boolean;
|
|
1293
1305
|
role: "admin" | "member";
|
|
@@ -1309,6 +1321,18 @@ interface TeamMember {
|
|
|
1309
1321
|
permissions: UserPermissions;
|
|
1310
1322
|
}
|
|
1311
1323
|
declare const DEFAULT_PERMISSIONS: UserPermissions;
|
|
1324
|
+
/**
|
|
1325
|
+
* Split the invite dialog's email field into addresses.
|
|
1326
|
+
*
|
|
1327
|
+
* The field takes several addresses separated by commas, semicolons, spaces or
|
|
1328
|
+
* new lines (a column pasted from a spreadsheet). Addresses are
|
|
1329
|
+
* lower-cased and de-duplicated. Anything that is not a plausible address
|
|
1330
|
+
* comes back in `invalid`, in the order typed, so the dialog can name it.
|
|
1331
|
+
*/
|
|
1332
|
+
declare function parseInviteEmails(input: string): {
|
|
1333
|
+
emails: string[];
|
|
1334
|
+
invalid: string[];
|
|
1335
|
+
};
|
|
1312
1336
|
|
|
1313
1337
|
type WorkspaceInfo = SettingsWorkspaceListItem & {
|
|
1314
1338
|
initials?: string;
|
|
@@ -2175,10 +2199,24 @@ interface InviteUpdateModalProps {
|
|
|
2175
2199
|
* members only. Defaults to true.
|
|
2176
2200
|
*/
|
|
2177
2201
|
allowAdminRole?: boolean;
|
|
2178
|
-
/**
|
|
2202
|
+
/**
|
|
2203
|
+
* Invite mode, preferred over `onInvite`: receives every address typed in
|
|
2204
|
+
* the field (comma, semicolon, space or newline separated), lower-cased and
|
|
2205
|
+
* de-duplicated. Resolve to `{ failed }` with the addresses that were not
|
|
2206
|
+
* invited; the dialog keeps just those in its field so they can be fixed.
|
|
2207
|
+
* While the promise is pending the submit button is disabled.
|
|
2208
|
+
*/
|
|
2209
|
+
onInviteMany?: (permissions: UserPermissions, emails: string[], organizationStanding?: OrganizationStanding) => Promise<{
|
|
2210
|
+
failed: string[];
|
|
2211
|
+
} | void> | void;
|
|
2212
|
+
/**
|
|
2213
|
+
* Called only in invite mode; receives (permissions, email, standing).
|
|
2214
|
+
* Kept for hosts that predate `onInviteMany`: without it, a list of
|
|
2215
|
+
* addresses is delivered as one call per address.
|
|
2216
|
+
*/
|
|
2179
2217
|
onInvite?: (permissions: UserPermissions, email: string, organizationStanding?: OrganizationStanding) => void;
|
|
2180
2218
|
}
|
|
2181
|
-
declare function InviteUpdateModal({ open, mode, userEmail, stores, hiddenApps, allowSubmitWithoutChanges, initialPermissions, onClose, onSave, onRemove, canRemove, showOrganizationStanding, organizationName, allowGuestStanding, initialOrganizationStanding, organizationDomain: _organizationDomain, allowAdminRole, onInvite, }: InviteUpdateModalProps): react.JSX.Element | null;
|
|
2219
|
+
declare function InviteUpdateModal({ open, mode, userEmail, stores, hiddenApps, allowSubmitWithoutChanges, initialPermissions, onClose, onSave, onRemove, canRemove, showOrganizationStanding, organizationName, allowGuestStanding, initialOrganizationStanding, organizationDomain: _organizationDomain, allowAdminRole, onInvite, onInviteMany, }: InviteUpdateModalProps): react.JSX.Element | null;
|
|
2182
2220
|
|
|
2183
2221
|
interface ExportDateModalProps {
|
|
2184
2222
|
title: string;
|
|
@@ -2526,13 +2564,15 @@ interface CurrentPlanState {
|
|
|
2526
2564
|
entitlement: BillingEntitlement | null;
|
|
2527
2565
|
/** Gate features on this; see `hasPaidFeatures`. */
|
|
2528
2566
|
paid: boolean;
|
|
2567
|
+
/** Explicit no-subscription evidence for display; legacy null stays compatible. */
|
|
2568
|
+
noSubscriptionConfirmed?: boolean;
|
|
2529
2569
|
}
|
|
2530
2570
|
/**
|
|
2531
2571
|
* Read the current plan and its entitlement through the host's
|
|
2532
2572
|
* `fetchCurrentPlan`. A failure that carries an entitlement — billing's 404
|
|
2533
2573
|
* for a sponsored workspace with no subscription of its own — is not an
|
|
2534
|
-
* error: it answers no subscription with that entitlement.
|
|
2535
|
-
*
|
|
2574
|
+
* error: it answers no subscription with that entitlement. A plain 404 also
|
|
2575
|
+
* means no subscription. Authorization, network and server errors still throw.
|
|
2536
2576
|
*/
|
|
2537
2577
|
declare function loadCurrentPlan(fetchCurrentPlan: () => Promise<SubscriptionResponse>): Promise<CurrentPlanState>;
|
|
2538
2578
|
|
|
@@ -2674,4 +2714,4 @@ interface AppSettingsRowProps {
|
|
|
2674
2714
|
}
|
|
2675
2715
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2676
2716
|
|
|
2677
|
-
export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, InviteUpdateModal, type InvoicePdfResponse, type 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, productsForCountry, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
|
2717
|
+
export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, InviteUpdateModal, type InvoicePdfResponse, type 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, parseInviteEmails, pausedOwnCreditsText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolWorkspaceName, productsForCountry, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sponsoredCreditsText, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|