@silexpert/core 1.3.74-4 → 1.3.75

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.
Files changed (90) hide show
  1. package/dist/cjs/api/resources/Refund.d.ts +1 -29
  2. package/dist/cjs/api/resources/Refund.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Refund.js +0 -12
  4. package/dist/cjs/api/resources/Refund.js.map +1 -1
  5. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  6. package/dist/cjs/api/resources/Society.js.map +1 -1
  7. package/dist/cjs/api/resources/Vat.d.ts +3 -2
  8. package/dist/cjs/api/resources/Vat.d.ts.map +1 -1
  9. package/dist/cjs/api/resources/Vat.js +5 -2
  10. package/dist/cjs/api/resources/Vat.js.map +1 -1
  11. package/dist/cjs/types/Interface/api/cerfa/3517.d.ts +1 -0
  12. package/dist/cjs/types/Interface/api/cerfa/3517.d.ts.map +1 -1
  13. package/dist/cjs/types/Interface/api/cerfa/3517.js.map +1 -1
  14. package/dist/cjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.d.ts +6 -0
  15. package/dist/cjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.d.ts.map +1 -0
  16. package/dist/cjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.js +28 -0
  17. package/dist/cjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.js.map +1 -0
  18. package/dist/cjs/types/Interface/api/vatDeclaration/ResultDataNote.d.ts +11 -0
  19. package/dist/cjs/types/Interface/api/vatDeclaration/ResultDataNote.d.ts.map +1 -0
  20. package/dist/cjs/types/Interface/api/vatDeclaration/ResultDataNote.js +3 -0
  21. package/dist/cjs/types/Interface/api/vatDeclaration/ResultDataNote.js.map +1 -0
  22. package/dist/cjs/types/Interface/models/IRefund.d.ts +1 -9
  23. package/dist/cjs/types/Interface/models/IRefund.d.ts.map +1 -1
  24. package/dist/cjs/types/Interface/models/IRefund.js.map +1 -1
  25. package/dist/cjs/types/Interface/models/IRegistration.d.ts +2 -0
  26. package/dist/cjs/types/Interface/models/IRegistration.d.ts.map +1 -1
  27. package/dist/cjs/types/Interface/models/IRegistration.js.map +1 -1
  28. package/dist/cjs/types/index.d.ts +2 -1
  29. package/dist/cjs/types/index.d.ts.map +1 -1
  30. package/dist/cjs/types/index.js +2 -1
  31. package/dist/cjs/types/index.js.map +1 -1
  32. package/dist/cjs/utils/vat/registration.d.ts +3 -0
  33. package/dist/cjs/utils/vat/registration.d.ts.map +1 -1
  34. package/dist/cjs/utils/vat/registration.js +24 -18
  35. package/dist/cjs/utils/vat/registration.js.map +1 -1
  36. package/dist/mjs/api/resources/Refund.d.ts +1 -29
  37. package/dist/mjs/api/resources/Refund.d.ts.map +1 -1
  38. package/dist/mjs/api/resources/Refund.js +0 -12
  39. package/dist/mjs/api/resources/Refund.js.map +1 -1
  40. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  41. package/dist/mjs/api/resources/Society.js.map +1 -1
  42. package/dist/mjs/api/resources/Vat.d.ts +3 -2
  43. package/dist/mjs/api/resources/Vat.d.ts.map +1 -1
  44. package/dist/mjs/api/resources/Vat.js +5 -2
  45. package/dist/mjs/api/resources/Vat.js.map +1 -1
  46. package/dist/mjs/types/Interface/api/cerfa/3517.d.ts +1 -0
  47. package/dist/mjs/types/Interface/api/cerfa/3517.d.ts.map +1 -1
  48. package/dist/mjs/types/Interface/api/cerfa/3517.js.map +1 -1
  49. package/dist/mjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.d.ts +6 -0
  50. package/dist/mjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.d.ts.map +1 -0
  51. package/dist/mjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.js +26 -0
  52. package/dist/mjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.js.map +1 -0
  53. package/dist/mjs/types/Interface/api/vatDeclaration/ResultDataNote.d.ts +11 -0
  54. package/dist/mjs/types/Interface/api/vatDeclaration/ResultDataNote.d.ts.map +1 -0
  55. package/dist/mjs/types/Interface/api/vatDeclaration/ResultDataNote.js +2 -0
  56. package/dist/mjs/types/Interface/api/vatDeclaration/ResultDataNote.js.map +1 -0
  57. package/dist/mjs/types/Interface/models/IRefund.d.ts +1 -9
  58. package/dist/mjs/types/Interface/models/IRefund.d.ts.map +1 -1
  59. package/dist/mjs/types/Interface/models/IRefund.js.map +1 -1
  60. package/dist/mjs/types/Interface/models/IRegistration.d.ts +2 -0
  61. package/dist/mjs/types/Interface/models/IRegistration.d.ts.map +1 -1
  62. package/dist/mjs/types/Interface/models/IRegistration.js.map +1 -1
  63. package/dist/mjs/types/index.d.ts +2 -1
  64. package/dist/mjs/types/index.d.ts.map +1 -1
  65. package/dist/mjs/types/index.js +2 -1
  66. package/dist/mjs/types/index.js.map +1 -1
  67. package/dist/mjs/utils/vat/registration.d.ts +3 -0
  68. package/dist/mjs/utils/vat/registration.d.ts.map +1 -1
  69. package/dist/mjs/utils/vat/registration.js +7 -1
  70. package/dist/mjs/utils/vat/registration.js.map +1 -1
  71. package/package.json +1 -1
  72. package/ts/api/resources/Refund.ts +1 -17
  73. package/ts/api/resources/Society.ts +0 -3
  74. package/ts/api/resources/Vat.ts +7 -1
  75. package/ts/types/Interface/api/cerfa/3517.ts +1 -0
  76. package/ts/types/Interface/api/vatDeclaration/CreateVatDeclaration.ts +13 -0
  77. package/ts/types/Interface/api/vatDeclaration/ResultDataNote.ts +11 -0
  78. package/ts/types/Interface/models/IRefund.ts +1 -13
  79. package/ts/types/Interface/models/IRegistration.ts +2 -0
  80. package/ts/types/index.ts +2 -1
  81. package/ts/utils/vat/registration.ts +10 -1
  82. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +0 -11
  83. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +0 -1
  84. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js +0 -49
  85. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js.map +0 -1
  86. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +0 -11
  87. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +0 -1
  88. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js +0 -51
  89. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js.map +0 -1
  90. package/ts/types/Interface/api/refund/QueryRefundPaginated.ts +0 -30
