Skip to content

Commit

Permalink
refactor(core): update Cloud API response type definition (#6667)
Browse files Browse the repository at this point in the history
  • Loading branch information
darcyYe authored Oct 11, 2024
1 parent a662b19 commit 5570cec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/core/src/utils/subscription/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ type RouteRequestBodyType<T extends { search?: unknown; body?: ZodType; response

export type Subscription = RouteResponseType<GetRoutes['/api/tenants/my/subscription']>;

type CompleteSubscriptionUsage = RouteResponseType<GetRoutes['/api/tenants/my/subscription-usage']>;

/**
* @remarks
* The `auditLogsRetentionDays` will be handled by cron job in Azure Functions, outdated audit logs will be removed automatically.
*/
export type SubscriptionQuota = Omit<
RouteResponseType<GetRoutes['/api/tenants/my/subscription/quota']>,
CompleteSubscriptionUsage['quota'],
// 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'
>;

export type SubscriptionUsage = Omit<
RouteResponseType<GetRoutes['/api/tenants/my/subscription/usage']>,
CompleteSubscriptionUsage['usage'],
// Since we are deprecation the `organizationsEnabled` key soon (use `organizationsLimit` instead), we exclude it from the usage keys for now to avoid confusion.
'organizationsEnabled'
>;
Expand Down

0 comments on commit 5570cec

Please sign in to comment.