* feat: add areDefaultEventTypesEnabled to PlatformOAuthClient * feat: specify areDefaultEventTypesEnabled when creating OAuth client * feat: specify areDefaultEventTypesEnabled when updating OAuth client * feat: display areDefaultEventTypesEnabled in OAuth clients list * refactor: set areDefaultEventTypesEnabled by default to false on API level * feat: v2 API CREATE managed user toggle default event types * refactor: centralize OAuth inputs and outputs in platform/types * fix: correct response types for OAuth hooks * refactor: web/lib/hooks/settings/platform/oauth-clients/useOAuthClients.ts * refactor: web/lib/hooks/settings/platform/oauth-clients/useOAuthClients.ts * refactor: split web OAuth hooks into separate files * refactor: split web OAuth hooks into separate files * docs: v2 OAuth client inputs and outputs * refactor: update and create oauth client inputs
24 lines
805 B
TypeScript
24 lines
805 B
TypeScript
import { useCheckTeamBilling } from "@calcom/web/lib/hooks/settings/platform/billing/useCheckTeamBilling";
|
|
|
|
import { usePlatformMe } from "./usePlatformMe";
|
|
|
|
export const useGetUserAttributes = () => {
|
|
const { data: platformUser, isLoading: isPlatformUserLoading } = usePlatformMe();
|
|
const { data: userBillingData, isFetching: isUserBillingDataLoading } = useCheckTeamBilling(
|
|
platformUser?.organizationId,
|
|
platformUser?.organization?.isPlatform ?? false
|
|
);
|
|
const isPlatformUser = platformUser?.organization?.isPlatform ?? false;
|
|
const isPaidUser = userBillingData?.valid;
|
|
const userOrgId = platformUser?.organizationId;
|
|
|
|
return {
|
|
isUserLoading: isPlatformUserLoading,
|
|
isUserBillingDataLoading,
|
|
isPlatformUser,
|
|
isPaidUser,
|
|
userBillingData,
|
|
userOrgId,
|
|
};
|
|
};
|