@@ -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,KAAK,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAKL,SAAS,EACT,eAAe,EAMf,iBAAiB,EACjB,qBAAqB,EACrB,OAAO,GACR,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,OAAO,GAAyB,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;IAErE,IAAI,YAAY,CAAC,KAAK,KAAK,iBAAiB,CAAC,WAAW,EAAE,CAAC;QACzD,MAAM,IAAI,GAA6B,EAAE,CAAC;QAE1C,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;YACnC,MAAM,MAAM,GAAG;gBACb;oBACE,IAAI,EACF,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,SAAS,CAAC,WAAW,EAAE,eAAe,EAAE,KAAK,CAAC;wBAC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UAAU,EAAE,CAAC;aACd,CAAC;QACJ,CAAC;aAAM,IAAI,YAAY,CAAC,gBAAgB,EAAE,IAAI,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC;YACtE,OAAO;gBACL,IAAI,EAAE,eAAe,CAAC,UAAU;gBAChC,MAAM,EAAE,YAAY,CAAC,gBAAgB,EAAE,MAAM;gBAC7C,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,CAAC;aACd,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;IACrH,CAAC;IACD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9D,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,SAA2B,CAAC;QAClE,OAAO;YACL,IAAI,EAAE,eAAe,CAAC,UAAU;YAChC,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;YAC5D,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,CAAC;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,CAAC;KACd,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse, sumBy } from 'lodash';\nimport {\n AnyCerfa3310_Century,\n Cerfa2571_2023,\n Cerfa2573_2024,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration,\n ReadRegistrationTick,\n RegistrationState,\n RegistrationTickState,\n TaxType,\n} from '../../types';\nimport { AnyCerfa3517Century } 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:\n isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label)\n ? `${declaration?.type} - ${declaration?.declarationType?.label}`\n : 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 }\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:\n isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label)\n ? `${declaration?.type} - ${declaration?.declarationType?.label}`\n : 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\n ? RegistrationTickState.FAILED\n : declaration.payment.isError === null\n ? RegistrationTickState.IN_PROGRESS\n : 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): {\n type: CustomerVatType | null;\n amount: number | null;\n collectable: number;\n deductible: number;\n amountBase?: number;\n} {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as AnyCerfa3310_Century;\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)\n return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0)\n return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (registration.idCerfaType === CerfaType.CERFA_3514) {\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0)\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests)\n return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as AnyCerfa3517Century;\n const other = {\n collectable: payload.other.total,\n deductible: payload.deductible.total,\n amountBase: payload?.total,\n };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0)\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0)\n return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0)\n return {\n type: CustomerVatType.VAT_REPORT,\n amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit,\n ...other,\n };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (\n [\n CerfaType.CERFA_2571_2023_A,\n CerfaType.CERFA_2571_2023_B,\n CerfaType.CERFA_2571_2023_C,\n CerfaType.CERFA_2571_2023_D,\n ].includes(registration.idCerfaType)\n ) {\n const payload = registration.payload.cerfa2571 as Cerfa2571_2023;\n\n if (registration.customerIsRegime?.type === TaxType.TO_PAY) {\n return {\n type: CustomerVatType.VAT_TO_PAY,\n amount: payload.companyTax.toPay.total,\n collectable: 0,\n deductible: 0,\n };\n } else if (registration.customerIsRegime?.type === TaxType.REFUND) {\n return {\n type: CustomerVatType.VAT_REFUND,\n amount: registration.customerIsRegime?.amount,\n collectable: 0,\n deductible: 0,\n };\n } else if (registration.customerIsRegime?.type === TaxType.REPORTABLE) {\n return {\n type: CustomerVatType.VAT_REPORT,\n amount: registration.customerIsRegime?.amount,\n collectable: 0,\n deductible: 0,\n };\n }\n\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.companyTax.toPay.total, collectable: 0, deductible: 0 };\n }\n if ([CerfaType.CERFA_2573].includes(registration.idCerfaType)) {\n const payload = registration.payload?.cerfa2573 as Cerfa2573_2024;\n return {\n type: CustomerVatType.VAT_REFUND,\n amount: sumBy(payload?.refunds ?? [], (r) => r?.amount ?? 0),\n collectable: 0,\n deductible: 0,\n };\n }\n\n return {\n type: null,\n amount: null,\n collectable: 0,\n deductible: 0,\n };\n}\n"]}
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,KAAK,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAKL,SAAS,EACT,eAAe,EAMf,iBAAiB,EACjB,qBAAqB,EACrB,OAAO,GACR,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,OAAO,GAAyB,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;IAErE,IAAI,YAAY,CAAC,KAAK,KAAK,iBAAiB,CAAC,WAAW,EAAE,CAAC;QACzD,MAAM,IAAI,GAA6B,EAAE,CAAC;QAE1C,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW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I,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,CAAC;KACd,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse, sumBy } from 'lodash';\nimport {\n AnyCerfa3310_Century,\n Cerfa2571_2023,\n Cerfa2573_2024,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration,\n ReadRegistrationTick,\n RegistrationState,\n RegistrationTickState,\n TaxType,\n} from '../../types';\nimport { AnyCerfa3517Century } 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:\n isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label)\n ? `${declaration?.type} - ${declaration?.declarationType?.label}`\n : 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 }\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:\n isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label)\n ? `${declaration?.type} - ${declaration?.declarationType?.label}`\n : 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\n ? RegistrationTickState.FAILED\n : declaration.payment.isError === null\n ? RegistrationTickState.IN_PROGRESS\n : 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): {\n type: CustomerVatType | null;\n amount: number | null;\n collectable: number;\n deductible: number;\n amountBase?: number;\n regulationAdd?: number;\n regulationDeduct?: number;\n reportFromPrevious?: number;\n} {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as AnyCerfa3310_Century;\n const other = {\n collectable: payload.vat?.grossDue,\n deductible: payload.vat?.deductible.total,\n regulationAdd: payload.vat?.sumToAdd,\n regulationDeduct: payload.vat?.deductible?.toImpute,\n reportFromPrevious: payload.vat?.deductible?.report,\n };\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)\n return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0)\n return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (registration.idCerfaType === CerfaType.CERFA_3514) {\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0)\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests)\n return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as AnyCerfa3517Century;\n const other = {\n collectable: payload.other.total,\n deductible: payload.deductible.total,\n amountBase: payload?.total,\n };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0)\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0)\n return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0)\n return {\n type: CustomerVatType.VAT_REPORT,\n amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit,\n ...other,\n };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (\n [\n CerfaType.CERFA_2571_2023_A,\n CerfaType.CERFA_2571_2023_B,\n CerfaType.CERFA_2571_2023_C,\n CerfaType.CERFA_2571_2023_D,\n ].includes(registration.idCerfaType)\n ) {\n const payload = registration.payload.cerfa2571 as Cerfa2571_2023;\n\n if (registration.customerIsRegime?.type === TaxType.TO_PAY) {\n return {\n type: CustomerVatType.VAT_TO_PAY,\n amount: payload.companyTax.toPay.total,\n collectable: 0,\n deductible: 0,\n };\n } else if (registration.customerIsRegime?.type === TaxType.REFUND) {\n return {\n type: CustomerVatType.VAT_REFUND,\n amount: registration.customerIsRegime?.amount,\n collectable: 0,\n deductible: 0,\n };\n } else if (registration.customerIsRegime?.type === TaxType.REPORTABLE) {\n return {\n type: CustomerVatType.VAT_REPORT,\n amount: registration.customerIsRegime?.amount,\n collectable: 0,\n deductible: 0,\n };\n }\n\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.companyTax.toPay.total, collectable: 0, deductible: 0 };\n }\n if ([CerfaType.CERFA_2573].includes(registration.idCerfaType)) {\n const payload = registration.payload?.cerfa2573 as Cerfa2573_2024;\n return {\n type: CustomerVatType.VAT_REFUND,\n amount: sumBy(payload?.refunds ?? [], (r) => r?.amount ?? 0),\n collectable: 0,\n deductible: 0,\n };\n }\n\n return {\n type: null,\n amount: null,\n collectable: 0,\n deductible: 0,\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.74-4",
3
+ "version": "1.3.75",
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,5 +1,5 @@
1
1
  import { Resource } from '../Resource';
2
- import { IRefund, QueryRefundPaginated } from '../../types';
2
+ import { IRefund } from '../../types';
3
3
 
4
4
  export class Refund extends Resource {
5
5
  public create(payload: IRefund): Promise<IRefund> {
@@ -8,20 +8,4 @@ export class Refund extends Resource {
8
8
  public update(id: number, params: Partial<IRefund>): Promise<boolean> {
9
9
  return this.axios.$patch(`/refunds/${id}`, { ...params });
10
10
  }
11
-
12
- public getPaginated(query: QueryRefundPaginated) {
13
- return this.axios.$get('/refunds', { params: query });
14
- }
15
-
16
- public getOneById(id: number) {
17
- return this.axios.$get(`/refunds/${id}`);
18
- }
19
-
20
- public validate(id: number, params: Partial<IRefund>) {
21
- return this.axios.$put(`/refunds/${id}`, { ...params });
22
- }
23
-
24
- public delete(id: number) {
25
- return this.axios.$delete(`/refunds/${id}`);
26
- }
27
11
  }
@@ -29,10 +29,8 @@ import {
29
29
  ReadSocietyUnpaidStats,
30
30
  DataCustomersCsv,
31
31
  ReadCurrentPrestations,
32
- IComment,
33
32
  } from '../../types';
34
33
  import { CancelToken } from 'axios';
35
- import { User } from './User';
36
34
 
37
35
  export class Society extends Resource {
38
36
  public get(params: QuerySociety): Promise<ISociety> {
@@ -105,7 +103,6 @@ export class Society extends Resource {
105
103
  getAccountant(): Promise<IUser | null> {
106
104
  return this.axios.$get('/society/accountant');
107
105
  }
108
-
109
106
  deleteUser(idSociety: number, idUser: number): Promise<true> {
110
107
  return this.axios.$delete(`/society/${idSociety}/user/${idUser}`);
111
108
  }
@@ -9,6 +9,7 @@ import {
9
9
  QueryPreviousVatDeclaration,
10
10
  QueryVatEntry,
11
11
  QueryVatMigrationEntry,
12
+ CreateVatNote,
12
13
  ReadFormattedAccountingTransaction,
13
14
  ReadRegistration,
14
15
  ReadVatDeclarationUpdatedEntry,
@@ -33,8 +34,9 @@ export class Vat extends Resource {
33
34
  idSociety: number,
34
35
  payload: UpdateOrCreateVatRegistration,
35
36
  details: CreateRegistrationDetail,
37
+ base64Note?: string | null,
36
38
  ): Promise<ReadRegistration> {
37
- const result = await this.axios.$post(`/societies/${idSociety}/vat`, payload);
39
+ const result = await this.axios.$post(`/societies/${idSociety}/vat`, { ...payload, base64Note });
38
40
  // @ts-ignore
39
41
  const data = result as ReadRegistration;
40
42
  await this.axios.$post(`/societies/${idSociety}/registrations/${data.id}/details`, details);
@@ -101,4 +103,8 @@ export class Vat extends Resource {
101
103
  sendByMail(idCustomerVat: number, payload: CreateAndSendVatMail): Promise<ICustomerVat> {
102
104
  return this.axios.$post(`/vat/advances/${idCustomerVat}/mails`, payload);
103
105
  }
106
+
107
+ getNote(idSociety: number, payload: CreateVatNote): Promise<string> {
108
+ return this.axios.$post(`/societies/${idSociety}/vat/notes`, payload);
109
+ }
104
110
  }
@@ -22,6 +22,7 @@ type ReduceNormalBaseAndTax = {
22
22
  };
23
23
 
24
24
  export type AnyCerfa3517Century = Cerfa3517_2023 | Cerfa3517_2025;
25
+ export type AnyPayloadCerfa3517Century = PayloadCerfa3517_2023 | PayloadCerfa3517_2025;
25
26
 
26
27
  export interface Cerfa3517_2023 {
27
28
  isNil: boolean;
@@ -0,0 +1,13 @@
1
+ import { IsNumber, IsObject } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils/decorators';
3
+ import { IRegistration } from '../../models/IRegistration';
4
+
5
+ export class CreateVatNote {
6
+ @ApiProperty()
7
+ @IsNumber()
8
+ totalTaxEcluded: number;
9
+
10
+ @ApiProperty()
11
+ @IsObject()
12
+ registration: IRegistration;
13
+ }
@@ -0,0 +1,11 @@
1
+ export type DataAmount = {
2
+ name: string;
3
+ description?: string;
4
+ amount: number;
5
+ };
6
+
7
+ export interface ResultDataNote {
8
+ keyIndicators: DataAmount[];
9
+ regulations?: DataAmount[];
10
+ total: DataAmount[];
11
+ }
@@ -4,26 +4,16 @@ import { IUser } from './IUser';
4
4
 
5
5
  // refunds
6
6
  export interface IRefund {
7
- idRefund?: number;
7
+ id?: number;
8
8
  amount: number | null;
9
9
  comment: string | null;
10
10
  refundDate: Date | null;
11
- refundAt?: Date | null;
12
11
  processed: boolean;
13
-
14
12
  isAmountChecked?: boolean;
15
-
16
13
  idRefundMotif: number;
17
14
  idSociety: number;
18
15
  idUserDemand: number;
19
- refundBy?: number | null;
20
16
  idFile?: number | null; //non obligatoire désormais, utilisé avant pour rattacher le RIB
21
- idUserAgreement?: number | null;
22
- dateAgreement?: Date | null;
23
-
24
- exceptionalAgreement?: boolean | null;
25
- agreement?: number | null;
26
-
27
17
  createdAt?: Date | null;
28
18
  updatedAt?: Date | null;
29
19
 
@@ -31,6 +21,4 @@ export interface IRefund {
31
21
  society?: ISociety;
32
22
  file?: IFile;
33
23
  userDemand?: IUser;
34
- refundByUser?: IUser;
35
- agreementUser?: IUser;
36
24
  }
@@ -21,6 +21,7 @@ export interface IRegistration {
21
21
  idDeposit: string | null;
22
22
  idExercice: number;
23
23
  idFile?: number | null;
24
+ idNoteFile?: number | null;
24
25
  idCustomerIsRegime?: number | null;
25
26
  idCustomerVat?: number | null;
26
27
  idUser?: number | null;
@@ -36,6 +37,7 @@ export interface IRegistration {
36
37
  user?: IUser | null;
37
38
  society?: ISociety;
38
39
  file?: IFile;
40
+ noteFile?: IFile | null;
39
41
  certificates?: IRegistrationCertificate[];
40
42
  customerVat?: ICustomerVat | null;
41
43
  }
package/ts/types/index.ts CHANGED
@@ -718,8 +718,10 @@ export * from './Interface/api/revision/RevisionObject';
718
718
  export * from './Interface/api/revision/Revision';
719
719
  export * from './Interface/api/revision/Create';
720
720
  export * from './Interface/api/vatDeclaration/QueryVatDeclaration';
721
+ export * from './Interface/api/vatDeclaration/CreateVatDeclaration';
721
722
  export * from './Interface/api/vatDeclaration/ReadVatVariousOperations';
722
723
  export * from './Interface/api/vatDeclaration/ResultFormatToEntries';
724
+ export * from './Interface/api/vatDeclaration/ResultDataNote';
723
725
  export * from './Interface/api/SocietyTransaction/Query';
724
726
  export * from './Interface/api/SocietyTransaction/QuerySocietyTransactionCount';
725
727
  export * from './Interface/api/SocietyTransaction/Read';
@@ -1165,4 +1167,3 @@ export * from './Interface/api/regulation/Read';
1165
1167
  export * from './Interface/api/regulation/Create';
1166
1168
  export * from './Interface/api/marketing/NewLeadSheet';
1167
1169
  export * from './Interface/api/ai/AskQuestionCollaborator';
1168
- export * from './Interface/api/refund/QueryRefundPaginated';
@@ -148,10 +148,19 @@ export function getTypeAndAmountFromRegistration(registration: IRegistration): {
148
148
  collectable: number;
149
149
  deductible: number;
150
150
  amountBase?: number;
151
+ regulationAdd?: number;
152
+ regulationDeduct?: number;
153
+ reportFromPrevious?: number;
151
154
  } {
152
155
  if (registration.idCerfaType === CerfaType.CERFA_3310) {
153
156
  const payload = registration.payload.cerfa3310 as AnyCerfa3310_Century;
154
- const other = { collectable: payload.vat?.grossDue, deductible: payload.vat?.deductible.total };
157
+ const other = {
158
+ collectable: payload.vat?.grossDue,
159
+ deductible: payload.vat?.deductible.total,
160
+ regulationAdd: payload.vat?.sumToAdd,
161
+ regulationDeduct: payload.vat?.deductible?.toImpute,
162
+ reportFromPrevious: payload.vat?.deductible?.report,
163
+ };
155
164
  if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };
156
165
  if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };
157
166
  if (payload?.credit?.refundAsked > 0)
@@ -1,11 +0,0 @@
1
- import { RequiredQueryPaginate } from '../BasePaginate';
2
- import { Order } from '../BaseRequest';
3
- export declare class QueryRefundPaginated extends RequiredQueryPaginate implements Order {
4
- search?: string;
5
- motif?: number;
6
- startDate?: Date;
7
- endDate?: Date;
8
- orderBy?: string;
9
- descending?: boolean;
10
- }
11
- //# sourceMappingURL=QueryRefundPaginated.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryRefundPaginated.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/refund/QueryRefundPaginated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,qBAAa,oBAAqB,SAAQ,qBAAsB,YAAW,KAAK;IAE9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,SAAS,CAAC,EAAE,IAAI,CAAC;IAIjB,OAAO,CAAC,EAAE,IAAI,CAAC;IAGf,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.QueryRefundPaginated = void 0;
13
- const utils_1 = require("../../../../utils");
14
- const BasePaginate_1 = require("../BasePaginate");
15
- const class_validator_1 = require("class-validator");
16
- class QueryRefundPaginated extends BasePaginate_1.RequiredQueryPaginate {
17
- }
18
- exports.QueryRefundPaginated = QueryRefundPaginated;
19
- __decorate([
20
- (0, utils_1.ApiPropertyOptional)(),
21
- __metadata("design:type", String)
22
- ], QueryRefundPaginated.prototype, "search", void 0);
23
- __decorate([
24
- (0, utils_1.ApiPropertyOptional)(),
25
- (0, class_validator_1.IsInt)(),
26
- (0, class_validator_1.IsOptional)(),
27
- __metadata("design:type", Number)
28
- ], QueryRefundPaginated.prototype, "motif", void 0);
29
- __decorate([
30
- (0, utils_1.ApiPropertyOptional)(),
31
- (0, class_validator_1.IsOptional)(),
32
- __metadata("design:type", Date)
33
- ], QueryRefundPaginated.prototype, "startDate", void 0);
34
- __decorate([
35
- (0, utils_1.ApiPropertyOptional)(),
36
- (0, class_validator_1.IsOptional)(),
37
- __metadata("design:type", Date)
38
- ], QueryRefundPaginated.prototype, "endDate", void 0);
39
- __decorate([
40
- (0, utils_1.ApiPropertyOptional)(),
41
- __metadata("design:type", String)
42
- ], QueryRefundPaginated.prototype, "orderBy", void 0);
43
- __decorate([
44
- (0, utils_1.ApiPropertyOptional)(),
45
- (0, class_validator_1.IsBoolean)(),
46
- (0, class_validator_1.IsOptional)(),
47
- __metadata("design:type", Boolean)
48
- ], QueryRefundPaginated.prototype, "descending", void 0);
49
- //# sourceMappingURL=QueryRefundPaginated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryRefundPaginated.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/refund/QueryRefundPaginated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,kDAAwD;AAExD,qDAA+D;AAE/D,MAAa,oBAAqB,SAAQ,oCAAqB;CAwB9D;AAxBD,oDAwBC;AAtBC;IADC,IAAA,2BAAmB,GAAE;;oDACN;AAKhB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,uBAAK,GAAE;IACP,IAAA,4BAAU,GAAE;;mDACE;AAIf;IAFC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;8BACD,IAAI;uDAAC;AAIjB;IAFC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;8BACH,IAAI;qDAAC;AAGf;IADC,IAAA,2BAAmB,GAAE;;qDACL;AAKjB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;wDACQ","sourcesContent":["import { ApiPropertyOptional } from '../../../../utils';\nimport { RequiredQueryPaginate } from '../BasePaginate';\nimport { Order } from '../BaseRequest';\nimport { IsBoolean, IsInt, IsOptional } from 'class-validator';\n\nexport class QueryRefundPaginated extends RequiredQueryPaginate implements Order {\n @ApiPropertyOptional()\n search?: string;\n\n @ApiPropertyOptional()\n @IsInt()\n @IsOptional()\n motif?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n startDate?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n endDate?: Date;\n\n @ApiPropertyOptional()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @IsOptional()\n descending?: boolean;\n}\n"]}
@@ -1,11 +0,0 @@
1
- import { RequiredQueryPaginate } from '../BasePaginate';
2
- import { Order } from '../BaseRequest';
3
- export declare class QueryRefundPaginated extends RequiredQueryPaginate implements Order {
4
- search?: string;
5
- motif?: number;
6
- startDate?: Date;
7
- endDate?: Date;
8
- orderBy?: string;
9
- descending?: boolean;
10
- }
11
- //# sourceMappingURL=QueryRefundPaginated.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryRefundPaginated.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/refund/QueryRefundPaginated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,qBAAa,oBAAqB,SAAQ,qBAAsB,YAAW,KAAK;IAE9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,SAAS,CAAC,EAAE,IAAI,CAAC;IAIjB,OAAO,CAAC,EAAE,IAAI,CAAC;IAGf,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -1,51 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { ApiPropertyOptional } from '../../../../utils';
11
- import { RequiredQueryPaginate } from '../BasePaginate';
12
- import { IsBoolean, IsInt, IsOptional } from 'class-validator';
13
- export class QueryRefundPaginated extends RequiredQueryPaginate {
14
- search;
15
- motif;
16
- startDate;
17
- endDate;
18
- orderBy;
19
- descending;
20
- }
21
- __decorate([
22
- ApiPropertyOptional(),
23
- __metadata("design:type", String)
24
- ], QueryRefundPaginated.prototype, "search", void 0);
25
- __decorate([
26
- ApiPropertyOptional(),
27
- IsInt(),
28
- IsOptional(),
29
- __metadata("design:type", Number)
30
- ], QueryRefundPaginated.prototype, "motif", void 0);
31
- __decorate([
32
- ApiPropertyOptional(),
33
- IsOptional(),
34
- __metadata("design:type", Date)
35
- ], QueryRefundPaginated.prototype, "startDate", void 0);
36
- __decorate([
37
- ApiPropertyOptional(),
38
- IsOptional(),
39
- __metadata("design:type", Date)
40
- ], QueryRefundPaginated.prototype, "endDate", void 0);
41
- __decorate([
42
- ApiPropertyOptional(),
43
- __metadata("design:type", String)
44
- ], QueryRefundPaginated.prototype, "orderBy", void 0);
45
- __decorate([
46
- ApiPropertyOptional(),
47
- IsBoolean(),
48
- IsOptional(),
49
- __metadata("design:type", Boolean)
50
- ], QueryRefundPaginated.prototype, "descending", void 0);
51
- //# sourceMappingURL=QueryRefundPaginated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryRefundPaginated.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/refund/QueryRefundPaginated.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,OAAO,oBAAqB,SAAQ,qBAAqB;IAE7D,MAAM,CAAU;IAKhB,KAAK,CAAU;IAIf,SAAS,CAAQ;IAIjB,OAAO,CAAQ;IAGf,OAAO,CAAU;IAKjB,UAAU,CAAW;CACtB;AAtBC;IADC,mBAAmB,EAAE;;oDACN;AAKhB;IAHC,mBAAmB,EAAE;IACrB,KAAK,EAAE;IACP,UAAU,EAAE;;mDACE;AAIf;IAFC,mBAAmB,EAAE;IACrB,UAAU,EAAE;8BACD,IAAI;uDAAC;AAIjB;IAFC,mBAAmB,EAAE;IACrB,UAAU,EAAE;8BACH,IAAI;qDAAC;AAGf;IADC,mBAAmB,EAAE;;qDACL;AAKjB;IAHC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,UAAU,EAAE;;wDACQ","sourcesContent":["import { ApiPropertyOptional } from '../../../../utils';\nimport { RequiredQueryPaginate } from '../BasePaginate';\nimport { Order } from '../BaseRequest';\nimport { IsBoolean, IsInt, IsOptional } from 'class-validator';\n\nexport class QueryRefundPaginated extends RequiredQueryPaginate implements Order {\n @ApiPropertyOptional()\n search?: string;\n\n @ApiPropertyOptional()\n @IsInt()\n @IsOptional()\n motif?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n startDate?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n endDate?: Date;\n\n @ApiPropertyOptional()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @IsOptional()\n descending?: boolean;\n}\n"]}
@@ -1,30 +0,0 @@
1
- import { ApiPropertyOptional } from '../../../../utils';
2
- import { RequiredQueryPaginate } from '../BasePaginate';
3
- import { Order } from '../BaseRequest';
4
- import { IsBoolean, IsInt, IsOptional } from 'class-validator';
5
-
6
- export class QueryRefundPaginated extends RequiredQueryPaginate implements Order {
7
- @ApiPropertyOptional()
8
- search?: string;
9
-
10
- @ApiPropertyOptional()
11
- @IsInt()
12
- @IsOptional()
13
- motif?: number;
14
-
15
- @ApiPropertyOptional()
16
- @IsOptional()
17
- startDate?: Date;
18
-
19
- @ApiPropertyOptional()
20
- @IsOptional()
21
- endDate?: Date;
22
-
23
- @ApiPropertyOptional()
24
- orderBy?: string;
25
-
26
- @ApiPropertyOptional()
27
- @IsBoolean()
28
- @IsOptional()
29
- descending?: boolean;
30
- }