0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(core): update Cloud API response type definition (#6667)

This commit is contained in:
Darcy Ye 2024-10-11 11:44:53 +08:00 committed by GitHub
parent a662b19db3
commit 5570cec243
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,18 +12,20 @@ type RouteRequestBodyType<T extends { search?: unknown; body?: ZodType; response
export type Subscription = RouteResponseType<GetRoutes['/api/tenants/my/subscription']>; export type Subscription = RouteResponseType<GetRoutes['/api/tenants/my/subscription']>;
type CompleteSubscriptionUsage = RouteResponseType<GetRoutes['/api/tenants/my/subscription-usage']>;
/** /**
* @remarks * @remarks
* The `auditLogsRetentionDays` will be handled by cron job in Azure Functions, outdated audit logs will be removed automatically. * The `auditLogsRetentionDays` will be handled by cron job in Azure Functions, outdated audit logs will be removed automatically.
*/ */
export type SubscriptionQuota = Omit< 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. // 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' 'auditLogsRetentionDays' | 'organizationsEnabled'
>; >;
export type SubscriptionUsage = Omit< 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. // Since we are deprecation the `organizationsEnabled` key soon (use `organizationsLimit` instead), we exclude it from the usage keys for now to avoid confusion.
'organizationsEnabled' 'organizationsEnabled'
>; >;