@silexpert/core 1.3.193-2 → 1.3.193-approbation-1
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/cjs/api/resources/Card.d.ts +1 -23
- package/dist/cjs/api/resources/Card.d.ts.map +1 -1
- package/dist/cjs/api/resources/Card.js +0 -36
- package/dist/cjs/api/resources/Card.js.map +1 -1
- package/dist/cjs/api/resources/Checklist.d.ts +6 -0
- package/dist/cjs/api/resources/Checklist.d.ts.map +1 -1
- package/dist/cjs/api/resources/Checklist.js +6 -0
- package/dist/cjs/api/resources/Checklist.js.map +1 -1
- package/dist/cjs/api/resources/DocumentRequest.d.ts +3 -1
- package/dist/cjs/api/resources/DocumentRequest.d.ts.map +1 -1
- package/dist/cjs/api/resources/DocumentRequest.js +6 -0
- package/dist/cjs/api/resources/DocumentRequest.js.map +1 -1
- package/dist/cjs/api/resources/InternalInvoicing.d.ts.map +1 -1
- package/dist/cjs/api/resources/InternalInvoicing.js +0 -8
- package/dist/cjs/api/resources/InternalInvoicing.js.map +1 -1
- package/dist/cjs/api/resources/LoginApproval.d.ts +18 -0
- package/dist/cjs/api/resources/LoginApproval.d.ts.map +1 -0
- package/dist/cjs/api/resources/LoginApproval.js +20 -0
- package/dist/cjs/api/resources/LoginApproval.js.map +1 -0
- package/dist/cjs/api/resources/Mfa.d.ts +1 -0
- package/dist/cjs/api/resources/Mfa.d.ts.map +1 -1
- package/dist/cjs/api/resources/Mfa.js +4 -0
- package/dist/cjs/api/resources/Mfa.js.map +1 -1
- package/dist/cjs/api/resources/Payment.d.ts +1 -0
- package/dist/cjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/cjs/api/resources/Payment.js +3 -0
- package/dist/cjs/api/resources/Payment.js.map +1 -1
- package/dist/cjs/api/resources/Shine.d.ts +2 -1
- package/dist/cjs/api/resources/Shine.d.ts.map +1 -1
- package/dist/cjs/api/resources/Shine.js +3 -0
- package/dist/cjs/api/resources/Shine.js.map +1 -1
- package/dist/cjs/api/resources/Society.d.ts +2 -1
- package/dist/cjs/api/resources/Society.d.ts.map +1 -1
- package/dist/cjs/api/resources/Society.js +3 -0
- package/dist/cjs/api/resources/Society.js.map +1 -1
- package/dist/cjs/api/resources/SocietyApproval.d.ts +47 -0
- package/dist/cjs/api/resources/SocietyApproval.d.ts.map +1 -0
- package/dist/cjs/api/resources/SocietyApproval.js +62 -0
- package/dist/cjs/api/resources/SocietyApproval.js.map +1 -0
- package/dist/cjs/api/resources/User.d.ts +1 -6
- package/dist/cjs/api/resources/User.d.ts.map +1 -1
- package/dist/cjs/api/resources/User.js +0 -15
- package/dist/cjs/api/resources/User.js.map +1 -1
- package/dist/cjs/api/resources.d.ts +4 -0
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +4 -0
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/AdjustmentType.js +4 -4
- package/dist/cjs/types/Enum/AdjustmentType.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.js +6 -6
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.js +8 -8
- package/dist/cjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/cjs/types/Enum/Card.d.ts +7 -43
- package/dist/cjs/types/Enum/Card.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Card.js +9 -51
- package/dist/cjs/types/Enum/Card.js.map +1 -1
- package/dist/cjs/types/Enum/Consistency.d.ts +1 -1
- package/dist/cjs/types/Enum/Consistency.js +7 -7
- package/dist/cjs/types/Enum/Consistency.js.map +1 -1
- package/dist/cjs/types/Enum/DashboardBlock.d.ts +2 -1
- package/dist/cjs/types/Enum/DashboardBlock.d.ts.map +1 -1
- package/dist/cjs/types/Enum/DashboardBlock.js +1 -0
- package/dist/cjs/types/Enum/DashboardBlock.js.map +1 -1
- package/dist/cjs/types/Enum/EntityType.d.ts +2 -2
- package/dist/cjs/types/Enum/EntityType.js +2 -2
- package/dist/cjs/types/Enum/EntityType.js.map +1 -1
- package/dist/cjs/types/Enum/Ged.d.ts +9 -3
- package/dist/cjs/types/Enum/Ged.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Ged.js +163 -56
- package/dist/cjs/types/Enum/Ged.js.map +1 -1
- package/dist/cjs/types/Enum/InformationRequestState.d.ts +2 -1
- package/dist/cjs/types/Enum/InformationRequestState.d.ts.map +1 -1
- package/dist/cjs/types/Enum/InformationRequestState.js +1 -0
- package/dist/cjs/types/Enum/InformationRequestState.js.map +1 -1
- package/dist/cjs/types/Enum/InformationRequestType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/InformationRequestType.js +12 -6
- package/dist/cjs/types/Enum/InformationRequestType.js.map +1 -1
- package/dist/cjs/types/Enum/KilometricAllowanceScale.d.ts.map +1 -1
- package/dist/cjs/types/Enum/KilometricAllowanceScale.js +119 -0
- package/dist/cjs/types/Enum/KilometricAllowanceScale.js.map +1 -1
- package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
- package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
- package/dist/cjs/types/Enum/LoginApprovalStatus.js +18 -0
- package/dist/cjs/types/Enum/LoginApprovalStatus.js.map +1 -0
- package/dist/cjs/types/Enum/MailAuto.d.ts +5 -1
- package/dist/cjs/types/Enum/MailAuto.d.ts.map +1 -1
- package/dist/cjs/types/Enum/MailAuto.js +4 -0
- package/dist/cjs/types/Enum/MailAuto.js.map +1 -1
- package/dist/cjs/types/Enum/MfaMode.d.ts +12 -0
- package/dist/cjs/types/Enum/MfaMode.d.ts.map +1 -0
- package/dist/cjs/types/Enum/MfaMode.js +16 -0
- package/dist/cjs/types/Enum/MfaMode.js.map +1 -0
- package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridClementine.js +482 -478
- package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
- package/dist/cjs/types/Enum/Proceding.d.ts +4 -0
- package/dist/cjs/types/Enum/Proceding.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Proceding.js +4 -0
- package/dist/cjs/types/Enum/Proceding.js.map +1 -1
- package/dist/cjs/types/Enum/SocietyApproval.d.ts +46 -0
- package/dist/cjs/types/Enum/SocietyApproval.d.ts.map +1 -0
- package/dist/cjs/types/Enum/SocietyApproval.js +280 -0
- package/dist/cjs/types/Enum/SocietyApproval.js.map +1 -0
- package/dist/cjs/types/Enum/StatutsSection.d.ts +7 -1
- package/dist/cjs/types/Enum/StatutsSection.d.ts.map +1 -1
- package/dist/cjs/types/Enum/StatutsSection.js +15 -7
- package/dist/cjs/types/Enum/StatutsSection.js.map +1 -1
- package/dist/cjs/types/Enum/Unit.d.ts +2 -1
- package/dist/cjs/types/Enum/Unit.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Unit.js +11 -0
- package/dist/cjs/types/Enum/Unit.js.map +1 -1
- package/dist/cjs/types/Interface/api/SocietyApproval.d.ts +36 -0
- package/dist/cjs/types/Interface/api/SocietyApproval.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/SocietyApproval.js +153 -0
- package/dist/cjs/types/Interface/api/SocietyApproval.js.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
- package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts +4 -0
- package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +21 -0
- package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +17 -0
- package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +4 -1
- package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
- package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
- package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/{card/ModifyCustomerVat.js → authentification/SetMobileApprovalDto.js} +11 -13
- package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.js +26 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
- package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts +0 -1
- package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js +0 -6
- package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js.map +1 -1
- package/dist/cjs/types/Interface/api/bankAccount/Benchmark.d.ts +5 -0
- package/dist/cjs/types/Interface/api/bankAccount/Benchmark.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/bankAccount/Benchmark.js +21 -0
- package/dist/cjs/types/Interface/api/bankAccount/Benchmark.js.map +1 -0
- package/dist/cjs/types/Interface/api/brevo/BrevoElement.d.ts +1 -0
- package/dist/cjs/types/Interface/api/brevo/BrevoElement.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/brevo/BrevoElement.js.map +1 -1
- package/dist/cjs/types/Interface/api/card/Cron.d.ts +3 -0
- package/dist/cjs/types/Interface/api/card/Cron.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/card/Cron.js +10 -1
- package/dist/cjs/types/Interface/api/card/Cron.js.map +1 -1
- package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts +0 -11
- package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/card/QueryUserCards.js +1 -44
- package/dist/cjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
- package/dist/cjs/types/Interface/api/card/UpdateCard.d.ts +0 -13
- package/dist/cjs/types/Interface/api/card/UpdateCard.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/card/UpdateCard.js +1 -58
- package/dist/cjs/types/Interface/api/card/UpdateCard.js.map +1 -1
- package/dist/cjs/types/Interface/api/documentRequest/Query.d.ts +10 -0
- package/dist/cjs/types/Interface/api/documentRequest/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/documentRequest/Query.js +43 -1
- package/dist/cjs/types/Interface/api/documentRequest/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/oldExportInfo/OldExpertInfos.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/oldExportInfo/OldExpertInfos.js +2 -0
- package/dist/cjs/types/Interface/api/oldExportInfo/OldExpertInfos.js.map +1 -1
- package/dist/cjs/types/Interface/api/revenue/revenueMovement.d.ts +10 -9
- package/dist/cjs/types/Interface/api/revenue/revenueMovement.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/revenue/revenueMovement.js +16 -15
- package/dist/cjs/types/Interface/api/revenue/revenueMovement.js.map +1 -1
- package/dist/cjs/types/Interface/api/revenue/revenueSnapshotGenerate.d.ts +0 -3
- package/dist/cjs/types/Interface/api/revenue/revenueSnapshotGenerate.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/revenue/revenueSnapshotGenerate.js +1 -14
- package/dist/cjs/types/Interface/api/revenue/revenueSnapshotGenerate.js.map +1 -1
- package/dist/cjs/types/Interface/api/shine/Query.d.ts +7 -0
- package/dist/cjs/types/Interface/api/shine/Query.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/shine/{GetConnect.js → Query.js} +9 -2
- package/dist/cjs/types/Interface/api/shine/Query.js.map +1 -0
- package/dist/cjs/types/Interface/api/user/RegisterProspect.d.ts +1 -0
- package/dist/cjs/types/Interface/api/user/RegisterProspect.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/user/RegisterProspect.js +6 -0
- package/dist/cjs/types/Interface/api/user/RegisterProspect.js.map +1 -1
- package/dist/cjs/types/Interface/api/woocommerce/InvoicesWoocommerce.d.ts +6 -5
- package/dist/cjs/types/Interface/api/woocommerce/InvoicesWoocommerce.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/woocommerce/InvoicesWoocommerce.js +14 -0
- package/dist/cjs/types/Interface/api/woocommerce/InvoicesWoocommerce.js.map +1 -1
- package/dist/cjs/types/Interface/models/IBalanceSheet.d.ts +0 -3
- package/dist/cjs/types/Interface/models/IBalanceSheet.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IBalanceSheet.js.map +1 -1
- package/dist/cjs/types/Interface/models/ICard.d.ts +0 -19
- package/dist/cjs/types/Interface/models/ICard.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ICard.js.map +1 -1
- package/dist/cjs/types/Interface/models/ICardHistory.d.ts +0 -4
- package/dist/cjs/types/Interface/models/ICardHistory.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ICardHistory.js.map +1 -1
- package/dist/cjs/types/Interface/models/ICustomerVat.d.ts +0 -1
- package/dist/cjs/types/Interface/models/ICustomerVat.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ICustomerVat.js.map +1 -1
- package/dist/cjs/types/Interface/models/ILoginApproval.d.ts +31 -0
- package/dist/cjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/ILoginApproval.js +3 -0
- package/dist/cjs/types/Interface/models/ILoginApproval.js.map +1 -0
- package/dist/cjs/types/Interface/models/ISocietyApproval.d.ts +2 -0
- package/dist/cjs/types/Interface/models/ISocietyApproval.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ISocietyApproval.js.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/cjs/types/index.d.ts +10 -6
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +10 -6
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/checkup.d.ts +12 -368
- package/dist/cjs/utils/checkup.d.ts.map +1 -1
- package/dist/cjs/utils/checkup.js +342 -565
- package/dist/cjs/utils/checkup.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/internationalization/choices.d.ts.map +1 -1
- package/dist/cjs/utils/commercialManagement/internationalization/choices.js +21 -19
- package/dist/cjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/cjs/utils/index.d.ts.map +1 -1
- package/dist/cjs/utils/index.js +1 -0
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/societyApproval.d.ts +38 -0
- package/dist/cjs/utils/societyApproval.d.ts.map +1 -0
- package/dist/cjs/utils/societyApproval.js +101 -0
- package/dist/cjs/utils/societyApproval.js.map +1 -0
- package/dist/cjs/utils/vat/centuries.js +2 -2
- package/dist/cjs/utils/vat/centuries.js.map +1 -1
- package/dist/cjs/utils/vat/utils.d.ts.map +1 -1
- package/dist/cjs/utils/vat/utils.js +5 -2
- package/dist/cjs/utils/vat/utils.js.map +1 -1
- package/dist/mjs/api/resources/Card.d.ts +1 -23
- package/dist/mjs/api/resources/Card.d.ts.map +1 -1
- package/dist/mjs/api/resources/Card.js +0 -45
- package/dist/mjs/api/resources/Card.js.map +1 -1
- package/dist/mjs/api/resources/Checklist.d.ts +6 -0
- package/dist/mjs/api/resources/Checklist.d.ts.map +1 -1
- package/dist/mjs/api/resources/Checklist.js +6 -0
- package/dist/mjs/api/resources/Checklist.js.map +1 -1
- package/dist/mjs/api/resources/DocumentRequest.d.ts +3 -1
- package/dist/mjs/api/resources/DocumentRequest.d.ts.map +1 -1
- package/dist/mjs/api/resources/DocumentRequest.js +6 -0
- package/dist/mjs/api/resources/DocumentRequest.js.map +1 -1
- package/dist/mjs/api/resources/InternalInvoicing.d.ts.map +1 -1
- package/dist/mjs/api/resources/InternalInvoicing.js +0 -8
- package/dist/mjs/api/resources/InternalInvoicing.js.map +1 -1
- package/dist/mjs/api/resources/LoginApproval.d.ts +18 -0
- package/dist/mjs/api/resources/LoginApproval.d.ts.map +1 -0
- package/dist/mjs/api/resources/LoginApproval.js +16 -0
- package/dist/mjs/api/resources/LoginApproval.js.map +1 -0
- package/dist/mjs/api/resources/Mfa.d.ts +1 -0
- package/dist/mjs/api/resources/Mfa.d.ts.map +1 -1
- package/dist/mjs/api/resources/Mfa.js +4 -0
- package/dist/mjs/api/resources/Mfa.js.map +1 -1
- package/dist/mjs/api/resources/Payment.d.ts +1 -0
- package/dist/mjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/mjs/api/resources/Payment.js +3 -0
- package/dist/mjs/api/resources/Payment.js.map +1 -1
- package/dist/mjs/api/resources/Shine.d.ts +2 -1
- package/dist/mjs/api/resources/Shine.d.ts.map +1 -1
- package/dist/mjs/api/resources/Shine.js +3 -0
- package/dist/mjs/api/resources/Shine.js.map +1 -1
- package/dist/mjs/api/resources/Society.d.ts +2 -1
- package/dist/mjs/api/resources/Society.d.ts.map +1 -1
- package/dist/mjs/api/resources/Society.js +3 -0
- package/dist/mjs/api/resources/Society.js.map +1 -1
- package/dist/mjs/api/resources/SocietyApproval.d.ts +47 -0
- package/dist/mjs/api/resources/SocietyApproval.d.ts.map +1 -0
- package/dist/mjs/api/resources/SocietyApproval.js +58 -0
- package/dist/mjs/api/resources/SocietyApproval.js.map +1 -0
- package/dist/mjs/api/resources/User.d.ts +1 -6
- package/dist/mjs/api/resources/User.d.ts.map +1 -1
- package/dist/mjs/api/resources/User.js +0 -15
- package/dist/mjs/api/resources/User.js.map +1 -1
- package/dist/mjs/api/resources.d.ts +4 -0
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +4 -0
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/AdjustmentType.js +4 -4
- package/dist/mjs/types/Enum/AdjustmentType.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.js +6 -6
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.js +8 -8
- package/dist/mjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/mjs/types/Enum/Card.d.ts +7 -43
- package/dist/mjs/types/Enum/Card.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Card.js +9 -51
- package/dist/mjs/types/Enum/Card.js.map +1 -1
- package/dist/mjs/types/Enum/Consistency.d.ts +1 -1
- package/dist/mjs/types/Enum/Consistency.js +7 -7
- package/dist/mjs/types/Enum/Consistency.js.map +1 -1
- package/dist/mjs/types/Enum/DashboardBlock.d.ts +2 -1
- package/dist/mjs/types/Enum/DashboardBlock.d.ts.map +1 -1
- package/dist/mjs/types/Enum/DashboardBlock.js +1 -0
- package/dist/mjs/types/Enum/DashboardBlock.js.map +1 -1
- package/dist/mjs/types/Enum/EntityType.d.ts +2 -2
- package/dist/mjs/types/Enum/EntityType.js +2 -2
- package/dist/mjs/types/Enum/EntityType.js.map +1 -1
- package/dist/mjs/types/Enum/Ged.d.ts +9 -3
- package/dist/mjs/types/Enum/Ged.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Ged.js +163 -56
- package/dist/mjs/types/Enum/Ged.js.map +1 -1
- package/dist/mjs/types/Enum/InformationRequestState.d.ts +2 -1
- package/dist/mjs/types/Enum/InformationRequestState.d.ts.map +1 -1
- package/dist/mjs/types/Enum/InformationRequestState.js +1 -0
- package/dist/mjs/types/Enum/InformationRequestState.js.map +1 -1
- package/dist/mjs/types/Enum/InformationRequestType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/InformationRequestType.js +12 -6
- package/dist/mjs/types/Enum/InformationRequestType.js.map +1 -1
- package/dist/mjs/types/Enum/KilometricAllowanceScale.d.ts.map +1 -1
- package/dist/mjs/types/Enum/KilometricAllowanceScale.js +119 -0
- package/dist/mjs/types/Enum/KilometricAllowanceScale.js.map +1 -1
- package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
- package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
- package/dist/mjs/types/Enum/LoginApprovalStatus.js +15 -0
- package/dist/mjs/types/Enum/LoginApprovalStatus.js.map +1 -0
- package/dist/mjs/types/Enum/MailAuto.d.ts +5 -1
- package/dist/mjs/types/Enum/MailAuto.d.ts.map +1 -1
- package/dist/mjs/types/Enum/MailAuto.js +4 -0
- package/dist/mjs/types/Enum/MailAuto.js.map +1 -1
- package/dist/mjs/types/Enum/MfaMode.d.ts +12 -0
- package/dist/mjs/types/Enum/MfaMode.d.ts.map +1 -0
- package/dist/mjs/types/Enum/MfaMode.js +13 -0
- package/dist/mjs/types/Enum/MfaMode.js.map +1 -0
- package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridClementine.js +486 -474
- package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
- package/dist/mjs/types/Enum/Proceding.d.ts +4 -0
- package/dist/mjs/types/Enum/Proceding.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Proceding.js +4 -0
- package/dist/mjs/types/Enum/Proceding.js.map +1 -1
- package/dist/mjs/types/Enum/SocietyApproval.d.ts +46 -0
- package/dist/mjs/types/Enum/SocietyApproval.d.ts.map +1 -0
- package/dist/mjs/types/Enum/SocietyApproval.js +277 -0
- package/dist/mjs/types/Enum/SocietyApproval.js.map +1 -0
- package/dist/mjs/types/Enum/StatutsSection.d.ts +7 -1
- package/dist/mjs/types/Enum/StatutsSection.d.ts.map +1 -1
- package/dist/mjs/types/Enum/StatutsSection.js +15 -7
- package/dist/mjs/types/Enum/StatutsSection.js.map +1 -1
- package/dist/mjs/types/Enum/Unit.d.ts +2 -1
- package/dist/mjs/types/Enum/Unit.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Unit.js +11 -0
- package/dist/mjs/types/Enum/Unit.js.map +1 -1
- package/dist/mjs/types/Interface/api/SocietyApproval.d.ts +36 -0
- package/dist/mjs/types/Interface/api/SocietyApproval.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/SocietyApproval.js +167 -0
- package/dist/mjs/types/Interface/api/SocietyApproval.js.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
- package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts +4 -0
- package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +18 -0
- package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +17 -0
- package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +7 -0
- package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
- package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
- package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/{card/ModifyCustomerVat.js → authentification/SetMobileApprovalDto.js} +12 -14
- package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
- package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/{card/Query.js → authentification/loginApproval.js} +11 -22
- package/dist/mjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
- package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts +0 -1
- package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js +0 -7
- package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js.map +1 -1
- package/dist/mjs/types/Interface/api/bankAccount/Benchmark.d.ts +5 -0
- package/dist/mjs/types/Interface/api/bankAccount/Benchmark.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/bankAccount/Benchmark.js +18 -0
- package/dist/mjs/types/Interface/api/bankAccount/Benchmark.js.map +1 -0
- package/dist/mjs/types/Interface/api/brevo/BrevoElement.d.ts +1 -0
- package/dist/mjs/types/Interface/api/brevo/BrevoElement.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/brevo/BrevoElement.js.map +1 -1
- package/dist/mjs/types/Interface/api/card/Cron.d.ts +3 -0
- package/dist/mjs/types/Interface/api/card/Cron.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/card/Cron.js +8 -0
- package/dist/mjs/types/Interface/api/card/Cron.js.map +1 -1
- package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts +0 -11
- package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/card/QueryUserCards.js +1 -43
- package/dist/mjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
- package/dist/mjs/types/Interface/api/card/UpdateCard.d.ts +0 -13
- package/dist/mjs/types/Interface/api/card/UpdateCard.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/card/UpdateCard.js +1 -65
- package/dist/mjs/types/Interface/api/card/UpdateCard.js.map +1 -1
- package/dist/mjs/types/Interface/api/documentRequest/Query.d.ts +10 -0
- package/dist/mjs/types/Interface/api/documentRequest/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/documentRequest/Query.js +48 -2
- package/dist/mjs/types/Interface/api/documentRequest/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/oldExportInfo/OldExpertInfos.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/oldExportInfo/OldExpertInfos.js +2 -0
- package/dist/mjs/types/Interface/api/oldExportInfo/OldExpertInfos.js.map +1 -1
- package/dist/mjs/types/Interface/api/revenue/revenueMovement.d.ts +10 -9
- package/dist/mjs/types/Interface/api/revenue/revenueMovement.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/revenue/revenueMovement.js +13 -12
- package/dist/mjs/types/Interface/api/revenue/revenueMovement.js.map +1 -1
- package/dist/mjs/types/Interface/api/revenue/revenueSnapshotGenerate.d.ts +0 -3
- package/dist/mjs/types/Interface/api/revenue/revenueSnapshotGenerate.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/revenue/revenueSnapshotGenerate.js +2 -22
- package/dist/mjs/types/Interface/api/revenue/revenueSnapshotGenerate.js.map +1 -1
- package/dist/mjs/types/Interface/api/shine/Query.d.ts +7 -0
- package/dist/mjs/types/Interface/api/shine/Query.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/shine/{GetConnect.js → Query.js} +8 -1
- package/dist/mjs/types/Interface/api/shine/Query.js.map +1 -0
- package/dist/mjs/types/Interface/api/user/RegisterProspect.d.ts +1 -0
- package/dist/mjs/types/Interface/api/user/RegisterProspect.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/user/RegisterProspect.js +7 -0
- package/dist/mjs/types/Interface/api/user/RegisterProspect.js.map +1 -1
- package/dist/mjs/types/Interface/api/woocommerce/InvoicesWoocommerce.d.ts +6 -5
- package/dist/mjs/types/Interface/api/woocommerce/InvoicesWoocommerce.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/woocommerce/InvoicesWoocommerce.js +15 -0
- package/dist/mjs/types/Interface/api/woocommerce/InvoicesWoocommerce.js.map +1 -1
- package/dist/mjs/types/Interface/models/IBalanceSheet.d.ts +0 -3
- package/dist/mjs/types/Interface/models/IBalanceSheet.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IBalanceSheet.js.map +1 -1
- package/dist/mjs/types/Interface/models/ICard.d.ts +0 -19
- package/dist/mjs/types/Interface/models/ICard.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ICard.js.map +1 -1
- package/dist/mjs/types/Interface/models/ICardHistory.d.ts +0 -4
- package/dist/mjs/types/Interface/models/ICardHistory.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ICardHistory.js.map +1 -1
- package/dist/mjs/types/Interface/models/ICustomerVat.d.ts +0 -1
- package/dist/mjs/types/Interface/models/ICustomerVat.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ICustomerVat.js.map +1 -1
- package/dist/mjs/types/Interface/models/ILoginApproval.d.ts +31 -0
- package/dist/mjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/ILoginApproval.js +2 -0
- package/dist/mjs/types/Interface/models/ILoginApproval.js.map +1 -0
- package/dist/mjs/types/Interface/models/ISocietyApproval.d.ts +2 -0
- package/dist/mjs/types/Interface/models/ISocietyApproval.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ISocietyApproval.js.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/mjs/types/index.d.ts +10 -6
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +10 -6
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/checkup.d.ts +12 -368
- package/dist/mjs/utils/checkup.d.ts.map +1 -1
- package/dist/mjs/utils/checkup.js +343 -566
- package/dist/mjs/utils/checkup.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/internationalization/choices.d.ts.map +1 -1
- package/dist/mjs/utils/commercialManagement/internationalization/choices.js +21 -19
- package/dist/mjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
- package/dist/mjs/utils/index.d.ts +1 -0
- package/dist/mjs/utils/index.d.ts.map +1 -1
- package/dist/mjs/utils/index.js +1 -0
- package/dist/mjs/utils/index.js.map +1 -1
- package/dist/mjs/utils/societyApproval.d.ts +38 -0
- package/dist/mjs/utils/societyApproval.d.ts.map +1 -0
- package/dist/mjs/utils/societyApproval.js +109 -0
- package/dist/mjs/utils/societyApproval.js.map +1 -0
- package/dist/mjs/utils/vat/centuries.js +2 -2
- package/dist/mjs/utils/vat/centuries.js.map +1 -1
- package/dist/mjs/utils/vat/utils.d.ts.map +1 -1
- package/dist/mjs/utils/vat/utils.js +5 -2
- package/dist/mjs/utils/vat/utils.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Card.ts +0 -61
- package/ts/api/resources/Checklist.ts +6 -0
- package/ts/api/resources/DocumentRequest.ts +9 -1
- package/ts/api/resources/InternalInvoicing.ts +0 -8
- package/ts/api/resources/LoginApproval.ts +20 -0
- package/ts/api/resources/Mfa.ts +6 -0
- package/ts/api/resources/Payment.ts +4 -0
- package/ts/api/resources/Shine.ts +11 -1
- package/ts/api/resources/Society.ts +5 -0
- package/ts/api/resources/SocietyApproval.ts +75 -0
- package/ts/api/resources/User.ts +0 -23
- package/ts/api/resources.ts +4 -0
- package/ts/types/Enum/AdjustmentType.ts +4 -4
- package/ts/types/Enum/BalanceSheet.ts +17 -17
- package/ts/types/Enum/BrandPourcentage.ts +8 -8
- package/ts/types/Enum/Card.ts +9 -51
- package/ts/types/Enum/Consistency.ts +7 -7
- package/ts/types/Enum/DashboardBlock.ts +1 -0
- package/ts/types/Enum/EntityType.ts +2 -2
- package/ts/types/Enum/Ged.ts +386 -268
- package/ts/types/Enum/InformationRequestState.ts +1 -0
- package/ts/types/Enum/InformationRequestType.ts +12 -6
- package/ts/types/Enum/KilometricAllowanceScale.ts +119 -0
- package/ts/types/Enum/LoginApprovalStatus.ts +13 -0
- package/ts/types/Enum/MailAuto.ts +4 -0
- package/ts/types/Enum/MfaMode.ts +11 -0
- package/ts/types/Enum/PriceGridClementine.ts +487 -474
- package/ts/types/Enum/Proceding.ts +4 -0
- package/ts/types/Enum/SocietyApproval.ts +301 -0
- package/ts/types/Enum/StatutsSection.ts +15 -7
- package/ts/types/Enum/Unit.ts +11 -0
- package/ts/types/Interface/api/SocietyApproval.ts +121 -0
- package/ts/types/Interface/api/authentification/AuthenticationResponse.ts +10 -0
- package/ts/types/Interface/api/authentification/FinalizeMobileApprovalDto.ts +6 -0
- package/ts/types/Interface/api/authentification/ReadAuthenticateCollaborater.ts +18 -0
- package/ts/types/Interface/api/authentification/SetMobileApprovalDto.ts +11 -0
- package/ts/types/Interface/api/authentification/loginApproval.ts +75 -0
- package/ts/types/Interface/api/balanceSheet/UpdateBalanceSheet.ts +0 -5
- package/ts/types/Interface/api/bankAccount/Benchmark.ts +7 -0
- package/ts/types/Interface/api/brevo/BrevoElement.ts +1 -0
- package/ts/types/Interface/api/card/Cron.ts +8 -1
- package/ts/types/Interface/api/card/QueryUserCards.ts +1 -36
- package/ts/types/Interface/api/card/UpdateCard.ts +2 -50
- package/ts/types/Interface/api/documentRequest/Query.ts +40 -2
- package/ts/types/Interface/api/oldExportInfo/OldExpertInfos.ts +2 -0
- package/ts/types/Interface/api/revenue/revenueMovement.ts +11 -9
- package/ts/types/Interface/api/revenue/revenueSnapshotGenerate.ts +2 -21
- package/ts/types/Interface/api/shine/{GetConnect.ts → Query.ts} +5 -0
- package/ts/types/Interface/api/user/RegisterProspect.ts +5 -0
- package/ts/types/Interface/api/woocommerce/InvoicesWoocommerce.ts +17 -5
- package/ts/types/Interface/models/IBalanceSheet.ts +0 -3
- package/ts/types/Interface/models/ICard.ts +0 -20
- package/ts/types/Interface/models/ICardHistory.ts +0 -4
- package/ts/types/Interface/models/ICustomerVat.ts +0 -1
- package/ts/types/Interface/models/ILoginApproval.ts +31 -0
- package/ts/types/Interface/models/ISocietyApproval.ts +2 -0
- package/ts/types/Interface/models/IUser.ts +2 -0
- package/ts/types/index.ts +10 -6
- package/ts/utils/checkup.ts +347 -566
- package/ts/utils/commercialManagement/internationalization/choices.ts +21 -19
- package/ts/utils/index.ts +1 -0
- package/ts/utils/societyApproval.ts +129 -0
- package/ts/utils/vat/centuries.ts +2 -2
- package/ts/utils/vat/utils.ts +7 -2
- package/dist/cjs/types/Interface/api/card/ModifyAcceptation.d.ts +0 -9
- package/dist/cjs/types/Interface/api/card/ModifyAcceptation.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/card/ModifyAcceptation.js +0 -43
- package/dist/cjs/types/Interface/api/card/ModifyAcceptation.js.map +0 -1
- package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.d.ts +0 -25
- package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.js +0 -106
- package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.js.map +0 -1
- package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.d.ts +0 -5
- package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.js.map +0 -1
- package/dist/cjs/types/Interface/api/card/ModifyPlanning.d.ts +0 -18
- package/dist/cjs/types/Interface/api/card/ModifyPlanning.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/card/ModifyPlanning.js +0 -79
- package/dist/cjs/types/Interface/api/card/ModifyPlanning.js.map +0 -1
- package/dist/cjs/types/Interface/api/card/Query.d.ts +0 -8
- package/dist/cjs/types/Interface/api/card/Query.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/card/Query.js +0 -37
- package/dist/cjs/types/Interface/api/card/Query.js.map +0 -1
- package/dist/cjs/types/Interface/api/shine/GetConnect.d.ts +0 -4
- package/dist/cjs/types/Interface/api/shine/GetConnect.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/shine/GetConnect.js.map +0 -1
- package/dist/mjs/types/Interface/api/card/ModifyAcceptation.d.ts +0 -9
- package/dist/mjs/types/Interface/api/card/ModifyAcceptation.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/card/ModifyAcceptation.js +0 -42
- package/dist/mjs/types/Interface/api/card/ModifyAcceptation.js.map +0 -1
- package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.d.ts +0 -25
- package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.js +0 -115
- package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.js.map +0 -1
- package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.d.ts +0 -5
- package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.js.map +0 -1
- package/dist/mjs/types/Interface/api/card/ModifyPlanning.d.ts +0 -18
- package/dist/mjs/types/Interface/api/card/ModifyPlanning.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/card/ModifyPlanning.js +0 -84
- package/dist/mjs/types/Interface/api/card/ModifyPlanning.js.map +0 -1
- package/dist/mjs/types/Interface/api/card/Query.d.ts +0 -8
- package/dist/mjs/types/Interface/api/card/Query.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/card/Query.js.map +0 -1
- package/dist/mjs/types/Interface/api/shine/GetConnect.d.ts +0 -4
- package/dist/mjs/types/Interface/api/shine/GetConnect.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/shine/GetConnect.js.map +0 -1
- package/ts/types/Interface/api/card/ModifyAcceptation.ts +0 -24
- package/ts/types/Interface/api/card/ModifyBalanceSheet.ts +0 -81
- package/ts/types/Interface/api/card/ModifyCustomerVat.ts +0 -13
- package/ts/types/Interface/api/card/ModifyPlanning.ts +0 -52
- package/ts/types/Interface/api/card/Query.ts +0 -19
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { LegalForm } from '../types/Enum/LegalForm';
|
|
2
|
+
import { SocietyApprovalDocumentsByLegalForm, } from '../types/Enum/SocietyApproval';
|
|
3
|
+
import { QualityList } from '../types/Enum/Quality';
|
|
4
|
+
import { getBrand } from './brands';
|
|
5
|
+
import { convertNumberToLetter } from './amount';
|
|
6
|
+
import * as dayjs from 'dayjs';
|
|
7
|
+
import { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe';
|
|
8
|
+
/**
|
|
9
|
+
* Récupère le nom de la forme juridique
|
|
10
|
+
* @param idLegalForm - L'identifiant de la forme juridique
|
|
11
|
+
* @param fallback - Valeur par défaut si non trouvée
|
|
12
|
+
* @returns Le nom de la forme juridique
|
|
13
|
+
*/
|
|
14
|
+
export function getLegalFormName(idLegalForm, fallback = '') {
|
|
15
|
+
return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Récupère la configuration des documents d'approbation pour une forme juridique donnée
|
|
19
|
+
* @param idLegalForm - L'identifiant de la forme juridique
|
|
20
|
+
* @returns La configuration des documents ou undefined si non trouvée
|
|
21
|
+
*/
|
|
22
|
+
export function getApprovalDocumentsByLegalForm(idLegalForm) {
|
|
23
|
+
return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Récupère le nom du template pour un document spécifique et une forme juridique
|
|
27
|
+
* @param idLegalForm - L'identifiant de la forme juridique
|
|
28
|
+
* @param idDocumentType - Le type de document d'approbation
|
|
29
|
+
* @returns Le nom du template ou undefined si non trouvé
|
|
30
|
+
*/
|
|
31
|
+
//@deprecated use getApprovalDocumentInfos instead
|
|
32
|
+
export function getApprovalDocumentTemplateName(idLegalForm, idDocumentType) {
|
|
33
|
+
const config = getApprovalDocumentsByLegalForm(idLegalForm);
|
|
34
|
+
const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);
|
|
35
|
+
return document?.templateName;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Récupère le texte de la ville du greffe
|
|
39
|
+
* @param idCityOfGreffe - L'identifiant de la ville du greffe
|
|
40
|
+
* @returns Le texte de la ville ou une chaîne vide
|
|
41
|
+
*/
|
|
42
|
+
function getCityOfGreffeName(idCityOfGreffe) {
|
|
43
|
+
if (!idCityOfGreffe)
|
|
44
|
+
return '';
|
|
45
|
+
return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Récupère le nom du template pour un document spécifique et une forme juridique
|
|
49
|
+
* @param idLegalForm - L'identifiant de la forme juridique
|
|
50
|
+
* @param idDocumentType - Le type de document d'approbation
|
|
51
|
+
* @returns Le nom du template ou undefined si non trouvé
|
|
52
|
+
*/
|
|
53
|
+
export function getApprovalDocumentInfos(idLegalForm, idDocumentType) {
|
|
54
|
+
const config = getApprovalDocumentsByLegalForm(idLegalForm);
|
|
55
|
+
return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Construit les données formatées pour le template d'approbation
|
|
59
|
+
* @param existingApproval - Les données d'approbation de la société
|
|
60
|
+
* @param style - Le style HTML pour le document
|
|
61
|
+
* @returns L'objet de données formaté pour le template
|
|
62
|
+
*/
|
|
63
|
+
export function buildApprovalTemplateData(existingApproval, style) {
|
|
64
|
+
const yearInText = convertNumberToLetter(+dayjs().format('YYYY')).toLowerCase();
|
|
65
|
+
const dayAndMonthInText = `${convertNumberToLetter(+dayjs().format('D'))} ${dayjs().locale('fr').format('MMMM').toLowerCase()}`;
|
|
66
|
+
const brand = getBrand();
|
|
67
|
+
return {
|
|
68
|
+
// Variables globales
|
|
69
|
+
style,
|
|
70
|
+
yearInText,
|
|
71
|
+
dayAndMonthInText,
|
|
72
|
+
date: dayjs().locale('fr').format('DD MMMM YYYY'),
|
|
73
|
+
companyInformation: {
|
|
74
|
+
rcs: brand?.companyInformation?.rcs,
|
|
75
|
+
nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,
|
|
76
|
+
city: brand?.companyInformation?.city,
|
|
77
|
+
postalAddress: brand?.companyInformation?.postalAddress,
|
|
78
|
+
montantCapital: brand?.companyInformation?.montantCapital,
|
|
79
|
+
statut: brand?.companyInformation?.statut,
|
|
80
|
+
ECOrderCity: brand?.companyInformation?.ECOrderCity,
|
|
81
|
+
},
|
|
82
|
+
owner: {
|
|
83
|
+
identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,
|
|
84
|
+
quality: QualityList.find((ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality)?.label,
|
|
85
|
+
},
|
|
86
|
+
// Variables stockées en base
|
|
87
|
+
...existingApproval,
|
|
88
|
+
generatingDatas: {
|
|
89
|
+
...existingApproval?.generatingDatas,
|
|
90
|
+
...(existingApproval?.generatingDatas?.approvalDate
|
|
91
|
+
? {
|
|
92
|
+
approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)
|
|
93
|
+
.locale('fr')
|
|
94
|
+
.format('DD MMMM YYYY')
|
|
95
|
+
.toUpperCase(),
|
|
96
|
+
}
|
|
97
|
+
: {}),
|
|
98
|
+
},
|
|
99
|
+
exercice: {
|
|
100
|
+
...existingApproval?.exercice,
|
|
101
|
+
society: {
|
|
102
|
+
...existingApproval?.exercice?.society,
|
|
103
|
+
cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),
|
|
104
|
+
},
|
|
105
|
+
endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=societyApproval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAGL,mCAAmC,GAEpC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAA8B,EAAE,WAAmB,EAAE;IACpF,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,IAAI,IAAI,QAAQ,CAAC;AACxF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,WAA8B;IAE9B,OAAO,mCAAmC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC;AAClG,CAAC;AAED;;;;;GAKG;AACH,kDAAkD;AAClD,MAAM,UAAU,+BAA+B,CAC7C,WAA8B,EAC9B,cAA2C;IAE3C,MAAM,MAAM,GAAG,+BAA+B,CAAC,WAAW,CAAC,CAAC;IAC5D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Ae,EAAE,YAAY,CAAC;yBACjE,MAAM,CAAC,IAAI,CAAC;yBACZ,MAAM,CAAC,cAAc,CAAC;yBACtB,WAAW,EAAE;iBACjB;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;QACD,QAAQ,EAAE;YACR,GAAG,gBAAgB,EAAE,QAAQ;YAC7B,OAAO,EAAE;gBACP,GAAG,gBAAgB,EAAE,QAAQ,EAAE,OAAO;gBACtC,YAAY,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,WAAW,EAAE;aACrG;YACD,OAAO,EAAE,KAAK,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;SACtG;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { LegalForm, LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport {\n SocietyApprovalDocumentType,\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval';\nimport { QualityList } from '../types/Enum/Quality';\nimport { getBrand } from './brands';\nimport { convertNumberToLetter } from './amount';\nimport * as dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\n//@deprecated use getApprovalDocumentInfos instead\nexport function getApprovalDocumentTemplateName(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): string | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n return document?.templateName;\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(+dayjs().format('YYYY')).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs().format('D'))} ${dayjs().locale('fr').format('MMMM').toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
|
|
@@ -52,7 +52,7 @@ const vatDocuments = [
|
|
|
52
52
|
idCerfaType: CerfaType.CERFA_3310,
|
|
53
53
|
name: '3310',
|
|
54
54
|
century: '25',
|
|
55
|
-
centuries: [2025],
|
|
55
|
+
centuries: [2025, 2026],
|
|
56
56
|
payload: (accountingEntries, payload, updatedEntries) => getCerfa3310Century25Payload(accountingEntries, payload, updatedEntries),
|
|
57
57
|
asponePayload: (data) => getCerfa3310Century25RegistrationFields(data),
|
|
58
58
|
fields: cerfa3310Century25Fields,
|
|
@@ -71,7 +71,7 @@ const vatDocuments = [
|
|
|
71
71
|
idCerfaType: CerfaType.CERFA_3514,
|
|
72
72
|
name: '3514',
|
|
73
73
|
century: '23',
|
|
74
|
-
centuries: [2022, 2023, 2024, 2025],
|
|
74
|
+
centuries: [2022, 2023, 2024, 2025, 2026],
|
|
75
75
|
payload: (payload) => getCerfa3514Century22Payload(payload),
|
|
76
76
|
asponePayload: (data) => getCerfa3514Century23RegistrationFields(data),
|
|
77
77
|
fields: cerfa3514Century22Fields,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"centuries.js","sourceRoot":"","sources":["../../../../ts/utils/vat/centuries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,uCAAuC,GACxC,MAAM,kBAAkB,CAAC;AAiB1B,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,uCAAuC,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,uCAAuC,EAAE,MAAM,kBAAkB,CAAC;AAO3E,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,oCAAoC,EACpC,wCAAwC,GACzC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,uCAAuC,GACxC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,sCAAsC,EACtC,wCAAwC,GACzC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,4BA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IAAI,KAAK,CAAC,eAAe,WAAW,iBAAiB,IAAI,sBAAsB,CAAC,CAAC;IAEnG,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { CerfaType } from '../../types/Enum/CerfaType';\nimport { VatDocument } from '../../types/Interface/api/cerfa/ReadCerfa';\nimport {\n cerfa3310Century23Fields,\n getCerfa3310Century23Payload,\n getCerfa3310Century23RegistrationFields,\n} from './3310/century23';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport {\n Cerfa3310_2023,\n Cerfa3310_2024,\n Cerfa3310_2025,\n PayloadCerfa3310_2023,\n PayloadCerfa3310_2024,\n PayloadCerfa3310_2025,\n} from '../../types/Interface/api/cerfa/3310';\nimport {\n Cerfa3514_2022,\n Cerfa3519_2017,\n PayloadCerfa3514_2022,\n PayloadCerfa3519_2017,\n UpdatedAnnotation,\n} from '../../types';\nimport { cerfa3519Century17Fields, getCerfa3519Century17Payload } from './3519/century17';\nimport { getCerfa3519Century23RegistrationFields } from './3519/century23';\nimport { cerfa3514Century22Fields, getCerfa3514Century22Payload } from './3514/century22';\nimport { getCerfa3514Century23RegistrationFields } from './3514/century23';\nimport {\n Cerfa3517_2023,\n Cerfa3517_2025,\n PayloadCerfa3517_2023,\n PayloadCerfa3517_2025,\n} from '../../types/Interface/api/cerfa/3517';\nimport {\n cerfa3517Century23Fields,\n getCerfa3517Century23Payload,\n getCerfa3517CenturyRegistrationField,\n getCerfa3517DDRCentury23egistrationField,\n} from './3517/century23';\nimport {\n cerfa3310Century24Fields,\n getCerfa3310Century24Payload,\n getCerfa3310Century24RegistrationFields,\n} from './3310/century24';\nimport {\n cerfa3517Century25Fields,\n getCerfa3517Century25Payload,\n getCerfa3517Century25RegistrationField,\n getCerfa3517DDRCentury25egistrationField,\n} from './3517/century25';\nimport {\n cerfa3310Century25Fields,\n getCerfa3310Century25Payload,\n getCerfa3310Century25RegistrationFields,\n} from './3310/century25';\n\nconst vatDocuments: VatDocument[] = [\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '23',\n centuries: [2022, 2023],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2023,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2023) => getCerfa3310Century23RegistrationFields(data),\n fields: cerfa3310Century23Fields,\n fileName: '3310-2023',\n annex: {\n name: '3519',\n century: '23',\n shouldInclude: (data: Cerfa3310_2023) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '24',\n centuries: [2024],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2024,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century24Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2024) => getCerfa3310Century24RegistrationFields(data),\n fields: cerfa3310Century24Fields,\n fileName: '3310-2024',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2023) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '25',\n centuries: [2025],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2025,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century25Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2025) => getCerfa3310Century25RegistrationFields(data),\n fields: cerfa3310Century25Fields,\n fileName: '3310-2025',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2023) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3514,\n name: '3514',\n century: '23',\n centuries: [2022, 2023, 2024, 2025],\n payload: (payload: PayloadCerfa3514_2022) => getCerfa3514Century22Payload(payload),\n asponePayload: (data: Cerfa3514_2022) => getCerfa3514Century23RegistrationFields(data),\n fields: cerfa3514Century22Fields,\n fileName: '3514-2022',\n },\n {\n idCerfaType: CerfaType.CERFA_3517,\n name: '3517',\n century: '23',\n centuries: [2022, 2023, 2024],\n payload: (accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2023) =>\n getCerfa3517Century23Payload(accountingEntries, payload),\n asponePayload: (data: Cerfa3517_2023) => getCerfa3517CenturyRegistrationField(data),\n fields: cerfa3517Century23Fields,\n fileName: '3517-2023',\n annexFields: (data: Cerfa3517_2023) => getCerfa3517DDRCentury23egistrationField(data),\n },\n {\n idCerfaType: CerfaType.CERFA_3517,\n name: '3517',\n century: '25',\n centuries: [2025, 2026],\n payload: (accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2025) =>\n getCerfa3517Century25Payload(accountingEntries, payload),\n asponePayload: (data: Cerfa3517_2025) => getCerfa3517Century25RegistrationField(data),\n fields: cerfa3517Century25Fields,\n fileName: '3517-2025',\n annexFields: (data: Cerfa3517_2025) => getCerfa3517DDRCentury25egistrationField(data),\n },\n];\n\nexport const getVatCerfaObject = (idCerfaType: CerfaType, endDate: string): VatDocument => {\n // Suppression du add(1, 'day') suite à une déclaration 3310 31/12 rejetée car millésime trop avancé pour le champ (0C3CE366-26EB-4BBA-AB61-93A606686C9A)\n\n // CA12 => Utiliser le millésime N pour les déclarations dont la date de fin de période CB/DTM >= 31/12/N-1\n // Autre => Utiliser le millésime N pour les déclarations dont la date de fin de période CB/DTM >= 01/01/N\n const year =\n idCerfaType === CerfaType.CERFA_3517 && dayjs(endDate).format('MM-DD') === '12-31'\n ? +dayjs(endDate).year() + 1\n : +dayjs(endDate).year();\n\n const cerfa = vatDocuments.find((v) => v.idCerfaType === idCerfaType && v.centuries.find((c) => c === year));\n if (!cerfa) throw new Error(`Cerfa type #${idCerfaType} with century ${year} is not managed yet.`);\n\n return cerfa;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"centuries.js","sourceRoot":"","sources":["../../../../ts/utils/vat/centuries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,uCAAuC,GACxC,MAAM,kBAAkB,CAAC;AAiB1B,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,uCAAuC,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,uCAAuC,EAAE,MAAM,kBAAkB,CAAC;AAO3E,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,oCAAoC,EACpC,wCAAwC,GACzC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,uCAAuC,GACxC,MAAM,kBAAkB,CAAC;AAC1B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WAAW,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAC7G,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,WAAW,iBAAiB,IAAI,sBAAsB,CAAC,CAAC;IAEnG,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { CerfaType } from '../../types/Enum/CerfaType';\nimport { VatDocument } from '../../types/Interface/api/cerfa/ReadCerfa';\nimport {\n cerfa3310Century23Fields,\n getCerfa3310Century23Payload,\n getCerfa3310Century23RegistrationFields,\n} from './3310/century23';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport {\n Cerfa3310_2023,\n Cerfa3310_2024,\n Cerfa3310_2025,\n PayloadCerfa3310_2023,\n PayloadCerfa3310_2024,\n PayloadCerfa3310_2025,\n} from '../../types/Interface/api/cerfa/3310';\nimport {\n Cerfa3514_2022,\n Cerfa3519_2017,\n PayloadCerfa3514_2022,\n PayloadCerfa3519_2017,\n UpdatedAnnotation,\n} from '../../types';\nimport { cerfa3519Century17Fields, getCerfa3519Century17Payload } from './3519/century17';\nimport { getCerfa3519Century23RegistrationFields } from './3519/century23';\nimport { cerfa3514Century22Fields, getCerfa3514Century22Payload } from './3514/century22';\nimport { getCerfa3514Century23RegistrationFields } from './3514/century23';\nimport {\n Cerfa3517_2023,\n Cerfa3517_2025,\n PayloadCerfa3517_2023,\n PayloadCerfa3517_2025,\n} from '../../types/Interface/api/cerfa/3517';\nimport {\n cerfa3517Century23Fields,\n getCerfa3517Century23Payload,\n getCerfa3517CenturyRegistrationField,\n getCerfa3517DDRCentury23egistrationField,\n} from './3517/century23';\nimport {\n cerfa3310Century24Fields,\n getCerfa3310Century24Payload,\n getCerfa3310Century24RegistrationFields,\n} from './3310/century24';\nimport {\n cerfa3517Century25Fields,\n getCerfa3517Century25Payload,\n getCerfa3517Century25RegistrationField,\n getCerfa3517DDRCentury25egistrationField,\n} from './3517/century25';\nimport {\n cerfa3310Century25Fields,\n getCerfa3310Century25Payload,\n getCerfa3310Century25RegistrationFields,\n} from './3310/century25';\n\nconst vatDocuments: VatDocument[] = [\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '23',\n centuries: [2022, 2023],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2023,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2023) => getCerfa3310Century23RegistrationFields(data),\n fields: cerfa3310Century23Fields,\n fileName: '3310-2023',\n annex: {\n name: '3519',\n century: '23',\n shouldInclude: (data: Cerfa3310_2023) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '24',\n centuries: [2024],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2024,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century24Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2024) => getCerfa3310Century24RegistrationFields(data),\n fields: cerfa3310Century24Fields,\n fileName: '3310-2024',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2023) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '25',\n centuries: [2025, 2026],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2025,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century25Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2025) => getCerfa3310Century25RegistrationFields(data),\n fields: cerfa3310Century25Fields,\n fileName: '3310-2025',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2023) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3514,\n name: '3514',\n century: '23',\n centuries: [2022, 2023, 2024, 2025, 2026],\n payload: (payload: PayloadCerfa3514_2022) => getCerfa3514Century22Payload(payload),\n asponePayload: (data: Cerfa3514_2022) => getCerfa3514Century23RegistrationFields(data),\n fields: cerfa3514Century22Fields,\n fileName: '3514-2022',\n },\n {\n idCerfaType: CerfaType.CERFA_3517,\n name: '3517',\n century: '23',\n centuries: [2022, 2023, 2024],\n payload: (accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2023) =>\n getCerfa3517Century23Payload(accountingEntries, payload),\n asponePayload: (data: Cerfa3517_2023) => getCerfa3517CenturyRegistrationField(data),\n fields: cerfa3517Century23Fields,\n fileName: '3517-2023',\n annexFields: (data: Cerfa3517_2023) => getCerfa3517DDRCentury23egistrationField(data),\n },\n {\n idCerfaType: CerfaType.CERFA_3517,\n name: '3517',\n century: '25',\n centuries: [2025, 2026],\n payload: (accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2025) =>\n getCerfa3517Century25Payload(accountingEntries, payload),\n asponePayload: (data: Cerfa3517_2025) => getCerfa3517Century25RegistrationField(data),\n fields: cerfa3517Century25Fields,\n fileName: '3517-2025',\n annexFields: (data: Cerfa3517_2025) => getCerfa3517DDRCentury25egistrationField(data),\n },\n];\n\nexport const getVatCerfaObject = (idCerfaType: CerfaType, endDate: string): VatDocument => {\n // Suppression du add(1, 'day') suite à une déclaration 3310 31/12 rejetée car millésime trop avancé pour le champ (0C3CE366-26EB-4BBA-AB61-93A606686C9A)\n\n // CA12 => Utiliser le millésime N pour les déclarations dont la date de fin de période CB/DTM >= 31/12/N-1\n // Autre => Utiliser le millésime N pour les déclarations dont la date de fin de période CB/DTM >= 01/01/N\n const year =\n idCerfaType === CerfaType.CERFA_3517 && dayjs(endDate).format('MM-DD') === '12-31'\n ? +dayjs(endDate).year() + 1\n : +dayjs(endDate).year();\n\n const cerfa = vatDocuments.find((v) => v.idCerfaType === idCerfaType && v.centuries.find((c) => c === year));\n if (!cerfa) throw new Error(`Cerfa type #${idCerfaType} with century ${year} is not managed yet.`);\n\n return cerfa;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAO,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,gBAAgB,EAAE,EACrC,cAAc,EAAE,MAAM,EAAE,EACxB,SAAS,SAAI,EACb,KAAK,UAAQ,GACZ,MAAM,CAqBR;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,2BAA2B,CACzC,iBAAiB,EAAE,gBAAgB,EAAE,EACrC,cAAc,EAAE,MAAM,EAAE,EACxB,SAAS,SAAI,EACb,OAAO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,UAAO,UAMvF;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,UAAO,UAMxF;AAED,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAYhF"}
|
|
@@ -77,10 +77,13 @@ export function getTaxesExcludedAmount(amountTtc, idVat, isRounded = true) {
|
|
|
77
77
|
return Math.round(amountNotRounded * 100) / 100;
|
|
78
78
|
}
|
|
79
79
|
export function getInternalInvoicingVatByZipCode(zipCode) {
|
|
80
|
-
if (zipCode?.startsWith('
|
|
80
|
+
if (zipCode?.startsWith('972') || zipCode?.startsWith('974')) {
|
|
81
81
|
return Vat.TX_8_5;
|
|
82
82
|
}
|
|
83
|
-
else if (zipCode?.startsWith('
|
|
83
|
+
else if (zipCode?.startsWith('971') ||
|
|
84
|
+
zipCode?.startsWith('973') ||
|
|
85
|
+
zipCode?.startsWith('976') ||
|
|
86
|
+
zipCode?.startsWith('977')) {
|
|
84
87
|
return Vat.WITHOUT_TAXE;
|
|
85
88
|
}
|
|
86
89
|
return Vat.TX_20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAW,MAAM,sBAAsB,CAAC;AAEpD,MAAM,UAAU,wBAAwB,CACtC,iBAAqC,EACrC,cAAwB,EACxB,SAAS,GAAG,CAAC,EACb,KAAK,GAAG,KAAK;IAEb,MAAM,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,MAAM,CACnB,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,eAAe,EAAE,EAAE;QACpD,IAAI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IAC5E,MAAM,gBAAgB,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;IAE7D,IAAI,CAAC,SAAS;QAAE,OAAO,gBAAgB,CAAC;IACxC,OAAO,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,OAAsB;IACrE,IAAI,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7D,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;SAAM,IACL,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC;QAC1B,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC;QAC1B,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC;QAC1B,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAC1B,CAAC;QACD,OAAO,GAAG,CAAC,YAAY,CAAC;IAC1B,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC;AACnB,CAAC","sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat, VatType } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n accountingEntry.account.number.toString().startsWith(number)\n ) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0),\n precision,\n );\n return isAbs ? Math.abs(result) : result;\n}\n\nexport function setZeroIfIsNegative(value: number): number {\n return value < 0 ? 0 : value;\n}\n\nexport function getTaxAmountByAccountNumber(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n logging = false,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n accountingEntry.account.number.toString().startsWith(number)\n ) {\n // eslint-disable-next-line no-console\n if (logging) console.log('\\'\\'');\n // eslint-disable-next-line no-console\n if (logging) console.log(accountingEntry);\n\n accTmp +=\n (accountingEntry.debit - accountingEntry.credit) *\n ((Object.values(Vat).find((v) => v.id === accountingEntry.idVat)?.value ?? 0) / 100);\n return true;\n }\n return false;\n });\n return isAbs ? Math.abs(accTmp) : accTmp;\n }, precision),\n );\n}\n\nexport function textFormatting(value: any, length: number | null = null, start?: number): string | null {\n if (value && typeof value === 'string') {\n let formattedValue = value.replace(/[\\u2018\\u2019]/g, '\\''); // Suppression des \"Curly Quotes\"\n formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &\n formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !\n formattedValue = formattedValue.replace(/[\\t]/g, ''); // Suppression des tabulations\n\n formattedValue = formattedValue.replace(/`/g, '\\''); // Suppression des `\n formattedValue = formattedValue.replace(/\"/g, ''); // Suppression des \"\n formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début\n formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin\n formattedValue = formattedValue.replace(/€/g, 'EUR');\n formattedValue = formattedValue.replace(/œ/g, 'oe');\n if (length) formattedValue = formattedValue.slice(start ?? 0, (start ?? 0) + length);\n return formattedValue;\n }\n return null;\n}\n\nexport function getTaxesIncludedAmount(amountHt: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find((v) => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountHt * ((100 + vatRate) / 100);\n\n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}\n\nexport function getTaxesExcludedAmount(amountTtc: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find((v) => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountTtc / ((100 + vatRate) / 100);\n\n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}\n\nexport function getInternalInvoicingVatByZipCode(zipCode: string | null): VatType {\n if (zipCode?.startsWith('972') || zipCode?.startsWith('974')) {\n return Vat.TX_8_5;\n } else if (\n zipCode?.startsWith('971') ||\n zipCode?.startsWith('973') ||\n zipCode?.startsWith('976') ||\n zipCode?.startsWith('977')\n ) {\n return Vat.WITHOUT_TAXE;\n }\n return Vat.TX_20;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.3.193-
|
|
3
|
+
"version": "1.3.193-approbation-1",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
package/ts/api/resources/Card.ts
CHANGED
|
@@ -3,15 +3,6 @@ import {
|
|
|
3
3
|
ICard,
|
|
4
4
|
QueryUserCards,
|
|
5
5
|
QueryUserCardsPaginated,
|
|
6
|
-
QueryUserCardsStats,
|
|
7
|
-
CardsStatsGroup,
|
|
8
|
-
UpdateCard,
|
|
9
|
-
ModifyTeamPlanning,
|
|
10
|
-
ModifyExercisePlanning,
|
|
11
|
-
OrganizeBalanceSheets,
|
|
12
|
-
OrganizeBalanceSheetsResponse,
|
|
13
|
-
QueryInternalCardsStats,
|
|
14
|
-
InternalCardStats,
|
|
15
6
|
BasePaginate,
|
|
16
7
|
UpdateCardV2,
|
|
17
8
|
AssignCard,
|
|
@@ -38,62 +29,10 @@ export class Card extends Resource {
|
|
|
38
29
|
});
|
|
39
30
|
}
|
|
40
31
|
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated Use getAll instead
|
|
43
|
-
*/
|
|
44
|
-
getAllAdmin(params: QueryUserCards, signal?: AbortSignal): Promise<ICard[]> {
|
|
45
|
-
return this.axios.$get('/cards', {
|
|
46
|
-
...(signal ? { signal } : {}),
|
|
47
|
-
params,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
getStats(params: QueryUserCardsStats, signal?: AbortSignal): Promise<CardsStatsGroup[]> {
|
|
52
|
-
return this.axios.$get('/cards/stats', {
|
|
53
|
-
...(signal ? { signal } : {}),
|
|
54
|
-
params,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
getInternalStats(params: QueryInternalCardsStats, signal?: AbortSignal): Promise<InternalCardStats[]> {
|
|
59
|
-
return this.axios.$get('/cards/internal/stats', {
|
|
60
|
-
...(signal ? { signal } : {}),
|
|
61
|
-
params,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* @deprecated Use updateV2 instead
|
|
67
|
-
*/
|
|
68
|
-
update(id: number, data: UpdateCard): Promise<ICard> {
|
|
69
|
-
return this.axios.$put(`/cards/${id}`, data);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
32
|
delete(id: number): Promise<void> {
|
|
73
33
|
return this.axios.$delete(`/cards/${id}`);
|
|
74
34
|
}
|
|
75
35
|
|
|
76
|
-
/**
|
|
77
|
-
* @deprecated comptallo v1 endpoint
|
|
78
|
-
*/
|
|
79
|
-
modifyTeamPlanning(data: ModifyTeamPlanning): Promise<true> {
|
|
80
|
-
return this.axios.$put('/cards/assign/modify-team-planning', data);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated comptallo v1 endpoint
|
|
85
|
-
*/
|
|
86
|
-
modifyExercisePlanning(data: ModifyExercisePlanning): Promise<true> {
|
|
87
|
-
return this.axios.$put('/cards/assign/modify-exercise-planning', data);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* @deprecated comptallo v1 endpoint
|
|
92
|
-
*/
|
|
93
|
-
organizeFutureBalanceSheets(data: OrganizeBalanceSheets): Promise<OrganizeBalanceSheetsResponse> {
|
|
94
|
-
return this.axios.$post('/cards/accountant/organize/future-balance-sheets', data);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
36
|
updateV2(idCard: number, data: UpdateCardV2): Promise<ICard> {
|
|
98
37
|
return this.axios.$put(`/cards/${idCard}/v2`, data);
|
|
99
38
|
}
|
|
@@ -172,10 +172,16 @@ export class Checklist extends Resource {
|
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
/**
|
|
176
|
+
* @deprecated Use documentRequest.controller -> sendAskDocumentsMail instead
|
|
177
|
+
*/
|
|
175
178
|
sendAskDocumentsMail(idChecklist: number, params: SendAskDocumentsOptions): Promise<true> {
|
|
176
179
|
return this.axios.$post(`/checklists/ask-documents/${idChecklist}/mail`, params);
|
|
177
180
|
}
|
|
178
181
|
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated Use documentRequest.controller -> sendRelaunchDocumentsMail instead
|
|
184
|
+
*/
|
|
179
185
|
sendRelaunchDocumentsMail(idChecklist: number, params: SendRelaunchDocumentsOptions): Promise<true> {
|
|
180
186
|
return this.axios.$post(`/checklists/relaunch-documents/${idChecklist}/mail`, params);
|
|
181
187
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import { CreateDocumentRequest, IDocumentRequest, QueryDocumentRequest, UpdateDocumentRequest } from '../../types';
|
|
2
|
+
import { CreateDocumentRequest, IDocumentRequest, QueryDocumentRequest, SendAskDocumentsMail, SendRelaunchDocumentsMail, UpdateDocumentRequest } from '../../types';
|
|
3
3
|
|
|
4
4
|
export class DocumentRequest extends Resource {
|
|
5
5
|
create(body: CreateDocumentRequest): Promise<IDocumentRequest> {
|
|
@@ -33,4 +33,12 @@ export class DocumentRequest extends Resource {
|
|
|
33
33
|
delete(id: number): Promise<void> {
|
|
34
34
|
return this.axios.$delete(`/documents-requests/${id}`);
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
sendRelaunchDocumentsMail(params: SendRelaunchDocumentsMail): Promise<true> {
|
|
38
|
+
return this.axios.$post('/documents-requests/relaunch-documents/mail', params);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
sendAskDocumentsMail(params: SendAskDocumentsMail): Promise<true> {
|
|
42
|
+
return this.axios.$post('/documents-requests/ask-documents/mail', params);
|
|
43
|
+
}
|
|
36
44
|
}
|
|
@@ -30,16 +30,8 @@ export class InternalInvoicing extends Resource {
|
|
|
30
30
|
return this.axios.$post('/internalInvoicing/cutOff/FAE', {});
|
|
31
31
|
case 3:
|
|
32
32
|
return this.axios.$post('/internalInvoicing/cutOff/AAE', {});
|
|
33
|
-
case 4:
|
|
34
|
-
return this.axios.$post('/internalInvoicing/cutOff/PCA2', {});
|
|
35
33
|
case 5:
|
|
36
34
|
return this.axios.$post('/internalInvoicing/cutOff/PCA-accounting-package', {});
|
|
37
|
-
case 6:
|
|
38
|
-
return this.axios.$post('/internalInvoicing/cutOff/PCA-accounting-package-2', {});
|
|
39
|
-
case 7:
|
|
40
|
-
return this.axios.$post('/internalInvoicing/cutOff/PCA-accounting-out-package', {});
|
|
41
|
-
case 8:
|
|
42
|
-
return this.axios.$post('/internalInvoicing/cutOff/PCA-accounting-out-package-2', {});
|
|
43
35
|
case 9:
|
|
44
36
|
return this.axios.$post('/internalInvoicing/cutOff/AAE-detail', {});
|
|
45
37
|
default:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Resource } from '../Resource';
|
|
2
|
+
import { ILoginApprovalStatusResponse } from '../../types/Interface/api/authentification/loginApproval';
|
|
3
|
+
|
|
4
|
+
export class LoginApproval extends Resource {
|
|
5
|
+
approve(requestId: string, deviceId: string): Promise<{ message: string; status: string }> {
|
|
6
|
+
return this.axios.$post(`/auth/approvals/${requestId}/approve`, { deviceId });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
deny(requestId: string, deviceId: string): Promise<{ message: string; status: string }> {
|
|
10
|
+
return this.axios.$post(`/auth/approvals/${requestId}/deny`, { deviceId });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
getStatus(requestId: string): Promise<ILoginApprovalStatusResponse> {
|
|
14
|
+
return this.axios.$get(`/auth/approvals/${requestId}/status`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
cleanup(): Promise<{ deleted: number; message: string }> {
|
|
18
|
+
return this.axios.$post('/auth/approvals/cleanup');
|
|
19
|
+
}
|
|
20
|
+
}
|
package/ts/api/resources/Mfa.ts
CHANGED
|
@@ -26,4 +26,10 @@ export class UserMfa extends Resource {
|
|
|
26
26
|
// Si userId est fourni, l'envoyer en query param, sinon vérifier l'user connecté
|
|
27
27
|
return this.axios.$get('/mfa/is-enabled', userId ? { params: { userId } } : undefined);
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
///// Mobile Approval MFA /////
|
|
31
|
+
|
|
32
|
+
setMobileApproval(userId: number, enable: boolean): Promise<void> {
|
|
33
|
+
return this.axios.$post('/mfa/mobile-approval', { userId, enable });
|
|
34
|
+
}
|
|
29
35
|
}
|
|
@@ -162,6 +162,10 @@ export class Payment extends Resource {
|
|
|
162
162
|
return this.axios.$get('/payments', { params: query, signal });
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
getLastPayment(idSociety: number): Promise<IPayment> {
|
|
166
|
+
return this.axios.$get(`/payment/${idSociety}/last`);
|
|
167
|
+
}
|
|
168
|
+
|
|
165
169
|
update(id: number, payload: UpdatePayment): Promise<IPayment> {
|
|
166
170
|
return this.axios.$patch(`/payments/${id}`, payload);
|
|
167
171
|
}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IBankAccount,
|
|
4
|
+
CreateShineTransactions,
|
|
5
|
+
GetConnect,
|
|
6
|
+
CreateShineAccount,
|
|
7
|
+
ConnectResponse,
|
|
8
|
+
GetRefreshConnect,
|
|
9
|
+
} from '../../types';
|
|
3
10
|
|
|
4
11
|
export class Shine extends Resource {
|
|
5
12
|
connect(idSociety: number, params: GetConnect): Promise<ConnectResponse> {
|
|
6
13
|
return this.axios.$get(`/connectors/shine/${idSociety}/connect`, { params });
|
|
7
14
|
}
|
|
15
|
+
refreshConnectData(idSociety: number, params: GetRefreshConnect): Promise<ConnectResponse> {
|
|
16
|
+
return this.axios.$get(`/connectors/shine/${idSociety}/refresh-connect-data`, { params });
|
|
17
|
+
}
|
|
8
18
|
importBankAccount(idSociety: number, params: CreateShineAccount): Promise<IBankAccount> {
|
|
9
19
|
return this.axios.$post(`/connectors/shine/${idSociety}/importBankAccount`, params);
|
|
10
20
|
}
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
DataCustomersCsv,
|
|
31
31
|
ReadCurrentPrestations,
|
|
32
32
|
QueryToArchivedSociety,
|
|
33
|
+
ReadFeatureAccess,
|
|
33
34
|
} from '../../types';
|
|
34
35
|
import { CancelToken } from 'axios';
|
|
35
36
|
|
|
@@ -205,4 +206,8 @@ export class Society extends Resource {
|
|
|
205
206
|
},
|
|
206
207
|
});
|
|
207
208
|
}
|
|
209
|
+
|
|
210
|
+
getAllFeatures(idSociety: number): Promise<ReadFeatureAccess> {
|
|
211
|
+
return this.axios.$get(`/societies/${idSociety}/features`);
|
|
212
|
+
}
|
|
208
213
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Resource } from '../Resource';
|
|
2
|
+
import {
|
|
3
|
+
ISocietyApproval,
|
|
4
|
+
CreateDocument,
|
|
5
|
+
ReadLibraryFile,
|
|
6
|
+
ResetDocument,
|
|
7
|
+
IDocumentSection,
|
|
8
|
+
IApprovalGeneratingData,
|
|
9
|
+
} from '../../types';
|
|
10
|
+
|
|
11
|
+
export class SocietyApproval extends Resource {
|
|
12
|
+
/**
|
|
13
|
+
* Get society approval data for a given exercice
|
|
14
|
+
* @param idExercice - The exercice ID
|
|
15
|
+
* @returns Society approval with all needed data
|
|
16
|
+
*/
|
|
17
|
+
get(idExercice: number): Promise<ISocietyApproval> {
|
|
18
|
+
return this.axios.$get(`/exercices/${idExercice}/approvals`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Get approval data needed for PDF generation
|
|
23
|
+
* Retrieves all necessary information before generating a PDF document
|
|
24
|
+
* @param idExercice - The exercice ID
|
|
25
|
+
* @returns Approval data with template data for PDF generation
|
|
26
|
+
*/
|
|
27
|
+
getGeneratingData(idExercice: number): Promise<IApprovalGeneratingData> {
|
|
28
|
+
return this.axios.$get(`/exercices/${idExercice}/approvals/generating-data`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Create or update society approval
|
|
33
|
+
* @param idExercice - The exercice ID
|
|
34
|
+
* @param payload - The approval data
|
|
35
|
+
* @returns Updated or created society approval
|
|
36
|
+
*/
|
|
37
|
+
updateOrCreate(idExercice: number, payload: ISocietyApproval): Promise<ISocietyApproval> {
|
|
38
|
+
return this.axios.$post(`/exercices/${idExercice}/approvals`, payload);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Generate approval PDF document
|
|
43
|
+
* @param idExercice - The exercice ID
|
|
44
|
+
* @param payload - The document type(s) to generate
|
|
45
|
+
* @returns PDF file as blob
|
|
46
|
+
*/
|
|
47
|
+
generatePdf(idExercice: number, payload: CreateDocument): Promise<ReadLibraryFile> {
|
|
48
|
+
return this.axios.$post(`/exercices/${idExercice}/approvals/pdf`, payload);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Reset document section by regenerating from original template
|
|
53
|
+
* @param idExercice - The exercice ID
|
|
54
|
+
* @param idDocumentSection - The documentSection ID to reset
|
|
55
|
+
* @param payload - The document type for template selection
|
|
56
|
+
* @returns Updated documentSection with new content from template
|
|
57
|
+
*/
|
|
58
|
+
resetDocument(idExercice: number, idDocumentSection: number, payload: ResetDocument): Promise<IDocumentSection> {
|
|
59
|
+
return this.axios.$put(`/exercices/${idExercice}/document-sections/${idDocumentSection}/reset`, payload);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Regenerate PDF document from existing documentSection HTML content
|
|
64
|
+
* @param idExercice - The exercice ID
|
|
65
|
+
* @param idDocumentSection - The documentSection ID containing HTML content
|
|
66
|
+
* @returns PDF file as buffer for download
|
|
67
|
+
*/
|
|
68
|
+
regeneratePdf(idExercice: number, idDocumentSection: number): Promise<Buffer> {
|
|
69
|
+
return this.axios.$post(
|
|
70
|
+
`/exercices/${idExercice}/approvals/pdf/regenerate`,
|
|
71
|
+
{ idDocumentSection },
|
|
72
|
+
{ responseType: 'arraybuffer' },
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
}
|
package/ts/api/resources/User.ts
CHANGED
|
@@ -23,9 +23,6 @@ import {
|
|
|
23
23
|
BasePaginate,
|
|
24
24
|
QueryGetAllUsersPaginated,
|
|
25
25
|
QueryUpdatePassword,
|
|
26
|
-
CreateCollaboraterDetail,
|
|
27
|
-
IWorkingSchedule,
|
|
28
|
-
ICollaboraterDetail,
|
|
29
26
|
} from '../../types';
|
|
30
27
|
|
|
31
28
|
export class User extends Resource {
|
|
@@ -147,24 +144,4 @@ export class User extends Resource {
|
|
|
147
144
|
registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {
|
|
148
145
|
return this.axios.$post('users/prospect', body);
|
|
149
146
|
}
|
|
150
|
-
|
|
151
|
-
updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {
|
|
152
|
-
return this.axios.$put(`users/coworker/${idUser}/working-schedules`, workingSchedules);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]> {
|
|
156
|
-
return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
createCollaboraterDetail(params: CreateCollaboraterDetail): Promise<ICollaboraterDetail> {
|
|
160
|
-
return this.axios.$post('collaboraters-details', params);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
getCollaboraterDetail(idUser: number): Promise<ICollaboraterDetail> {
|
|
164
|
-
return this.axios.$get(`collaboraters-details/user/${idUser}`);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail> {
|
|
168
|
-
return this.axios.$put(`collaboraters-details/${id}`, params);
|
|
169
|
-
}
|
|
170
147
|
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -188,6 +188,8 @@ import { BalanceSheetReport } from './resources/BalanceSheetReport';
|
|
|
188
188
|
import { Revenue } from './resources/Revenue';
|
|
189
189
|
import { InformationRequest } from './resources/InformationRequest';
|
|
190
190
|
import { AutomaticRegistration } from './resources/AutomaticRegistration';
|
|
191
|
+
import { LoginApproval } from './resources/LoginApproval';
|
|
192
|
+
import { SocietyApproval } from './resources/SocietyApproval';
|
|
191
193
|
|
|
192
194
|
export const resources = {
|
|
193
195
|
budgetInsight: BudgetInsight,
|
|
@@ -380,4 +382,6 @@ export const resources = {
|
|
|
380
382
|
revenue: Revenue,
|
|
381
383
|
informationRequest: InformationRequest,
|
|
382
384
|
automaticRegistration: AutomaticRegistration,
|
|
385
|
+
loginApproval: LoginApproval,
|
|
386
|
+
societyApproval: SocietyApproval,
|
|
383
387
|
};
|