@silexpert/core 1.1.263 → 1.1.265
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/Account.d.ts +3 -1
- package/dist/cjs/api/resources/Account.d.ts.map +1 -1
- package/dist/cjs/api/resources/Account.js +6 -0
- package/dist/cjs/api/resources/Account.js.map +1 -1
- package/dist/cjs/api/resources/CalendarEvent.d.ts +2 -1
- package/dist/cjs/api/resources/CalendarEvent.d.ts.map +1 -1
- package/dist/cjs/api/resources/CalendarEvent.js +3 -0
- package/dist/cjs/api/resources/CalendarEvent.js.map +1 -1
- package/dist/cjs/api/resources/Contest.d.ts +2 -2
- package/dist/cjs/api/resources/Contest.d.ts.map +1 -1
- package/dist/cjs/api/resources/Contest.js.map +1 -1
- package/dist/cjs/api/resources/Transaction.d.ts +3 -2
- package/dist/cjs/api/resources/Transaction.d.ts.map +1 -1
- package/dist/cjs/api/resources/Transaction.js +4 -1
- package/dist/cjs/api/resources/Transaction.js.map +1 -1
- package/dist/cjs/types/Enum/Contest.d.ts +16 -0
- package/dist/cjs/types/Enum/Contest.d.ts.map +1 -0
- package/dist/cjs/types/Enum/Contest.js +20 -0
- package/dist/cjs/types/Enum/Contest.js.map +1 -0
- package/dist/cjs/types/Enum/MailAuto.d.ts +2 -1
- package/dist/cjs/types/Enum/MailAuto.d.ts.map +1 -1
- package/dist/cjs/types/Enum/MailAuto.js +1 -0
- package/dist/cjs/types/Enum/MailAuto.js.map +1 -1
- package/dist/cjs/types/Enum/MailDomainType.d.ts +1 -0
- package/dist/cjs/types/Enum/MailDomainType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/MailDomainType.js +3662 -1
- package/dist/cjs/types/Enum/MailDomainType.js.map +1 -1
- package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridPourcentage.js +326 -0
- package/dist/cjs/types/Enum/PriceGridPourcentage.js.map +1 -1
- package/dist/cjs/types/Enum/TimeSlot.js +2 -2
- package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
- package/dist/cjs/types/Interface/api/account/Create.d.ts +13 -0
- package/dist/cjs/types/Interface/api/account/Create.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/account/{CreateAccountSociety.js → Create.js} +22 -2
- package/dist/cjs/types/Interface/api/account/Create.js.map +1 -0
- package/dist/cjs/types/Interface/api/account/Query.d.ts +24 -0
- package/dist/cjs/types/Interface/api/account/Query.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/account/{QueryAccounts.js → Query.js} +43 -2
- package/dist/cjs/types/Interface/api/account/Query.js.map +1 -0
- package/dist/{mjs/types/Interface/api/account/ReadQuoteAccount.d.ts → cjs/types/Interface/api/account/Read.d.ts} +2 -1
- package/dist/cjs/types/Interface/api/account/Read.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/account/{ReadAccounts.js → Read.js} +1 -1
- package/dist/cjs/types/Interface/api/account/Read.js.map +1 -0
- package/dist/cjs/types/Interface/api/account/Update.d.ts +16 -0
- package/dist/cjs/types/Interface/api/account/Update.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/account/{UpdateAccountSociety.js → Update.js} +28 -2
- package/dist/cjs/types/Interface/api/account/Update.js.map +1 -0
- package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts +6 -0
- package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/{account/QueryGenericAccount.js → calendarEvent/queryCalendarEventCall.js} +11 -11
- package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js.map +1 -0
- package/dist/cjs/types/Interface/api/calendarEvent/readCalendarEventCall.d.ts +8 -0
- package/dist/cjs/types/Interface/api/calendarEvent/readCalendarEventCall.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/{account/ReadQuoteAccount.js → calendarEvent/readCalendarEventCall.js} +1 -1
- package/dist/cjs/types/Interface/api/calendarEvent/readCalendarEventCall.js.map +1 -0
- package/dist/cjs/types/Interface/api/contest/Create.d.ts +15 -0
- package/dist/cjs/types/Interface/api/contest/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/contest/Create.js +95 -1
- package/dist/cjs/types/Interface/api/contest/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/transactions/Query.d.ts +14 -0
- package/dist/cjs/types/Interface/api/transactions/Query.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/transactions/{QueryUnexport.js → Query.js} +36 -2
- package/dist/cjs/types/Interface/api/transactions/Query.js.map +1 -0
- package/dist/cjs/types/Interface/models/IAccount.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IAccount.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IAccount.js.map +1 -1
- package/dist/{mjs/types/Interface/models/IVoteContest.d.ts → cjs/types/Interface/models/IContest.d.ts} +5 -2
- package/dist/cjs/types/Interface/models/IContest.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/{IVoteContest.js → IContest.js} +1 -1
- package/dist/cjs/types/Interface/models/IContest.js.map +1 -0
- package/dist/cjs/types/Interface/models/IUserContest.d.ts +2 -2
- package/dist/cjs/types/Interface/models/IUserContest.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUserContest.js.map +1 -1
- package/dist/cjs/types/index.d.ts +9 -9
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +9 -9
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/vat/registration.d.ts.map +1 -1
- package/dist/cjs/utils/vat/registration.js +10 -1
- package/dist/cjs/utils/vat/registration.js.map +1 -1
- package/dist/mjs/api/resources/Account.d.ts +3 -1
- package/dist/mjs/api/resources/Account.d.ts.map +1 -1
- package/dist/mjs/api/resources/Account.js +6 -0
- package/dist/mjs/api/resources/Account.js.map +1 -1
- package/dist/mjs/api/resources/CalendarEvent.d.ts +2 -1
- package/dist/mjs/api/resources/CalendarEvent.d.ts.map +1 -1
- package/dist/mjs/api/resources/CalendarEvent.js +3 -0
- package/dist/mjs/api/resources/CalendarEvent.js.map +1 -1
- package/dist/mjs/api/resources/Contest.d.ts +2 -2
- package/dist/mjs/api/resources/Contest.d.ts.map +1 -1
- package/dist/mjs/api/resources/Contest.js.map +1 -1
- package/dist/mjs/api/resources/Transaction.d.ts +3 -2
- package/dist/mjs/api/resources/Transaction.d.ts.map +1 -1
- package/dist/mjs/api/resources/Transaction.js +4 -1
- package/dist/mjs/api/resources/Transaction.js.map +1 -1
- package/dist/mjs/types/Enum/Contest.d.ts +16 -0
- package/dist/mjs/types/Enum/Contest.d.ts.map +1 -0
- package/dist/mjs/types/Enum/Contest.js +17 -0
- package/dist/mjs/types/Enum/Contest.js.map +1 -0
- package/dist/mjs/types/Enum/MailAuto.d.ts +2 -1
- package/dist/mjs/types/Enum/MailAuto.d.ts.map +1 -1
- package/dist/mjs/types/Enum/MailAuto.js +1 -0
- package/dist/mjs/types/Enum/MailAuto.js.map +1 -1
- package/dist/mjs/types/Enum/MailDomainType.d.ts +1 -0
- package/dist/mjs/types/Enum/MailDomainType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/MailDomainType.js +3661 -0
- package/dist/mjs/types/Enum/MailDomainType.js.map +1 -1
- package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridPourcentage.js +326 -0
- package/dist/mjs/types/Enum/PriceGridPourcentage.js.map +1 -1
- package/dist/mjs/types/Enum/TimeSlot.js +2 -2
- package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
- package/dist/mjs/types/Interface/api/account/Create.d.ts +13 -0
- package/dist/mjs/types/Interface/api/account/Create.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/account/{CreateAccountSociety.js → Create.js} +23 -1
- package/dist/mjs/types/Interface/api/account/Create.js.map +1 -0
- package/dist/mjs/types/Interface/api/account/Query.d.ts +24 -0
- package/dist/mjs/types/Interface/api/account/Query.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/account/{QueryAccounts.js → Query.js} +47 -2
- package/dist/mjs/types/Interface/api/account/Query.js.map +1 -0
- package/dist/{cjs/types/Interface/api/account/ReadQuoteAccount.d.ts → mjs/types/Interface/api/account/Read.d.ts} +2 -1
- package/dist/mjs/types/Interface/api/account/Read.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/account/Read.js +2 -0
- package/dist/mjs/types/Interface/api/account/Read.js.map +1 -0
- package/dist/mjs/types/Interface/api/account/Update.d.ts +16 -0
- package/dist/mjs/types/Interface/api/account/Update.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/account/{UpdateAccountSociety.js → Update.js} +30 -1
- package/dist/mjs/types/Interface/api/account/Update.js.map +1 -0
- package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts +6 -0
- package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/{account/QueryGenericAccount.js → calendarEvent/queryCalendarEventCall.js} +12 -12
- package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js.map +1 -0
- package/dist/mjs/types/Interface/api/calendarEvent/readCalendarEventCall.d.ts +8 -0
- package/dist/mjs/types/Interface/api/calendarEvent/readCalendarEventCall.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/calendarEvent/readCalendarEventCall.js +2 -0
- package/dist/mjs/types/Interface/api/calendarEvent/readCalendarEventCall.js.map +1 -0
- package/dist/mjs/types/Interface/api/contest/Create.d.ts +15 -0
- package/dist/mjs/types/Interface/api/contest/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/contest/Create.js +104 -1
- package/dist/mjs/types/Interface/api/contest/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/transactions/Query.d.ts +14 -0
- package/dist/mjs/types/Interface/api/transactions/Query.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/transactions/{QueryUnexport.js → Query.js} +40 -2
- package/dist/mjs/types/Interface/api/transactions/Query.js.map +1 -0
- package/dist/mjs/types/Interface/models/IAccount.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IAccount.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IAccount.js.map +1 -1
- package/dist/{cjs/types/Interface/models/IVoteContest.d.ts → mjs/types/Interface/models/IContest.d.ts} +5 -2
- package/dist/mjs/types/Interface/models/IContest.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IContest.js +2 -0
- package/dist/mjs/types/Interface/models/IContest.js.map +1 -0
- package/dist/mjs/types/Interface/models/IUserContest.d.ts +2 -2
- package/dist/mjs/types/Interface/models/IUserContest.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUserContest.js.map +1 -1
- package/dist/mjs/types/index.d.ts +9 -9
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +9 -9
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/vat/registration.d.ts.map +1 -1
- package/dist/mjs/utils/vat/registration.js +10 -1
- package/dist/mjs/utils/vat/registration.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Account.ts +12 -1
- package/ts/api/resources/CalendarEvent.ts +4 -1
- package/ts/api/resources/Contest.ts +2 -2
- package/ts/api/resources/Transaction.ts +6 -2
- package/ts/types/Enum/Contest.ts +15 -0
- package/ts/types/Enum/MailAuto.ts +1 -0
- package/ts/types/Enum/MailDomainType.ts +3662 -0
- package/ts/types/Enum/PriceGridPourcentage.ts +326 -0
- package/ts/types/Enum/TimeSlot.ts +2 -2
- package/ts/types/Interface/api/account/Create.ts +33 -0
- package/ts/types/Interface/api/account/Query.ts +66 -0
- package/ts/types/Interface/api/account/{ReadQuoteAccount.ts → Read.ts} +3 -0
- package/ts/types/Interface/api/account/{UpdateAccountSociety.ts → Update.ts} +22 -0
- package/ts/types/Interface/api/{account/QueryGenericAccount.ts → calendarEvent/queryCalendarEventCall.ts} +7 -7
- package/ts/types/Interface/api/calendarEvent/readCalendarEventCall.ts +8 -0
- package/ts/types/Interface/api/contest/Create.ts +83 -1
- package/ts/types/Interface/api/transactions/Query.ts +55 -0
- package/ts/types/Interface/models/IAccount.ts +2 -0
- package/ts/types/Interface/models/{IVoteContest.ts → IContest.ts} +5 -1
- package/ts/types/Interface/models/IUserContest.ts +2 -2
- package/ts/types/index.ts +10 -9
- package/ts/utils/vat/registration.ts +10 -1
- package/dist/cjs/types/Interface/api/account/CreateAccountSociety.d.ts +0 -7
- package/dist/cjs/types/Interface/api/account/CreateAccountSociety.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/account/CreateAccountSociety.js.map +0 -1
- package/dist/cjs/types/Interface/api/account/QueryAccountSociety.d.ts +0 -8
- package/dist/cjs/types/Interface/api/account/QueryAccountSociety.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/account/QueryAccountSociety.js +0 -37
- package/dist/cjs/types/Interface/api/account/QueryAccountSociety.js.map +0 -1
- package/dist/cjs/types/Interface/api/account/QueryAccounts.d.ts +0 -13
- package/dist/cjs/types/Interface/api/account/QueryAccounts.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/account/QueryAccounts.js.map +0 -1
- package/dist/cjs/types/Interface/api/account/QueryGenericAccount.d.ts +0 -6
- package/dist/cjs/types/Interface/api/account/QueryGenericAccount.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/account/QueryGenericAccount.js.map +0 -1
- package/dist/cjs/types/Interface/api/account/ReadAccounts.d.ts +0 -2
- package/dist/cjs/types/Interface/api/account/ReadAccounts.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/account/ReadAccounts.js.map +0 -1
- package/dist/cjs/types/Interface/api/account/ReadQuoteAccount.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/account/ReadQuoteAccount.js.map +0 -1
- package/dist/cjs/types/Interface/api/account/UpdateAccountSociety.d.ts +0 -9
- package/dist/cjs/types/Interface/api/account/UpdateAccountSociety.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/account/UpdateAccountSociety.js.map +0 -1
- package/dist/cjs/types/Interface/api/transactions/QueryUnexport.d.ts +0 -7
- package/dist/cjs/types/Interface/api/transactions/QueryUnexport.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/transactions/QueryUnexport.js.map +0 -1
- package/dist/cjs/types/Interface/models/IVoteContest.d.ts.map +0 -1
- package/dist/cjs/types/Interface/models/IVoteContest.js.map +0 -1
- package/dist/mjs/types/Interface/api/account/CreateAccountSociety.d.ts +0 -7
- package/dist/mjs/types/Interface/api/account/CreateAccountSociety.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/account/CreateAccountSociety.js.map +0 -1
- package/dist/mjs/types/Interface/api/account/QueryAccountSociety.d.ts +0 -8
- package/dist/mjs/types/Interface/api/account/QueryAccountSociety.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/account/QueryAccountSociety.js +0 -38
- package/dist/mjs/types/Interface/api/account/QueryAccountSociety.js.map +0 -1
- package/dist/mjs/types/Interface/api/account/QueryAccounts.d.ts +0 -13
- package/dist/mjs/types/Interface/api/account/QueryAccounts.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/account/QueryAccounts.js.map +0 -1
- package/dist/mjs/types/Interface/api/account/QueryGenericAccount.d.ts +0 -6
- package/dist/mjs/types/Interface/api/account/QueryGenericAccount.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/account/QueryGenericAccount.js.map +0 -1
- package/dist/mjs/types/Interface/api/account/ReadAccounts.d.ts +0 -2
- package/dist/mjs/types/Interface/api/account/ReadAccounts.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/account/ReadAccounts.js +0 -2
- package/dist/mjs/types/Interface/api/account/ReadAccounts.js.map +0 -1
- package/dist/mjs/types/Interface/api/account/ReadQuoteAccount.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/account/ReadQuoteAccount.js +0 -2
- package/dist/mjs/types/Interface/api/account/ReadQuoteAccount.js.map +0 -1
- package/dist/mjs/types/Interface/api/account/UpdateAccountSociety.d.ts +0 -9
- package/dist/mjs/types/Interface/api/account/UpdateAccountSociety.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/account/UpdateAccountSociety.js.map +0 -1
- package/dist/mjs/types/Interface/api/transactions/QueryUnexport.d.ts +0 -7
- package/dist/mjs/types/Interface/api/transactions/QueryUnexport.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/transactions/QueryUnexport.js.map +0 -1
- package/dist/mjs/types/Interface/models/IVoteContest.d.ts.map +0 -1
- package/dist/mjs/types/Interface/models/IVoteContest.js +0 -2
- package/dist/mjs/types/Interface/models/IVoteContest.js.map +0 -1
- package/ts/types/Interface/api/account/CreateAccountSociety.ts +0 -15
- package/ts/types/Interface/api/account/QueryAccountSociety.ts +0 -18
- package/ts/types/Interface/api/account/QueryAccounts.ts +0 -32
- package/ts/types/Interface/api/account/ReadAccounts.ts +0 -2
- package/ts/types/Interface/api/transactions/QueryUnexport.ts +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../../ts/utils/vat/registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAIL,SAAS,EACT,eAAe,EAIyB,iBAAiB,EAAE,qBAAqB,GACjF,MAAM,aAAa,CAAC;AAGrB,MAAM,YAAY,GAAyB;IACzC,KAAK,EAAE,qBAAqB,CAAC,WAAW;IACxC,KAAK,EAAE,wBAAwB;IAC/B,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,UAAU,QAAQ,CAAC,YAA8B;IACrD,MAAM,YAAY,GAA2B,YAAY,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC;IACvF,MAAM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AAE,CAAC;KACxD,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse } from 'lodash';\nimport {\n Cerfa2571_2023,\n Cerfa3310_2023,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration, ReadRegistrationTick, RegistrationState, RegistrationTickState,\n} from '../../types';\nimport { Cerfa3517_2023 } from '../../types/Interface/api/cerfa/3517';\n\nconst waitingState: ReadRegistrationTick = {\n state: RegistrationTickState.IN_PROGRESS,\n title: 'En cours de traitement',\n details: [],\n date: null,\n isPayment: false,\n};\n\nexport function getTicks(registration: ReadRegistration): ReadRegistrationTick[][] {\n const declarations: Array<ReadDeclaration> = registration.response?.declarations ?? [];\n const history : InterchangeHistory[] = registration.response?.history;\n\n if (registration.state === RegistrationState.IN_PROGRESS) {\n const data: ReadRegistrationTick[][] = [];\n\n declarations.forEach((declaration) => {\n const result = [\n {\n type: isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label) ? `${declaration?.type} - ${declaration?.declarationType?.label}` : null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n details: [],\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n isPayment: false,\n },\n waitingState,\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n result.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(result);\n });\n\n return data;\n } if ([RegistrationState.ACCEPTED, RegistrationState.REFUSED].includes(registration.state)) {\n const data: ReadRegistrationTick[][] = [];\n\n if (!declarations.length) {\n const response: ReadRegistrationTick[] = [\n {\n type: null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n {\n state: RegistrationTickState.FAILED,\n title: history?.find((h) => h.isError)?.label ?? '',\n details: history?.find((h) => h.isError)?.stateDetailsHistory ?? [],\n date: history?.find((h) => h.isError)?.date ?? null,\n },\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n response.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(response);\n }\n\n declarations.forEach((declaration) => {\n const response: ReadRegistrationTick[] = [\n {\n type: isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label) ? `${declaration?.type} - ${declaration?.declarationType?.label}` : null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n ...reverse(declaration.states).map((d: InterchangeHistory) => ({\n state: d.isError ? RegistrationTickState.FAILED : RegistrationTickState.FINISHED,\n title: d.label ?? null,\n details: d?.stateDetailsHistory,\n date: d.date ?? null,\n })),\n ];\n\n for (let index = declaration.states.length; index < 3; index += 1) {\n response.push({ ...waitingState, title: null });\n }\n\n if (isDefined(declaration.payment)) {\n response.push({\n state: declaration.payment.isError ? RegistrationTickState.FAILED : declaration.payment.isError === null ? RegistrationTickState.IN_PROGRESS : RegistrationTickState.FINISHED,\n title: declaration.payment?.label ?? '',\n details: [],\n isPayment: true,\n date: declaration.payment.date ?? null,\n });\n }\n data.push(response);\n });\n\n return data;\n }\n\n return [];\n}\n\nexport function getTypeAndAmountFromRegistration(registration: IRegistration): { type: CustomerVatType | null; amount: number | null; collectable: number; deductible: number; } {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as Cerfa3310_2023;\n const other = { collectable: payload.vat?.grossDue, deductible: payload.vat?.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };\n if (payload?.credit?.refundAsked > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3514) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests) return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as Cerfa3517_2023;\n const other = { collectable: payload.other.total, deductible: payload.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if ([CerfaType.CERFA_2571_2023_A, CerfaType.CERFA_2571_2023_B, CerfaType.CERFA_2571_2023_C, CerfaType.CERFA_2571_2023_D].includes(registration.idCerfaType)) {\n const payload = registration.payload.cerfa2571 as Cerfa2571_2023;\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.companyTax.toPay.total, collectable: 0, deductible: 0 };\n }\n\n return {\n type: null, amount: null, collectable: 0, deductible: 0,\n };\n}"]}
|
|
1
|
+
{"version":3,"file":"registration.js","source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AED,OAAO;QACL,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse } from 'lodash';\nimport {\n Cerfa2571_2023,\n Cerfa3310_2023,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration, ReadRegistrationTick, RegistrationState, RegistrationTickState, TaxType,\n} from '../../types';\nimport { Cerfa3517_2023 } from '../../types/Interface/api/cerfa/3517';\n\nconst waitingState: ReadRegistrationTick = {\n state: RegistrationTickState.IN_PROGRESS,\n title: 'En cours de traitement',\n details: [],\n date: null,\n isPayment: false,\n};\n\nexport function getTicks(registration: ReadRegistration): ReadRegistrationTick[][] {\n const declarations: Array<ReadDeclaration> = registration.response?.declarations ?? [];\n const history : InterchangeHistory[] = registration.response?.history;\n\n if (registration.state === RegistrationState.IN_PROGRESS) {\n const data: ReadRegistrationTick[][] = [];\n\n declarations.forEach((declaration) => {\n const result = [\n {\n type: isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label) ? `${declaration?.type} - ${declaration?.declarationType?.label}` : null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n details: [],\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n isPayment: false,\n },\n waitingState,\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n result.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(result);\n });\n\n return data;\n } if ([RegistrationState.ACCEPTED, RegistrationState.REFUSED].includes(registration.state)) {\n const data: ReadRegistrationTick[][] = [];\n\n if (!declarations.length) {\n const response: ReadRegistrationTick[] = [\n {\n type: null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n {\n state: RegistrationTickState.FAILED,\n title: history?.find((h) => h.isError)?.label ?? '',\n details: history?.find((h) => h.isError)?.stateDetailsHistory ?? [],\n date: history?.find((h) => h.isError)?.date ?? null,\n },\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n response.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(response);\n }\n\n declarations.forEach((declaration) => {\n const response: ReadRegistrationTick[] = [\n {\n type: isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label) ? `${declaration?.type} - ${declaration?.declarationType?.label}` : null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n ...reverse(declaration.states).map((d: InterchangeHistory) => ({\n state: d.isError ? RegistrationTickState.FAILED : RegistrationTickState.FINISHED,\n title: d.label ?? null,\n details: d?.stateDetailsHistory,\n date: d.date ?? null,\n })),\n ];\n\n for (let index = declaration.states.length; index < 3; index += 1) {\n response.push({ ...waitingState, title: null });\n }\n\n if (isDefined(declaration.payment)) {\n response.push({\n state: declaration.payment.isError ? RegistrationTickState.FAILED : declaration.payment.isError === null ? RegistrationTickState.IN_PROGRESS : RegistrationTickState.FINISHED,\n title: declaration.payment?.label ?? '',\n details: [],\n isPayment: true,\n date: declaration.payment.date ?? null,\n });\n }\n data.push(response);\n });\n\n return data;\n }\n\n return [];\n}\n\nexport function getTypeAndAmountFromRegistration(registration: IRegistration): { type: CustomerVatType | null; amount: number | null; collectable: number; deductible: number; } {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as Cerfa3310_2023;\n const other = { collectable: payload.vat?.grossDue, deductible: payload.vat?.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };\n if (payload?.credit?.refundAsked > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3514) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests) return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as Cerfa3517_2023;\n const other = { collectable: payload.other.total, deductible: payload.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if ([CerfaType.CERFA_2571_2023_A, CerfaType.CERFA_2571_2023_B, CerfaType.CERFA_2571_2023_C, CerfaType.CERFA_2571_2023_D].includes(registration.idCerfaType)) {\n const payload = registration.payload.cerfa2571 as Cerfa2571_2023;\n\n if (registration.customerIsRegime?.type === TaxType.TO_PAY) {\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.companyTax.toPay.total, collectable: 0, deductible: 0 };\n } else if (registration.customerIsRegime?.type === TaxType.REFUND) {\n return { type: CustomerVatType.VAT_REFUND, amount: registration.customerIsRegime?.amount, collectable: 0, deductible: 0 };\n } else if (registration.customerIsRegime?.type === TaxType.REPORTABLE) {\n return { type: CustomerVatType.VAT_REPORT, amount: registration.customerIsRegime?.amount, collectable: 0, deductible: 0 };\n }\n\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.companyTax.toPay.total, collectable: 0, deductible: 0 };\n }\n\n return {\n type: null, amount: null, collectable: 0, deductible: 0,\n };\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.265",
|
|
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",
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
2
|
import {
|
|
3
|
-
BasePaginate, CreateAccountSociety, IAccount, QueryAccounts, QueryAccountSociety,
|
|
3
|
+
BasePaginate, CreateAccountSociety, IAccount, QueryAccounts, QueryAccountSociety, IAccountType,
|
|
4
|
+
UpdateAccountSociety,
|
|
5
|
+
CreateAccount,
|
|
6
|
+
UpdateAccount,
|
|
4
7
|
} from '../../types';
|
|
5
8
|
import { IAccountExtend } from '../../types/Interface/models/IAccountExtend';
|
|
6
9
|
|
|
@@ -37,4 +40,12 @@ export class Account extends Resource {
|
|
|
37
40
|
putAccountsSociety(idSociety: number, params: UpdateAccountSociety): Promise<IAccountExtend> {
|
|
38
41
|
return this.axios.$put(`/society/${idSociety}/accountsSociety`, params);
|
|
39
42
|
}
|
|
43
|
+
|
|
44
|
+
create(params: CreateAccount): Promise<IAccount> {
|
|
45
|
+
return this.axios.$post('/accounts', params);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
update(id: number, params: UpdateAccount): Promise<IAccount> {
|
|
49
|
+
return this.axios.$put(`/accounts/${id}`, params);
|
|
50
|
+
}
|
|
40
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CancelToken } from 'axios';
|
|
2
2
|
import {
|
|
3
|
-
CreateCalendarEventForUsers, GetAllCalendarEvent, GetLastInvalidateEvent, ICalendarEvent, ICalendarEventUser, QueryCalendarEvent, ReadAllCalendarEvent, UpdateCalendarEvent, VerifyCalendarEvent,
|
|
3
|
+
CreateCalendarEventForUsers, GetAllCalendarEvent, GetLastInvalidateEvent, ICalendarEvent, ICalendarEventUser, QueryCalendarEvent, QueryCalendarEventCall, ReadAllCalendarEvent, ReadCalendarEventCall, UpdateCalendarEvent, VerifyCalendarEvent,
|
|
4
4
|
} from '../../types';
|
|
5
5
|
import { Resource } from '../Resource';
|
|
6
6
|
|
|
@@ -37,7 +37,10 @@ export class CalendarEvent extends Resource {
|
|
|
37
37
|
},
|
|
38
38
|
params,
|
|
39
39
|
});
|
|
40
|
+
}
|
|
40
41
|
|
|
42
|
+
compareCalendarCall(params: QueryCalendarEventCall): Promise<ReadCalendarEventCall> {
|
|
43
|
+
return this.axios.$get('/calendar-events/compare-calendar-call', { params });
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
update(id: number, payload: UpdateCalendarEvent): Promise<ICalendarEvent> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isDefined } from 'class-validator';
|
|
2
|
-
import { IUserContest,
|
|
2
|
+
import { IUserContest, IContest, QueryFetchUserContest, CreateUserContest, CreateVoteContest } from '../../types';
|
|
3
3
|
import { Resource } from '../Resource';
|
|
4
4
|
|
|
5
5
|
export class Contest extends Resource {
|
|
@@ -40,7 +40,7 @@ export class Contest extends Resource {
|
|
|
40
40
|
return this.axios.$post('contest/vote/check', payload);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
createVote(payload: CreateVoteContest): Promise<
|
|
43
|
+
createVote(payload: CreateVoteContest): Promise<IContest> {
|
|
44
44
|
return this.axios.$post('contest/vote', payload);
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -11,7 +11,7 @@ export class Transaction extends Resource {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
exportInfo(idSociety: number, params: QueryTransaction): Promise<Buffer> {
|
|
15
15
|
return this.axios.$get(`/society/${idSociety}/transactions/export`, {
|
|
16
16
|
params,
|
|
17
17
|
responseType: 'arraybuffer',
|
|
@@ -28,9 +28,13 @@ export class Transaction extends Resource {
|
|
|
28
28
|
getAll(idSociety: number, query: QueryGetAllTransactions): Promise<IAccountingTransaction[]> {
|
|
29
29
|
return this.axios.$get(`/society/${idSociety}/transactions/list`, { params: query });
|
|
30
30
|
}
|
|
31
|
-
unexport(idSociety: number, params: QueryUnexport): Promise<
|
|
31
|
+
unexport(idSociety: number, params: QueryUnexport): Promise<number> {
|
|
32
32
|
return this.axios.$put(`/society/${idSociety}/transactions/unexport`, params);
|
|
33
33
|
}
|
|
34
|
+
|
|
35
|
+
export(idSociety: number, params: QueryUnexport): Promise<number> {
|
|
36
|
+
return this.axios.$put(`/society/${idSociety}/transactions/export`, params);
|
|
37
|
+
}
|
|
34
38
|
annotate(id: number, data: UpdateAccountingTransaction): Promise<ReadFormattedAccountingTransaction> {
|
|
35
39
|
return this.axios.$put(`/transactions/${id}`, data);
|
|
36
40
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export enum ContestType {
|
|
2
|
+
ENTREPRENEUR = 1,
|
|
3
|
+
OLYMPICS_1 = 2,
|
|
4
|
+
OLYMPICS_2 = 3,
|
|
5
|
+
OLYMPICS_3 = 4,
|
|
6
|
+
OLYMPICS_4 = 5,
|
|
7
|
+
OLYMPICS_5 = 6,
|
|
8
|
+
OLYMPICS_6 = 7,
|
|
9
|
+
OLYMPICS_7 = 8,
|
|
10
|
+
OLYMPICS_8 = 9,
|
|
11
|
+
OLYMPICS_9 = 10,
|
|
12
|
+
OLYMPICS_10 = 11,
|
|
13
|
+
OLYMPICS_11 = 12,
|
|
14
|
+
OLYMPICS_12 = 13,
|
|
15
|
+
}
|