@greatapps/common 1.1.790 → 1.1.792
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/account/AccountHubLinkHandler.mjs +36 -0
- package/dist/components/account/AccountHubLinkHandler.mjs.map +1 -0
- package/dist/components/account/AccountModalLayout.mjs +137 -0
- package/dist/components/account/AccountModalLayout.mjs.map +1 -0
- package/dist/components/account/AccountModals.mjs +10 -3
- package/dist/components/account/AccountModals.mjs.map +1 -1
- package/dist/components/account/AccountUnsavedChangesDialog.mjs +34 -0
- package/dist/components/account/AccountUnsavedChangesDialog.mjs.map +1 -0
- package/dist/components/account/DeleteAccountModal.mjs +1 -1
- package/dist/components/account/DeleteAccountModal.mjs.map +1 -1
- package/dist/components/account/IsntPossibleDeleteAccountModal.mjs +8 -1
- package/dist/components/account/IsntPossibleDeleteAccountModal.mjs.map +1 -1
- package/dist/components/account/MyAccountModal.mjs +173 -0
- package/dist/components/account/MyAccountModal.mjs.map +1 -0
- package/dist/components/account/TwoFactorAuthModal.mjs +1 -1
- package/dist/components/account/TwoFactorAuthModal.mjs.map +1 -1
- package/dist/components/account/hooks/useAccountHubActions.mjs +85 -0
- package/dist/components/account/hooks/useAccountHubActions.mjs.map +1 -0
- package/dist/components/account/hooks/useAddCardWithPaymentSwitch.mjs +44 -0
- package/dist/components/account/hooks/useAddCardWithPaymentSwitch.mjs.map +1 -0
- package/dist/components/account/hooks/useAffiliatesActions.mjs +69 -0
- package/dist/components/account/hooks/useAffiliatesActions.mjs.map +1 -0
- package/dist/components/account/hooks/useMyAccountModal.mjs +27 -0
- package/dist/components/account/hooks/useMyAccountModal.mjs.map +1 -0
- package/dist/components/account/hooks/useProjectsActions.mjs +40 -0
- package/dist/components/account/hooks/useProjectsActions.mjs.map +1 -0
- package/dist/components/account/hooks/useSubscriptionActions.mjs +87 -0
- package/dist/components/account/hooks/useSubscriptionActions.mjs.map +1 -0
- package/dist/components/account/hooks/useTeamActions.mjs +31 -0
- package/dist/components/account/hooks/useTeamActions.mjs.map +1 -0
- package/dist/components/account/sections/AffiliatesSection.mjs +313 -0
- package/dist/components/account/sections/AffiliatesSection.mjs.map +1 -0
- package/dist/components/account/sections/ChangePasswordSection.mjs +5 -5
- package/dist/components/account/sections/ChangePasswordSection.mjs.map +1 -1
- package/dist/components/account/sections/MyProfileSection.mjs +212 -164
- package/dist/components/account/sections/MyProfileSection.mjs.map +1 -1
- package/dist/components/account/sections/PreferencesSection.mjs +74 -68
- package/dist/components/account/sections/PreferencesSection.mjs.map +1 -1
- package/dist/components/account/sections/ProjectsSection.mjs +77 -0
- package/dist/components/account/sections/ProjectsSection.mjs.map +1 -0
- package/dist/components/account/sections/SecuritySection.mjs +55 -36
- package/dist/components/account/sections/SecuritySection.mjs.map +1 -1
- package/dist/components/account/sections/SubscriptionSection.mjs +29 -0
- package/dist/components/account/sections/SubscriptionSection.mjs.map +1 -0
- package/dist/components/account/sections/TeamSection.mjs +119 -0
- package/dist/components/account/sections/TeamSection.mjs.map +1 -0
- package/dist/components/account/sections/TokenSection.mjs +41 -43
- package/dist/components/account/sections/TokenSection.mjs.map +1 -1
- package/dist/components/account/sections/affiliates/AffiliateCommissionCard.mjs +73 -0
- package/dist/components/account/sections/affiliates/AffiliateCommissionCard.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateFlows.mjs +20 -0
- package/dist/components/account/sections/affiliates/AffiliateFlows.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateLeadsSheet.mjs +99 -0
- package/dist/components/account/sections/affiliates/AffiliateLeadsSheet.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateStatsCard.mjs +31 -0
- package/dist/components/account/sections/affiliates/AffiliateStatsCard.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateStepCard.mjs +15 -0
- package/dist/components/account/sections/affiliates/AffiliateStepCard.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateTransactionsList.mjs +108 -0
- package/dist/components/account/sections/affiliates/AffiliateTransactionsList.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/NoReceivingAccountModal.mjs +49 -0
- package/dist/components/account/sections/affiliates/NoReceivingAccountModal.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/ReceivingAccountModal.mjs +182 -0
- package/dist/components/account/sections/affiliates/ReceivingAccountModal.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/RequestWithdrawalSheet.mjs +476 -0
- package/dist/components/account/sections/affiliates/RequestWithdrawalSheet.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/ViewAttachmentModal.mjs +34 -0
- package/dist/components/account/sections/affiliates/ViewAttachmentModal.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/reports/AffiliatesIndicatorsChart.mjs +27 -0
- package/dist/components/account/sections/affiliates/reports/AffiliatesIndicatorsChart.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/reports/AffiliatesReportsTab.mjs +30 -0
- package/dist/components/account/sections/affiliates/reports/AffiliatesReportsTab.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/reports/useAffiliatesIndicatorsChart.mjs +120 -0
- package/dist/components/account/sections/affiliates/reports/useAffiliatesIndicatorsChart.mjs.map +1 -0
- package/dist/components/account/sections/projects/DeleteProjectModal.mjs +205 -0
- package/dist/components/account/sections/projects/DeleteProjectModal.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectFlows.mjs +16 -0
- package/dist/components/account/sections/projects/ProjectFlows.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectMembersStack.mjs +53 -0
- package/dist/components/account/sections/projects/ProjectMembersStack.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectRow.mjs +85 -0
- package/dist/components/account/sections/projects/ProjectRow.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectSheet.mjs +499 -0
- package/dist/components/account/sections/projects/ProjectSheet.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectsDisabledModal.mjs +55 -0
- package/dist/components/account/sections/projects/ProjectsDisabledModal.mjs.map +1 -0
- package/dist/components/account/sections/projects/project-form.schema.mjs +28 -0
- package/dist/components/account/sections/projects/project-form.schema.mjs.map +1 -0
- package/dist/components/account/sections/shared/ConnectListRow.mjs +45 -0
- package/dist/components/account/sections/shared/ConnectListRow.mjs.map +1 -0
- package/dist/components/account/sections/shared/DateFilterPopover.mjs +51 -0
- package/dist/components/account/sections/shared/DateFilterPopover.mjs.map +1 -0
- package/dist/components/account/sections/shared/EntityAvatar.mjs +41 -0
- package/dist/components/account/sections/shared/EntityAvatar.mjs.map +1 -0
- package/dist/components/account/sections/shared/FilterPopover.mjs +62 -0
- package/dist/components/account/sections/shared/FilterPopover.mjs.map +1 -0
- package/dist/components/account/sections/shared/FormSection.mjs +14 -0
- package/dist/components/account/sections/shared/FormSection.mjs.map +1 -0
- package/dist/components/account/sections/shared/IconBox.mjs +18 -0
- package/dist/components/account/sections/shared/IconBox.mjs.map +1 -0
- package/dist/components/account/sections/shared/InfiniteScrollList.mjs +36 -0
- package/dist/components/account/sections/shared/InfiniteScrollList.mjs.map +1 -0
- package/dist/components/account/sections/shared/ListPagination.mjs +69 -0
- package/dist/components/account/sections/shared/ListPagination.mjs.map +1 -0
- package/dist/components/account/sections/shared/RowActionsMenu.mjs +52 -0
- package/dist/components/account/sections/shared/RowActionsMenu.mjs.map +1 -0
- package/dist/components/account/sections/shared/SectionLoadError.mjs +20 -0
- package/dist/components/account/sections/shared/SectionLoadError.mjs.map +1 -0
- package/dist/components/account/sections/shared/StatusBadge.mjs +26 -0
- package/dist/components/account/sections/shared/StatusBadge.mjs.map +1 -0
- package/dist/components/account/sections/shared/WorkspaceSection.mjs +10 -0
- package/dist/components/account/sections/shared/WorkspaceSection.mjs.map +1 -0
- package/dist/components/account/sections/subscription/AiCreditsUsage.mjs +106 -0
- package/dist/components/account/sections/subscription/AiCreditsUsage.mjs.map +1 -0
- package/dist/components/account/sections/subscription/BillingAddressSheet.mjs +407 -0
- package/dist/components/account/sections/subscription/BillingAddressSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/BoletoDetailsDialog.mjs +73 -0
- package/dist/components/account/sections/subscription/BoletoDetailsDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/BoletoGeneratedDialog.mjs +22 -0
- package/dist/components/account/sections/subscription/BoletoGeneratedDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/CancelPlanDialog.mjs +161 -0
- package/dist/components/account/sections/subscription/CancelPlanDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ChargeRow.mjs +127 -0
- package/dist/components/account/sections/subscription/ChargeRow.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ChargeStatusBadge.mjs +27 -0
- package/dist/components/account/sections/subscription/ChargeStatusBadge.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ChargesList.mjs +88 -0
- package/dist/components/account/sections/subscription/ChargesList.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ManageCardsSheet.mjs +49 -0
- package/dist/components/account/sections/subscription/ManageCardsSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/OverdueReceiptOpener.mjs +26 -0
- package/dist/components/account/sections/subscription/OverdueReceiptOpener.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PayChargeDialog.mjs +222 -0
- package/dist/components/account/sections/subscription/PayChargeDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PaymentConfirmationDialog.mjs +61 -0
- package/dist/components/account/sections/subscription/PaymentConfirmationDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PaymentMethodsCard.mjs +72 -0
- package/dist/components/account/sections/subscription/PaymentMethodsCard.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PendingChangeDialog.mjs +117 -0
- package/dist/components/account/sections/subscription/PendingChangeDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PixDetailsDialog.mjs +165 -0
- package/dist/components/account/sections/subscription/PixDetailsDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PixPaymentDialog.mjs +155 -0
- package/dist/components/account/sections/subscription/PixPaymentDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PlanDetailsSheet.mjs +253 -0
- package/dist/components/account/sections/subscription/PlanDetailsSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ReceiptDetailsSheet.mjs +237 -0
- package/dist/components/account/sections/subscription/ReceiptDetailsSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/SubscriptionFlows.mjs +40 -0
- package/dist/components/account/sections/subscription/SubscriptionFlows.mjs.map +1 -0
- package/dist/components/account/sections/subscription/SubscriptionPlanCard.mjs +303 -0
- package/dist/components/account/sections/subscription/SubscriptionPlanCard.mjs.map +1 -0
- package/dist/components/account/sections/subscription/UsageReportSheet.mjs +163 -0
- package/dist/components/account/sections/subscription/UsageReportSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/ChangePlanSheet.mjs +75 -0
- package/dist/components/account/sections/subscription/change-plan/ChangePlanSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/AbTestDetailsDialog.mjs +55 -0
- package/dist/components/account/sections/subscription/change-plan/components/AbTestDetailsDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/AddonsBlock.mjs +188 -0
- package/dist/components/account/sections/subscription/change-plan/components/AddonsBlock.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/AlternativeBucketsSection.mjs +66 -0
- package/dist/components/account/sections/subscription/change-plan/components/AlternativeBucketsSection.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/CouponBlock.mjs +42 -0
- package/dist/components/account/sections/subscription/change-plan/components/CouponBlock.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/CouponDialog.mjs +119 -0
- package/dist/components/account/sections/subscription/change-plan/components/CouponDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/PricePreview.mjs +17 -0
- package/dist/components/account/sections/subscription/change-plan/components/PricePreview.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/SummaryBlock.mjs +130 -0
- package/dist/components/account/sections/subscription/change-plan/components/SummaryBlock.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/plan-comparison.mjs +38 -0
- package/dist/components/account/sections/subscription/change-plan/plan-comparison.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PaymentSummaryStep.mjs +127 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PaymentSummaryStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PlanComparisonStep.mjs +111 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PlanComparisonStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PlanViewStep.mjs +69 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PlanViewStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/ReactivationConfigStep.mjs +88 -0
- package/dist/components/account/sections/subscription/change-plan/steps/ReactivationConfigStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/ReactivationPaymentStep.mjs +115 -0
- package/dist/components/account/sections/subscription/change-plan/steps/ReactivationPaymentStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/useChangePlanState.mjs +918 -0
- package/dist/components/account/sections/subscription/change-plan/useChangePlanState.mjs.map +1 -0
- package/dist/components/account/sections/subscription/downgrade/CannotDowngradeDialog.mjs +216 -0
- package/dist/components/account/sections/subscription/downgrade/CannotDowngradeDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/downgrade/DowngradeReasonDialog.mjs +128 -0
- package/dist/components/account/sections/subscription/downgrade/DowngradeReasonDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/plans/PlanCard.mjs +281 -0
- package/dist/components/account/sections/subscription/plans/PlanCard.mjs.map +1 -0
- package/dist/components/account/sections/subscription/plans/PlanCardSkeleton.mjs +53 -0
- package/dist/components/account/sections/subscription/plans/PlanCardSkeleton.mjs.map +1 -0
- package/dist/components/account/sections/subscription/plans/PlansCatalogDialog.mjs +119 -0
- package/dist/components/account/sections/subscription/plans/PlansCatalogDialog.mjs.map +1 -0
- package/dist/components/account/sections/team/DeleteUserModal.mjs +116 -0
- package/dist/components/account/sections/team/DeleteUserModal.mjs.map +1 -0
- package/dist/components/account/sections/team/TeamFlows.mjs +14 -0
- package/dist/components/account/sections/team/TeamFlows.mjs.map +1 -0
- package/dist/components/account/sections/team/TeamMemberRow.mjs +99 -0
- package/dist/components/account/sections/team/TeamMemberRow.mjs.map +1 -0
- package/dist/components/account/sections/team/UserSheet.mjs +570 -0
- package/dist/components/account/sections/team/UserSheet.mjs.map +1 -0
- package/dist/components/account/sections/team/steps/NotificationsStep.mjs +80 -0
- package/dist/components/account/sections/team/steps/NotificationsStep.mjs.map +1 -0
- package/dist/components/account/sections/team/steps/ProjectSelectionStep.mjs +180 -0
- package/dist/components/account/sections/team/steps/ProjectSelectionStep.mjs.map +1 -0
- package/dist/components/account/sections/team/steps/UserInformationStep.mjs +371 -0
- package/dist/components/account/sections/team/steps/UserInformationStep.mjs.map +1 -0
- package/dist/components/account/sections/team/user-form.schema.mjs +37 -0
- package/dist/components/account/sections/team/user-form.schema.mjs.map +1 -0
- package/dist/components/account/types/workspace-actions.type.mjs +1 -0
- package/dist/components/account/types/workspace-actions.type.mjs.map +1 -0
- package/dist/components/layouts/ProfilePopover.mjs +10 -12
- package/dist/components/layouts/ProfilePopover.mjs.map +1 -1
- package/dist/components/layouts/UsersSelectorPopover.mjs +7 -4
- package/dist/components/layouts/UsersSelectorPopover.mjs.map +1 -1
- package/dist/components/modals/AccountDeletionWarningModal.mjs +4 -5
- package/dist/components/modals/AccountDeletionWarningModal.mjs.map +1 -1
- package/dist/components/modals/AccountFrozenModal.mjs +6 -3
- package/dist/components/modals/AccountFrozenModal.mjs.map +1 -1
- package/dist/components/modals/Modals.mjs +3 -3
- package/dist/components/modals/Modals.mjs.map +1 -1
- package/dist/components/modals/PaidPlanRequiredModal.mjs +4 -5
- package/dist/components/modals/PaidPlanRequiredModal.mjs.map +1 -1
- package/dist/components/modals/cards/AddFirstCardWarningModal.mjs +63 -0
- package/dist/components/modals/cards/AddFirstCardWarningModal.mjs.map +1 -0
- package/dist/components/modals/cards/SwitchPaymentToCardModal.mjs +187 -0
- package/dist/components/modals/cards/SwitchPaymentToCardModal.mjs.map +1 -0
- package/dist/components/modals/promo/AiCreditsOfferModal/AiCreditsOfferModal.mjs +5 -4
- package/dist/components/modals/promo/AiCreditsOfferModal/AiCreditsOfferModal.mjs.map +1 -1
- package/dist/components/ui/data-display/CardItem.mjs +9 -1
- package/dist/components/ui/data-display/CardItem.mjs.map +1 -1
- package/dist/components/ui/data-display/PaymentMethodIcons.mjs +50 -0
- package/dist/components/ui/data-display/PaymentMethodIcons.mjs.map +1 -0
- package/dist/components/ui/form/BillingPeriodSelector.mjs +108 -0
- package/dist/components/ui/form/BillingPeriodSelector.mjs.map +1 -0
- package/dist/components/ui/form/PaymentMethodToggle.mjs +82 -0
- package/dist/components/ui/form/PaymentMethodToggle.mjs.map +1 -0
- package/dist/components/ui/form/RadioOptionFieldIcon.mjs +57 -0
- package/dist/components/ui/form/RadioOptionFieldIcon.mjs.map +1 -0
- package/dist/components/ui/form/SegmentedControl.mjs +56 -0
- package/dist/components/ui/form/SegmentedControl.mjs.map +1 -0
- package/dist/components/ui/overlay/Dialog.mjs +21 -4
- package/dist/components/ui/overlay/Dialog.mjs.map +1 -1
- package/dist/components/ui/overlay/Sheet.mjs +26 -8
- package/dist/components/ui/overlay/Sheet.mjs.map +1 -1
- package/dist/components/ui/overlay/layers.mjs +52 -5
- package/dist/components/ui/overlay/layers.mjs.map +1 -1
- package/dist/enums/AccountHubFlow.mjs +13 -0
- package/dist/enums/AccountHubFlow.mjs.map +1 -0
- package/dist/enums/DateFilterPeriod.mjs +22 -0
- package/dist/enums/DateFilterPeriod.mjs.map +1 -0
- package/dist/enums/WorkspaceSectionType.mjs +11 -0
- package/dist/enums/WorkspaceSectionType.mjs.map +1 -0
- package/dist/handlers.mjs +24 -0
- package/dist/handlers.mjs.map +1 -1
- package/dist/hooks/useDebounce.mjs +5 -3
- package/dist/hooks/useDebounce.mjs.map +1 -1
- package/dist/hooks/useUploadProgress.mjs +33 -0
- package/dist/hooks/useUploadProgress.mjs.map +1 -0
- package/dist/i18n/messages/en-us.mjs +868 -3
- package/dist/i18n/messages/en-us.mjs.map +1 -1
- package/dist/i18n/messages/es-es.mjs +868 -3
- package/dist/i18n/messages/es-es.mjs.map +1 -1
- package/dist/i18n/messages/pt-br.mjs +868 -3
- package/dist/i18n/messages/pt-br.mjs.map +1 -1
- package/dist/index.mjs +87 -7
- package/dist/index.mjs.map +1 -1
- package/dist/infra/http/paged.mjs +20 -0
- package/dist/infra/http/paged.mjs.map +1 -0
- package/dist/middleware.mjs +2 -0
- package/dist/middleware.mjs.map +1 -1
- package/dist/middlewares/create-auth-middleware.mjs +2 -4
- package/dist/middlewares/create-auth-middleware.mjs.map +1 -1
- package/dist/middlewares/create-legacy-account-routes-middleware.mjs +44 -0
- package/dist/middlewares/create-legacy-account-routes-middleware.mjs.map +1 -0
- package/dist/middlewares/is-route-equals.mjs +7 -0
- package/dist/middlewares/is-route-equals.mjs.map +1 -0
- package/dist/modules/accounts/actions/account-management.action.mjs +20 -1
- package/dist/modules/accounts/actions/account-management.action.mjs.map +1 -1
- package/dist/modules/accounts/constants/account-hub-link.constants.mjs +9 -0
- package/dist/modules/accounts/constants/account-hub-link.constants.mjs.map +1 -0
- package/dist/modules/accounts/constants/legacy-account-routes.constants.mjs +5 -0
- package/dist/modules/accounts/constants/legacy-account-routes.constants.mjs.map +1 -0
- package/dist/modules/accounts/handlers/list-account-members.handler.mjs +22 -0
- package/dist/modules/accounts/handlers/list-account-members.handler.mjs.map +1 -0
- package/dist/modules/accounts/hooks/add-user-projects.hook.mjs +51 -0
- package/dist/modules/accounts/hooks/add-user-projects.hook.mjs.map +1 -0
- package/dist/modules/accounts/hooks/create-account-user.hook.mjs +20 -0
- package/dist/modules/accounts/hooks/create-account-user.hook.mjs.map +1 -0
- package/dist/modules/accounts/hooks/remove-user-projects.hook.mjs +47 -0
- package/dist/modules/accounts/hooks/remove-user-projects.hook.mjs.map +1 -0
- package/dist/modules/accounts/hooks/use-account-members.hook.mjs +20 -0
- package/dist/modules/accounts/hooks/use-account-members.hook.mjs.map +1 -0
- package/dist/modules/accounts/services/account.service.mjs +59 -0
- package/dist/modules/accounts/services/account.service.mjs.map +1 -1
- package/dist/modules/accounts/types/account-hub-link.type.mjs +1 -0
- package/dist/modules/accounts/types/account-hub-link.type.mjs.map +1 -0
- package/dist/modules/accounts/utils/build-account-hub-url.mjs +16 -0
- package/dist/modules/accounts/utils/build-account-hub-url.mjs.map +1 -0
- package/dist/modules/accounts/utils/is-account-hub-flow.mjs +9 -0
- package/dist/modules/accounts/utils/is-account-hub-flow.mjs.map +1 -0
- package/dist/modules/accounts/utils/is-account-section.mjs +9 -0
- package/dist/modules/accounts/utils/is-account-section.mjs.map +1 -0
- package/dist/modules/accounts/utils/is-my-account-section.mjs +13 -0
- package/dist/modules/accounts/utils/is-my-account-section.mjs.map +1 -0
- package/dist/modules/accounts/utils/map-legacy-account-route.mjs +93 -0
- package/dist/modules/accounts/utils/map-legacy-account-route.mjs.map +1 -0
- package/dist/modules/accounts/utils/parse-account-hub-link.mjs +20 -0
- package/dist/modules/accounts/utils/parse-account-hub-link.mjs.map +1 -0
- package/dist/modules/affiliates/actions/ensure-affiliate.action.mjs +10 -0
- package/dist/modules/affiliates/actions/ensure-affiliate.action.mjs.map +1 -0
- package/dist/modules/affiliates/actions/request-deposit.action.mjs +10 -0
- package/dist/modules/affiliates/actions/request-deposit.action.mjs.map +1 -0
- package/dist/modules/affiliates/actions/update-affiliate.action.mjs +10 -0
- package/dist/modules/affiliates/actions/update-affiliate.action.mjs.map +1 -0
- package/dist/modules/affiliates/constants/affiliate.constants.mjs +11 -0
- package/dist/modules/affiliates/constants/affiliate.constants.mjs.map +1 -0
- package/dist/modules/affiliates/constants/query-keys.constants.mjs +15 -0
- package/dist/modules/affiliates/constants/query-keys.constants.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/affiliate-report-analytics.handler.mjs +16 -0
- package/dist/modules/affiliates/handlers/affiliate-report-analytics.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/affiliate-withdrawal-limits.handler.mjs +12 -0
- package/dist/modules/affiliates/handlers/affiliate-withdrawal-limits.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/current-affiliate.handler.mjs +12 -0
- package/dist/modules/affiliates/handlers/current-affiliate.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/list-affiliate-coupons.handler.mjs +12 -0
- package/dist/modules/affiliates/handlers/list-affiliate-coupons.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/list-affiliate-leads.handler.mjs +22 -0
- package/dist/modules/affiliates/handlers/list-affiliate-leads.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/list-affiliate-transactions.handler.mjs +22 -0
- package/dist/modules/affiliates/handlers/list-affiliate-transactions.handler.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-affiliate-coupons.hook.mjs +17 -0
- package/dist/modules/affiliates/hooks/use-affiliate-coupons.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-affiliate-leads.hook.mjs +22 -0
- package/dist/modules/affiliates/hooks/use-affiliate-leads.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-affiliate-report-analytics.hook.mjs +17 -0
- package/dist/modules/affiliates/hooks/use-affiliate-report-analytics.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-affiliate-transactions.hook.mjs +20 -0
- package/dist/modules/affiliates/hooks/use-affiliate-transactions.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-current-affiliate.hook.mjs +17 -0
- package/dist/modules/affiliates/hooks/use-current-affiliate.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-ensure-affiliate.hook.mjs +23 -0
- package/dist/modules/affiliates/hooks/use-ensure-affiliate.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-request-deposit.hook.mjs +28 -0
- package/dist/modules/affiliates/hooks/use-request-deposit.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-update-affiliate.hook.mjs +22 -0
- package/dist/modules/affiliates/hooks/use-update-affiliate.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-withdrawal-limits.hook.mjs +17 -0
- package/dist/modules/affiliates/hooks/use-withdrawal-limits.hook.mjs.map +1 -0
- package/dist/modules/affiliates/services/affiliates.service.mjs +183 -0
- package/dist/modules/affiliates/services/affiliates.service.mjs.map +1 -0
- package/dist/modules/affiliates/types/affiliate.type.mjs +100 -0
- package/dist/modules/affiliates/types/affiliate.type.mjs.map +1 -0
- package/dist/modules/affiliates/utils/get-affiliate-share-link.mjs +9 -0
- package/dist/modules/affiliates/utils/get-affiliate-share-link.mjs.map +1 -0
- package/dist/modules/charges/actions/get-nota-fiscal.action.mjs +10 -0
- package/dist/modules/charges/actions/get-nota-fiscal.action.mjs.map +1 -0
- package/dist/modules/charges/actions/refresh-pix.action.mjs +10 -0
- package/dist/modules/charges/actions/refresh-pix.action.mjs.map +1 -0
- package/dist/modules/charges/hooks/nota-fiscal.hook.mjs +13 -0
- package/dist/modules/charges/hooks/nota-fiscal.hook.mjs.map +1 -0
- package/dist/modules/charges/hooks/refresh-pix.hook.mjs +13 -0
- package/dist/modules/charges/hooks/refresh-pix.hook.mjs.map +1 -0
- package/dist/modules/charges/services/charges.service.mjs +67 -0
- package/dist/modules/charges/services/charges.service.mjs.map +1 -1
- package/dist/modules/charges/types/nota-fiscal.type.mjs +1 -0
- package/dist/modules/charges/types/nota-fiscal.type.mjs.map +1 -0
- package/dist/modules/charges/types/refresh-pix.type.mjs +1 -0
- package/dist/modules/charges/types/refresh-pix.type.mjs.map +1 -0
- package/dist/modules/charges/utils/get-charge-download-url.mjs +8 -0
- package/dist/modules/charges/utils/get-charge-download-url.mjs.map +1 -0
- package/dist/modules/coupons/constants/query-keys.constants.mjs +5 -0
- package/dist/modules/coupons/constants/query-keys.constants.mjs.map +1 -0
- package/dist/modules/coupons/handlers/find-coupon-by-code.handler.mjs +17 -0
- package/dist/modules/coupons/handlers/find-coupon-by-code.handler.mjs.map +1 -0
- package/dist/modules/coupons/handlers/find-coupon-by-id.handler.mjs +16 -0
- package/dist/modules/coupons/handlers/find-coupon-by-id.handler.mjs.map +1 -0
- package/dist/modules/coupons/hooks/use-coupon-by-code.hook.mjs +15 -0
- package/dist/modules/coupons/hooks/use-coupon-by-code.hook.mjs.map +1 -0
- package/dist/modules/coupons/hooks/use-coupon-by-id.hook.mjs +18 -0
- package/dist/modules/coupons/hooks/use-coupon-by-id.hook.mjs.map +1 -0
- package/dist/modules/coupons/services/coupons.service.mjs +44 -0
- package/dist/modules/coupons/services/coupons.service.mjs.map +1 -0
- package/dist/modules/coupons/types/coupon.type.mjs +61 -0
- package/dist/modules/coupons/types/coupon.type.mjs.map +1 -0
- package/dist/modules/coupons/utils/coupon-restrictions.mjs +60 -0
- package/dist/modules/coupons/utils/coupon-restrictions.mjs.map +1 -0
- package/dist/modules/domains/handlers/count-domains.handler.mjs +12 -0
- package/dist/modules/domains/handlers/count-domains.handler.mjs.map +1 -0
- package/dist/modules/domains/hooks/count-domains.hook.mjs +17 -0
- package/dist/modules/domains/hooks/count-domains.hook.mjs.map +1 -0
- package/dist/modules/domains/services/domains.service.mjs +18 -0
- package/dist/modules/domains/services/domains.service.mjs.map +1 -0
- package/dist/modules/ia-credits/handlers/list-ia-credit-operations.handler.mjs +15 -0
- package/dist/modules/ia-credits/handlers/list-ia-credit-operations.handler.mjs.map +1 -0
- package/dist/modules/ia-credits/hooks/ia-credit-operations.hook.mjs +28 -0
- package/dist/modules/ia-credits/hooks/ia-credit-operations.hook.mjs.map +1 -0
- package/dist/modules/ia-credits/services/ia-credits.service.mjs +23 -2
- package/dist/modules/ia-credits/services/ia-credits.service.mjs.map +1 -1
- package/dist/modules/pages/handlers/count-pages.handler.mjs +4 -2
- package/dist/modules/pages/handlers/count-pages.handler.mjs.map +1 -1
- package/dist/modules/pages/hooks/count-published-pages.hook.mjs +26 -0
- package/dist/modules/pages/hooks/count-published-pages.hook.mjs.map +1 -0
- package/dist/modules/pages/services/pages.service.mjs +3 -2
- package/dist/modules/pages/services/pages.service.mjs.map +1 -1
- package/dist/modules/plans/constants/plan-tooltips.constants.mjs +14 -0
- package/dist/modules/plans/constants/plan-tooltips.constants.mjs.map +1 -0
- package/dist/modules/plans/hooks/use-enriched-plans.hook.mjs +28 -0
- package/dist/modules/plans/hooks/use-enriched-plans.hook.mjs.map +1 -0
- package/dist/modules/plans/hooks/use-ui-plans.hook.mjs +20 -0
- package/dist/modules/plans/hooks/use-ui-plans.hook.mjs.map +1 -0
- package/dist/modules/projects/hooks/add-project-users.hook.mjs +25 -0
- package/dist/modules/projects/hooks/add-project-users.hook.mjs.map +1 -0
- package/dist/modules/projects/hooks/list-all-account-users.hook.mjs +3 -6
- package/dist/modules/projects/hooks/list-all-account-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-available-users.hook.mjs +3 -6
- package/dist/modules/projects/hooks/list-available-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-infinite-projects.hook.mjs +3 -6
- package/dist/modules/projects/hooks/list-infinite-projects.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-project-users.hook.mjs +3 -6
- package/dist/modules/projects/hooks/list-project-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/remove-project-users.hook.mjs +25 -0
- package/dist/modules/projects/hooks/remove-project-users.hook.mjs.map +1 -0
- package/dist/modules/projects/services/project-users.service.mjs +5 -0
- package/dist/modules/projects/services/project-users.service.mjs.map +1 -1
- package/dist/modules/projects/types.mjs +3 -2
- package/dist/modules/projects/types.mjs.map +1 -1
- package/dist/modules/subscriptions/actions/cancel-subscription.action.mjs +10 -0
- package/dist/modules/subscriptions/actions/cancel-subscription.action.mjs.map +1 -0
- package/dist/modules/subscriptions/actions/create-subscription.action.mjs +10 -0
- package/dist/modules/subscriptions/actions/create-subscription.action.mjs.map +1 -0
- package/dist/modules/subscriptions/actions/find-pending-pix-status.action.mjs +10 -0
- package/dist/modules/subscriptions/actions/find-pending-pix-status.action.mjs.map +1 -0
- package/dist/modules/subscriptions/actions/find-subscription-by-id.action.mjs +10 -0
- package/dist/modules/subscriptions/actions/find-subscription-by-id.action.mjs.map +1 -0
- package/dist/modules/subscriptions/constants/addons.constants.mjs +35 -0
- package/dist/modules/subscriptions/constants/addons.constants.mjs.map +1 -1
- package/dist/modules/subscriptions/constants/downgrade.constants.mjs +25 -0
- package/dist/modules/subscriptions/constants/downgrade.constants.mjs.map +1 -0
- package/dist/modules/subscriptions/constants/subscription.constants.mjs +2 -0
- package/dist/modules/subscriptions/constants/subscription.constants.mjs.map +1 -1
- package/dist/modules/subscriptions/handlers/pending-pix-status.handler.mjs +15 -0
- package/dist/modules/subscriptions/handlers/pending-pix-status.handler.mjs.map +1 -0
- package/dist/modules/subscriptions/hooks/cancel-subscription.hook.mjs +25 -0
- package/dist/modules/subscriptions/hooks/cancel-subscription.hook.mjs.map +1 -0
- package/dist/modules/subscriptions/hooks/create-subscription.hook.mjs +33 -0
- package/dist/modules/subscriptions/hooks/create-subscription.hook.mjs.map +1 -0
- package/dist/modules/subscriptions/hooks/find-subscription-by-id.hook.mjs +18 -0
- package/dist/modules/subscriptions/hooks/find-subscription-by-id.hook.mjs.map +1 -0
- package/dist/modules/subscriptions/hooks/pending-pix-status.hook.mjs +25 -0
- package/dist/modules/subscriptions/hooks/pending-pix-status.hook.mjs.map +1 -0
- package/dist/modules/subscriptions/services/subscriptions.service.mjs +71 -0
- package/dist/modules/subscriptions/services/subscriptions.service.mjs.map +1 -1
- package/dist/modules/subscriptions/types/cancel-subscription.type.mjs +9 -0
- package/dist/modules/subscriptions/types/cancel-subscription.type.mjs.map +1 -0
- package/dist/modules/subscriptions/types/create-subscription.type.mjs +62 -0
- package/dist/modules/subscriptions/types/create-subscription.type.mjs.map +1 -0
- package/dist/modules/subscriptions/types/pending-pix-status.type.mjs +28 -0
- package/dist/modules/subscriptions/types/pending-pix-status.type.mjs.map +1 -0
- package/dist/modules/subscriptions/types/subscription.type.mjs +9 -1
- package/dist/modules/subscriptions/types/subscription.type.mjs.map +1 -1
- package/dist/modules/subscriptions/utils/addon-buckets.mjs +69 -0
- package/dist/modules/subscriptions/utils/addon-buckets.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/confirm-payment-if-required.mjs +8 -2
- package/dist/modules/subscriptions/utils/confirm-payment-if-required.mjs.map +1 -1
- package/dist/modules/subscriptions/utils/first-period-pricing.mjs +25 -0
- package/dist/modules/subscriptions/utils/first-period-pricing.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/is-api-subscription.mjs +8 -0
- package/dist/modules/subscriptions/utils/is-api-subscription.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/is-boleto-payer.mjs +17 -0
- package/dist/modules/subscriptions/utils/is-boleto-payer.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/is-free-subscription.mjs +8 -0
- package/dist/modules/subscriptions/utils/is-free-subscription.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/periodicity.mjs +55 -1
- package/dist/modules/subscriptions/utils/periodicity.mjs.map +1 -1
- package/dist/modules/subscriptions/utils/resolve-subscription-plan-name.mjs +27 -0
- package/dist/modules/subscriptions/utils/resolve-subscription-plan-name.mjs.map +1 -0
- package/dist/modules/users/hooks/messages.hook.mjs +3 -5
- package/dist/modules/users/hooks/messages.hook.mjs.map +1 -1
- package/dist/server.mjs +6 -0
- package/dist/server.mjs.map +1 -1
- package/dist/store/useAccountModals.mjs +9 -2
- package/dist/store/useAccountModals.mjs.map +1 -1
- package/dist/store/useAccountUnsavedChanges.mjs +31 -0
- package/dist/store/useAccountUnsavedChanges.mjs.map +1 -0
- package/dist/store/useAffiliateFlows.mjs +23 -0
- package/dist/store/useAffiliateFlows.mjs.map +1 -0
- package/dist/store/useProjectFlows.mjs +18 -0
- package/dist/store/useProjectFlows.mjs.map +1 -0
- package/dist/store/useSubscriptionFlows.mjs +58 -0
- package/dist/store/useSubscriptionFlows.mjs.map +1 -0
- package/dist/store/useTeamFlows.mjs +15 -0
- package/dist/store/useTeamFlows.mjs.map +1 -0
- package/dist/testing/factories/coupon.factory.mjs +19 -0
- package/dist/testing/factories/coupon.factory.mjs.map +1 -0
- package/dist/testing/factories/index.mjs +6 -0
- package/dist/testing/factories/index.mjs.map +1 -1
- package/dist/testing/factories/project-user.factory.mjs +17 -0
- package/dist/testing/factories/project-user.factory.mjs.map +1 -0
- package/dist/testing/factories/project.factory.mjs +21 -0
- package/dist/testing/factories/project.factory.mjs.map +1 -0
- package/dist/testing/react/providers.mjs +1 -1
- package/dist/testing/react/providers.mjs.map +1 -1
- package/dist/utils/browser/chart-custom-tooltip.mjs +69 -0
- package/dist/utils/browser/chart-custom-tooltip.mjs.map +1 -0
- package/dist/utils/browser/get-css-variable.mjs +9 -0
- package/dist/utils/browser/get-css-variable.mjs.map +1 -0
- package/dist/utils/constants/scrollbar.mjs +5 -0
- package/dist/utils/constants/scrollbar.mjs.map +1 -0
- package/dist/utils/date-filter-period.mjs +34 -0
- package/dist/utils/date-filter-period.mjs.map +1 -0
- package/dist/utils/file/index.mjs +11 -1
- package/dist/utils/file/index.mjs.map +1 -1
- package/dist/utils/format/initials.mjs +8 -0
- package/dist/utils/format/initials.mjs.map +1 -0
- package/dist/utils/format/masks.mjs +32 -1
- package/dist/utils/format/masks.mjs.map +1 -1
- package/dist/utils/qrcode/to-data-url.mjs +12 -0
- package/dist/utils/qrcode/to-data-url.mjs.map +1 -0
- package/dist/utils/validators/account.mjs +1 -7
- package/dist/utils/validators/account.mjs.map +1 -1
- package/package.json +15 -2
- package/src/components/account/AccountHubLinkHandler.tsx +39 -0
- package/src/components/account/AccountModalLayout.tsx +190 -0
- package/src/components/account/AccountModals.tsx +12 -2
- package/src/components/account/AccountUnsavedChangesDialog.tsx +49 -0
- package/src/components/account/DeleteAccountModal.tsx +1 -1
- package/src/components/account/IsntPossibleDeleteAccountModal.tsx +9 -1
- package/src/components/account/MyAccountModal.tsx +222 -0
- package/src/components/account/TwoFactorAuthModal.tsx +1 -1
- package/src/components/account/hooks/useAccountHubActions.ts +95 -0
- package/src/components/account/hooks/useAddCardWithPaymentSwitch.ts +70 -0
- package/src/components/account/hooks/useAffiliatesActions.tsx +78 -0
- package/src/components/account/hooks/useMyAccountModal.ts +40 -0
- package/src/components/account/hooks/useProjectsActions.ts +44 -0
- package/src/components/account/hooks/useSubscriptionActions.ts +99 -0
- package/src/components/account/hooks/useTeamActions.ts +35 -0
- package/src/components/account/sections/AffiliatesSection.tsx +342 -0
- package/src/components/account/sections/ChangePasswordSection.tsx +6 -10
- package/src/components/account/sections/MyProfileSection.tsx +215 -147
- package/src/components/account/sections/PreferencesSection.tsx +71 -71
- package/src/components/account/sections/ProjectsSection.tsx +110 -0
- package/src/components/account/sections/SecuritySection.tsx +72 -62
- package/src/components/account/sections/SubscriptionSection.tsx +36 -0
- package/src/components/account/sections/TeamSection.tsx +161 -0
- package/src/components/account/sections/TokenSection.tsx +4 -8
- package/src/components/account/sections/affiliates/AffiliateCommissionCard.tsx +83 -0
- package/src/components/account/sections/affiliates/AffiliateFlows.tsx +20 -0
- package/src/components/account/sections/affiliates/AffiliateLeadsSheet.tsx +143 -0
- package/src/components/account/sections/affiliates/AffiliateStatsCard.tsx +56 -0
- package/src/components/account/sections/affiliates/AffiliateStepCard.tsx +20 -0
- package/src/components/account/sections/affiliates/AffiliateTransactionsList.tsx +194 -0
- package/src/components/account/sections/affiliates/NoReceivingAccountModal.tsx +63 -0
- package/src/components/account/sections/affiliates/ReceivingAccountModal.tsx +213 -0
- package/src/components/account/sections/affiliates/RequestWithdrawalSheet.tsx +586 -0
- package/src/components/account/sections/affiliates/ViewAttachmentModal.tsx +47 -0
- package/src/components/account/sections/affiliates/reports/AffiliatesIndicatorsChart.tsx +45 -0
- package/src/components/account/sections/affiliates/reports/AffiliatesReportsTab.tsx +44 -0
- package/src/components/account/sections/affiliates/reports/useAffiliatesIndicatorsChart.ts +148 -0
- package/src/components/account/sections/projects/DeleteProjectModal.tsx +246 -0
- package/src/components/account/sections/projects/ProjectFlows.tsx +16 -0
- package/src/components/account/sections/projects/ProjectMembersStack.tsx +75 -0
- package/src/components/account/sections/projects/ProjectRow.tsx +96 -0
- package/src/components/account/sections/projects/ProjectSheet.tsx +603 -0
- package/src/components/account/sections/projects/ProjectsDisabledModal.tsx +69 -0
- package/src/components/account/sections/projects/project-form.schema.ts +30 -0
- package/src/components/account/sections/shared/ConnectListRow.tsx +68 -0
- package/src/components/account/sections/shared/DateFilterPopover.tsx +58 -0
- package/src/components/account/sections/shared/EntityAvatar.tsx +54 -0
- package/src/components/account/sections/shared/FilterPopover.tsx +79 -0
- package/src/components/account/sections/shared/FormSection.tsx +23 -0
- package/src/components/account/sections/shared/IconBox.tsx +21 -0
- package/src/components/account/sections/shared/InfiniteScrollList.tsx +57 -0
- package/src/components/account/sections/shared/ListPagination.tsx +84 -0
- package/src/components/account/sections/shared/RowActionsMenu.tsx +66 -0
- package/src/components/account/sections/shared/SectionLoadError.tsx +27 -0
- package/src/components/account/sections/shared/StatusBadge.tsx +33 -0
- package/src/components/account/sections/shared/WorkspaceSection.tsx +22 -0
- package/src/components/account/sections/subscription/AiCreditsUsage.tsx +152 -0
- package/src/components/account/sections/subscription/BillingAddressSheet.tsx +460 -0
- package/src/components/account/sections/subscription/BoletoDetailsDialog.tsx +104 -0
- package/src/components/account/sections/subscription/BoletoGeneratedDialog.tsx +24 -0
- package/src/components/account/sections/subscription/CancelPlanDialog.tsx +221 -0
- package/src/components/account/sections/subscription/ChargeRow.tsx +161 -0
- package/src/components/account/sections/subscription/ChargeStatusBadge.tsx +29 -0
- package/src/components/account/sections/subscription/ChargesList.tsx +125 -0
- package/src/components/account/sections/subscription/ManageCardsSheet.tsx +93 -0
- package/src/components/account/sections/subscription/OverdueReceiptOpener.tsx +29 -0
- package/src/components/account/sections/subscription/PayChargeDialog.tsx +306 -0
- package/src/components/account/sections/subscription/PaymentConfirmationDialog.tsx +70 -0
- package/src/components/account/sections/subscription/PaymentMethodsCard.tsx +117 -0
- package/src/components/account/sections/subscription/PendingChangeDialog.tsx +168 -0
- package/src/components/account/sections/subscription/PixDetailsDialog.tsx +246 -0
- package/src/components/account/sections/subscription/PixPaymentDialog.tsx +242 -0
- package/src/components/account/sections/subscription/PlanDetailsSheet.tsx +380 -0
- package/src/components/account/sections/subscription/ReceiptDetailsSheet.tsx +318 -0
- package/src/components/account/sections/subscription/SubscriptionFlows.tsx +40 -0
- package/src/components/account/sections/subscription/SubscriptionPlanCard.tsx +433 -0
- package/src/components/account/sections/subscription/UsageReportSheet.tsx +244 -0
- package/src/components/account/sections/subscription/change-plan/ChangePlanSheet.tsx +95 -0
- package/src/components/account/sections/subscription/change-plan/components/AbTestDetailsDialog.tsx +57 -0
- package/src/components/account/sections/subscription/change-plan/components/AddonsBlock.tsx +214 -0
- package/src/components/account/sections/subscription/change-plan/components/AlternativeBucketsSection.tsx +92 -0
- package/src/components/account/sections/subscription/change-plan/components/CouponBlock.tsx +42 -0
- package/src/components/account/sections/subscription/change-plan/components/CouponDialog.tsx +134 -0
- package/src/components/account/sections/subscription/change-plan/components/PricePreview.tsx +28 -0
- package/src/components/account/sections/subscription/change-plan/components/SummaryBlock.tsx +194 -0
- package/src/components/account/sections/subscription/change-plan/plan-comparison.ts +52 -0
- package/src/components/account/sections/subscription/change-plan/steps/PaymentSummaryStep.tsx +161 -0
- package/src/components/account/sections/subscription/change-plan/steps/PlanComparisonStep.tsx +165 -0
- package/src/components/account/sections/subscription/change-plan/steps/PlanViewStep.tsx +89 -0
- package/src/components/account/sections/subscription/change-plan/steps/ReactivationConfigStep.tsx +117 -0
- package/src/components/account/sections/subscription/change-plan/steps/ReactivationPaymentStep.tsx +139 -0
- package/src/components/account/sections/subscription/change-plan/useChangePlanState.tsx +1158 -0
- package/src/components/account/sections/subscription/downgrade/CannotDowngradeDialog.tsx +297 -0
- package/src/components/account/sections/subscription/downgrade/DowngradeReasonDialog.tsx +154 -0
- package/src/components/account/sections/subscription/plans/PlanCard.tsx +417 -0
- package/src/components/account/sections/subscription/plans/PlanCardSkeleton.tsx +70 -0
- package/src/components/account/sections/subscription/plans/PlansCatalogDialog.tsx +156 -0
- package/src/components/account/sections/team/DeleteUserModal.tsx +134 -0
- package/src/components/account/sections/team/TeamFlows.tsx +14 -0
- package/src/components/account/sections/team/TeamMemberRow.tsx +151 -0
- package/src/components/account/sections/team/UserSheet.tsx +688 -0
- package/src/components/account/sections/team/steps/NotificationsStep.tsx +109 -0
- package/src/components/account/sections/team/steps/ProjectSelectionStep.tsx +219 -0
- package/src/components/account/sections/team/steps/UserInformationStep.tsx +423 -0
- package/src/components/account/sections/team/user-form.schema.ts +43 -0
- package/src/components/account/types/workspace-actions.type.ts +56 -0
- package/src/components/layouts/ProfilePopover.tsx +11 -12
- package/src/components/layouts/UsersSelectorPopover.tsx +7 -4
- package/src/components/modals/AccountDeletionWarningModal.tsx +4 -5
- package/src/components/modals/AccountFrozenModal.tsx +6 -3
- package/src/components/modals/Modals.tsx +6 -3
- package/src/components/modals/PaidPlanRequiredModal.tsx +4 -5
- package/src/components/modals/cards/AddFirstCardWarningModal.tsx +72 -0
- package/src/components/modals/cards/SwitchPaymentToCardModal.tsx +232 -0
- package/src/components/modals/promo/AiCreditsOfferModal/AiCreditsOfferModal.tsx +5 -4
- package/src/components/ui/data-display/CardItem.tsx +9 -5
- package/src/components/ui/data-display/PaymentMethodIcons.tsx +43 -0
- package/src/components/ui/form/BillingPeriodSelector.tsx +173 -0
- package/src/components/ui/form/PaymentMethodToggle.tsx +119 -0
- package/src/components/ui/form/RadioOptionFieldIcon.tsx +64 -0
- package/src/components/ui/form/SegmentedControl.tsx +77 -0
- package/src/components/ui/overlay/Dialog.tsx +21 -2
- package/src/components/ui/overlay/Sheet.tsx +26 -5
- package/src/components/ui/overlay/layers.tsx +88 -4
- package/src/enums/AccountHubFlow.ts +8 -0
- package/src/enums/DateFilterPeriod.ts +17 -0
- package/src/enums/WorkspaceSectionType.ts +6 -0
- package/src/handlers.ts +14 -0
- package/src/hooks/useDebounce.ts +5 -3
- package/src/hooks/useUploadProgress.ts +42 -0
- package/src/i18n/messages/en-us.ts +909 -2
- package/src/i18n/messages/es-es.ts +913 -2
- package/src/i18n/messages/pt-br.ts +913 -2
- package/src/index.ts +56 -1
- package/src/infra/http/paged.ts +24 -0
- package/src/middleware.ts +1 -0
- package/src/middlewares/create-auth-middleware.ts +2 -5
- package/src/middlewares/create-legacy-account-routes-middleware.ts +54 -0
- package/src/middlewares/is-route-equals.ts +3 -0
- package/src/modules/accounts/actions/account-management.action.ts +22 -1
- package/src/modules/accounts/constants/account-hub-link.constants.ts +3 -0
- package/src/modules/accounts/constants/legacy-account-routes.constants.ts +1 -0
- package/src/modules/accounts/handlers/list-account-members.handler.ts +23 -0
- package/src/modules/accounts/hooks/add-user-projects.hook.ts +72 -0
- package/src/modules/accounts/hooks/create-account-user.hook.ts +21 -0
- package/src/modules/accounts/hooks/remove-user-projects.hook.ts +68 -0
- package/src/modules/accounts/hooks/use-account-members.hook.ts +31 -0
- package/src/modules/accounts/services/account.service.ts +71 -0
- package/src/modules/accounts/types/account-hub-link.type.ts +13 -0
- package/src/modules/accounts/types.ts +9 -0
- package/src/modules/accounts/utils/build-account-hub-url.ts +14 -0
- package/src/modules/accounts/utils/is-account-hub-flow.ts +7 -0
- package/src/modules/accounts/utils/is-account-section.ts +7 -0
- package/src/modules/accounts/utils/is-my-account-section.ts +12 -0
- package/src/modules/accounts/utils/map-legacy-account-route.ts +108 -0
- package/src/modules/accounts/utils/parse-account-hub-link.ts +21 -0
- package/src/modules/affiliates/actions/ensure-affiliate.action.ts +9 -0
- package/src/modules/affiliates/actions/request-deposit.action.ts +9 -0
- package/src/modules/affiliates/actions/update-affiliate.action.ts +9 -0
- package/src/modules/affiliates/constants/affiliate.constants.ts +11 -0
- package/src/modules/affiliates/constants/query-keys.constants.ts +7 -0
- package/src/modules/affiliates/handlers/affiliate-report-analytics.handler.ts +16 -0
- package/src/modules/affiliates/handlers/affiliate-withdrawal-limits.handler.ts +10 -0
- package/src/modules/affiliates/handlers/current-affiliate.handler.ts +10 -0
- package/src/modules/affiliates/handlers/list-affiliate-coupons.handler.ts +10 -0
- package/src/modules/affiliates/handlers/list-affiliate-leads.handler.ts +23 -0
- package/src/modules/affiliates/handlers/list-affiliate-transactions.handler.ts +23 -0
- package/src/modules/affiliates/hooks/use-affiliate-coupons.hook.ts +19 -0
- package/src/modules/affiliates/hooks/use-affiliate-leads.hook.ts +27 -0
- package/src/modules/affiliates/hooks/use-affiliate-report-analytics.hook.ts +19 -0
- package/src/modules/affiliates/hooks/use-affiliate-transactions.hook.ts +25 -0
- package/src/modules/affiliates/hooks/use-current-affiliate.hook.ts +19 -0
- package/src/modules/affiliates/hooks/use-ensure-affiliate.hook.ts +24 -0
- package/src/modules/affiliates/hooks/use-request-deposit.hook.ts +29 -0
- package/src/modules/affiliates/hooks/use-update-affiliate.hook.ts +24 -0
- package/src/modules/affiliates/hooks/use-withdrawal-limits.hook.ts +20 -0
- package/src/modules/affiliates/services/affiliates.service.ts +240 -0
- package/src/modules/affiliates/types/affiliate.type.ts +180 -0
- package/src/modules/affiliates/utils/get-affiliate-share-link.ts +8 -0
- package/src/modules/charges/actions/get-nota-fiscal.action.ts +8 -0
- package/src/modules/charges/actions/refresh-pix.action.ts +8 -0
- package/src/modules/charges/hooks/nota-fiscal.hook.ts +13 -0
- package/src/modules/charges/hooks/refresh-pix.hook.ts +13 -0
- package/src/modules/charges/services/charges.service.ts +121 -0
- package/src/modules/charges/types/nota-fiscal.type.ts +20 -0
- package/src/modules/charges/types/refresh-pix.type.ts +14 -0
- package/src/modules/charges/utils/get-charge-download-url.ts +10 -0
- package/src/modules/coupons/constants/query-keys.constants.ts +1 -0
- package/src/modules/coupons/handlers/find-coupon-by-code.handler.ts +16 -0
- package/src/modules/coupons/handlers/find-coupon-by-id.handler.ts +15 -0
- package/src/modules/coupons/hooks/use-coupon-by-code.hook.ts +16 -0
- package/src/modules/coupons/hooks/use-coupon-by-id.hook.ts +20 -0
- package/src/modules/coupons/services/coupons.service.ts +54 -0
- package/src/modules/coupons/types/coupon.type.ts +70 -0
- package/src/modules/coupons/utils/coupon-restrictions.ts +112 -0
- package/src/modules/domains/handlers/count-domains.handler.ts +10 -0
- package/src/modules/domains/hooks/count-domains.hook.ts +17 -0
- package/src/modules/domains/services/domains.service.ts +18 -0
- package/src/modules/ia-credits/handlers/list-ia-credit-operations.handler.ts +14 -0
- package/src/modules/ia-credits/hooks/ia-credit-operations.hook.ts +33 -0
- package/src/modules/ia-credits/services/ia-credits.service.ts +32 -1
- package/src/modules/pages/handlers/count-pages.handler.ts +5 -2
- package/src/modules/pages/hooks/count-published-pages.hook.ts +26 -0
- package/src/modules/pages/services/pages.service.ts +3 -2
- package/src/modules/plans/constants/plan-tooltips.constants.ts +16 -0
- package/src/modules/plans/hooks/use-enriched-plans.hook.ts +31 -0
- package/src/modules/plans/hooks/use-ui-plans.hook.ts +22 -0
- package/src/modules/projects/hooks/add-project-users.hook.ts +29 -0
- package/src/modules/projects/hooks/list-all-account-users.hook.ts +3 -6
- package/src/modules/projects/hooks/list-available-users.hook.ts +3 -6
- package/src/modules/projects/hooks/list-infinite-projects.hook.ts +3 -6
- package/src/modules/projects/hooks/list-project-users.hook.ts +3 -6
- package/src/modules/projects/hooks/remove-project-users.hook.ts +29 -0
- package/src/modules/projects/services/project-users.service.ts +135 -130
- package/src/modules/projects/types.ts +89 -88
- package/src/modules/subscriptions/actions/cancel-subscription.action.ts +12 -0
- package/src/modules/subscriptions/actions/create-subscription.action.ts +9 -0
- package/src/modules/subscriptions/actions/find-pending-pix-status.action.ts +8 -0
- package/src/modules/subscriptions/actions/find-subscription-by-id.action.ts +8 -0
- package/src/modules/subscriptions/constants/addons.constants.ts +50 -0
- package/src/modules/subscriptions/constants/downgrade.constants.ts +30 -0
- package/src/modules/subscriptions/constants/subscription.constants.ts +3 -0
- package/src/modules/subscriptions/handlers/pending-pix-status.handler.ts +17 -0
- package/src/modules/subscriptions/hooks/cancel-subscription.hook.ts +28 -0
- package/src/modules/subscriptions/hooks/create-subscription.hook.ts +34 -0
- package/src/modules/subscriptions/hooks/find-subscription-by-id.hook.ts +17 -0
- package/src/modules/subscriptions/hooks/pending-pix-status.hook.ts +30 -0
- package/src/modules/subscriptions/services/subscriptions.service.ts +401 -301
- package/src/modules/subscriptions/types/cancel-subscription.type.ts +8 -0
- package/src/modules/subscriptions/types/create-subscription.type.ts +79 -0
- package/src/modules/subscriptions/types/pending-pix-status.type.ts +33 -0
- package/src/modules/subscriptions/types/subscription.type.ts +157 -147
- package/src/modules/subscriptions/utils/addon-buckets.ts +129 -0
- package/src/modules/subscriptions/utils/confirm-payment-if-required.ts +9 -2
- package/src/modules/subscriptions/utils/first-period-pricing.ts +63 -0
- package/src/modules/subscriptions/utils/is-api-subscription.ts +6 -0
- package/src/modules/subscriptions/utils/is-boleto-payer.ts +21 -0
- package/src/modules/subscriptions/utils/is-free-subscription.ts +6 -0
- package/src/modules/subscriptions/utils/periodicity.ts +101 -0
- package/src/modules/subscriptions/utils/resolve-subscription-plan-name.ts +44 -0
- package/src/modules/users/hooks/messages.hook.ts +3 -5
- package/src/server.ts +102 -99
- package/src/store/useAccountModals.ts +22 -5
- package/src/store/useAccountUnsavedChanges.ts +52 -0
- package/src/store/useAffiliateFlows.ts +46 -0
- package/src/store/useProjectFlows.ts +42 -0
- package/src/store/useSubscriptionFlows.ts +176 -0
- package/src/store/useTeamFlows.ts +34 -0
- package/src/testing/factories/coupon.factory.ts +17 -0
- package/src/testing/factories/index.ts +3 -0
- package/src/testing/factories/project-user.factory.ts +15 -0
- package/src/testing/factories/project.factory.ts +19 -0
- package/src/testing/react/providers.tsx +2 -1
- package/src/utils/browser/chart-custom-tooltip.ts +85 -0
- package/src/utils/browser/get-css-variable.ts +6 -0
- package/src/utils/constants/scrollbar.ts +10 -0
- package/src/utils/date-filter-period.ts +34 -0
- package/src/utils/file/index.ts +13 -0
- package/src/utils/format/initials.ts +10 -0
- package/src/utils/format/masks.ts +41 -0
- package/src/utils/qrcode/to-data-url.ts +23 -0
- package/src/utils/validators/account.ts +0 -8
- package/dist/components/account/ConfigurationsMyAccountModal.mjs +0 -143
- package/dist/components/account/ConfigurationsMyAccountModal.mjs.map +0 -1
- package/dist/components/account/hooks/useConfigurationsModal.mjs +0 -34
- package/dist/components/account/hooks/useConfigurationsModal.mjs.map +0 -1
- package/src/components/account/ConfigurationsMyAccountModal.tsx +0 -179
- package/src/components/account/hooks/useConfigurationsModal.ts +0 -45
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { addProjectUserAction } from "../actions/add-project-user.action";
|
|
4
|
+
import { withAction } from "../../../utils/withAction";
|
|
5
|
+
import { useAuthQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
6
|
+
import { ACCOUNT_USERS_QUERY_KEY } from "../../accounts/hooks/useAccountManagement";
|
|
7
|
+
import { PROJECTS_BASE_KEY } from "./list-projects.hook";
|
|
8
|
+
function useAddProjectUsers() {
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const projectUsersKey = useAuthQueryKey(["project-users"]);
|
|
11
|
+
const projectsKey = useAuthQueryKey([...PROJECTS_BASE_KEY]);
|
|
12
|
+
const accountUsersKey = useAuthQueryKey([...ACCOUNT_USERS_QUERY_KEY]);
|
|
13
|
+
return useMutation({
|
|
14
|
+
mutationFn: ({ projectId, userIds }) => withAction(addProjectUserAction)({ projectId, users: userIds }),
|
|
15
|
+
onSuccess: (_data, { projectId }) => {
|
|
16
|
+
queryClient.invalidateQueries({ queryKey: [...projectUsersKey, projectId] });
|
|
17
|
+
queryClient.invalidateQueries({ queryKey: projectsKey });
|
|
18
|
+
queryClient.invalidateQueries({ queryKey: accountUsersKey });
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
useAddProjectUsers
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=add-project-users.hook.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/projects/hooks/add-project-users.hook.ts"],"sourcesContent":["'use client';\n\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { addProjectUserAction } from '../actions/add-project-user.action';\nimport { withAction } from '../../../utils/withAction';\nimport { useAuthQueryKey } from '../../../hooks/useAuthQueryKey';\nimport { ACCOUNT_USERS_QUERY_KEY } from '../../accounts/hooks/useAccountManagement';\nimport { PROJECTS_BASE_KEY } from './list-projects.hook';\n\n/**\n * Conecta vários usuários a um projeto de uma vez (usado ao salvar o sheet de projeto).\n * Para conectar um único usuário com update otimista, use `useAddProjectUser`.\n */\nexport function useAddProjectUsers() {\n const queryClient = useQueryClient();\n const projectUsersKey = useAuthQueryKey(['project-users']);\n const projectsKey = useAuthQueryKey([...PROJECTS_BASE_KEY]);\n const accountUsersKey = useAuthQueryKey([...ACCOUNT_USERS_QUERY_KEY]);\n\n return useMutation({\n mutationFn: ({ projectId, userIds }: { projectId: number; userIds: number[] }) =>\n withAction(addProjectUserAction)({ projectId, users: userIds }),\n onSuccess: (_data, { projectId }) => {\n queryClient.invalidateQueries({ queryKey: [...projectUsersKey, projectId] });\n queryClient.invalidateQueries({ queryKey: projectsKey });\n queryClient.invalidateQueries({ queryKey: accountUsersKey });\n },\n });\n}\n"],"mappings":";AAEA,SAAS,aAAa,sBAAsB;AAC5C,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AACxC,SAAS,yBAAyB;AAM3B,SAAS,qBAAqB;AACnC,QAAM,cAAc,eAAe;AACnC,QAAM,kBAAkB,gBAAgB,CAAC,eAAe,CAAC;AACzD,QAAM,cAAc,gBAAgB,CAAC,GAAG,iBAAiB,CAAC;AAC1D,QAAM,kBAAkB,gBAAgB,CAAC,GAAG,uBAAuB,CAAC;AAEpE,SAAO,YAAY;AAAA,IACjB,YAAY,CAAC,EAAE,WAAW,QAAQ,MAChC,WAAW,oBAAoB,EAAE,EAAE,WAAW,OAAO,QAAQ,CAAC;AAAA,IAChE,WAAW,CAAC,OAAO,EAAE,UAAU,MAAM;AACnC,kBAAY,kBAAkB,EAAE,UAAU,CAAC,GAAG,iBAAiB,SAAS,EAAE,CAAC;AAC3E,kBAAY,kBAAkB,EAAE,UAAU,YAAY,CAAC;AACvD,kBAAY,kBAAkB,EAAE,UAAU,gBAAgB,CAAC;AAAA,IAC7D;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
3
|
-
import {
|
|
3
|
+
import { apiFetchPaged, nextPageParam } from "../../../infra/http/paged";
|
|
4
4
|
import { useAuthQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
5
5
|
const PAGE_SIZE = 20;
|
|
6
6
|
const LIST_ALL_ACCOUNT_USERS_BASE_KEY = () => ["account-users", "all"];
|
|
@@ -13,7 +13,7 @@ function useListAllAccountUsers(search = "", projectId) {
|
|
|
13
13
|
const queryKey = useAuthQueryKey([...LIST_ALL_ACCOUNT_USERS_QUERY_KEY(search, projectId)]);
|
|
14
14
|
return useInfiniteQuery({
|
|
15
15
|
queryKey,
|
|
16
|
-
queryFn: ({ pageParam, signal }) =>
|
|
16
|
+
queryFn: ({ pageParam, signal }) => apiFetchPaged("/api/account/users", {
|
|
17
17
|
params: {
|
|
18
18
|
search: search || void 0,
|
|
19
19
|
page: pageParam,
|
|
@@ -22,10 +22,7 @@ function useListAllAccountUsers(search = "", projectId) {
|
|
|
22
22
|
},
|
|
23
23
|
signal
|
|
24
24
|
}),
|
|
25
|
-
getNextPageParam:
|
|
26
|
-
const loaded = allPages.reduce((sum, p) => sum + p.data.length, 0);
|
|
27
|
-
return loaded < lastPage.total ? allPages.length + 1 : void 0;
|
|
28
|
-
},
|
|
25
|
+
getNextPageParam: nextPageParam,
|
|
29
26
|
initialPageParam: 1
|
|
30
27
|
});
|
|
31
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/projects/hooks/list-all-account-users.hook.ts"],"sourcesContent":["'use client';\n\nimport { useInfiniteQuery } from '@tanstack/react-query';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/projects/hooks/list-all-account-users.hook.ts"],"sourcesContent":["'use client';\n\nimport { useInfiniteQuery } from '@tanstack/react-query';\nimport { apiFetchPaged, nextPageParam } from '../../../infra/http/paged';\nimport type { AccountUser, UsersPage } from '../types';\nimport { useAuthQueryKey } from '../../../hooks/useAuthQueryKey';\n\nconst PAGE_SIZE = 20;\n\nexport const LIST_ALL_ACCOUNT_USERS_BASE_KEY = () =>\n ['account-users', 'all'] as const;\n\nexport const LIST_ALL_ACCOUNT_USERS_QUERY_KEY = (search: string = '', projectId?: number) => [\n ...LIST_ALL_ACCOUNT_USERS_BASE_KEY(),\n search,\n projectId,\n] as const;\n\nexport function useListAllAccountUsers(search: string = '', projectId?: number) {\n const queryKey = useAuthQueryKey([...LIST_ALL_ACCOUNT_USERS_QUERY_KEY(search, projectId)]);\n\n return useInfiniteQuery({\n queryKey,\n queryFn: ({ pageParam, signal }) =>\n apiFetchPaged<UsersPage<AccountUser>>('/api/account/users', {\n params: {\n search: search || undefined,\n page: pageParam as number,\n limit: PAGE_SIZE,\n inProject: projectId,\n },\n signal,\n }),\n getNextPageParam: nextPageParam,\n initialPageParam: 1,\n });\n}\n"],"mappings":";AAEA,SAAS,wBAAwB;AACjC,SAAS,eAAe,qBAAqB;AAE7C,SAAS,uBAAuB;AAEhC,MAAM,YAAY;AAEX,MAAM,kCAAkC,MAC7C,CAAC,iBAAiB,KAAK;AAElB,MAAM,mCAAmC,CAAC,SAAiB,IAAI,cAAuB;AAAA,EAC3F,GAAG,gCAAgC;AAAA,EACnC;AAAA,EACA;AACF;AAEO,SAAS,uBAAuB,SAAiB,IAAI,WAAoB;AAC9E,QAAM,WAAW,gBAAgB,CAAC,GAAG,iCAAiC,QAAQ,SAAS,CAAC,CAAC;AAEzF,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA,SAAS,CAAC,EAAE,WAAW,OAAO,MAC5B,cAAsC,sBAAsB;AAAA,MAC1D,QAAQ;AAAA,QACN,QAAQ,UAAU;AAAA,QAClB,MAAM;AAAA,QACN,OAAO;AAAA,QACP,WAAW;AAAA,MACb;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACH,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,EACpB,CAAC;AACH;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
3
|
-
import {
|
|
3
|
+
import { apiFetchPaged, nextPageParam } from "../../../infra/http/paged";
|
|
4
4
|
import { useAuthQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
5
5
|
const PAGE_SIZE = 20;
|
|
6
6
|
const LIST_AVAILABLE_USERS_BASE_KEY = (projectId) => ["project-users", projectId, "out"];
|
|
@@ -12,7 +12,7 @@ function useListAvailableUsers(projectId, search = "") {
|
|
|
12
12
|
const queryKey = useAuthQueryKey([...LIST_AVAILABLE_USERS_QUERY_KEY(projectId, search)]);
|
|
13
13
|
return useInfiniteQuery({
|
|
14
14
|
queryKey,
|
|
15
|
-
queryFn: ({ pageParam, signal }) =>
|
|
15
|
+
queryFn: ({ pageParam, signal }) => apiFetchPaged(`/api/projects/${projectId}/available-users`, {
|
|
16
16
|
params: {
|
|
17
17
|
search: search || void 0,
|
|
18
18
|
page: pageParam,
|
|
@@ -20,10 +20,7 @@ function useListAvailableUsers(projectId, search = "") {
|
|
|
20
20
|
},
|
|
21
21
|
signal
|
|
22
22
|
}),
|
|
23
|
-
getNextPageParam:
|
|
24
|
-
const loaded = allPages.reduce((sum, p) => sum + p.data.length, 0);
|
|
25
|
-
return loaded < lastPage.total ? allPages.length + 1 : void 0;
|
|
26
|
-
},
|
|
23
|
+
getNextPageParam: nextPageParam,
|
|
27
24
|
initialPageParam: 1,
|
|
28
25
|
enabled: !!projectId
|
|
29
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/projects/hooks/list-available-users.hook.ts"],"sourcesContent":["'use client';\n\nimport { useInfiniteQuery } from '@tanstack/react-query';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/projects/hooks/list-available-users.hook.ts"],"sourcesContent":["'use client';\n\nimport { useInfiniteQuery } from '@tanstack/react-query';\nimport { apiFetchPaged, nextPageParam } from '../../../infra/http/paged';\nimport type { AccountUser, UsersPage } from '../types';\nimport { useAuthQueryKey } from '../../../hooks/useAuthQueryKey';\n\nconst PAGE_SIZE = 20;\n\nexport const LIST_AVAILABLE_USERS_BASE_KEY = (projectId: number) =>\n ['project-users', projectId, 'out'] as const;\n\nexport const LIST_AVAILABLE_USERS_QUERY_KEY = (projectId: number, search: string = '') => [\n ...LIST_AVAILABLE_USERS_BASE_KEY(projectId),\n search,\n] as const;\n\nexport function useListAvailableUsers(projectId: number, search: string = '') {\n const queryKey = useAuthQueryKey([...LIST_AVAILABLE_USERS_QUERY_KEY(projectId, search)]);\n\n return useInfiniteQuery({\n queryKey,\n queryFn: ({ pageParam, signal }) =>\n apiFetchPaged<UsersPage<AccountUser>>(`/api/projects/${projectId}/available-users`, {\n params: {\n search: search || undefined,\n page: pageParam as number,\n limit: PAGE_SIZE,\n },\n signal,\n }),\n getNextPageParam: nextPageParam,\n initialPageParam: 1,\n enabled: !!projectId,\n });\n}\n"],"mappings":";AAEA,SAAS,wBAAwB;AACjC,SAAS,eAAe,qBAAqB;AAE7C,SAAS,uBAAuB;AAEhC,MAAM,YAAY;AAEX,MAAM,gCAAgC,CAAC,cAC5C,CAAC,iBAAiB,WAAW,KAAK;AAE7B,MAAM,iCAAiC,CAAC,WAAmB,SAAiB,OAAO;AAAA,EACxF,GAAG,8BAA8B,SAAS;AAAA,EAC1C;AACF;AAEO,SAAS,sBAAsB,WAAmB,SAAiB,IAAI;AAC5E,QAAM,WAAW,gBAAgB,CAAC,GAAG,+BAA+B,WAAW,MAAM,CAAC,CAAC;AAEvF,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA,SAAS,CAAC,EAAE,WAAW,OAAO,MAC5B,cAAsC,iBAAiB,SAAS,oBAAoB;AAAA,MAClF,QAAQ;AAAA,QACN,QAAQ,UAAU;AAAA,QAClB,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACH,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,SAAS,CAAC,CAAC;AAAA,EACb,CAAC;AACH;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
3
|
-
import {
|
|
3
|
+
import { apiFetchPaged, nextPageParam } from "../../../infra/http/paged";
|
|
4
4
|
import { useAuthQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
5
5
|
import { PROJECTS_BASE_KEY } from "./list-projects.hook";
|
|
6
6
|
const PAGE_SIZE = 20;
|
|
@@ -12,7 +12,7 @@ function useInfiniteProjects({
|
|
|
12
12
|
const queryKey = useAuthQueryKey([...INFINITE_PROJECTS_QUERY_KEY(params)]);
|
|
13
13
|
return useInfiniteQuery({
|
|
14
14
|
queryKey,
|
|
15
|
-
queryFn: ({ pageParam, signal }) =>
|
|
15
|
+
queryFn: ({ pageParam, signal }) => apiFetchPaged("/api/projects", {
|
|
16
16
|
params: {
|
|
17
17
|
...params,
|
|
18
18
|
page: pageParam,
|
|
@@ -21,10 +21,7 @@ function useInfiniteProjects({
|
|
|
21
21
|
signal
|
|
22
22
|
}),
|
|
23
23
|
initialPageParam: 1,
|
|
24
|
-
getNextPageParam:
|
|
25
|
-
const loaded = allPages.reduce((sum, p) => sum + p.data.length, 0);
|
|
26
|
-
return loaded < lastPage.total ? allPages.length + 1 : void 0;
|
|
27
|
-
},
|
|
24
|
+
getNextPageParam: nextPageParam,
|
|
28
25
|
placeholderData: (prev) => prev,
|
|
29
26
|
staleTime: 1e4,
|
|
30
27
|
refetchOnMount: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/projects/hooks/list-infinite-projects.hook.ts"],"sourcesContent":["\"use client\";\n\nimport { useInfiniteQuery } from \"@tanstack/react-query\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/projects/hooks/list-infinite-projects.hook.ts"],"sourcesContent":["\"use client\";\n\nimport { useInfiniteQuery } from \"@tanstack/react-query\";\nimport { apiFetchPaged, nextPageParam } from \"../../../infra/http/paged\";\nimport type { ListProjectsActionParams } from \"../actions/list-projects.action\";\nimport type { ProjectsPage } from \"../types\";\nimport { useAuthQueryKey } from \"../../../hooks/useAuthQueryKey\";\nimport { PROJECTS_BASE_KEY } from \"./list-projects.hook\";\n\nconst PAGE_SIZE = 20;\n\nexport const INFINITE_PROJECTS_QUERY_KEY = (\n params?: Omit<ListProjectsActionParams, \"page\">,\n) => [...PROJECTS_BASE_KEY, \"infinite\", params] as const;\n\nexport function useInfiniteProjects({\n limit = PAGE_SIZE,\n ...params\n}: Omit<ListProjectsActionParams, \"page\">) {\n const queryKey = useAuthQueryKey([...INFINITE_PROJECTS_QUERY_KEY(params)]);\n\n return useInfiniteQuery({\n queryKey,\n queryFn: ({ pageParam, signal }) =>\n apiFetchPaged<ProjectsPage>('/api/projects', {\n params: {\n ...params,\n page: pageParam as number,\n limit,\n },\n signal,\n }),\n initialPageParam: 1,\n getNextPageParam: nextPageParam,\n placeholderData: (prev) => prev,\n staleTime: 10_000,\n refetchOnMount: true,\n refetchOnWindowFocus: true,\n refetchOnReconnect: true,\n });\n}\n"],"mappings":";AAEA,SAAS,wBAAwB;AACjC,SAAS,eAAe,qBAAqB;AAG7C,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAEX,MAAM,8BAA8B,CACzC,WACG,CAAC,GAAG,mBAAmB,YAAY,MAAM;AAEvC,SAAS,oBAAoB;AAAA,EAClC,QAAQ;AAAA,EACR,GAAG;AACL,GAA2C;AACzC,QAAM,WAAW,gBAAgB,CAAC,GAAG,4BAA4B,MAAM,CAAC,CAAC;AAEzE,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA,SAAS,CAAC,EAAE,WAAW,OAAO,MAC5B,cAA4B,iBAAiB;AAAA,MAC3C,QAAQ;AAAA,QACN,GAAG;AAAA,QACH,MAAM;AAAA,QACN;AAAA,MACF;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACH,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,iBAAiB,CAAC,SAAS;AAAA,IAC3B,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,sBAAsB;AAAA,IACtB,oBAAoB;AAAA,EACtB,CAAC;AACH;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
3
|
-
import {
|
|
3
|
+
import { apiFetchPaged, nextPageParam } from "../../../infra/http/paged";
|
|
4
4
|
import { useAuthQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
5
5
|
const PAGE_SIZE = 20;
|
|
6
6
|
const LIST_PROJECT_USERS_BASE_KEY = (projectId) => ["project-users", projectId, "in"];
|
|
@@ -12,7 +12,7 @@ function useListProjectUsers(projectId, search = "") {
|
|
|
12
12
|
const queryKey = useAuthQueryKey([...LIST_PROJECT_USERS_QUERY_KEY(projectId, search)]);
|
|
13
13
|
return useInfiniteQuery({
|
|
14
14
|
queryKey,
|
|
15
|
-
queryFn: ({ pageParam, signal }) =>
|
|
15
|
+
queryFn: ({ pageParam, signal }) => apiFetchPaged(`/api/projects/${projectId}/users`, {
|
|
16
16
|
params: {
|
|
17
17
|
search: search || void 0,
|
|
18
18
|
page: pageParam,
|
|
@@ -20,10 +20,7 @@ function useListProjectUsers(projectId, search = "") {
|
|
|
20
20
|
},
|
|
21
21
|
signal
|
|
22
22
|
}),
|
|
23
|
-
getNextPageParam:
|
|
24
|
-
const loaded = allPages.reduce((sum, p) => sum + p.data.length, 0);
|
|
25
|
-
return loaded < lastPage.total ? allPages.length + 1 : void 0;
|
|
26
|
-
},
|
|
23
|
+
getNextPageParam: nextPageParam,
|
|
27
24
|
initialPageParam: 1,
|
|
28
25
|
enabled: !!projectId
|
|
29
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/projects/hooks/list-project-users.hook.ts"],"sourcesContent":["'use client';\n\nimport { useInfiniteQuery } from '@tanstack/react-query';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/projects/hooks/list-project-users.hook.ts"],"sourcesContent":["'use client';\n\nimport { useInfiniteQuery } from '@tanstack/react-query';\nimport { apiFetchPaged, nextPageParam } from '../../../infra/http/paged';\nimport type { ProjectUser, UsersPage } from '../types';\nimport { useAuthQueryKey } from '../../../hooks/useAuthQueryKey';\n\nconst PAGE_SIZE = 20;\n\nexport const LIST_PROJECT_USERS_BASE_KEY = (projectId: number) =>\n ['project-users', projectId, 'in'] as const;\n\nexport const LIST_PROJECT_USERS_QUERY_KEY = (projectId: number, search: string = '') => [\n ...LIST_PROJECT_USERS_BASE_KEY(projectId),\n search,\n] as const;\n\nexport function useListProjectUsers(projectId: number, search: string = '') {\n const queryKey = useAuthQueryKey([...LIST_PROJECT_USERS_QUERY_KEY(projectId, search)]);\n\n return useInfiniteQuery({\n queryKey,\n queryFn: ({ pageParam, signal }) =>\n apiFetchPaged<UsersPage<ProjectUser>>(`/api/projects/${projectId}/users`, {\n params: {\n search: search || undefined,\n page: pageParam as number,\n limit: PAGE_SIZE,\n },\n signal,\n }),\n getNextPageParam: nextPageParam,\n initialPageParam: 1,\n enabled: !!projectId,\n });\n}\n"],"mappings":";AAEA,SAAS,wBAAwB;AACjC,SAAS,eAAe,qBAAqB;AAE7C,SAAS,uBAAuB;AAEhC,MAAM,YAAY;AAEX,MAAM,8BAA8B,CAAC,cAC1C,CAAC,iBAAiB,WAAW,IAAI;AAE5B,MAAM,+BAA+B,CAAC,WAAmB,SAAiB,OAAO;AAAA,EACtF,GAAG,4BAA4B,SAAS;AAAA,EACxC;AACF;AAEO,SAAS,oBAAoB,WAAmB,SAAiB,IAAI;AAC1E,QAAM,WAAW,gBAAgB,CAAC,GAAG,6BAA6B,WAAW,MAAM,CAAC,CAAC;AAErF,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA,SAAS,CAAC,EAAE,WAAW,OAAO,MAC5B,cAAsC,iBAAiB,SAAS,UAAU;AAAA,MACxE,QAAQ;AAAA,QACN,QAAQ,UAAU;AAAA,QAClB,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACH,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,SAAS,CAAC,CAAC;AAAA,EACb,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { removeProjectUserAction } from "../actions/remove-project-user.action";
|
|
4
|
+
import { withAction } from "../../../utils/withAction";
|
|
5
|
+
import { useAuthQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
6
|
+
import { ACCOUNT_USERS_QUERY_KEY } from "../../accounts/hooks/useAccountManagement";
|
|
7
|
+
import { PROJECTS_BASE_KEY } from "./list-projects.hook";
|
|
8
|
+
function useRemoveProjectUsers() {
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const projectUsersKey = useAuthQueryKey(["project-users"]);
|
|
11
|
+
const projectsKey = useAuthQueryKey([...PROJECTS_BASE_KEY]);
|
|
12
|
+
const accountUsersKey = useAuthQueryKey([...ACCOUNT_USERS_QUERY_KEY]);
|
|
13
|
+
return useMutation({
|
|
14
|
+
mutationFn: ({ projectId, userIds }) => withAction(removeProjectUserAction)({ projectId, users: userIds }),
|
|
15
|
+
onSuccess: (_data, { projectId }) => {
|
|
16
|
+
queryClient.invalidateQueries({ queryKey: [...projectUsersKey, projectId] });
|
|
17
|
+
queryClient.invalidateQueries({ queryKey: projectsKey });
|
|
18
|
+
queryClient.invalidateQueries({ queryKey: accountUsersKey });
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
useRemoveProjectUsers
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=remove-project-users.hook.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/projects/hooks/remove-project-users.hook.ts"],"sourcesContent":["'use client';\n\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { removeProjectUserAction } from '../actions/remove-project-user.action';\nimport { withAction } from '../../../utils/withAction';\nimport { useAuthQueryKey } from '../../../hooks/useAuthQueryKey';\nimport { ACCOUNT_USERS_QUERY_KEY } from '../../accounts/hooks/useAccountManagement';\nimport { PROJECTS_BASE_KEY } from './list-projects.hook';\n\n/**\n * Desconecta vários usuários de um projeto de uma vez (usado ao salvar o sheet de projeto).\n * Para desconectar um único usuário com update otimista, use `useRemoveProjectUser`.\n */\nexport function useRemoveProjectUsers() {\n const queryClient = useQueryClient();\n const projectUsersKey = useAuthQueryKey(['project-users']);\n const projectsKey = useAuthQueryKey([...PROJECTS_BASE_KEY]);\n const accountUsersKey = useAuthQueryKey([...ACCOUNT_USERS_QUERY_KEY]);\n\n return useMutation({\n mutationFn: ({ projectId, userIds }: { projectId: number; userIds: number[] }) =>\n withAction(removeProjectUserAction)({ projectId, users: userIds }),\n onSuccess: (_data, { projectId }) => {\n queryClient.invalidateQueries({ queryKey: [...projectUsersKey, projectId] });\n queryClient.invalidateQueries({ queryKey: projectsKey });\n queryClient.invalidateQueries({ queryKey: accountUsersKey });\n },\n });\n}\n"],"mappings":";AAEA,SAAS,aAAa,sBAAsB;AAC5C,SAAS,+BAA+B;AACxC,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AACxC,SAAS,yBAAyB;AAM3B,SAAS,wBAAwB;AACtC,QAAM,cAAc,eAAe;AACnC,QAAM,kBAAkB,gBAAgB,CAAC,eAAe,CAAC;AACzD,QAAM,cAAc,gBAAgB,CAAC,GAAG,iBAAiB,CAAC;AAC1D,QAAM,kBAAkB,gBAAgB,CAAC,GAAG,uBAAuB,CAAC;AAEpE,SAAO,YAAY;AAAA,IACjB,YAAY,CAAC,EAAE,WAAW,QAAQ,MAChC,WAAW,uBAAuB,EAAE,EAAE,WAAW,OAAO,QAAQ,CAAC;AAAA,IACnE,WAAW,CAAC,OAAO,EAAE,UAAU,MAAM;AACnC,kBAAY,kBAAkB,EAAE,UAAU,CAAC,GAAG,iBAAiB,SAAS,EAAE,CAAC;AAC3E,kBAAY,kBAAkB,EAAE,UAAU,YAAY,CAAC;AACvD,kBAAY,kBAAkB,EAAE,UAAU,gBAAgB,CAAC;AAAA,IAC7D;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -2,6 +2,8 @@ import "server-only";
|
|
|
2
2
|
import { api } from "../../../infra/api/client";
|
|
3
3
|
import { ApiError } from "../../../infra/api/types";
|
|
4
4
|
import { buildQueryParams } from "../../../infra/utils/params";
|
|
5
|
+
import { assertAccountNotFrozen } from "../../auth/utils/assert-account-not-frozen";
|
|
6
|
+
import { assertManagementSubscription } from "../../auth/utils/assert-management-subscription";
|
|
5
7
|
import { getUserContext } from "../../auth/utils/get-user-context";
|
|
6
8
|
import {
|
|
7
9
|
AccountUserSchema,
|
|
@@ -63,6 +65,8 @@ class ProjectUsersService {
|
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
67
|
async addToProject({ projectId, users }) {
|
|
68
|
+
await assertManagementSubscription();
|
|
69
|
+
await assertAccountNotFrozen();
|
|
66
70
|
const { id_account, id_user } = await getUserContext();
|
|
67
71
|
const url = `/account/${id_account}/user/${id_user}/projects/${projectId}/users`;
|
|
68
72
|
const response = await api.apps.post(url, { users });
|
|
@@ -75,6 +79,7 @@ class ProjectUsersService {
|
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
async removeFromProject({ projectId, users }) {
|
|
82
|
+
await assertManagementSubscription();
|
|
78
83
|
const { id_account, id_user } = await getUserContext();
|
|
79
84
|
const url = `/account/${id_account}/user/${id_user}/projects/${projectId}/users`;
|
|
80
85
|
const response = await api.apps.delete(url, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/projects/services/project-users.service.ts"],"sourcesContent":["import 'server-only';\
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/projects/services/project-users.service.ts"],"sourcesContent":["import 'server-only';\n\nimport { api } from '../../../infra/api/client';\nimport { ApiError } from '../../../infra/api/types';\nimport { buildQueryParams } from '../../../infra/utils/params';\nimport { assertAccountNotFrozen } from '../../auth/utils/assert-account-not-frozen';\nimport { assertManagementSubscription } from '../../auth/utils/assert-management-subscription';\nimport { getUserContext } from '../../auth/utils/get-user-context';\nimport {\n AccountUser,\n AccountUserSchema,\n AddRemoveProjectUsersParams,\n ListUsersParams,\n ProjectUser,\n ProjectUserSchema,\n UsersPage,\n} from '../types';\n\ninterface ApiListResponse<T> {\n data: T[];\n total: number;\n status: number;\n message?: string;\n}\n\ninterface ApiActionResponse {\n status: number;\n message?: string;\n}\n\nclass ProjectUsersService {\n async listInProject(projectId: number, params: ListUsersParams = {}): Promise<UsersPage<ProjectUser>> {\n const { id_account, id_user } = await getUserContext();\n const query = buildQueryParams(params as Record<string, string | number | boolean | undefined>);\n const url = `/account/${id_account}/user/${id_user}/projects/${projectId}/users${query ? `?${query}` : ''}`;\n\n const response = await api.apps.get<ApiListResponse<ProjectUser>>(url);\n\n if (response.status === 0) {\n throw new ApiError(\n response.message || 'Erro ao listar usuários do projeto',\n 'LIST_PROJECT_USERS_FAILED',\n 400\n );\n }\n\n return {\n data: response.data.map((item) => ProjectUserSchema.parse(item)),\n total: response.total,\n page: params.page ?? 1,\n };\n }\n\n async listAllAccountUsers(params: ListUsersParams = {}): Promise<UsersPage<AccountUser>> {\n const { id_account, id_user } = await getUserContext();\n // scopeUserId: o backend escopa a lista p/ collaborator/viewer (só veem quem divide projeto)\n const query = buildQueryParams({ ...params, scopeUserId: id_user } as Record<string, string | number | boolean | undefined>);\n const url = `/accounts/${id_account}/users${query ? `?${query}` : ''}`;\n\n const response = await api.apps.get<ApiListResponse<AccountUser>>(url);\n\n if (response.status === 0) {\n throw new ApiError(\n response.message || 'Erro ao listar usuários da conta',\n 'LIST_ACCOUNT_USERS_FAILED',\n 400\n );\n }\n\n return {\n data: response.data.map((item) => AccountUserSchema.parse(item)),\n total: response.total,\n page: params.page ?? 1,\n };\n }\n\n async listNotInProject(projectId: number, params: ListUsersParams = {}): Promise<UsersPage<AccountUser>> {\n const { id_account } = await getUserContext();\n const query = buildQueryParams({ notInProject: projectId, ...params } as Record<string, string | number | boolean | undefined>);\n const url = `/accounts/${id_account}/users${query ? `?${query}` : ''}`;\n\n const response = await api.apps.get<ApiListResponse<AccountUser>>(url);\n\n if (response.status === 0) {\n throw new ApiError(\n response.message || 'Erro ao listar usuários disponíveis',\n 'LIST_AVAILABLE_USERS_FAILED',\n 400\n );\n }\n\n return {\n data: response.data.map((item) => AccountUserSchema.parse(item)),\n total: response.total,\n page: params.page ?? 1,\n };\n }\n\n async addToProject({ projectId, users }: AddRemoveProjectUsersParams): Promise<void> {\n await assertManagementSubscription();\n await assertAccountNotFrozen();\n const { id_account, id_user } = await getUserContext();\n const url = `/account/${id_account}/user/${id_user}/projects/${projectId}/users`;\n\n const response = await api.apps.post<ApiActionResponse>(url, { users });\n\n if (response.status === 0) {\n throw new ApiError(\n response.message || 'Erro ao adicionar usuário ao projeto',\n 'ADD_PROJECT_USER_FAILED',\n 400\n );\n }\n }\n\n async removeFromProject({ projectId, users }: AddRemoveProjectUsersParams): Promise<void> {\n await assertManagementSubscription();\n const { id_account, id_user } = await getUserContext();\n const url = `/account/${id_account}/user/${id_user}/projects/${projectId}/users`;\n\n const response = await api.apps.delete<ApiActionResponse>(url, {\n body: JSON.stringify({ users }),\n });\n\n if (response.status === 0) {\n throw new ApiError(\n response.message || 'Erro ao remover usuário do projeto',\n 'REMOVE_PROJECT_USER_FAILED',\n 400\n );\n }\n }\n}\n\nexport const projectUsersService = new ProjectUsersService();\n"],"mappings":"AAAA,OAAO;AAEP,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,8BAA8B;AACvC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B;AAAA,EAEE;AAAA,EAIA;AAAA,OAEK;AAcP,MAAM,oBAAoB;AAAA,EACxB,MAAM,cAAc,WAAmB,SAA0B,CAAC,GAAoC;AACpG,UAAM,EAAE,YAAY,QAAQ,IAAI,MAAM,eAAe;AACrD,UAAM,QAAQ,iBAAiB,MAA+D;AAC9F,UAAM,MAAM,YAAY,UAAU,SAAS,OAAO,aAAa,SAAS,SAAS,QAAQ,IAAI,KAAK,KAAK,EAAE;AAEzG,UAAM,WAAW,MAAM,IAAI,KAAK,IAAkC,GAAG;AAErE,QAAI,SAAS,WAAW,GAAG;AACzB,YAAM,IAAI;AAAA,QACR,SAAS,WAAW;AAAA,QACpB;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,MACL,MAAM,SAAS,KAAK,IAAI,CAAC,SAAS,kBAAkB,MAAM,IAAI,CAAC;AAAA,MAC/D,OAAO,SAAS;AAAA,MAChB,MAAM,OAAO,QAAQ;AAAA,IACvB;AAAA,EACF;AAAA,EAEA,MAAM,oBAAoB,SAA0B,CAAC,GAAoC;AACvF,UAAM,EAAE,YAAY,QAAQ,IAAI,MAAM,eAAe;AAErD,UAAM,QAAQ,iBAAiB,EAAE,GAAG,QAAQ,aAAa,QAAQ,CAA0D;AAC3H,UAAM,MAAM,aAAa,UAAU,SAAS,QAAQ,IAAI,KAAK,KAAK,EAAE;AAEpE,UAAM,WAAW,MAAM,IAAI,KAAK,IAAkC,GAAG;AAErE,QAAI,SAAS,WAAW,GAAG;AACzB,YAAM,IAAI;AAAA,QACR,SAAS,WAAW;AAAA,QACpB;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,MACL,MAAM,SAAS,KAAK,IAAI,CAAC,SAAS,kBAAkB,MAAM,IAAI,CAAC;AAAA,MAC/D,OAAO,SAAS;AAAA,MAChB,MAAM,OAAO,QAAQ;AAAA,IACvB;AAAA,EACF;AAAA,EAEA,MAAM,iBAAiB,WAAmB,SAA0B,CAAC,GAAoC;AACvG,UAAM,EAAE,WAAW,IAAI,MAAM,eAAe;AAC5C,UAAM,QAAQ,iBAAiB,EAAE,cAAc,WAAW,GAAG,OAAO,CAA0D;AAC9H,UAAM,MAAM,aAAa,UAAU,SAAS,QAAQ,IAAI,KAAK,KAAK,EAAE;AAEpE,UAAM,WAAW,MAAM,IAAI,KAAK,IAAkC,GAAG;AAErE,QAAI,SAAS,WAAW,GAAG;AACzB,YAAM,IAAI;AAAA,QACR,SAAS,WAAW;AAAA,QACpB;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,MACL,MAAM,SAAS,KAAK,IAAI,CAAC,SAAS,kBAAkB,MAAM,IAAI,CAAC;AAAA,MAC/D,OAAO,SAAS;AAAA,MAChB,MAAM,OAAO,QAAQ;AAAA,IACvB;AAAA,EACF;AAAA,EAEA,MAAM,aAAa,EAAE,WAAW,MAAM,GAA+C;AACnF,UAAM,6BAA6B;AACnC,UAAM,uBAAuB;AAC7B,UAAM,EAAE,YAAY,QAAQ,IAAI,MAAM,eAAe;AACrD,UAAM,MAAM,YAAY,UAAU,SAAS,OAAO,aAAa,SAAS;AAExE,UAAM,WAAW,MAAM,IAAI,KAAK,KAAwB,KAAK,EAAE,MAAM,CAAC;AAEtE,QAAI,SAAS,WAAW,GAAG;AACzB,YAAM,IAAI;AAAA,QACR,SAAS,WAAW;AAAA,QACpB;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAM,kBAAkB,EAAE,WAAW,MAAM,GAA+C;AACxF,UAAM,6BAA6B;AACnC,UAAM,EAAE,YAAY,QAAQ,IAAI,MAAM,eAAe;AACrD,UAAM,MAAM,YAAY,UAAU,SAAS,OAAO,aAAa,SAAS;AAExE,UAAM,WAAW,MAAM,IAAI,KAAK,OAA0B,KAAK;AAAA,MAC7D,MAAM,KAAK,UAAU,EAAE,MAAM,CAAC;AAAA,IAChC,CAAC;AAED,QAAI,SAAS,WAAW,GAAG;AACzB,YAAM,IAAI;AAAA,QACR,SAAS,WAAW;AAAA,QACpB;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,sBAAsB,IAAI,oBAAoB;","names":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { UserProfile } from "../users/schema";
|
|
2
3
|
const ProjectSchema = z.object({
|
|
3
4
|
id: z.coerce.number(),
|
|
4
5
|
id_wl: z.coerce.number(),
|
|
@@ -19,14 +20,14 @@ const ProjectUserSchema = z.object({
|
|
|
19
20
|
id_project: z.coerce.number(),
|
|
20
21
|
name: z.string().nullable(),
|
|
21
22
|
email: z.string().nullable(),
|
|
22
|
-
profile: z.
|
|
23
|
+
profile: z.enum(UserProfile).catch(UserProfile.viewer).default(UserProfile.viewer),
|
|
23
24
|
photo: z.string().nullable().optional()
|
|
24
25
|
});
|
|
25
26
|
const AccountUserSchema = z.object({
|
|
26
27
|
id: z.coerce.number(),
|
|
27
28
|
name: z.string().nullable(),
|
|
28
29
|
email: z.string().nullable(),
|
|
29
|
-
profile: z.
|
|
30
|
+
profile: z.enum(UserProfile).catch(UserProfile.viewer).default(UserProfile.viewer),
|
|
30
31
|
photo: z.string().nullable().optional(),
|
|
31
32
|
in_project: z.boolean().optional()
|
|
32
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/modules/projects/types.ts"],"sourcesContent":["import { z } from \"zod\";\
|
|
1
|
+
{"version":3,"sources":["../../../src/modules/projects/types.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { UserProfile } from \"../users/schema\";\n\n// ============================================================================\n// Project\n// ============================================================================\n\nexport const ProjectSchema = z.object({\n id: z.coerce.number(),\n id_wl: z.coerce.number(),\n id_account: z.coerce.number(),\n title: z.string(),\n photo: z.string().nullable().optional(),\n id_api: z.coerce.number().nullable().optional(),\n id_form_integration: z.coerce.number().nullable().optional(),\n total_users: z.coerce.number().optional().default(0),\n deleted: z\n .union([z.boolean(), z.number()])\n .transform((v) => Boolean(v))\n .default(false),\n datetime_add: z.string().nullable().optional(),\n datetime_alt: z.string().nullable().optional(),\n datetime_del: z.string().nullable().optional(),\n});\n\nexport type Project = z.infer<typeof ProjectSchema>;\n\nexport interface ProjectsPage {\n data: Project[];\n total: number;\n page: number;\n}\n\nexport interface CreateProjectRequest {\n title: string;\n photo?: string;\n id_api?: number;\n users?: number[];\n}\n\nexport interface UpdateProjectRequest {\n title: string;\n photo?: string;\n}\n\n// ============================================================================\n// Project Users\n// ============================================================================\n\nexport const ProjectUserSchema = z.object({\n id_user: z.coerce.number(),\n id_account: z.coerce.number(),\n id_project: z.coerce.number(),\n name: z.string().nullable(),\n email: z.string().nullable(),\n profile: z.enum(UserProfile).catch(UserProfile.viewer).default(UserProfile.viewer),\n photo: z.string().nullable().optional(),\n});\n\nexport type ProjectUser = z.infer<typeof ProjectUserSchema>;\n\nexport const AccountUserSchema = z.object({\n id: z.coerce.number(),\n name: z.string().nullable(),\n email: z.string().nullable(),\n profile: z.enum(UserProfile).catch(UserProfile.viewer).default(UserProfile.viewer),\n photo: z.string().nullable().optional(),\n in_project: z.boolean().optional(),\n});\n\nexport type AccountUser = z.infer<typeof AccountUserSchema>;\n\nexport interface AddRemoveProjectUsersParams {\n projectId: number;\n users: number[];\n}\n\nexport interface ListUsersParams {\n search?: string;\n page?: number;\n limit?: number;\n inProject?: number;\n}\n\nexport interface UsersPage<T> {\n data: T[];\n total: number;\n page: number;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAClB,SAAS,mBAAmB;AAMrB,MAAM,gBAAgB,EAAE,OAAO;AAAA,EACpC,IAAI,EAAE,OAAO,OAAO;AAAA,EACpB,OAAO,EAAE,OAAO,OAAO;AAAA,EACvB,YAAY,EAAE,OAAO,OAAO;AAAA,EAC5B,OAAO,EAAE,OAAO;AAAA,EAChB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EACtC,QAAQ,EAAE,OAAO,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,qBAAqB,EAAE,OAAO,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC3D,aAAa,EAAE,OAAO,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;AAAA,EACnD,SAAS,EACN,MAAM,CAAC,EAAE,QAAQ,GAAG,EAAE,OAAO,CAAC,CAAC,EAC/B,UAAU,CAAC,MAAM,QAAQ,CAAC,CAAC,EAC3B,QAAQ,KAAK;AAAA,EAChB,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC7C,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC7C,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAC/C,CAAC;AA0BM,MAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,SAAS,EAAE,OAAO,OAAO;AAAA,EACzB,YAAY,EAAE,OAAO,OAAO;AAAA,EAC5B,YAAY,EAAE,OAAO,OAAO;AAAA,EAC5B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,MAAM,EAAE,QAAQ,YAAY,MAAM;AAAA,EACjF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AACxC,CAAC;AAIM,MAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,IAAI,EAAE,OAAO,OAAO;AAAA,EACpB,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,MAAM,EAAE,QAAQ,YAAY,MAAM;AAAA,EACjF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EACtC,YAAY,EAAE,QAAQ,EAAE,SAAS;AACnC,CAAC;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { safeMutationAction } from "../../../utils/safeMutationAction";
|
|
3
|
+
import { subscriptionsService } from "../services/subscriptions.service";
|
|
4
|
+
async function cancelSubscriptionAction(subscriptionId, data) {
|
|
5
|
+
return safeMutationAction(() => subscriptionsService.cancelSubscription(subscriptionId, data));
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
cancelSubscriptionAction
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=cancel-subscription.action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/actions/cancel-subscription.action.ts"],"sourcesContent":["'use server';\n\nimport { safeMutationAction } from '../../../utils/safeMutationAction';\nimport { subscriptionsService } from '../services/subscriptions.service';\nimport type { CancelSubscriptionRequest } from '../types/cancel-subscription.type';\n\nexport async function cancelSubscriptionAction(\n subscriptionId: number | string,\n data: CancelSubscriptionRequest\n) {\n return safeMutationAction(() => subscriptionsService.cancelSubscription(subscriptionId, data));\n}\n"],"mappings":";AAEA,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AAGrC,eAAsB,yBACpB,gBACA,MACA;AACA,SAAO,mBAAmB,MAAM,qBAAqB,mBAAmB,gBAAgB,IAAI,CAAC;AAC/F;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { safeMutationAction } from "../../../utils/safeMutationAction";
|
|
3
|
+
import { subscriptionsService } from "../services/subscriptions.service";
|
|
4
|
+
async function createSubscriptionAction(data) {
|
|
5
|
+
return safeMutationAction(() => subscriptionsService.createSubscription(data));
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
createSubscriptionAction
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=create-subscription.action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/actions/create-subscription.action.ts"],"sourcesContent":["'use server';\n\nimport { safeMutationAction } from '../../../utils/safeMutationAction';\nimport { subscriptionsService } from '../services/subscriptions.service';\nimport type { CreateSubscriptionRequest } from '../types/create-subscription.type';\n\nexport async function createSubscriptionAction(data: CreateSubscriptionRequest) {\n return safeMutationAction(() => subscriptionsService.createSubscription(data));\n}\n"],"mappings":";AAEA,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AAGrC,eAAsB,yBAAyB,MAAiC;AAC9E,SAAO,mBAAmB,MAAM,qBAAqB,mBAAmB,IAAI,CAAC;AAC/E;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { safeServerAction } from "../../../utils/safeServerAction";
|
|
3
|
+
import { subscriptionsService } from "../services/subscriptions.service";
|
|
4
|
+
async function findPendingPixStatusAction(correlationId) {
|
|
5
|
+
return safeServerAction(() => subscriptionsService.findPendingPixStatus(correlationId));
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
findPendingPixStatusAction
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=find-pending-pix-status.action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/actions/find-pending-pix-status.action.ts"],"sourcesContent":["'use server';\n\nimport { safeServerAction } from '../../../utils/safeServerAction';\nimport { subscriptionsService } from '../services/subscriptions.service';\n\nexport async function findPendingPixStatusAction(correlationId: string) {\n return safeServerAction(() => subscriptionsService.findPendingPixStatus(correlationId));\n}\n"],"mappings":";AAEA,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AAErC,eAAsB,2BAA2B,eAAuB;AACtE,SAAO,iBAAiB,MAAM,qBAAqB,qBAAqB,aAAa,CAAC;AACxF;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { safeServerAction } from "../../../utils/safeServerAction";
|
|
3
|
+
import { subscriptionsService } from "../services/subscriptions.service";
|
|
4
|
+
async function findSubscriptionByIdAction(subscriptionId) {
|
|
5
|
+
return safeServerAction(() => subscriptionsService.findSubscriptionById(subscriptionId));
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
findSubscriptionByIdAction
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=find-subscription-by-id.action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/actions/find-subscription-by-id.action.ts"],"sourcesContent":["'use server';\n\nimport { safeServerAction } from '../../../utils/safeServerAction';\nimport { subscriptionsService } from '../services/subscriptions.service';\n\nexport async function findSubscriptionByIdAction(subscriptionId: string | number) {\n return safeServerAction(() => subscriptionsService.findSubscriptionById(subscriptionId));\n}\n"],"mappings":";AAEA,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AAErC,eAAsB,2BAA2B,gBAAiC;AAChF,SAAO,iBAAiB,MAAM,qBAAqB,qBAAqB,cAAc,CAAC;AACzF;","names":[]}
|
|
@@ -22,12 +22,47 @@ function buildAiCreditOptions(planItems) {
|
|
|
22
22
|
}));
|
|
23
23
|
}
|
|
24
24
|
const AI_CREDIT_VALUES = new Set(AI_CREDIT_SIZES);
|
|
25
|
+
const ESSENTIAL_PLAN_ID = 1;
|
|
26
|
+
const STARTER_PLAN_ID = 415;
|
|
27
|
+
const AGENCY_PLAN_ID = 3;
|
|
28
|
+
const API_PLAN_ID = 411;
|
|
29
|
+
const REDUCED_DOMAIN_PRICE = 9.9;
|
|
30
|
+
const DEFAULT_DOMAIN_EXTRA_PRICE = 14.9;
|
|
31
|
+
const PLANS_WITHOUT_EXTRA_DOMAINS = /* @__PURE__ */ new Set([ESSENTIAL_PLAN_ID, STARTER_PLAN_ID]);
|
|
32
|
+
function canBuyExtraDomains(planId) {
|
|
33
|
+
return planId !== void 0 && !PLANS_WITHOUT_EXTRA_DOMAINS.has(planId);
|
|
34
|
+
}
|
|
35
|
+
function getDomainExtraPrice(planId) {
|
|
36
|
+
if (planId === AGENCY_PLAN_ID || planId === API_PLAN_ID) return REDUCED_DOMAIN_PRICE;
|
|
37
|
+
return DEFAULT_DOMAIN_EXTRA_PRICE;
|
|
38
|
+
}
|
|
39
|
+
function getAddonLabels(translate) {
|
|
40
|
+
return {
|
|
41
|
+
[ADDON_IDS.DOMAINS]: { id: ADDON_IDS.DOMAINS, name: translate("common.addons.domains") },
|
|
42
|
+
[ADDON_IDS.PAGES]: { id: ADDON_IDS.PAGES, name: translate("common.addons.pages") },
|
|
43
|
+
[ADDON_IDS.PROJECTS]: { id: ADDON_IDS.PROJECTS, name: translate("common.addons.projects") },
|
|
44
|
+
[ADDON_IDS.AB_TEST]: {
|
|
45
|
+
id: ADDON_IDS.AB_TEST,
|
|
46
|
+
name: translate("common.addons.abTestName"),
|
|
47
|
+
shortName: translate("common.addons.abTestShortName"),
|
|
48
|
+
description: translate("common.addons.abTestDescription"),
|
|
49
|
+
detailsUrl: "https://www.greatpages.com.br/teste-ab"
|
|
50
|
+
},
|
|
51
|
+
[ADDON_IDS.HEATMAP]: { id: ADDON_IDS.HEATMAP, name: translate("common.addons.heatmap") },
|
|
52
|
+
[ADDON_IDS.AI]: { id: ADDON_IDS.AI, name: translate("common.addons.aiCredits") }
|
|
53
|
+
};
|
|
54
|
+
}
|
|
25
55
|
export {
|
|
26
56
|
ADDON_IDS,
|
|
27
57
|
AI_CREDIT_SIZES,
|
|
28
58
|
AI_CREDIT_VALUES,
|
|
59
|
+
ESSENTIAL_PLAN_ID,
|
|
60
|
+
STARTER_PLAN_ID,
|
|
29
61
|
aiCreditUnitPrice,
|
|
30
62
|
buildAiCreditOptions,
|
|
63
|
+
canBuyExtraDomains,
|
|
64
|
+
getAddonLabels,
|
|
65
|
+
getDomainExtraPrice,
|
|
31
66
|
resolveAiCreditPrice
|
|
32
67
|
};
|
|
33
68
|
//# sourceMappingURL=addons.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/subscriptions/constants/addons.constants.ts"],"sourcesContent":["export const ADDON_IDS = {\n DOMAINS: 1,\n PAGES: 2,\n PROJECTS: 3,\n AB_TEST: 4,\n HEATMAP: 5,\n AI: 6,\n} as const;\n\nexport type AddonKindEnum = (typeof ADDON_IDS)[keyof typeof ADDON_IDS];\n\nexport interface AiCreditOption {\n credits: number;\n price: number;\n}\n\ntype AiCreditPlanItem = { id_addon: number; value: number; tier_quantity?: number | null };\n\nexport const AI_CREDIT_SIZES = [0, 250, 500, 1000, 2500, 5000, 10000] as const;\n\nexport function aiCreditUnitPrice(planItems: AiCreditPlanItem[], credits: number): number {\n const paid = (planItems ?? []).filter((item) => item.id_addon === ADDON_IDS.AI && item.value > 0);\n const tier = paid.find((item) => Number(item.tier_quantity) === credits);\n return (tier ?? paid.find((item) => !Number(item.tier_quantity)))?.value ?? 0;\n}\n\nexport function resolveAiCreditPrice(quantity: number, planItems: AiCreditPlanItem[]): number {\n return Math.round(quantity * aiCreditUnitPrice(planItems, quantity) * 100) / 100;\n}\n\nexport function buildAiCreditOptions(planItems: AiCreditPlanItem[]): AiCreditOption[] {\n return AI_CREDIT_SIZES.map((credits) => ({\n credits,\n price: resolveAiCreditPrice(credits, planItems),\n }));\n}\n\nexport const AI_CREDIT_VALUES: ReadonlySet<number> = new Set(AI_CREDIT_SIZES);\n"],"mappings":"AAAO,MAAM,YAAY;AAAA,EACvB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,IAAI;AACN;AAWO,MAAM,kBAAkB,CAAC,GAAG,KAAK,KAAK,KAAM,MAAM,KAAM,GAAK;AAE7D,SAAS,kBAAkB,WAA+B,SAAyB;AACxF,QAAM,QAAQ,aAAa,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,aAAa,UAAU,MAAM,KAAK,QAAQ,CAAC;AAChG,QAAM,OAAO,KAAK,KAAK,CAAC,SAAS,OAAO,KAAK,aAAa,MAAM,OAAO;AACvE,UAAQ,QAAQ,KAAK,KAAK,CAAC,SAAS,CAAC,OAAO,KAAK,aAAa,CAAC,IAAI,SAAS;AAC9E;AAEO,SAAS,qBAAqB,UAAkB,WAAuC;AAC5F,SAAO,KAAK,MAAM,WAAW,kBAAkB,WAAW,QAAQ,IAAI,GAAG,IAAI;AAC/E;AAEO,SAAS,qBAAqB,WAAiD;AACpF,SAAO,gBAAgB,IAAI,CAAC,aAAa;AAAA,IACvC;AAAA,IACA,OAAO,qBAAqB,SAAS,SAAS;AAAA,EAChD,EAAE;AACJ;AAEO,MAAM,mBAAwC,IAAI,IAAI,eAAe;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/constants/addons.constants.ts"],"sourcesContent":["export const ADDON_IDS = {\n DOMAINS: 1,\n PAGES: 2,\n PROJECTS: 3,\n AB_TEST: 4,\n HEATMAP: 5,\n AI: 6,\n} as const;\n\nexport type AddonKindEnum = (typeof ADDON_IDS)[keyof typeof ADDON_IDS];\n\nexport interface AiCreditOption {\n credits: number;\n price: number;\n}\n\ntype AiCreditPlanItem = { id_addon: number; value: number; tier_quantity?: number | null };\n\nexport const AI_CREDIT_SIZES = [0, 250, 500, 1000, 2500, 5000, 10000] as const;\n\nexport function aiCreditUnitPrice(planItems: AiCreditPlanItem[], credits: number): number {\n const paid = (planItems ?? []).filter((item) => item.id_addon === ADDON_IDS.AI && item.value > 0);\n const tier = paid.find((item) => Number(item.tier_quantity) === credits);\n return (tier ?? paid.find((item) => !Number(item.tier_quantity)))?.value ?? 0;\n}\n\nexport function resolveAiCreditPrice(quantity: number, planItems: AiCreditPlanItem[]): number {\n return Math.round(quantity * aiCreditUnitPrice(planItems, quantity) * 100) / 100;\n}\n\nexport function buildAiCreditOptions(planItems: AiCreditPlanItem[]): AiCreditOption[] {\n return AI_CREDIT_SIZES.map((credits) => ({\n credits,\n price: resolveAiCreditPrice(credits, planItems),\n }));\n}\n\nexport const AI_CREDIT_VALUES: ReadonlySet<number> = new Set(AI_CREDIT_SIZES);\n\nexport const ESSENTIAL_PLAN_ID = 1;\nexport const STARTER_PLAN_ID = 415;\nconst AGENCY_PLAN_ID = 3;\nconst API_PLAN_ID = 411;\nconst REDUCED_DOMAIN_PRICE = 9.9;\nconst DEFAULT_DOMAIN_EXTRA_PRICE = 14.9;\n\nconst PLANS_WITHOUT_EXTRA_DOMAINS: ReadonlySet<number> = new Set([ESSENTIAL_PLAN_ID, STARTER_PLAN_ID]);\n\n/** Planos Essencial e Iniciante não contratam domínios extras. */\nexport function canBuyExtraDomains(planId: number | undefined): boolean {\n return planId !== undefined && !PLANS_WITHOUT_EXTRA_DOMAINS.has(planId);\n}\n\n/** Preço unitário do domínio extra: Agência e API pagam menos que os demais planos. */\nexport function getDomainExtraPrice(planId: number | undefined): number {\n if (planId === AGENCY_PLAN_ID || planId === API_PLAN_ID) return REDUCED_DOMAIN_PRICE;\n return DEFAULT_DOMAIN_EXTRA_PRICE;\n}\n\n// `key: any`: os apps tipam `useTranslations()` contra o catálogo deles, e uma chave literal\n// mais estreita não é atribuível a `string` (contravariância) — mesmo padrão dos demais helpers.\ntype TranslateFn = (key: any, values?: Record<string, string | number>) => string;\n\nexport type AddonDefinition = {\n id: number;\n name: string;\n shortName?: string;\n description?: string;\n detailsUrl?: string;\n};\n\n/** Rótulos dos adicionais, já traduzidos. */\nexport function getAddonLabels(translate: TranslateFn): Record<number, AddonDefinition> {\n return {\n [ADDON_IDS.DOMAINS]: { id: ADDON_IDS.DOMAINS, name: translate('common.addons.domains') },\n [ADDON_IDS.PAGES]: { id: ADDON_IDS.PAGES, name: translate('common.addons.pages') },\n [ADDON_IDS.PROJECTS]: { id: ADDON_IDS.PROJECTS, name: translate('common.addons.projects') },\n [ADDON_IDS.AB_TEST]: {\n id: ADDON_IDS.AB_TEST,\n name: translate('common.addons.abTestName'),\n shortName: translate('common.addons.abTestShortName'),\n description: translate('common.addons.abTestDescription'),\n detailsUrl: 'https://www.greatpages.com.br/teste-ab',\n },\n [ADDON_IDS.HEATMAP]: { id: ADDON_IDS.HEATMAP, name: translate('common.addons.heatmap') },\n [ADDON_IDS.AI]: { id: ADDON_IDS.AI, name: translate('common.addons.aiCredits') },\n };\n}\n"],"mappings":"AAAO,MAAM,YAAY;AAAA,EACvB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,IAAI;AACN;AAWO,MAAM,kBAAkB,CAAC,GAAG,KAAK,KAAK,KAAM,MAAM,KAAM,GAAK;AAE7D,SAAS,kBAAkB,WAA+B,SAAyB;AACxF,QAAM,QAAQ,aAAa,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,aAAa,UAAU,MAAM,KAAK,QAAQ,CAAC;AAChG,QAAM,OAAO,KAAK,KAAK,CAAC,SAAS,OAAO,KAAK,aAAa,MAAM,OAAO;AACvE,UAAQ,QAAQ,KAAK,KAAK,CAAC,SAAS,CAAC,OAAO,KAAK,aAAa,CAAC,IAAI,SAAS;AAC9E;AAEO,SAAS,qBAAqB,UAAkB,WAAuC;AAC5F,SAAO,KAAK,MAAM,WAAW,kBAAkB,WAAW,QAAQ,IAAI,GAAG,IAAI;AAC/E;AAEO,SAAS,qBAAqB,WAAiD;AACpF,SAAO,gBAAgB,IAAI,CAAC,aAAa;AAAA,IACvC;AAAA,IACA,OAAO,qBAAqB,SAAS,SAAS;AAAA,EAChD,EAAE;AACJ;AAEO,MAAM,mBAAwC,IAAI,IAAI,eAAe;AAErE,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AAC/B,MAAM,iBAAiB;AACvB,MAAM,cAAc;AACpB,MAAM,uBAAuB;AAC7B,MAAM,6BAA6B;AAEnC,MAAM,8BAAmD,oBAAI,IAAI,CAAC,mBAAmB,eAAe,CAAC;AAG9F,SAAS,mBAAmB,QAAqC;AACtE,SAAO,WAAW,UAAa,CAAC,4BAA4B,IAAI,MAAM;AACxE;AAGO,SAAS,oBAAoB,QAAoC;AACtE,MAAI,WAAW,kBAAkB,WAAW,YAAa,QAAO;AAChE,SAAO;AACT;AAeO,SAAS,eAAe,WAAyD;AACtF,SAAO;AAAA,IACL,CAAC,UAAU,OAAO,GAAG,EAAE,IAAI,UAAU,SAAS,MAAM,UAAU,uBAAuB,EAAE;AAAA,IACvF,CAAC,UAAU,KAAK,GAAG,EAAE,IAAI,UAAU,OAAO,MAAM,UAAU,qBAAqB,EAAE;AAAA,IACjF,CAAC,UAAU,QAAQ,GAAG,EAAE,IAAI,UAAU,UAAU,MAAM,UAAU,wBAAwB,EAAE;AAAA,IAC1F,CAAC,UAAU,OAAO,GAAG;AAAA,MACnB,IAAI,UAAU;AAAA,MACd,MAAM,UAAU,0BAA0B;AAAA,MAC1C,WAAW,UAAU,+BAA+B;AAAA,MACpD,aAAa,UAAU,iCAAiC;AAAA,MACxD,YAAY;AAAA,IACd;AAAA,IACA,CAAC,UAAU,OAAO,GAAG,EAAE,IAAI,UAAU,SAAS,MAAM,UAAU,uBAAuB,EAAE;AAAA,IACvF,CAAC,UAAU,EAAE,GAAG,EAAE,IAAI,UAAU,IAAI,MAAM,UAAU,yBAAyB,EAAE;AAAA,EACjF;AACF;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const DOWNGRADE_REASON_OTHER = "outro";
|
|
2
|
+
const DOWNGRADE_REASONS = [
|
|
3
|
+
"problemas-tecnicos",
|
|
4
|
+
"preco",
|
|
5
|
+
"pouco-uso",
|
|
6
|
+
"falta-recursos",
|
|
7
|
+
DOWNGRADE_REASON_OTHER
|
|
8
|
+
];
|
|
9
|
+
function getDowngradeReasonLabels(translate) {
|
|
10
|
+
return DOWNGRADE_REASONS.reduce(
|
|
11
|
+
(labels, reason) => ({
|
|
12
|
+
...labels,
|
|
13
|
+
[reason]: translate(
|
|
14
|
+
`common.account.workspace.subscription.changePlan.downgradeReasons.${reason}`
|
|
15
|
+
)
|
|
16
|
+
}),
|
|
17
|
+
{}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
DOWNGRADE_REASONS,
|
|
22
|
+
DOWNGRADE_REASON_OTHER,
|
|
23
|
+
getDowngradeReasonLabels
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=downgrade.constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/constants/downgrade.constants.ts"],"sourcesContent":["/** Motivo aberto: exige o texto livre antes de continuar. */\nexport const DOWNGRADE_REASON_OTHER = 'outro';\n\n/** Motivos oferecidos no downgrade — o rótulo sai do i18n pela própria chave. */\nexport const DOWNGRADE_REASONS = [\n 'problemas-tecnicos',\n 'preco',\n 'pouco-uso',\n 'falta-recursos',\n DOWNGRADE_REASON_OTHER,\n] as const;\n\nexport type DowngradeReason = (typeof DOWNGRADE_REASONS)[number];\n\n// `key: any`: os apps tipam `useTranslations()` contra o catálogo deles e a chave dinâmica não é\n// atribuível ao literal esperado — mesmo padrão dos demais helpers que recebem o translate.\ntype TranslateFn = (key: any, values?: Record<string, string | number>) => string;\n\n/** Rótulos dos motivos, já traduzidos, na ordem em que aparecem. */\nexport function getDowngradeReasonLabels(translate: TranslateFn): Record<DowngradeReason, string> {\n return DOWNGRADE_REASONS.reduce(\n (labels, reason) => ({\n ...labels,\n [reason]: translate(\n `common.account.workspace.subscription.changePlan.downgradeReasons.${reason}`\n ),\n }),\n {} as Record<DowngradeReason, string>\n );\n}\n"],"mappings":"AACO,MAAM,yBAAyB;AAG/B,MAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AASO,SAAS,yBAAyB,WAAyD;AAChG,SAAO,kBAAkB;AAAA,IACvB,CAAC,QAAQ,YAAY;AAAA,MACnB,GAAG;AAAA,MACH,CAAC,MAAM,GAAG;AAAA,QACR,qEAAqE,MAAM;AAAA,MAC7E;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -4,8 +4,10 @@ const FREEZE_WARNING_DAYS_BEFORE = 1;
|
|
|
4
4
|
const FREEZE_ELIGIBLE_WHITELABEL_ID = 1;
|
|
5
5
|
const MAX_PAYMENT_ATTEMPTS = 8;
|
|
6
6
|
const FREE_PLAN_ID = 5;
|
|
7
|
+
const API_PLAN_ID = 411;
|
|
7
8
|
export {
|
|
8
9
|
ACCOUNT_FREEZE_AFTER_DAYS,
|
|
10
|
+
API_PLAN_ID,
|
|
9
11
|
FREEZE_ELIGIBLE_WHITELABEL_ID,
|
|
10
12
|
FREEZE_WARNING_DAYS_BEFORE,
|
|
11
13
|
FREE_PLAN_ID,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/subscriptions/constants/subscription.constants.ts"],"sourcesContent":["export const SUBSCRIPTION_GRACE_PERIOD_DAYS = 15;\n\nexport const ACCOUNT_FREEZE_AFTER_DAYS = 7;\nexport const FREEZE_WARNING_DAYS_BEFORE = 1;\n\nexport const FREEZE_ELIGIBLE_WHITELABEL_ID = 1;\n\nexport const MAX_PAYMENT_ATTEMPTS = 8;\n\n/** Plano legado \"FREE\" identificado por `id_plan`, fora do `type: 'free'` moderno. */\nexport const FREE_PLAN_ID = 5;\n"],"mappings":"AAAO,MAAM,iCAAiC;AAEvC,MAAM,4BAA4B;AAClC,MAAM,6BAA6B;AAEnC,MAAM,gCAAgC;AAEtC,MAAM,uBAAuB;AAG7B,MAAM,eAAe;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/constants/subscription.constants.ts"],"sourcesContent":["export const SUBSCRIPTION_GRACE_PERIOD_DAYS = 15;\n\nexport const ACCOUNT_FREEZE_AFTER_DAYS = 7;\nexport const FREEZE_WARNING_DAYS_BEFORE = 1;\n\nexport const FREEZE_ELIGIBLE_WHITELABEL_ID = 1;\n\nexport const MAX_PAYMENT_ATTEMPTS = 8;\n\n/** Plano legado \"FREE\" identificado por `id_plan`, fora do `type: 'free'` moderno. */\nexport const FREE_PLAN_ID = 5;\n\n/** Plano de acesso à API: sem créditos de IA. */\nexport const API_PLAN_ID = 411;\n"],"mappings":"AAAO,MAAM,iCAAiC;AAEvC,MAAM,4BAA4B;AAClC,MAAM,6BAA6B;AAEnC,MAAM,gCAAgC;AAEtC,MAAM,uBAAuB;AAG7B,MAAM,eAAe;AAGrB,MAAM,cAAc;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { safeRouteHandler } from "../../../infra/route/safe-route-handler";
|
|
3
|
+
import { subscriptionsService } from "../services/subscriptions.service";
|
|
4
|
+
function createPendingPixStatusHandler() {
|
|
5
|
+
return async function GET(_req, { params }) {
|
|
6
|
+
return safeRouteHandler(async () => {
|
|
7
|
+
const { correlationId } = await params;
|
|
8
|
+
return subscriptionsService.findPendingPixStatus(correlationId);
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
createPendingPixStatusHandler
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=pending-pix-status.handler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/handlers/pending-pix-status.handler.ts"],"sourcesContent":["import 'server-only';\n\nimport type { NextRequest } from 'next/server';\nimport { safeRouteHandler } from '../../../infra/route/safe-route-handler';\nimport { subscriptionsService } from '../services/subscriptions.service';\n\nexport function createPendingPixStatusHandler() {\n return async function GET(\n _req: NextRequest,\n { params }: { params: Promise<{ correlationId: string }> }\n ) {\n return safeRouteHandler(async () => {\n const { correlationId } = await params;\n return subscriptionsService.findPendingPixStatus(correlationId);\n });\n };\n}\n"],"mappings":"AAAA,OAAO;AAGP,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AAE9B,SAAS,gCAAgC;AAC9C,SAAO,eAAe,IACpB,MACA,EAAE,OAAO,GACT;AACA,WAAO,iBAAiB,YAAY;AAClC,YAAM,EAAE,cAAc,IAAI,MAAM;AAChC,aAAO,qBAAqB,qBAAqB,aAAa;AAAA,IAChE,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { withAction } from "../../../utils/withAction";
|
|
4
|
+
import { useAuthQueryKey } from "../../../hooks/useAuthQueryKey";
|
|
5
|
+
import { cancelSubscriptionAction } from "../actions/cancel-subscription.action";
|
|
6
|
+
import { SUBSCRIPTIONS_QUERY_KEY, CHARGES_QUERY_KEY } from "../constants/query-keys.constants";
|
|
7
|
+
function useCancelSubscription() {
|
|
8
|
+
const queryClient = useQueryClient();
|
|
9
|
+
const subscriptionsKey = useAuthQueryKey([...SUBSCRIPTIONS_QUERY_KEY]);
|
|
10
|
+
const chargesKey = useAuthQueryKey([...CHARGES_QUERY_KEY]);
|
|
11
|
+
return useMutation({
|
|
12
|
+
mutationFn: ({
|
|
13
|
+
subscriptionId,
|
|
14
|
+
data
|
|
15
|
+
}) => withAction(cancelSubscriptionAction)(subscriptionId, data),
|
|
16
|
+
onSuccess: () => {
|
|
17
|
+
queryClient.invalidateQueries({ queryKey: subscriptionsKey });
|
|
18
|
+
queryClient.invalidateQueries({ queryKey: chargesKey });
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
useCancelSubscription
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=cancel-subscription.hook.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/hooks/cancel-subscription.hook.ts"],"sourcesContent":["'use client';\n\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { withAction } from '../../../utils/withAction';\nimport { useAuthQueryKey } from '../../../hooks/useAuthQueryKey';\nimport { cancelSubscriptionAction } from '../actions/cancel-subscription.action';\nimport { SUBSCRIPTIONS_QUERY_KEY, CHARGES_QUERY_KEY } from '../constants/query-keys.constants';\nimport type { CancelSubscriptionRequest } from '../types/cancel-subscription.type';\n\nexport function useCancelSubscription() {\n const queryClient = useQueryClient();\n const subscriptionsKey = useAuthQueryKey([...SUBSCRIPTIONS_QUERY_KEY]);\n const chargesKey = useAuthQueryKey([...CHARGES_QUERY_KEY]);\n\n return useMutation({\n mutationFn: ({\n subscriptionId,\n data,\n }: {\n subscriptionId: number | string;\n data: CancelSubscriptionRequest;\n }) => withAction(cancelSubscriptionAction)(subscriptionId, data),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: subscriptionsKey });\n queryClient.invalidateQueries({ queryKey: chargesKey });\n },\n });\n}\n"],"mappings":";AAEA,SAAS,aAAa,sBAAsB;AAC5C,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAChC,SAAS,gCAAgC;AACzC,SAAS,yBAAyB,yBAAyB;AAGpD,SAAS,wBAAwB;AACtC,QAAM,cAAc,eAAe;AACnC,QAAM,mBAAmB,gBAAgB,CAAC,GAAG,uBAAuB,CAAC;AACrE,QAAM,aAAa,gBAAgB,CAAC,GAAG,iBAAiB,CAAC;AAEzD,SAAO,YAAY;AAAA,IACjB,YAAY,CAAC;AAAA,MACX;AAAA,MACA;AAAA,IACF,MAGM,WAAW,wBAAwB,EAAE,gBAAgB,IAAI;AAAA,IAC/D,WAAW,MAAM;AACf,kBAAY,kBAAkB,EAAE,UAAU,iBAAiB,CAAC;AAC5D,kBAAY,kBAAkB,EAAE,UAAU,WAAW,CAAC;AAAA,IACxD;AAAA,EACF,CAAC;AACH;","names":[]}
|