diff --git a/packages/console/src/cloud/types/router.ts b/packages/console/src/cloud/types/router.ts index c96b32347..6d14bee37 100644 --- a/packages/console/src/cloud/types/router.ts +++ b/packages/console/src/cloud/types/router.ts @@ -15,13 +15,13 @@ export type Subscription = GuardedResponse; -/** The response of `GET /api/tenants/my/subscription/quota` has the same response type. */ + export type NewSubscriptionQuota = Omit< NewSubscriptionUsageResponse['quota'], // Since we are deprecation the `organizationsEnabled` key soon (use `organizationsLimit` instead), we exclude it from the quota keys for now to avoid confusion. 'organizationsEnabled' >; -/** The response of `GET /api/tenants/my/subscription/usage` has the same response type. */ + export type NewSubscriptionCountBasedUsage = Omit< NewSubscriptionUsageResponse['usage'], // Since we are deprecation the `organizationsEnabled` key soon (use `organizationsLimit` instead), we exclude it from the usage keys for now to avoid confusion. diff --git a/packages/core/src/utils/subscription/types.ts b/packages/core/src/utils/subscription/types.ts index 1d8dfd104..e5f2153d7 100644 --- a/packages/core/src/utils/subscription/types.ts +++ b/packages/core/src/utils/subscription/types.ts @@ -10,27 +10,20 @@ type RouteResponseType = z.infer>; -export type Subscription = RouteResponseType; +export type Subscription = RouteResponseType; /** - * The type of the response of the `GET /api/tenants/:tenantId/subscription/quota` endpoint. - * It is the same as the response type of `GET /api/tenants/my/subscription/quota` endpoint. - * * @remarks * The `auditLogsRetentionDays` will be handled by cron job in Azure Functions, outdated audit logs will be removed automatically. */ export type SubscriptionQuota = Omit< - RouteResponseType, + RouteResponseType, // Since we are deprecation the `organizationsEnabled` key soon (use `organizationsLimit` instead), we exclude it from the usage keys for now to avoid confusion. 'auditLogsRetentionDays' | 'organizationsEnabled' >; -/** - * The type of the response of the `GET /api/tenants/:tenantId/subscription/usage` endpoint. - * It is the same as the response type of `GET /api/tenants/my/subscription/usage` endpoint. - */ export type SubscriptionUsage = Omit< - RouteResponseType, + RouteResponseType, // Since we are deprecation the `organizationsEnabled` key soon (use `organizationsLimit` instead), we exclude it from the usage keys for now to avoid confusion. 'organizationsEnabled' >;