mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-30 21:01:54 +08:00
## Summary Adds a Usage page under Project Settings showing the owner team's plan, billing period, and resource consumption (dashboard admins, auth users, emails, analytics events, session replays) with progress bars and an upgrade CTA. Backend aggregates usage across the team via `sumTenancyUsage` (parallelized with `Promise.all`) and serves it through `GET /internal/plan-usage`. Shared types in `@hexclave/shared` define the contract consumed by the SDK and dashboard. ## Screenshots  Link to Devin session: https://app.devin.ai/sessions/1bc3344126a442adb4f29ae373d346be Requested by: @Developing-Gamer <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Usage page in project settings displaying comprehensive plan usage metrics including dashboard seats, authentication users, emails sent, analytics events, and session replays * Shows current usage against plan limits with visual progress indicators * Displays upgrade recommendations when plan limits are exceeded with one-click upgrade functionality * Added Usage menu item to project settings navigation <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: armaan <armaan@stack-auth.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
151 lines
3.9 KiB
TypeScript
151 lines
3.9 KiB
TypeScript
export {
|
|
HexclaveAdminApp,
|
|
HexclaveClientApp,
|
|
HexclaveServerApp,
|
|
} from "./apps";
|
|
|
|
// Legacy Stack* aliases — same runtime symbols, kept for backwards compatibility.
|
|
// Prefer the Hexclave* equivalents in new code.
|
|
// The @deprecated JSDoc lives on the original declarations in ./apps/interfaces/*.ts
|
|
// so it survives dts bundling (per-specifier JSDoc on re-exports does not).
|
|
export { StackAdminApp } from "./apps";
|
|
export { StackClientApp } from "./apps";
|
|
export { StackServerApp } from "./apps";
|
|
|
|
// HexclaveAdminApp / HexclaveClientApp / HexclaveServerApp are already exported above as values
|
|
// (which TypeScript treats as both value and type). Only the constructor / options / JSON
|
|
// helper types need separate type-only re-exports.
|
|
export type {
|
|
HexclaveAdminAppConstructor,
|
|
HexclaveAdminAppConstructorOptions,
|
|
HexclaveClientAppConstructor,
|
|
HexclaveClientAppConstructorOptions,
|
|
HexclaveClientAppJson,
|
|
HexclaveServerAppConstructor,
|
|
HexclaveServerAppConstructorOptions,
|
|
} from "./apps";
|
|
|
|
// Legacy Stack* type aliases — @deprecated tags live on the original declarations
|
|
// in ./apps/interfaces/*.ts (per-specifier JSDoc on re-exports doesn't survive dts bundling).
|
|
export type { StackAdminAppConstructor } from "./apps";
|
|
export type { StackAdminAppConstructorOptions } from "./apps";
|
|
export type { StackClientAppConstructor } from "./apps";
|
|
export type { StackClientAppConstructorOptions } from "./apps";
|
|
export type { StackClientAppJson } from "./apps";
|
|
export type { StackServerAppConstructor } from "./apps";
|
|
export type { StackServerAppConstructorOptions } from "./apps";
|
|
|
|
export type {
|
|
EmailOutboxListOptions,
|
|
EmailOutboxListResult,
|
|
EmailOutboxUpdateOptions
|
|
} from "./apps/interfaces/admin-app";
|
|
|
|
export type {
|
|
ProjectConfig
|
|
} from "./project-configs";
|
|
|
|
export type {
|
|
InternalApiKey,
|
|
InternalApiKeyBase,
|
|
InternalApiKeyBaseCrudRead,
|
|
InternalApiKeyCreateOptions,
|
|
InternalApiKeyFirstView
|
|
} from "./internal-api-keys";
|
|
|
|
export {
|
|
hexclaveAppInternalsSymbol,
|
|
} from "./common";
|
|
export {
|
|
getPagePrompt,
|
|
} from "./url-targets";
|
|
export type {
|
|
GetCurrentUserOptions,
|
|
/** @deprecated Use GetCurrentUserOptions instead */
|
|
GetCurrentUserOptions as GetUserOptions,
|
|
HandlerUrlOptions,
|
|
HandlerUrls, OAuthScopesOnSignIn, ResolvedHandlerUrls
|
|
} from "./common";
|
|
|
|
export type {
|
|
Connection,
|
|
OAuthConnection
|
|
} from "./connected-accounts";
|
|
|
|
export type {
|
|
ContactChannel,
|
|
ServerContactChannel
|
|
} from "./contact-channels";
|
|
|
|
export type {
|
|
AdminEmailOutbox,
|
|
AdminEmailOutboxRecipient,
|
|
AdminEmailOutboxSimpleStatus,
|
|
AdminEmailOutboxStatus,
|
|
AdminSendAttemptError,
|
|
AdminSentEmail
|
|
} from "./email";
|
|
|
|
export type {
|
|
AdminProjectPermission,
|
|
AdminProjectPermissionDefinition,
|
|
AdminProjectPermissionDefinitionCreateOptions,
|
|
AdminProjectPermissionDefinitionUpdateOptions, AdminTeamPermission,
|
|
AdminTeamPermissionDefinition,
|
|
AdminTeamPermissionDefinitionCreateOptions,
|
|
AdminTeamPermissionDefinitionUpdateOptions
|
|
} from "./permissions";
|
|
|
|
export type {
|
|
AdminDomainConfig,
|
|
AdminEmailConfig,
|
|
AdminOAuthProviderConfig,
|
|
AdminProjectConfig,
|
|
AdminProjectConfigUpdateOptions,
|
|
OAuthProviderConfig
|
|
} from "./project-configs";
|
|
|
|
export type {
|
|
AdminOwnedProject,
|
|
AdminProject,
|
|
AdminProjectCreateOptions,
|
|
AdminProjectUpdateOptions,
|
|
Project,
|
|
PushedConfigSource
|
|
} from "./projects";
|
|
|
|
export type {
|
|
PlanUsage,
|
|
PlanUsageKind,
|
|
PlanUsageNextPlanId,
|
|
PlanUsagePlanId,
|
|
PlanUsageRow,
|
|
} from "./plan-usage";
|
|
|
|
export type {
|
|
EditableTeamMemberProfile, ReceivedTeamInvitation,
|
|
SentTeamInvitation, ServerListUsersOptions,
|
|
ServerTeam,
|
|
ServerTeamCreateOptions, ServerTeamMemberProfile,
|
|
ServerTeamUpdateOptions,
|
|
ServerTeamUser,
|
|
Team,
|
|
TeamCreateOptions,
|
|
TeamInvitation,
|
|
TeamMemberProfile,
|
|
TeamUpdateOptions,
|
|
TeamUser
|
|
} from "./teams";
|
|
|
|
export type {
|
|
Auth,
|
|
CurrentInternalServerUser,
|
|
CurrentInternalUser,
|
|
CurrentServerUser,
|
|
CurrentUser,
|
|
OAuthProvider,
|
|
ServerOAuthProvider,
|
|
ServerUser,
|
|
User
|
|
} from "./users";
|