@silexpert/core 1.3.199-8 → 1.3.199

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 (208) hide show
  1. package/dist/cjs/api/resources/User.d.ts +1 -8
  2. package/dist/cjs/api/resources/User.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/User.js +0 -58
  4. package/dist/cjs/api/resources/User.js.map +1 -1
  5. package/dist/cjs/api/resources/Webex.d.ts +8 -0
  6. package/dist/cjs/api/resources/Webex.d.ts.map +1 -0
  7. package/dist/cjs/api/resources/Webex.js +17 -0
  8. package/dist/cjs/api/resources/Webex.js.map +1 -0
  9. package/dist/cjs/api/resources/WorkingSchedule.d.ts +1 -2
  10. package/dist/cjs/api/resources/WorkingSchedule.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/WorkingSchedule.js +0 -3
  12. package/dist/cjs/api/resources/WorkingSchedule.js.map +1 -1
  13. package/dist/cjs/types/Enum/Card.d.ts +2 -2
  14. package/dist/cjs/types/Enum/Card.d.ts.map +1 -1
  15. package/dist/cjs/types/Enum/Card.js +2 -2
  16. package/dist/cjs/types/Enum/Card.js.map +1 -1
  17. package/dist/cjs/types/Enum/EbookIntention.d.ts +8 -0
  18. package/dist/cjs/types/Enum/EbookIntention.d.ts.map +1 -0
  19. package/dist/cjs/types/Enum/EbookIntention.js +18 -0
  20. package/dist/cjs/types/Enum/EbookIntention.js.map +1 -0
  21. package/dist/cjs/types/Enum/EquipmentType.d.ts +0 -15
  22. package/dist/cjs/types/Enum/EquipmentType.d.ts.map +1 -1
  23. package/dist/cjs/types/Enum/EquipmentType.js +0 -15
  24. package/dist/cjs/types/Enum/EquipmentType.js.map +1 -1
  25. package/dist/cjs/types/Enum/Ged.js +1 -1
  26. package/dist/cjs/types/Enum/Ged.js.map +1 -1
  27. package/dist/cjs/types/Enum/PrestationState.d.ts +2 -1
  28. package/dist/cjs/types/Enum/PrestationState.d.ts.map +1 -1
  29. package/dist/cjs/types/Enum/PrestationState.js +7 -0
  30. package/dist/cjs/types/Enum/PrestationState.js.map +1 -1
  31. package/dist/cjs/types/Enum/PrestationType.d.ts +1 -0
  32. package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
  33. package/dist/cjs/types/Enum/PrestationType.js +24 -3
  34. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  35. package/dist/cjs/types/Enum/SalesContractBrandClementine.d.ts.map +1 -1
  36. package/dist/cjs/types/Enum/SalesContractBrandClementine.js +19 -4
  37. package/dist/cjs/types/Enum/SalesContractBrandClementine.js.map +1 -1
  38. package/dist/cjs/types/Interface/api/SocietyApproval.d.ts +8 -1
  39. package/dist/cjs/types/Interface/api/SocietyApproval.d.ts.map +1 -1
  40. package/dist/cjs/types/Interface/api/SocietyApproval.js +43 -0
  41. package/dist/cjs/types/Interface/api/SocietyApproval.js.map +1 -1
  42. package/dist/cjs/types/Interface/api/brevo/BrevoElement.d.ts +1 -0
  43. package/dist/cjs/types/Interface/api/brevo/BrevoElement.d.ts.map +1 -1
  44. package/dist/cjs/types/Interface/api/brevo/BrevoElement.js +6 -0
  45. package/dist/cjs/types/Interface/api/brevo/BrevoElement.js.map +1 -1
  46. package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts +1 -0
  47. package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
  48. package/dist/cjs/types/Interface/api/card/QueryUserCards.js +6 -0
  49. package/dist/cjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
  50. package/dist/cjs/types/Interface/api/prestation/Query.d.ts +2 -0
  51. package/dist/cjs/types/Interface/api/prestation/Query.d.ts.map +1 -1
  52. package/dist/cjs/types/Interface/api/prestation/Query.js +13 -0
  53. package/dist/cjs/types/Interface/api/prestation/Query.js.map +1 -1
  54. package/dist/cjs/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
  55. package/dist/cjs/types/Interface/api/user/CreateCoworker.js +0 -11
  56. package/dist/cjs/types/Interface/api/user/CreateCoworker.js.map +1 -1
  57. package/dist/cjs/types/Interface/api/webex/GetWebinarsParams.d.ts +7 -0
  58. package/dist/cjs/types/Interface/api/webex/GetWebinarsParams.d.ts.map +1 -0
  59. package/dist/cjs/types/Interface/api/webex/GetWebinarsParams.js +38 -0
  60. package/dist/cjs/types/Interface/api/webex/GetWebinarsParams.js.map +1 -0
  61. package/dist/cjs/types/Interface/api/webex/PaginatedWebinars.d.ts +7 -0
  62. package/dist/cjs/types/Interface/api/webex/PaginatedWebinars.d.ts.map +1 -0
  63. package/dist/cjs/types/Interface/api/webex/PaginatedWebinars.js +3 -0
  64. package/dist/cjs/types/Interface/api/webex/PaginatedWebinars.js.map +1 -0
  65. package/dist/cjs/types/Interface/api/webex/WebexMeeting.d.ts +22 -0
  66. package/dist/cjs/types/Interface/api/webex/WebexMeeting.d.ts.map +1 -0
  67. package/dist/cjs/types/Interface/api/webex/WebexMeeting.js +3 -0
  68. package/dist/cjs/types/Interface/api/webex/WebexMeeting.js.map +1 -0
  69. package/dist/cjs/types/Interface/api/webex/WebexRegistrant.d.ts +18 -0
  70. package/dist/cjs/types/Interface/api/webex/WebexRegistrant.d.ts.map +1 -0
  71. package/dist/cjs/types/Interface/api/webex/WebexRegistrant.js +40 -0
  72. package/dist/cjs/types/Interface/api/webex/WebexRegistrant.js.map +1 -0
  73. package/dist/cjs/types/Interface/models/IUser.d.ts +0 -1
  74. package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
  75. package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
  76. package/dist/cjs/types/index.d.ts +5 -0
  77. package/dist/cjs/types/index.d.ts.map +1 -1
  78. package/dist/cjs/types/index.js +5 -0
  79. package/dist/cjs/types/index.js.map +1 -1
  80. package/dist/cjs/utils/documents.js +1 -1
  81. package/dist/cjs/utils/documents.js.map +1 -1
  82. package/dist/cjs/utils/prestation.d.ts.map +1 -1
  83. package/dist/cjs/utils/prestation.js +2 -1
  84. package/dist/cjs/utils/prestation.js.map +1 -1
  85. package/dist/cjs/utils/societyApproval.d.ts.map +1 -1
  86. package/dist/cjs/utils/societyApproval.js +12 -3
  87. package/dist/cjs/utils/societyApproval.js.map +1 -1
  88. package/dist/mjs/api/resources/User.d.ts +1 -8
  89. package/dist/mjs/api/resources/User.d.ts.map +1 -1
  90. package/dist/mjs/api/resources/User.js +0 -58
  91. package/dist/mjs/api/resources/User.js.map +1 -1
  92. package/dist/mjs/api/resources/Webex.d.ts +8 -0
  93. package/dist/mjs/api/resources/Webex.d.ts.map +1 -0
  94. package/dist/mjs/api/resources/Webex.js +13 -0
  95. package/dist/mjs/api/resources/Webex.js.map +1 -0
  96. package/dist/mjs/api/resources/WorkingSchedule.d.ts +1 -2
  97. package/dist/mjs/api/resources/WorkingSchedule.d.ts.map +1 -1
  98. package/dist/mjs/api/resources/WorkingSchedule.js +0 -3
  99. package/dist/mjs/api/resources/WorkingSchedule.js.map +1 -1
  100. package/dist/mjs/types/Enum/Card.d.ts +2 -2
  101. package/dist/mjs/types/Enum/Card.d.ts.map +1 -1
  102. package/dist/mjs/types/Enum/Card.js +2 -2
  103. package/dist/mjs/types/Enum/Card.js.map +1 -1
  104. package/dist/mjs/types/Enum/EbookIntention.d.ts +8 -0
  105. package/dist/mjs/types/Enum/EbookIntention.d.ts.map +1 -0
  106. package/dist/mjs/types/Enum/EbookIntention.js +15 -0
  107. package/dist/mjs/types/Enum/EbookIntention.js.map +1 -0
  108. package/dist/mjs/types/Enum/EquipmentType.d.ts +0 -15
  109. package/dist/mjs/types/Enum/EquipmentType.d.ts.map +1 -1
  110. package/dist/mjs/types/Enum/EquipmentType.js +0 -15
  111. package/dist/mjs/types/Enum/EquipmentType.js.map +1 -1
  112. package/dist/mjs/types/Enum/Ged.js +1 -1
  113. package/dist/mjs/types/Enum/Ged.js.map +1 -1
  114. package/dist/mjs/types/Enum/PrestationState.d.ts +2 -1
  115. package/dist/mjs/types/Enum/PrestationState.d.ts.map +1 -1
  116. package/dist/mjs/types/Enum/PrestationState.js +7 -0
  117. package/dist/mjs/types/Enum/PrestationState.js.map +1 -1
  118. package/dist/mjs/types/Enum/PrestationType.d.ts +1 -0
  119. package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
  120. package/dist/mjs/types/Enum/PrestationType.js +23 -2
  121. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  122. package/dist/mjs/types/Enum/SalesContractBrandClementine.d.ts.map +1 -1
  123. package/dist/mjs/types/Enum/SalesContractBrandClementine.js +20 -5
  124. package/dist/mjs/types/Enum/SalesContractBrandClementine.js.map +1 -1
  125. package/dist/mjs/types/Interface/api/SocietyApproval.d.ts +8 -1
  126. package/dist/mjs/types/Interface/api/SocietyApproval.d.ts.map +1 -1
  127. package/dist/mjs/types/Interface/api/SocietyApproval.js +52 -2
  128. package/dist/mjs/types/Interface/api/SocietyApproval.js.map +1 -1
  129. package/dist/mjs/types/Interface/api/brevo/BrevoElement.d.ts +1 -0
  130. package/dist/mjs/types/Interface/api/brevo/BrevoElement.d.ts.map +1 -1
  131. package/dist/mjs/types/Interface/api/brevo/BrevoElement.js +7 -0
  132. package/dist/mjs/types/Interface/api/brevo/BrevoElement.js.map +1 -1
  133. package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts +1 -0
  134. package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
  135. package/dist/mjs/types/Interface/api/card/QueryUserCards.js +6 -0
  136. package/dist/mjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
  137. package/dist/mjs/types/Interface/api/prestation/Query.d.ts +2 -0
  138. package/dist/mjs/types/Interface/api/prestation/Query.d.ts.map +1 -1
  139. package/dist/mjs/types/Interface/api/prestation/Query.js +15 -0
  140. package/dist/mjs/types/Interface/api/prestation/Query.js.map +1 -1
  141. package/dist/mjs/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
  142. package/dist/mjs/types/Interface/api/user/CreateCoworker.js +0 -11
  143. package/dist/mjs/types/Interface/api/user/CreateCoworker.js.map +1 -1
  144. package/dist/mjs/types/Interface/api/webex/GetWebinarsParams.d.ts +7 -0
  145. package/dist/mjs/types/Interface/api/webex/GetWebinarsParams.d.ts.map +1 -0
  146. package/dist/mjs/types/Interface/api/webex/GetWebinarsParams.js +38 -0
  147. package/dist/mjs/types/Interface/api/webex/GetWebinarsParams.js.map +1 -0
  148. package/dist/mjs/types/Interface/api/webex/PaginatedWebinars.d.ts +7 -0
  149. package/dist/mjs/types/Interface/api/webex/PaginatedWebinars.d.ts.map +1 -0
  150. package/dist/mjs/types/Interface/api/webex/PaginatedWebinars.js +2 -0
  151. package/dist/mjs/types/Interface/api/webex/PaginatedWebinars.js.map +1 -0
  152. package/dist/mjs/types/Interface/api/webex/WebexMeeting.d.ts +22 -0
  153. package/dist/mjs/types/Interface/api/webex/WebexMeeting.d.ts.map +1 -0
  154. package/dist/mjs/types/Interface/api/webex/WebexMeeting.js +2 -0
  155. package/dist/mjs/types/Interface/api/webex/WebexMeeting.js.map +1 -0
  156. package/dist/mjs/types/Interface/api/webex/WebexRegistrant.d.ts +18 -0
  157. package/dist/mjs/types/Interface/api/webex/WebexRegistrant.d.ts.map +1 -0
  158. package/dist/mjs/types/Interface/api/webex/WebexRegistrant.js +40 -0
  159. package/dist/mjs/types/Interface/api/webex/WebexRegistrant.js.map +1 -0
  160. package/dist/mjs/types/Interface/models/IUser.d.ts +0 -1
  161. package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
  162. package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
  163. package/dist/mjs/types/index.d.ts +5 -0
  164. package/dist/mjs/types/index.d.ts.map +1 -1
  165. package/dist/mjs/types/index.js +5 -0
  166. package/dist/mjs/types/index.js.map +1 -1
  167. package/dist/mjs/utils/documents.js +1 -1
  168. package/dist/mjs/utils/documents.js.map +1 -1
  169. package/dist/mjs/utils/prestation.d.ts.map +1 -1
  170. package/dist/mjs/utils/prestation.js +2 -1
  171. package/dist/mjs/utils/prestation.js.map +1 -1
  172. package/dist/mjs/utils/societyApproval.d.ts.map +1 -1
  173. package/dist/mjs/utils/societyApproval.js +11 -0
  174. package/dist/mjs/utils/societyApproval.js.map +1 -1
  175. package/package.json +1 -1
  176. package/ts/api/resources/User.ts +0 -65
  177. package/ts/api/resources/Webex.ts +16 -0
  178. package/ts/api/resources/WorkingSchedule.ts +0 -5
  179. package/ts/types/Enum/Card.ts +2 -2
  180. package/ts/types/Enum/EbookIntention.ts +14 -0
  181. package/ts/types/Enum/EquipmentType.ts +0 -15
  182. package/ts/types/Enum/Ged.ts +1 -1
  183. package/ts/types/Enum/PrestationState.ts +7 -0
  184. package/ts/types/Enum/PrestationType.ts +24 -2
  185. package/ts/types/Enum/SalesContractBrandClementine.ts +20 -4
  186. package/ts/types/Interface/api/SocietyApproval.ts +38 -2
  187. package/ts/types/Interface/api/brevo/BrevoElement.ts +5 -0
  188. package/ts/types/Interface/api/card/QueryUserCards.ts +5 -0
  189. package/ts/types/Interface/api/prestation/Query.ts +11 -0
  190. package/ts/types/Interface/api/user/CreateCoworker.ts +0 -11
  191. package/ts/types/Interface/api/webex/GetWebinarsParams.ts +20 -0
  192. package/ts/types/Interface/api/webex/PaginatedWebinars.ts +7 -0
  193. package/ts/types/Interface/api/webex/WebexMeeting.ts +21 -0
  194. package/ts/types/Interface/api/webex/WebexRegistrant.ts +34 -0
  195. package/ts/types/Interface/models/IUser.ts +0 -1
  196. package/ts/types/index.ts +5 -0
  197. package/ts/utils/documents.ts +1 -1
  198. package/ts/utils/prestation.ts +2 -1
  199. package/ts/utils/societyApproval.ts +11 -0
  200. package/dist/cjs/utils/transforms/number.transform.d.ts +0 -3
  201. package/dist/cjs/utils/transforms/number.transform.d.ts.map +0 -1
  202. package/dist/cjs/utils/transforms/number.transform.js +0 -36
  203. package/dist/cjs/utils/transforms/number.transform.js.map +0 -1
  204. package/dist/mjs/utils/transforms/number.transform.d.ts +0 -3
  205. package/dist/mjs/utils/transforms/number.transform.d.ts.map +0 -1
  206. package/dist/mjs/utils/transforms/number.transform.js +0 -33
  207. package/dist/mjs/utils/transforms/number.transform.js.map +0 -1
  208. package/ts/utils/transforms/number.transform.ts +0 -38
@@ -82,7 +82,7 @@ const calculateScoringOfPrestation = (idPrestationType, prestations, currentIdPr
82
82
  if (isSoftwarePrestation([idPrestationType]) &&
83
83
  ((_a = currentPrestation === null || currentPrestation === void 0 ? void 0 : currentPrestation.exercices) === null || _a === void 0 ? void 0 : _a.length) &&
84
84
  //@ts-expect-error
85
- (((_b = currentPrestation === null || currentPrestation === void 0 ? void 0 : currentPrestation.exercices[0].ExercicePrestation) === null || _b === void 0 ? void 0 : _b.totalPrestation) < 80 ||
85
+ (((_b = currentPrestation === null || currentPrestation === void 0 ? void 0 : currentPrestation.exercices[0].ExercicePrestation) === null || _b === void 0 ? void 0 : _b.totalPrestation) < 72 ||
86
86
  //@ts-expect-error
87
87
  ((_c = currentPrestation === null || currentPrestation === void 0 ? void 0 : currentPrestation.exercices[0].ExercicePrestation) === null || _c === void 0 ? void 0 : _c.monthNumber) !== 1)) {
88
88
  return 0;
@@ -223,6 +223,7 @@ const calculatePrestationPriceWithPriceGrid = (idPrestationList, endDate, NbrMon
223
223
  if (totalMonth > 0) {
224
224
  if (isYearly) {
225
225
  yearlyPrice = (10 - totalMonth) * (yearlyPrice ? yearlyPrice / 10 : 0);
226
+ monthNbr = monthNbr - totalMonth;
226
227
  }
227
228
  else {
228
229
  monthNbr = monthNbr - totalMonth;
@@ -1 +1 @@
1
- {"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../../ts/utils/prestation.ts"],"names":[],"mappings":";;;AACA,2CAAwC;AACxC,+EAA4E;AAC5E,uCAAqD;AACrD,yCAA0C;AAC1C,iEAIsC;AACtC,uDAA4D;AAC5D,qEAAwF;AACxF,2EAAwE;AACxE,6EAA0E;AAC1E,2EAAwE;AACxE,mFAAgF;AAChF,2DAAwD;AACxD,qCAAiD;AACjD,+BAA+B;AAC/B,yCAA4C;AA4E5C,MAAM,yBAAyB,GAAG,CAAC,gBAAwB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CAAC,mBAAmB,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAE9G,OAAO,IAAI,CAAC;aACT,IACH,CAAC,+BAAc,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YAC9D,gBAAgB;YAChB,8CAA8C;YAC9C,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAExG,OAAO,IAAI,CAAC;;YACT,OAAO,KAAK,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAuBA,kDAAmB;AArBrB,MAAM,2BAA2B,GAAG,CAAC,gBAAwB,EAA4B,EAAE;IACzF,IAAI,qEAAoD,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAAE,OAAO,UAAU,CAAC;IACvG,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAqBA,kEAA2B","sourcesContent":["import { IExercice, IPrestation, IPrestationList } from '../types';\nimport { Vat } from '../types/Enum/Vat';\nimport { ReasonTerminationType } from '../types/Enum/ReasonTerminationType';\nimport { getTaxesIncludedAmount } from './vat/utils';\nimport { intersection } from './noLodash';\nimport {\n ClementineSubscriptionAccountancySoftwarePrestations,\n PrestationDetail,\n PrestationType,\n} from '../types/Enum/PrestationType';\nimport { LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport { PrestationOptionType, PrestationOption } from '../types/Enum/PrestationOption';\nimport { PriceGridClementine } from '../types/Enum/PriceGridClementine';\nimport { PriceGridPourcentage } from '../types/Enum/PriceGridPourcentage';\nimport { PriceGridLegalstart } from '../types/Enum/PriceGridLegalstart';\nimport { PriceGridStatutsExpress } from '../types/Enum/PriceGridStatutsExpress';\nimport { ClosingType } from '../types/Enum/ClosingType';\nimport { getBrandNameByNodeEnv } from './brands';\nimport * as dayjs from 'dayjs';\nimport { exerciceNumber } from './exercice';\n\ntype priceGridBrand = {\n idTypeBrand: number;\n price: priceGrid[];\n};\n\ntype priceGrid = {\n idPrestationList: number[];\n priceWithTaxesIncluded: boolean;\n applicationCost: number;\n monthlyNbr?: monthlyNbr[];\n exerciceNbr?: exerciceNbr[];\n turnoverCreatedYear?: turnover[];\n turnoverPastYear?: turnover[];\n turnoverMonthly?: turnover[];\n turnoverYearly?: turnover[];\n employee?: employee[];\n partner?: employee[];\n properties?: propertie[];\n vatRegimeMonthly?: vatRegime[];\n vatRegimeYearly?: vatRegime[];\n taxSystem?: taxSystem[];\n legalForm?: legalForm[];\n employeeByLegalForm?: employeeByLegalForm[];\n};\n\ntype monthlyNbr = {\n minimum: number;\n maximum: number;\n value: number;\n closingType: number[];\n};\n\ntype exerciceNbr = {\n minimum: number;\n maximum: number;\n price: number;\n};\n\ntype turnover = {\n turnoverValue: number;\n price: number;\n};\n\ntype legalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype employee = {\n amountMinimum: number;\n amountMaximum: number;\n price: number;\n};\n\ntype employeeByLegalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype propertie = {\n amount: number;\n price: number;\n};\n\ntype vatRegime = {\n type: number;\n price: number;\n};\n\ntype taxSystem = {\n id: number;\n price: number;\n};\n\nconst isOtherAccountingMissions = (idPrestationList: number): boolean =>\n [\n PrestationType.PREVISIONNEL,\n PrestationType.BILAN_INTERMEDIAIRE,\n PrestationType.AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE,\n PrestationType.AUTRE_MISSION_COMPTABLE,\n PrestationType.TVS,\n PrestationType.ETUDE_FISCALE,\n PrestationType.BILAN_PREVISIONNEL,\n ].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique: boolean, isCatalog: boolean, idPrestationList: number): boolean =>\n idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean =>\n idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden: boolean, isCatalog: boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL),\n ).length;\n\nconst isOnlySocial = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [\n PrestationType.CREATION_SOCIETE,\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ]).length;\n\nconst isFromStatutsExpress = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ].includes(idPL),\n ).length;\n\nconst isExpress = (idPrestationList: number): boolean => {\n const prestationDetailValues = Object.values(PrestationDetail) as any;\n const prestaList = prestationDetailValues.find((pr: any) => pr.id === idPrestationList);\n return !!prestaList.isBack;\n};\n\nconst isConsultingHour = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.CONSULTING_HOUR]).length;\n\nconst isSoftwarePrestation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.STEERING, PrestationType.VAT, PrestationType.BALANCESHEET])\n .length; /* &&\n idPrestationList.length === 1 */ // Commenté car si un client résilie un software pour un utre software, condition non prise en charge\n\nconst calculateScoringOfPrestation = (\n idPrestationType: PrestationType,\n prestations: IPrestation[],\n currentIdPrestation: number,\n): number => {\n const prestationsSignedPaid = prestations.filter(\n (prestation) =>\n prestation.paid &&\n prestation.signed &&\n (prestation.terminationList === null ||\n prestation.terminationList?.idReasonTermination?.includes(ReasonTerminationType.CHANGES_NEW_OFFERS)) &&\n prestation.id !== currentIdPrestation,\n );\n\n const currentPrestation = prestations.find(\n (el) => el.idPrestationList === idPrestationType && el.terminationList === null,\n );\n\n // SPECIAL CASE:\n // If current prestation is a software prestation\n // and the current prestation is an annual payment, return 0 point\n if (\n isSoftwarePrestation([idPrestationType]) &&\n currentPrestation?.exercices?.length &&\n //@ts-expect-error\n (currentPrestation?.exercices[0].ExercicePrestation?.totalPrestation < 80 ||\n //@ts-expect-error\n currentPrestation?.exercices[0].ExercicePrestation?.monthNumber !== 1)\n ) {\n return 0;\n }\n\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter(\n (p) =>\n p.isComptable &&\n !p.isCatalog &&\n p.id &&\n ![PrestationType.BALANCESHEET, PrestationType.VAT, PrestationType.STEERING].includes(p.id),\n );\n const prestationHalfPriceIds = prestationHalfPriceList.map((t) => t.id);\n\n // Get the number of points for the new prestation\n const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);\n let numberPoint = prestaDetails?.point || 0;\n\n // For each back exercices, add 100 points\n // -> for new prestations only\n if (\n [\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.GESTION_IMMO,\n PrestationType.EI,\n PrestationType.MICRO,\n ].includes(idPrestationType) &&\n currentPrestation?.exercices?.length &&\n currentPrestation?.exercices.find((el) => el.isBack)\n ) {\n numberPoint += (currentPrestation?.exercices.filter((el) => el.isBack).length ?? 1) * 100;\n }\n\n // Get list of prestations that are already done\n // and check if one of them is in the list of prestations that are half price\n const prestationsExistIds = prestationsSignedPaid.map((prestation) => prestation.idPrestationList);\n const prestationHalfPriceAlreadyDoneIds = prestationsExistIds.filter((id) => prestationHalfPriceIds.includes(id));\n\n // If one of the prestations already done is in the list of prestations that are half price and if the idPrestationType is in prestationHalfPriceIds, return 50% of points\n if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType))\n return Math.floor(numberPoint * 0.3);\n\n return numberPoint;\n};\n\nexport const calculateMonthlyAmount = (params: {\n monthlyPrice: number;\n monthNumber: number;\n monthOffer: number;\n idVatForInternalInvoicing?: number | null;\n returnTaxesIncludedValue?: boolean;\n}): number => {\n const { monthlyPrice, monthNumber, monthOffer, idVatForInternalInvoicing, returnTaxesIncludedValue = true } = params;\n\n if (!idVatForInternalInvoicing && returnTaxesIncludedValue)\n throw new Error('Taux de TVA manquant pour calculer le montant TTC');\n\n if (!idVatForInternalInvoicing || !returnTaxesIncludedValue) return monthlyPrice * (monthNumber - monthOffer);\n\n return (\n monthlyPrice *\n (monthNumber - monthOffer) *\n (1 + Object.values(Vat).find((el) => el.id === idVatForInternalInvoicing).value / 100)\n );\n};\n\nexport const getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid | undefined => {\n let currentBrandPriceGrid: priceGridBrand | undefined;\n let currentPriceGrid: priceGrid | undefined;\n\n const currentEnvName = getBrandNameByNodeEnv(process.env.NODE_ENV);\n const listEnvEnum = {\n PriceGridClementine,\n PriceGridPourcentage,\n PriceGridLegalstart,\n PriceGridStatutsExpress,\n };\n // @ts-ignore\n const currentPriceGridFile: priceGridBrand[] = listEnvEnum[`PriceGrid${currentEnvName}`];\n if (currentPriceGridFile)\n currentBrandPriceGrid = currentPriceGridFile.find(\n (priceGrid: priceGridBrand) => priceGrid.idTypeBrand === idTypeBrand,\n );\n if (currentBrandPriceGrid)\n currentPriceGrid = currentBrandPriceGrid?.price.find((price: priceGrid) =>\n price.idPrestationList.includes(idPrestationList),\n );\n return currentPriceGrid;\n};\n\nconst calculatePrestationPriceWithPriceGrid = (\n idPrestationList: number,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n isYearly: boolean /* Prestation annuel ou mensuel */,\n totalMonth: number /* Nbr de moiis offer */,\n idTaxSystem: number,\n idLegalForm: number,\n exerciceNbr: number,\n balanceSheetOffered: number = 0 /* montant du bilan offer */,\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n} => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let monthNbr: number = NbrMonth;\n let yearlyPrice: number | undefined;\n let finalMonthlyPrice: number | undefined;\n const canBeCreated: boolean = true;\n let recalculateMonthly: boolean = false;\n\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n\n if (currentPriceGrid) {\n let monthlyPrice: number | undefined;\n let vatRegimePrice: number | undefined;\n let taxSystemPrice: number | undefined;\n\n /* Gestion du régime de TVA */\n if (currentPriceGrid.vatRegimeMonthly && !isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeMonthly?.find((regime) => regime.type === idVatRegime)?.price;\n else if (currentPriceGrid.vatRegimeYearly && isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeYearly?.find((regime) => regime.type === idVatRegime)?.price;\n\n /* Gestion du Régime d'imposition */\n if (currentPriceGrid.taxSystem && idTaxSystem)\n taxSystemPrice = currentPriceGrid.taxSystem?.find((tax) => tax.id === idTaxSystem)?.price;\n\n /* Gestion des montants */\n /* Récupératioin des prix mensuels */\n if (currentPriceGrid.turnoverMonthly && !isYearly)\n monthlyPrice = currentPriceGrid.turnoverMonthly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.properties)\n monthlyPrice = currentPriceGrid.properties?.find((property) => property.amount === rentsNumber)?.price;\n else if (currentPriceGrid.employee) {\n monthlyPrice = currentPriceGrid.employee?.find(\n (emp) => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber,\n )?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n } else if (currentPriceGrid.employeeByLegalForm) {\n monthlyPrice = currentPriceGrid.employeeByLegalForm?.find((emp) => emp.idLegalForm === idLegalForm)?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n /* Récupération des prix annuels */\n } else if (currentPriceGrid.turnoverYearly && isYearly)\n yearlyPrice = currentPriceGrid.turnoverYearly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear)\n yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear)\n yearlyPrice = currentPriceGrid.turnoverPastYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.partner)\n yearlyPrice = currentPriceGrid.partner?.find(\n (part) => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber,\n )?.price;\n else if (currentPriceGrid.legalForm)\n yearlyPrice = currentPriceGrid.legalForm?.find((form) => form.idLegalForm === idLegalForm)?.price;\n else if (currentPriceGrid.exerciceNbr)\n yearlyPrice = currentPriceGrid.exerciceNbr?.find(\n (el) => el.minimum <= exerciceNbr && exerciceNbr <= el.maximum,\n )?.price;\n /* Calcul du prix mensuel final */\n finalMonthlyPrice =\n (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0) + (taxSystemPrice ? taxSystemPrice : 0);\n\n /* Gestion des mois */\n let cloturedPast: boolean = false;\n if (dayjs(endDate, 'YYYY-MM-DD').subtract(15, 'day').isBefore(dayjs())) cloturedPast = true;\n let monthlyNbrList: monthlyNbr[] | undefined;\n let monthlyNbr: monthlyNbr | undefined;\n if (currentPriceGrid.monthlyNbr) {\n monthlyNbrList = currentPriceGrid.monthlyNbr?.filter((el) =>\n el.closingType.includes(cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS),\n );\n if (monthlyNbrList) {\n monthlyNbr = monthlyNbrList.find((el) => el.minimum <= monthNbr && monthNbr <= el.maximum);\n if (monthlyNbr) {\n monthNbr = monthlyNbr.value;\n }\n }\n }\n\n /* Gestion des offres, mois offer */\n if (totalMonth > 0) {\n if (isYearly) {\n yearlyPrice = (10 - totalMonth) * (yearlyPrice ? yearlyPrice / 10 : 0);\n } else {\n monthNbr = monthNbr - totalMonth;\n }\n }\n\n /* Calcul du nombre de mois soustraient */\n reduceMonth = monthNbr === NbrMonth - totalMonth ? totalMonth : 0;\n\n /* Gestion des offres, bilan offer */\n if (balanceSheetOffered > 0) {\n yearlyPrice = undefined;\n recalculateMonthly = false;\n finalMonthlyPrice = balanceSheetOffered / monthNbr;\n }\n\n /* Prix Final */\n totalPrestation = yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr;\n }\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n monthNbr: yearlyPrice ? 0 : recalculateMonthly ? NbrMonth : monthNbr,\n price: yearlyPrice\n ? yearlyPrice\n : recalculateMonthly\n ? totalPrestation / monthNbr\n : finalMonthlyPrice\n ? finalMonthlyPrice\n : 0,\n };\n};\n\nconst calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {\n let totalPrestation: number = 0;\n\n totalPrestation = prestationList?.price || 0;\n\n return totalPrestation;\n};\n\n/**\n * From idLegalForm, get application fees amount (without taxes included if no idVat passed, or with taxes included calculated by given idVat)\n * @param idLegalForm\n * @param idVat\n * @returns amount of application fees, without taxes included\n * @deprecated Application fees are not charged anymore\n */\nconst getApplicationFeesAmount = (idLegalForm: number, idVat?: number) => {\n let applicationFeesAmount = 50;\n if (idLegalForm === LegalFormTypeEnum.SCI) applicationFeesAmount = 150;\n\n //Sans tva, on envoie le montant HT\n if (!idVat) return applicationFeesAmount;\n\n //Avec tva, on envoie le montant TTC\n return getTaxesIncludedAmount(applicationFeesAmount, idVat);\n};\n\nconst calculatePrestationPrice = (\n idPrestationList: number,\n prestationList: IPrestationList,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n optionsList: number[],\n totalPercentage: number /* total pourcentage offer (%) */,\n totalAmount: number /* total montant offer (€) */,\n totalMonth: number /* total mois offer (mois) */,\n isWithApplicationFees: boolean /* frais de dossier */,\n idTaxSystem: number,\n idLegalForm: number,\n isYearly: boolean = false /* prestation annuel ou mensuel */,\n isSubPrestation: boolean = false,\n balanceSheetOffered: number = 0,\n exerciceList: IExercice[] = [],\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n calculDetail: string;\n monthlyPrice: string;\n price: number;\n} => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let canBeCreated: boolean = true;\n let monthNbr: number = 0;\n let price: number = 0;\n let totalWithReduce: {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n } = { totalPrestation: 0, reduceMonth: 0, canBeCreated: true, monthNbr: 0, price: 0 };\n\n /* Gestion du prix en fonction de la prestation */\n if (\n [\n PrestationType.COMPTA_PRO,\n PrestationType.COMPTA_PRO_EXPRESS,\n PrestationType.COMPTA_ENTREPRISE,\n PrestationType.COMPTA_ENTREPRISE_EXPRESS,\n PrestationType.COMPTA_SCI,\n PrestationType.COMPTA_SCI_EXPRESS,\n PrestationType.BILAN_PREVISIONNEL,\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n PrestationType.COMPTA_POURCENTAGE,\n PrestationType.COMPTA_POURCENTAGE_EXPRESS,\n PrestationType.SOCIAL,\n PrestationType.GESTION_JURIDIQUE,\n PrestationType.COMPTA_PRO_COMPTASTART,\n PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS,\n PrestationType.COMPTA_EI_KLEMS,\n PrestationType.COMPTA_EI_KLEMS_EXPRESS,\n PrestationType.COMPTA_MICRO_KLEMS,\n PrestationType.COMPTA_MICRO_KLEMS_EXPRESS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS_EXPRESS,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.EI,\n PrestationType.MICRO,\n PrestationType.GESTION_IMMO,\n ].includes(idPrestationList)\n ) {\n let exerciceNbr: number = 0;\n if (exerciceList.length) exerciceNbr = exerciceNumber(dayjs(endDate, 'YYYY-MM-DD').toDate(), exerciceList);\n totalWithReduce = calculatePrestationPriceWithPriceGrid(\n idPrestationList,\n endDate,\n NbrMonth,\n turnover,\n rentsNumber,\n employeesNumber,\n associatesNumber,\n idTypeBrand,\n idVatRegime,\n pastBalanceSheet,\n isYearly,\n totalMonth,\n idTaxSystem,\n idLegalForm,\n exerciceNbr,\n balanceSheetOffered,\n );\n totalPrestation = totalWithReduce.totalPrestation;\n reduceMonth = totalWithReduce.reduceMonth;\n canBeCreated = totalWithReduce.canBeCreated;\n monthNbr = totalWithReduce.monthNbr;\n price = totalWithReduce.price;\n } else {\n totalPrestation = calculatePrestationPriceWithPrestationList(prestationList);\n if ([PrestationType.CREATION_SOCIETE].includes(idPrestationList) && !isSubPrestation) {\n // totalPrestation += 50;\n // La création est offerte désormais\n // inutile d'ajouter les frais de greffe et d'annonce légale,\n // car ne compte pas dans le calcul pour les sales\n }\n }\n /* Gestion des offres */\n /* Offre montant offer */\n if (totalAmount > 0) totalPrestation = totalPrestation - totalAmount;\n /* Offre pourcentage offer */\n if (totalPercentage > 0) totalPrestation = totalPrestation - totalPrestation * (totalPercentage / 100);\n /* Gesstioin du prix minimum acceptable pour la prestation */\n if (prestationList && prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice)\n totalPrestation = prestationList.minimumPrice;\n /* Gestion des options */\n let OptionTotalPrice: number = 0;\n if (optionsList.length) {\n optionsList.forEach((optionId) => {\n const optionPrice: number | undefined = Object.values(PrestationOption).find(\n (option) => option.id === optionId,\n )?.price;\n if (optionPrice) OptionTotalPrice += optionPrice;\n });\n }\n totalPrestation += OptionTotalPrice ? OptionTotalPrice : 0;\n /* Gestion des frais de dossier */\n // if (isWithApplicationFees) {\n // const applicationFeesAmount = getApplicationFeesAmount(idLegalForm);\n // totalPrestation += applicationFeesAmount;\n // }\n\n const calculDetail = `${monthNbr > 0 ? monthNbr + ' mois x ' + Math.round(price * 100) / 100 + '€' : Math.round(price * 100) / 100 + '€'} ${totalAmount > 0 ? '- ' + totalAmount + '€' : ''} ${totalPercentage > 0 ? '- ' + totalPercentage + '%' : ''} ${isWithApplicationFees ? '+ 50€' : ''}`;\n\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n calculDetail,\n monthlyPrice: monthNbr > 0 ? Math.round(price * 100) / 100 + '€/mois' : Math.round(price * 100) / 100 + '€',\n price,\n };\n};\n\nconst getPrestationOptions = (idPrestationList: number): PrestationOptionType[] => {\n const PrestationOptionList: PrestationOptionType[] = Object.values(PrestationOption).filter((option) =>\n option.brand.includes(getBrandNameByNodeEnv(process.env.NODE_ENV)),\n );\n return PrestationOptionList.filter((option) => option.prestationList.includes(idPrestationList));\n};\n\nconst isAbleToUpdatePrice = (\n idTypeBrand: number,\n idPrestationList: number,\n turnover: number,\n pastBalanceSheet: boolean,\n): boolean => {\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n if (currentPriceGrid) {\n if (\n [\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n ].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 2].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n !pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverCreatedYear[currentPriceGrid.turnoverCreatedYear.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverPastYear[currentPriceGrid.turnoverPastYear.length - 1].turnoverValue < turnover\n )\n return true;\n else return false;\n }\n return false;\n};\n\nconst idPrestationListToOfferType = (idPrestationList: number): 'software' | 'expertise' => {\n if (ClementineSubscriptionAccountancySoftwarePrestations.includes(idPrestationList)) return 'software';\n return 'expertise';\n};\n\nexport {\n isOtherAccountingMissions,\n isOtherJuridicalMissions,\n isAdditionalPresta,\n isOtherSocialMission,\n isOnlyPrevi,\n isOnlySocial,\n isOnlyJuridic,\n isCreation,\n isFromStatutsExpress,\n isExpress,\n isConsultingHour,\n isSoftwarePrestation,\n calculateScoringOfPrestation,\n calculatePrestationPrice,\n getPrestationOptions,\n isAbleToUpdatePrice,\n calculatePrestationPriceWithPriceGrid,\n getApplicationFeesAmount,\n idPrestationListToOfferType,\n};\n"]}
1
+ {"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../../ts/utils/prestation.ts"],"names":[],"mappings":";;;AACA,2CAAwC;AACxC,+EAA4E;AAC5E,uCAAqD;AACrD,y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gBAAgB,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAEtG,OAAO,IAAI,CAAC;aACT,IACH,CAAC,+BAAc,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YAC9D,CAAC,gBAAgB;YACjB,8CAA8C;YAC9C,gBAAgB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAE9G,OAAO,IAAI,CAAC;aACT,IACH,CAAC,+BAAc,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YAC9D,gBAAgB;YAChB,8CAA8C;YAC9C,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAExG,OAAO,IAAI,CAAC;;YACT,OAAO,KAAK,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAuBA,kDAAmB;AArBrB,MAAM,2BAA2B,GAAG,CAAC,gBAAwB,EAA4B,EAAE;IACzF,IAAI,qEAAoD,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAAE,OAAO,UAAU,CAAC;IACvG,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAqBA,kEAA2B","sourcesContent":["import { IExercice, IPrestation, IPrestationList } from '../types';\nimport { Vat } from '../types/Enum/Vat';\nimport { ReasonTerminationType } from '../types/Enum/ReasonTerminationType';\nimport { getTaxesIncludedAmount } from './vat/utils';\nimport { intersection } from './noLodash';\nimport {\n ClementineSubscriptionAccountancySoftwarePrestations,\n PrestationDetail,\n PrestationType,\n} from '../types/Enum/PrestationType';\nimport { LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport { PrestationOptionType, PrestationOption } from '../types/Enum/PrestationOption';\nimport { PriceGridClementine } from '../types/Enum/PriceGridClementine';\nimport { PriceGridPourcentage } from '../types/Enum/PriceGridPourcentage';\nimport { PriceGridLegalstart } from '../types/Enum/PriceGridLegalstart';\nimport { PriceGridStatutsExpress } from '../types/Enum/PriceGridStatutsExpress';\nimport { ClosingType } from '../types/Enum/ClosingType';\nimport { getBrandNameByNodeEnv } from './brands';\nimport * as dayjs from 'dayjs';\nimport { exerciceNumber } from './exercice';\n\ntype priceGridBrand = {\n idTypeBrand: number;\n price: priceGrid[];\n};\n\ntype priceGrid = {\n idPrestationList: number[];\n priceWithTaxesIncluded: boolean;\n applicationCost: number;\n monthlyNbr?: monthlyNbr[];\n exerciceNbr?: exerciceNbr[];\n turnoverCreatedYear?: turnover[];\n turnoverPastYear?: turnover[];\n turnoverMonthly?: turnover[];\n turnoverYearly?: turnover[];\n employee?: employee[];\n partner?: employee[];\n properties?: propertie[];\n vatRegimeMonthly?: vatRegime[];\n vatRegimeYearly?: vatRegime[];\n taxSystem?: taxSystem[];\n legalForm?: legalForm[];\n employeeByLegalForm?: employeeByLegalForm[];\n};\n\ntype monthlyNbr = {\n minimum: number;\n maximum: number;\n value: number;\n closingType: number[];\n};\n\ntype exerciceNbr = {\n minimum: number;\n maximum: number;\n price: number;\n};\n\ntype turnover = {\n turnoverValue: number;\n price: number;\n};\n\ntype legalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype employee = {\n amountMinimum: number;\n amountMaximum: number;\n price: number;\n};\n\ntype employeeByLegalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype propertie = {\n amount: number;\n price: number;\n};\n\ntype vatRegime = {\n type: number;\n price: number;\n};\n\ntype taxSystem = {\n id: number;\n price: number;\n};\n\nconst isOtherAccountingMissions = (idPrestationList: number): boolean =>\n [\n PrestationType.PREVISIONNEL,\n PrestationType.BILAN_INTERMEDIAIRE,\n PrestationType.AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE,\n PrestationType.AUTRE_MISSION_COMPTABLE,\n PrestationType.TVS,\n PrestationType.ETUDE_FISCALE,\n PrestationType.BILAN_PREVISIONNEL,\n ].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique: boolean, isCatalog: boolean, idPrestationList: number): boolean =>\n idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean =>\n idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden: boolean, isCatalog: boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL),\n ).length;\n\nconst isOnlySocial = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [\n PrestationType.CREATION_SOCIETE,\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ]).length;\n\nconst isFromStatutsExpress = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ].includes(idPL),\n ).length;\n\nconst isExpress = (idPrestationList: number): boolean => {\n const prestationDetailValues = Object.values(PrestationDetail) as any;\n const prestaList = prestationDetailValues.find((pr: any) => pr.id === idPrestationList);\n return !!prestaList.isBack;\n};\n\nconst isConsultingHour = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.CONSULTING_HOUR]).length;\n\nconst isSoftwarePrestation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.STEERING, PrestationType.VAT, PrestationType.BALANCESHEET])\n .length; /* &&\n idPrestationList.length === 1 */ // Commenté car si un client résilie un software pour un utre software, condition non prise en charge\n\nconst calculateScoringOfPrestation = (\n idPrestationType: PrestationType,\n prestations: IPrestation[],\n currentIdPrestation: number,\n): number => {\n const prestationsSignedPaid = prestations.filter(\n (prestation) =>\n prestation.paid &&\n prestation.signed &&\n (prestation.terminationList === null ||\n prestation.terminationList?.idReasonTermination?.includes(ReasonTerminationType.CHANGES_NEW_OFFERS)) &&\n prestation.id !== currentIdPrestation,\n );\n\n const currentPrestation = prestations.find(\n (el) => el.idPrestationList === idPrestationType && el.terminationList === null,\n );\n\n // SPECIAL CASE:\n // If current prestation is a software prestation\n // and the current prestation is an annual payment, return 0 point\n if (\n isSoftwarePrestation([idPrestationType]) &&\n currentPrestation?.exercices?.length &&\n //@ts-expect-error\n (currentPrestation?.exercices[0].ExercicePrestation?.totalPrestation < 72 ||\n //@ts-expect-error\n currentPrestation?.exercices[0].ExercicePrestation?.monthNumber !== 1)\n ) {\n return 0;\n }\n\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter(\n (p) =>\n p.isComptable &&\n !p.isCatalog &&\n p.id &&\n ![PrestationType.BALANCESHEET, PrestationType.VAT, PrestationType.STEERING].includes(p.id),\n );\n const prestationHalfPriceIds = prestationHalfPriceList.map((t) => t.id);\n\n // Get the number of points for the new prestation\n const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);\n let numberPoint = prestaDetails?.point || 0;\n\n // For each back exercices, add 100 points\n // -> for new prestations only\n if (\n [\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.GESTION_IMMO,\n PrestationType.EI,\n PrestationType.MICRO,\n ].includes(idPrestationType) &&\n currentPrestation?.exercices?.length &&\n currentPrestation?.exercices.find((el) => el.isBack)\n ) {\n numberPoint += (currentPrestation?.exercices.filter((el) => el.isBack).length ?? 1) * 100;\n }\n\n // Get list of prestations that are already done\n // and check if one of them is in the list of prestations that are half price\n const prestationsExistIds = prestationsSignedPaid.map((prestation) => prestation.idPrestationList);\n const prestationHalfPriceAlreadyDoneIds = prestationsExistIds.filter((id) => prestationHalfPriceIds.includes(id));\n\n // If one of the prestations already done is in the list of prestations that are half price and if the idPrestationType is in prestationHalfPriceIds, return 50% of points\n if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType))\n return Math.floor(numberPoint * 0.3);\n\n return numberPoint;\n};\n\nexport const calculateMonthlyAmount = (params: {\n monthlyPrice: number;\n monthNumber: number;\n monthOffer: number;\n idVatForInternalInvoicing?: number | null;\n returnTaxesIncludedValue?: boolean;\n}): number => {\n const { monthlyPrice, monthNumber, monthOffer, idVatForInternalInvoicing, returnTaxesIncludedValue = true } = params;\n\n if (!idVatForInternalInvoicing && returnTaxesIncludedValue)\n throw new Error('Taux de TVA manquant pour calculer le montant TTC');\n\n if (!idVatForInternalInvoicing || !returnTaxesIncludedValue) return monthlyPrice * (monthNumber - monthOffer);\n\n return (\n monthlyPrice *\n (monthNumber - monthOffer) *\n (1 + Object.values(Vat).find((el) => el.id === idVatForInternalInvoicing).value / 100)\n );\n};\n\nexport const getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid | undefined => {\n let currentBrandPriceGrid: priceGridBrand | undefined;\n let currentPriceGrid: priceGrid | undefined;\n\n const currentEnvName = getBrandNameByNodeEnv(process.env.NODE_ENV);\n const listEnvEnum = {\n PriceGridClementine,\n PriceGridPourcentage,\n PriceGridLegalstart,\n PriceGridStatutsExpress,\n };\n // @ts-ignore\n const currentPriceGridFile: priceGridBrand[] = listEnvEnum[`PriceGrid${currentEnvName}`];\n if (currentPriceGridFile)\n currentBrandPriceGrid = currentPriceGridFile.find(\n (priceGrid: priceGridBrand) => priceGrid.idTypeBrand === idTypeBrand,\n );\n if (currentBrandPriceGrid)\n currentPriceGrid = currentBrandPriceGrid?.price.find((price: priceGrid) =>\n price.idPrestationList.includes(idPrestationList),\n );\n return currentPriceGrid;\n};\n\nconst calculatePrestationPriceWithPriceGrid = (\n idPrestationList: number,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n isYearly: boolean /* Prestation annuel ou mensuel */,\n totalMonth: number /* Nbr de moiis offer */,\n idTaxSystem: number,\n idLegalForm: number,\n exerciceNbr: number,\n balanceSheetOffered: number = 0 /* montant du bilan offer */,\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n} => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let monthNbr: number = NbrMonth;\n let yearlyPrice: number | undefined;\n let finalMonthlyPrice: number | undefined;\n const canBeCreated: boolean = true;\n let recalculateMonthly: boolean = false;\n\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n\n if (currentPriceGrid) {\n let monthlyPrice: number | undefined;\n let vatRegimePrice: number | undefined;\n let taxSystemPrice: number | undefined;\n\n /* Gestion du régime de TVA */\n if (currentPriceGrid.vatRegimeMonthly && !isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeMonthly?.find((regime) => regime.type === idVatRegime)?.price;\n else if (currentPriceGrid.vatRegimeYearly && isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeYearly?.find((regime) => regime.type === idVatRegime)?.price;\n\n /* Gestion du Régime d'imposition */\n if (currentPriceGrid.taxSystem && idTaxSystem)\n taxSystemPrice = currentPriceGrid.taxSystem?.find((tax) => tax.id === idTaxSystem)?.price;\n\n /* Gestion des montants */\n /* Récupératioin des prix mensuels */\n if (currentPriceGrid.turnoverMonthly && !isYearly)\n monthlyPrice = currentPriceGrid.turnoverMonthly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.properties)\n monthlyPrice = currentPriceGrid.properties?.find((property) => property.amount === rentsNumber)?.price;\n else if (currentPriceGrid.employee) {\n monthlyPrice = currentPriceGrid.employee?.find(\n (emp) => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber,\n )?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n } else if (currentPriceGrid.employeeByLegalForm) {\n monthlyPrice = currentPriceGrid.employeeByLegalForm?.find((emp) => emp.idLegalForm === idLegalForm)?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n /* Récupération des prix annuels */\n } else if (currentPriceGrid.turnoverYearly && isYearly)\n yearlyPrice = currentPriceGrid.turnoverYearly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear)\n yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear)\n yearlyPrice = currentPriceGrid.turnoverPastYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.partner)\n yearlyPrice = currentPriceGrid.partner?.find(\n (part) => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber,\n )?.price;\n else if (currentPriceGrid.legalForm)\n yearlyPrice = currentPriceGrid.legalForm?.find((form) => form.idLegalForm === idLegalForm)?.price;\n else if (currentPriceGrid.exerciceNbr)\n yearlyPrice = currentPriceGrid.exerciceNbr?.find(\n (el) => el.minimum <= exerciceNbr && exerciceNbr <= el.maximum,\n )?.price;\n /* Calcul du prix mensuel final */\n finalMonthlyPrice =\n (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0) + (taxSystemPrice ? taxSystemPrice : 0);\n\n /* Gestion des mois */\n let cloturedPast: boolean = false;\n if (dayjs(endDate, 'YYYY-MM-DD').subtract(15, 'day').isBefore(dayjs())) cloturedPast = true;\n let monthlyNbrList: monthlyNbr[] | undefined;\n let monthlyNbr: monthlyNbr | undefined;\n if (currentPriceGrid.monthlyNbr) {\n monthlyNbrList = currentPriceGrid.monthlyNbr?.filter((el) =>\n el.closingType.includes(cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS),\n );\n if (monthlyNbrList) {\n monthlyNbr = monthlyNbrList.find((el) => el.minimum <= monthNbr && monthNbr <= el.maximum);\n if (monthlyNbr) {\n monthNbr = monthlyNbr.value;\n }\n }\n }\n\n /* Gestion des offres, mois offer */\n if (totalMonth > 0) {\n if (isYearly) {\n yearlyPrice = (10 - totalMonth) * (yearlyPrice ? yearlyPrice / 10 : 0);\n monthNbr = monthNbr - totalMonth;\n } else {\n monthNbr = monthNbr - totalMonth;\n }\n }\n\n /* Calcul du nombre de mois soustraient */\n reduceMonth = monthNbr === NbrMonth - totalMonth ? totalMonth : 0;\n\n /* Gestion des offres, bilan offer */\n if (balanceSheetOffered > 0) {\n yearlyPrice = undefined;\n recalculateMonthly = false;\n finalMonthlyPrice = balanceSheetOffered / monthNbr;\n }\n\n /* Prix Final */\n totalPrestation = yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr;\n }\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n monthNbr: yearlyPrice ? 0 : recalculateMonthly ? NbrMonth : monthNbr,\n price: yearlyPrice\n ? yearlyPrice\n : recalculateMonthly\n ? totalPrestation / monthNbr\n : finalMonthlyPrice\n ? finalMonthlyPrice\n : 0,\n };\n};\n\nconst calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {\n let totalPrestation: number = 0;\n\n totalPrestation = prestationList?.price || 0;\n\n return totalPrestation;\n};\n\n/**\n * From idLegalForm, get application fees amount (without taxes included if no idVat passed, or with taxes included calculated by given idVat)\n * @param idLegalForm\n * @param idVat\n * @returns amount of application fees, without taxes included\n * @deprecated Application fees are not charged anymore\n */\nconst getApplicationFeesAmount = (idLegalForm: number, idVat?: number) => {\n let applicationFeesAmount = 50;\n if (idLegalForm === LegalFormTypeEnum.SCI) applicationFeesAmount = 150;\n\n //Sans tva, on envoie le montant HT\n if (!idVat) return applicationFeesAmount;\n\n //Avec tva, on envoie le montant TTC\n return getTaxesIncludedAmount(applicationFeesAmount, idVat);\n};\n\nconst calculatePrestationPrice = (\n idPrestationList: number,\n prestationList: IPrestationList,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n optionsList: number[],\n totalPercentage: number /* total pourcentage offer (%) */,\n totalAmount: number /* total montant offer (€) */,\n totalMonth: number /* total mois offer (mois) */,\n isWithApplicationFees: boolean /* frais de dossier */,\n idTaxSystem: number,\n idLegalForm: number,\n isYearly: boolean = false /* prestation annuel ou mensuel */,\n isSubPrestation: boolean = false,\n balanceSheetOffered: number = 0,\n exerciceList: IExercice[] = [],\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n calculDetail: string;\n monthlyPrice: string;\n price: number;\n} => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let canBeCreated: boolean = true;\n let monthNbr: number = 0;\n let price: number = 0;\n let totalWithReduce: {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n } = { totalPrestation: 0, reduceMonth: 0, canBeCreated: true, monthNbr: 0, price: 0 };\n\n /* Gestion du prix en fonction de la prestation */\n if (\n [\n PrestationType.COMPTA_PRO,\n PrestationType.COMPTA_PRO_EXPRESS,\n PrestationType.COMPTA_ENTREPRISE,\n PrestationType.COMPTA_ENTREPRISE_EXPRESS,\n PrestationType.COMPTA_SCI,\n PrestationType.COMPTA_SCI_EXPRESS,\n PrestationType.BILAN_PREVISIONNEL,\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n PrestationType.COMPTA_POURCENTAGE,\n PrestationType.COMPTA_POURCENTAGE_EXPRESS,\n PrestationType.SOCIAL,\n PrestationType.GESTION_JURIDIQUE,\n PrestationType.COMPTA_PRO_COMPTASTART,\n PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS,\n PrestationType.COMPTA_EI_KLEMS,\n PrestationType.COMPTA_EI_KLEMS_EXPRESS,\n PrestationType.COMPTA_MICRO_KLEMS,\n PrestationType.COMPTA_MICRO_KLEMS_EXPRESS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS_EXPRESS,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.EI,\n PrestationType.MICRO,\n PrestationType.GESTION_IMMO,\n ].includes(idPrestationList)\n ) {\n let exerciceNbr: number = 0;\n if (exerciceList.length) exerciceNbr = exerciceNumber(dayjs(endDate, 'YYYY-MM-DD').toDate(), exerciceList);\n totalWithReduce = calculatePrestationPriceWithPriceGrid(\n idPrestationList,\n endDate,\n NbrMonth,\n turnover,\n rentsNumber,\n employeesNumber,\n associatesNumber,\n idTypeBrand,\n idVatRegime,\n pastBalanceSheet,\n isYearly,\n totalMonth,\n idTaxSystem,\n idLegalForm,\n exerciceNbr,\n balanceSheetOffered,\n );\n totalPrestation = totalWithReduce.totalPrestation;\n reduceMonth = totalWithReduce.reduceMonth;\n canBeCreated = totalWithReduce.canBeCreated;\n monthNbr = totalWithReduce.monthNbr;\n price = totalWithReduce.price;\n } else {\n totalPrestation = calculatePrestationPriceWithPrestationList(prestationList);\n if ([PrestationType.CREATION_SOCIETE].includes(idPrestationList) && !isSubPrestation) {\n // totalPrestation += 50;\n // La création est offerte désormais\n // inutile d'ajouter les frais de greffe et d'annonce légale,\n // car ne compte pas dans le calcul pour les sales\n }\n }\n /* Gestion des offres */\n /* Offre montant offer */\n if (totalAmount > 0) totalPrestation = totalPrestation - totalAmount;\n /* Offre pourcentage offer */\n if (totalPercentage > 0) totalPrestation = totalPrestation - totalPrestation * (totalPercentage / 100);\n /* Gesstioin du prix minimum acceptable pour la prestation */\n if (prestationList && prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice)\n totalPrestation = prestationList.minimumPrice;\n /* Gestion des options */\n let OptionTotalPrice: number = 0;\n if (optionsList.length) {\n optionsList.forEach((optionId) => {\n const optionPrice: number | undefined = Object.values(PrestationOption).find(\n (option) => option.id === optionId,\n )?.price;\n if (optionPrice) OptionTotalPrice += optionPrice;\n });\n }\n totalPrestation += OptionTotalPrice ? OptionTotalPrice : 0;\n /* Gestion des frais de dossier */\n // if (isWithApplicationFees) {\n // const applicationFeesAmount = getApplicationFeesAmount(idLegalForm);\n // totalPrestation += applicationFeesAmount;\n // }\n\n const calculDetail = `${monthNbr > 0 ? monthNbr + ' mois x ' + Math.round(price * 100) / 100 + '€' : Math.round(price * 100) / 100 + '€'} ${totalAmount > 0 ? '- ' + totalAmount + '€' : ''} ${totalPercentage > 0 ? '- ' + totalPercentage + '%' : ''} ${isWithApplicationFees ? '+ 50€' : ''}`;\n\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n calculDetail,\n monthlyPrice: monthNbr > 0 ? Math.round(price * 100) / 100 + '€/mois' : Math.round(price * 100) / 100 + '€',\n price,\n };\n};\n\nconst getPrestationOptions = (idPrestationList: number): PrestationOptionType[] => {\n const PrestationOptionList: PrestationOptionType[] = Object.values(PrestationOption).filter((option) =>\n option.brand.includes(getBrandNameByNodeEnv(process.env.NODE_ENV)),\n );\n return PrestationOptionList.filter((option) => option.prestationList.includes(idPrestationList));\n};\n\nconst isAbleToUpdatePrice = (\n idTypeBrand: number,\n idPrestationList: number,\n turnover: number,\n pastBalanceSheet: boolean,\n): boolean => {\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n if (currentPriceGrid) {\n if (\n [\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n ].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 2].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n !pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverCreatedYear[currentPriceGrid.turnoverCreatedYear.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverPastYear[currentPriceGrid.turnoverPastYear.length - 1].turnoverValue < turnover\n )\n return true;\n else return false;\n }\n return false;\n};\n\nconst idPrestationListToOfferType = (idPrestationList: number): 'software' | 'expertise' => {\n if (ClementineSubscriptionAccountancySoftwarePrestations.includes(idPrestationList)) return 'software';\n return 'expertise';\n};\n\nexport {\n isOtherAccountingMissions,\n isOtherJuridicalMissions,\n isAdditionalPresta,\n isOtherSocialMission,\n isOnlyPrevi,\n isOnlySocial,\n isOnlyJuridic,\n isCreation,\n isFromStatutsExpress,\n isExpress,\n isConsultingHour,\n isSoftwarePrestation,\n calculateScoringOfPrestation,\n calculatePrestationPrice,\n getPrestationOptions,\n isAbleToUpdatePrice,\n calculatePrestationPriceWithPriceGrid,\n getApplicationFeesAmount,\n idPrestationListToOfferType,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"societyApproval.d.ts","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAE7B,+BAA+B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAO9E;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,EAAE,QAAQ,GAAE,MAAW,GAAG,MAAM,CAE9F;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,iBAAiB,GAC7B,6BAA6B,GAAG,SAAS,CAE3C;AAED;;;;;GAKG;AAEH,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,iBAAiB,EAC9B,cAAc,EAAE,2BAA2B,GAC1C,MAAM,GAAG,SAAS,CAIpB;AAYD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,iBAAiB,EAC9B,cAAc,EAAE,2BAA2B,GAC1C,+BAA+B,GAAG,SAAS,CAG7C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CA+ChH"}
1
+ {"version":3,"file":"societyApproval.d.ts","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAE7B,+BAA+B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAQ9E;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,EAAE,QAAQ,GAAE,MAAW,GAAG,MAAM,CAE9F;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,iBAAiB,GAC7B,6BAA6B,GAAG,SAAS,CAE3C;AAED;;;;;GAKG;AAEH,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,iBAAiB,EAC9B,cAAc,EAAE,2BAA2B,GAC1C,MAAM,GAAG,SAAS,CAIpB;AAYD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,iBAAiB,EAC9B,cAAc,EAAE,2BAA2B,GAC1C,+BAA+B,GAAG,SAAS,CAG7C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAyDhH"}
@@ -12,6 +12,7 @@ const brands_1 = require("./brands");
12
12
  const amount_1 = require("./amount");
13
13
  const dayjs = require("dayjs");
14
14
  const CityOfGreffe_1 = require("../types/Enum/CityOfGreffe");
15
+ const siretValidation_1 = require("./siretValidation");
15
16
  /**
16
17
  * Récupère le nom de la forme juridique
17
18
  * @param idLegalForm - L'identifiant de la forme juridique
@@ -70,7 +71,7 @@ function getApprovalDocumentInfos(idLegalForm, idDocumentType) {
70
71
  * @returns L'objet de données formaté pour le template
71
72
  */
72
73
  function buildApprovalTemplateData(existingApproval, style) {
73
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
74
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
74
75
  const yearInText = (0, amount_1.convertNumberToLetter)(+dayjs().format('YYYY')).toLowerCase();
75
76
  const dayAndMonthInText = `${(0, amount_1.convertNumberToLetter)(+dayjs().format('D'))} ${dayjs().locale('fr').format('MMMM').toLowerCase()}`;
76
77
  const brand = (0, brands_1.getBrand)();
@@ -89,13 +90,21 @@ function buildApprovalTemplateData(existingApproval, style) {
89
90
  }, owner: {
90
91
  identity: `${((_l = (_k = (_j = (_h = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _h === void 0 ? void 0 : _h.society) === null || _j === void 0 ? void 0 : _j.users) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.idCivility) === 1 ? 'Monsieur' : 'Madame'} ${(_q = (_p = (_o = (_m = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _m === void 0 ? void 0 : _m.society) === null || _o === void 0 ? void 0 : _o.users) === null || _p === void 0 ? void 0 : _p[0]) === null || _q === void 0 ? void 0 : _q.firstname} ${(_u = (_t = (_s = (_r = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _r === void 0 ? void 0 : _r.society) === null || _s === void 0 ? void 0 : _s.users) === null || _t === void 0 ? void 0 : _t[0]) === null || _u === void 0 ? void 0 : _u.lastname} `,
91
92
  quality: (_v = Quality_1.QualityList.find((ql) => { var _a, _b, _c, _d, _e, _f; return ql.id === ((_f = (_e = (_d = (_c = (_b = (_a = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _a === void 0 ? void 0 : _a.society) === null || _b === void 0 ? void 0 : _b.users) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.businessPartners) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.idQuality); })) === null || _v === void 0 ? void 0 : _v.label,
92
- } }, existingApproval), { generatingDatas: Object.assign(Object.assign({}, existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.generatingDatas), (((_w = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.generatingDatas) === null || _w === void 0 ? void 0 : _w.approvalDate)
93
+ } }, existingApproval), { generatingDatas: Object.assign(Object.assign(Object.assign({}, existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.generatingDatas), (((_w = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.generatingDatas) === null || _w === void 0 ? void 0 : _w.approvalDate)
93
94
  ? {
94
95
  approvalDate: dayjs((_x = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.generatingDatas) === null || _x === void 0 ? void 0 : _x.approvalDate)
95
96
  .locale('fr')
96
97
  .format('DD MMMM YYYY')
97
98
  .toUpperCase(),
98
99
  }
99
- : {})), exercice: Object.assign(Object.assign({}, existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice), { society: Object.assign(Object.assign({}, (_y = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _y === void 0 ? void 0 : _y.society), { cityOfGreffe: getCityOfGreffeName((_0 = (_z = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _z === void 0 ? void 0 : _z.society) === null || _0 === void 0 ? void 0 : _0.idCityOfGreffe).toUpperCase() }), endDate: dayjs((_1 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _1 === void 0 ? void 0 : _1.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase() }) });
100
+ : {})), (((_y = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.generatingDatas) === null || _y === void 0 ? void 0 : _y.approvalDividendsPaymentDate)
101
+ ? {
102
+ approvalDividendsPaymentDate: dayjs((_z = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.generatingDatas) === null || _z === void 0 ? void 0 : _z.approvalDividendsPaymentDate)
103
+ .locale('fr')
104
+ .format('DD MMMM YYYY'),
105
+ }
106
+ : {})), exercice: Object.assign(Object.assign({}, existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice), { society: Object.assign(Object.assign({}, (_0 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _0 === void 0 ? void 0 : _0.society), { cityOfGreffe: getCityOfGreffeName((_2 = (_1 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _1 === void 0 ? void 0 : _1.society) === null || _2 === void 0 ? void 0 : _2.idCityOfGreffe).toUpperCase(), siren: ((_4 = (_3 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _3 === void 0 ? void 0 : _3.society) === null || _4 === void 0 ? void 0 : _4.siret)
107
+ ? (0, siretValidation_1.siretToSiren)(existingApproval.exercice.society.siret)
108
+ : null }), endDate: dayjs((_5 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _5 === void 0 ? void 0 : _5.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase() }) });
100
109
  }
101
110
  //# sourceMappingURL=societyApproval.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":";;AAoBA,4CAEC;AAOD,0EAIC;AASD,0EAOC;AAkBD,4DAMC;AAQD,8DA+CC;AAhID,uDAAuE;AACvE,mEAKuC;AAEvC,mDAAoD;AACpD,qCAAoC;AACpC,qCAAiD;AACjD,+BAA+B;AAC/B,6DAAgE;AAEhE;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,WAA8B,EAAE,WAAmB,EAAE;;IACpF,OAAO,MAAA,MAAA,MAAM,CAAC,MAAM,CAAC,qBAAS,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CAAC,0CAAE,IAAI,mCAAI,QAAQ,CAAC;AACxF,CAAC;AAED;;;;GAIG;AACH,SAAgB,+BAA+B,CAC7C,WAA8B;IAE9B,OAAO,qDAAmC,CAAC,IAAI,CAA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B,CAAC,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,0CAAE,OAAO,0CAAE,cAAc,CAAC,CAAC,WAAW,EAAE,KAEtG,OAAO,EAAE,KAAK,CAAC,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,0CAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE,OAEvG;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"]}
1
+ {"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":";;AAqBA,4CAEC;AAOD,0EAIC;AASD,0EAOC;AAkBD,4DAMC;AAQD,8DAyDC;AA3ID,uDAAuE;AACvE,mEAKuC;AAEvC,mDAAoD;AACpD,qCAAoC;AACpC,qCAAiD;AACjD,+BAA+B;AAC/B,6DAAgE;AAChE,uDAAiD;AAEjD;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,WAA8B,EAAE,WAAmB,EAAE;;IACpF,OAAO,MAAA,MAAA,MAAM,CAAC,MAAM,CAAC,qBAAS,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,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gB,uBAAhB,gBAAgB,CAAE,eAAe,0CAAE,4BAA4B;YACjE,CAAC,CAAC;gBACE,4BAA4B,EAAE,KAAK,CAAC,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,eAAe,0CAAE,4BAA4B,CAAC;qBACjG,MAAM,CAAC,IAAI,CAAC;qBACZ,MAAM,CAAC,cAAc,CAAC;aAC1B;YACH,CAAC,CAAC,EAAE,CAAC,GAET,QAAQ,kCACH,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,KAC7B,OAAO,kCACF,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,0CAAE,OAAO,KACtC,YAAY,EAAE,mBAAmB,CAAC,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,0CAAE,OAAO,0CAAE,cAAc,CAAC,CAAC,WAAW,EAAE,EACpG,KAAK,EAAE,CAAA,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,0CAAE,OAAO,0CAAE,KAAK;oBAC/C,CAAC,CAAC,IAAA,8BAAY,EAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC;oBACvD,CAAC,CAAC,IAAI,KAEV,OAAO,EAAE,KAAK,CAAC,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,0CAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE,OAEvG;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';\nimport { siretToSiren } from './siretValidation';\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 ...(existingApproval?.generatingDatas?.approvalDividendsPaymentDate\n ? {\n approvalDividendsPaymentDate: dayjs(existingApproval?.generatingDatas?.approvalDividendsPaymentDate)\n .locale('fr')\n .format('DD MMMM YYYY'),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n siren: existingApproval?.exercice?.society?.siret\n ? siretToSiren(existingApproval.exercice.society.siret)\n : null,\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
@@ -1,13 +1,11 @@
1
1
  import { Resource } from '../Resource';
2
- import { IUser, QueryConfirm, QueryResendConfirmationLink, CreateUser, CreateCoworker, QueryUserSmsConfirmation, QueryGetAllFromSociety, ISociety, Role, QueryGetAllCollaborators, QueryGetAllCollaboratorsByRoles, QueryGetAllWithoutBp, CollaboratorsByRoles, QueryUserExport, UpdateCorworker, GetSocietyFromUser, RegisterProspectBody, RegisterProspectResponse, QueryGet, BasePaginate, QueryGetAllUsersPaginated, QueryUpdatePassword, CreateCollaboraterDetail, IWorkingSchedule, ICollaboraterDetail } from '../../types';
2
+ import { IUser, QueryConfirm, QueryResendConfirmationLink, CreateUser, CreateCoworker, QueryUserSmsConfirmation, QueryGetAllFromSociety, ISociety, Role, QueryGetAllCollaborators, QueryGetAllCollaboratorsByRoles, QueryGetAllWithoutBp, CollaboratorsByRoles, QueryUserExport, UpdateCorworker, GetSocietyFromUser, RegisterProspectBody, RegisterProspectResponse, QueryGet, BasePaginate, QueryGetAllUsersPaginated, QueryUpdatePassword } from '../../types';
3
3
  export declare class User extends Resource {
4
4
  confirm(params: QueryConfirm): Promise<IUser>;
5
5
  resendConfirmationEmailLink(params: QueryResendConfirmationLink): Promise<boolean>;
6
6
  create(data: CreateUser): Promise<IUser>;
7
7
  coworker(data: CreateCoworker): Promise<IUser>;
8
- createCompletCoworker(data: CreateCoworker, file?: File): Promise<IUser>;
9
8
  updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser>;
10
- updateCompletCoworker(idUser: number, data: UpdateCorworker, file?: File): Promise<IUser>;
11
9
  sendNewCode(id: number): Promise<IUser>;
12
10
  verifySmsCodeConfirmation(id: number, params: QueryUserSmsConfirmation): Promise<IUser>;
13
11
  allFromSociety(params: QueryGetAllFromSociety): Promise<IUser[]>;
@@ -30,10 +28,5 @@ export declare class User extends Resource {
30
28
  }): Promise<IUser[]>;
31
29
  export(params: QueryUserExport): Promise<Buffer>;
32
30
  registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse>;
33
- updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]>;
34
- createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]>;
35
- createCollaboraterDetail(params: CreateCollaboraterDetail): Promise<ICollaboraterDetail>;
36
- getCollaboraterDetail(idUser: number): Promise<ICollaboraterDetail>;
37
- updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail>;
38
31
  }
39
32
  //# sourceMappingURL=User.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,KAAK,EACL,YAAY,EACZ,2BAA2B,EAC3B,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,sBAAsB,EACtB,QAAQ,EACR,IAAI,EAEJ,wBAAwB,EACxB,+BAA+B,EAC/B,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,QAAQ,EAC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K,EAAE,IAAI,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAGvD,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAUhD,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAGhF"}
@@ -13,27 +13,6 @@ export class User extends Resource {
13
13
  coworker(data) {
14
14
  return this.axios.$post('user/coworker', data);
15
15
  }
16
- createCompletCoworker(data, file) {
17
- const formData = new FormData();
18
- Object.entries(data).forEach(([key, value]) => {
19
- if (value !== undefined && value !== null) {
20
- if (Array.isArray(value)) {
21
- value.forEach((v) => {
22
- formData.append(`${key}[]`, `${v}`);
23
- });
24
- }
25
- else {
26
- formData.append(key, `${value}`);
27
- }
28
- }
29
- });
30
- if (file) {
31
- formData.append('file', file);
32
- }
33
- return this.axios.$post('user/coworker/complete', formData, {
34
- headers: { 'Content-Type': 'multipart/form-data' },
35
- });
36
- }
37
16
  updateCoworker(idUser, params) {
38
17
  const formData = new FormData();
39
18
  Object.entries(params).forEach(([key, value]) => {
@@ -53,28 +32,6 @@ export class User extends Resource {
53
32
  headers: { 'Content-Type': 'multipart/form-data' },
54
33
  });
55
34
  }
56
- updateCompletCoworker(idUser, data, file) {
57
- const formData = new FormData();
58
- Object.entries(data).forEach(([key, value]) => {
59
- if (value || value === false || value === 0) {
60
- if (Array.isArray(value)) {
61
- value.forEach((v) => {
62
- formData.append(`${key}[]`, `${v}`);
63
- });
64
- }
65
- else if (key === 'file')
66
- formData.append('file', value);
67
- else
68
- formData.append(key, `${value}`);
69
- }
70
- });
71
- if (file) {
72
- formData.append('file', file);
73
- }
74
- return this.axios.$put(`/user/coworker/complete/${idUser}`, formData, {
75
- headers: { 'Content-Type': 'multipart/form-data' },
76
- });
77
- }
78
35
  sendNewCode(id) {
79
36
  return this.axios.$put(`user/${id}/sendNewSmsCode`);
80
37
  }
@@ -158,20 +115,5 @@ export class User extends Resource {
158
115
  registerProspect(body) {
159
116
  return this.axios.$post('users/prospect', body);
160
117
  }
161
- updateCoworkerWorkingSchedules(idUser, workingSchedules) {
162
- return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);
163
- }
164
- createCoworkerWorkingSchedules(idUser, workingSchedules) {
165
- return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);
166
- }
167
- createCollaboraterDetail(params) {
168
- return this.axios.$post('collaboraters-details', params);
169
- }
170
- getCollaboraterDetail(idUser) {
171
- return this.axios.$get(`collaboraters-details/user/${idUser}`);
172
- }
173
- updateCollaboraterDetail(id, params) {
174
- return this.axios.$put(`collaboraters-details/${id}`, params);
175
- }
176
118
  }
177
119
  //# sourceMappingURL=User.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../ts/api/resources/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EASL,IAAI,EACJ,eAAe,GAiBhB,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,IAAK,SAAQ,QAAQ;IAChC,OAAO,CAAC,MAAoB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IACD,2BAA2B,CAAC,MAAmC;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,EAAE,yBAAyB,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,CAAC,IAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,QAAQ,CAAC,IAAoB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,qBAAqB,CAAC,IAAoB,EAAE,IAAW;QACrD,MA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AM,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;IAC1F,CAAC;IAED,wBAAwB,CAAC,MAAgC;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,qBAAqB,CAAC,MAAc;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,wBAAwB,CAAC,EAAU,EAAE,MAAoC;QACvE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport {\n IUser,\n QueryConfirm,\n QueryResendConfirmationLink,\n CreateUser,\n CreateCoworker,\n QueryUserSmsConfirmation,\n QueryGetAllFromSociety,\n ISociety,\n Role,\n TimeCounterType,\n QueryGetAllCollaborators,\n QueryGetAllCollaboratorsByRoles,\n QueryGetAllWithoutBp,\n CollaboratorsByRoles,\n QueryUserExport,\n UpdateCorworker,\n GetSocietyFromUser,\n RegisterProspectBody,\n RegisterProspectResponse,\n QueryGet,\n BasePaginate,\n QueryGetAllUsersPaginated,\n QueryUpdatePassword,\n CreateCollaboraterDetail,\n IWorkingSchedule,\n ICollaboraterDetail,\n} from '../../types';\n\nexport class User extends Resource {\n confirm(params: QueryConfirm): Promise<IUser> {\n return this.axios.$put('user/confirm', params);\n }\n resendConfirmationEmailLink(params: QueryResendConfirmationLink): Promise<boolean> {\n return this.axios.$put(`user/${params.id}/send-confirmation-mail`);\n }\n create(data: CreateUser): Promise<IUser> {\n return this.axios.$post('user/create', data);\n }\n coworker(data: CreateCoworker): Promise<IUser> {\n return this.axios.$post('user/coworker', data);\n }\n\n createCompletCoworker(data: CreateCoworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n if (Array.isArray(value)) {\n value.forEach((v) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else {\n formData.append(key, `${value}`);\n }\n }\n });\n if (file){ \n formData.append('file', file);\n }\n return this.axios.$post('user/coworker/complete', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser> {\n const formData = new FormData();\n Object.entries(params).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n\n return this.axios.$put(`/user/coworker/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCompletCoworker(idUser: number, data: UpdateCorworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n if (file){\n formData.append('file', file);\n }\n return this.axios.$put(`/user/coworker/complete/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n sendNewCode(id: number): Promise<IUser> {\n return this.axios.$put(`user/${id}/sendNewSmsCode`);\n }\n verifySmsCodeConfirmation(id: number, params: QueryUserSmsConfirmation): Promise<IUser> {\n return this.axios.$get(`user/${id}/verifySmsCodeConfirmation`, { params });\n }\n allFromSociety(params: QueryGetAllFromSociety): Promise<IUser[]> {\n return this.axios.$get('user/all-from-society', { params });\n }\n allWithoutBp(params: QueryGetAllWithoutBp): Promise<IUser[]> {\n return this.axios.$get('user/all-without-bp', { params });\n }\n allCollaborators(params: QueryGetAllCollaborators): Promise<IUser[]> {\n return this.axios.$get('user/all-collaborators', { params });\n }\n allCollaboratorsByRoles(data: QueryGetAllCollaboratorsByRoles): Promise<CollaboratorsByRoles[]> {\n const { idTimeCounterType, idRoles } = data;\n let params = { idRoles };\n if (idTimeCounterType) {\n const timeCounterType = Object.values(TimeCounterType).find((tct) => tct.id === idTimeCounterType);\n const rolesByDefault = [\n Role.FRONT_OFFICE,\n Role.FRONT_OFFICE_EXPRESS,\n Role.SOCIAL,\n Role.JURIDIC,\n Role.HUMAN_RESSOURCES,\n Role.FACTURATION,\n Role.CUSTOMER_SUCCESS,\n Role.COMMERCIAL,\n Role.MANAGER,\n Role.EXPERT_ACCOUNTANT,\n Role.DEVELOPER,\n Role.TECHNICAL_ADVISOR,\n ];\n params = { idRoles: timeCounterType?.limitedRoles ?? rolesByDefault };\n }\n return this.axios.$get('user/all-collaborators-by-roles', { params });\n }\n getAllPaginated(params: QueryGetAllUsersPaginated, signal?: AbortSignal): Promise<BasePaginate<IUser>> {\n return this.axios.$get('/user/paginated', {\n ...(signal ? { signal } : {}),\n params,\n });\n }\n selectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates');\n }\n selectableTeammatesV2(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates/v2');\n }\n calendarSelectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/calendar-selectable-teammates');\n }\n\n getAllSocieties(id: number, params: GetSocietyFromUser): Promise<ISociety[]> {\n return this.axios.$get(`/users/${id}/societies`, { params });\n }\n\n update(id: number, params: Partial<IUser> & { lastMobileConnection?: Date }): Promise<IUser> {\n return this.axios.$put(`user/${id}`, params);\n }\n getInfo(params?: QueryGet): Promise<IUser> {\n return this.axios.$get('user', { params });\n }\n delete(id: number): Promise<number> {\n return this.axios.$delete(`users/${id}`);\n }\n\n updatePassword(id: number, body: QueryUpdatePassword): Promise<Partial<IUser>> {\n return this.axios.$patch(`/users/${id}/password`, body);\n }\n\n getByRoles(params: { roles: Role[] }): Promise<IUser[]> {\n return this.axios.$get('users/roles', { params });\n }\n export(params: QueryUserExport): Promise<Buffer> {\n return this.axios.$get('users/export', {\n params,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {\n return this.axios.$post('users/prospect', body);\n }\n\n updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCollaboraterDetail(params: CreateCollaboraterDetail): Promise<ICollaboraterDetail> {\n return this.axios.$post('collaboraters-details', params);\n }\n\n getCollaboraterDetail(idUser: number): Promise<ICollaboraterDetail> {\n return this.axios.$get(`collaboraters-details/user/${idUser}`);\n }\n\n updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail> {\n return this.axios.$put(`collaboraters-details/${id}`, params);\n }\n}\n"]}
1
+ {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../ts/api/resources/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EASL,IAAI,EACJ,eAAe,GAchB,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,IAAK,SAAQ,QAAQ;IAChC,OAAO,CAAC,MAAoB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IACD,2BAA2B,CAAC,MAAmC;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,EAAE,yBAAyB,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,CAAC,IAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,E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MAAM,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU,CAAC,MAAyB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,CAAC,MAAuB;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE;YACrC,MAAM;YACN,YAAY,EAAE,aAAa;YAC3B,OAAO,EAAE;gBACP,MAAM,EAAE,iBAAiB;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB,CAAC,IAA0B;QACzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport {\n IUser,\n QueryConfirm,\n QueryResendConfirmationLink,\n CreateUser,\n CreateCoworker,\n QueryUserSmsConfirmation,\n QueryGetAllFromSociety,\n ISociety,\n Role,\n TimeCounterType,\n QueryGetAllCollaborators,\n QueryGetAllCollaboratorsByRoles,\n QueryGetAllWithoutBp,\n CollaboratorsByRoles,\n QueryUserExport,\n UpdateCorworker,\n GetSocietyFromUser,\n RegisterProspectBody,\n RegisterProspectResponse,\n QueryGet,\n BasePaginate,\n QueryGetAllUsersPaginated,\n QueryUpdatePassword,\n} from '../../types';\n\nexport class User extends Resource {\n confirm(params: QueryConfirm): Promise<IUser> {\n return this.axios.$put('user/confirm', params);\n }\n resendConfirmationEmailLink(params: QueryResendConfirmationLink): Promise<boolean> {\n return this.axios.$put(`user/${params.id}/send-confirmation-mail`);\n }\n create(data: CreateUser): Promise<IUser> {\n return this.axios.$post('user/create', data);\n }\n coworker(data: CreateCoworker): Promise<IUser> {\n return this.axios.$post('user/coworker', data);\n }\n updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser> {\n const formData = new FormData();\n Object.entries(params).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n\n return this.axios.$put(`/user/coworker/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n sendNewCode(id: number): Promise<IUser> {\n return this.axios.$put(`user/${id}/sendNewSmsCode`);\n }\n verifySmsCodeConfirmation(id: number, params: QueryUserSmsConfirmation): Promise<IUser> {\n return this.axios.$get(`user/${id}/verifySmsCodeConfirmation`, { params });\n }\n allFromSociety(params: QueryGetAllFromSociety): Promise<IUser[]> {\n return this.axios.$get('user/all-from-society', { params });\n }\n allWithoutBp(params: QueryGetAllWithoutBp): Promise<IUser[]> {\n return this.axios.$get('user/all-without-bp', { params });\n }\n allCollaborators(params: QueryGetAllCollaborators): Promise<IUser[]> {\n return this.axios.$get('user/all-collaborators', { params });\n }\n allCollaboratorsByRoles(data: QueryGetAllCollaboratorsByRoles): Promise<CollaboratorsByRoles[]> {\n const { idTimeCounterType, idRoles } = data;\n let params = { idRoles };\n if (idTimeCounterType) {\n const timeCounterType = Object.values(TimeCounterType).find((tct) => tct.id === idTimeCounterType);\n const rolesByDefault = [\n Role.FRONT_OFFICE,\n Role.FRONT_OFFICE_EXPRESS,\n Role.SOCIAL,\n Role.JURIDIC,\n Role.HUMAN_RESSOURCES,\n Role.FACTURATION,\n Role.CUSTOMER_SUCCESS,\n Role.COMMERCIAL,\n Role.MANAGER,\n Role.EXPERT_ACCOUNTANT,\n Role.DEVELOPER,\n Role.TECHNICAL_ADVISOR,\n ];\n params = { idRoles: timeCounterType?.limitedRoles ?? rolesByDefault };\n }\n return this.axios.$get('user/all-collaborators-by-roles', { params });\n }\n getAllPaginated(params: QueryGetAllUsersPaginated, signal?: AbortSignal): Promise<BasePaginate<IUser>> {\n return this.axios.$get('/user/paginated', {\n ...(signal ? { signal } : {}),\n params,\n });\n }\n selectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates');\n }\n selectableTeammatesV2(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates/v2');\n }\n calendarSelectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/calendar-selectable-teammates');\n }\n\n getAllSocieties(id: number, params: GetSocietyFromUser): Promise<ISociety[]> {\n return this.axios.$get(`/users/${id}/societies`, { params });\n }\n\n update(id: number, params: Partial<IUser> & { lastMobileConnection?: Date }): Promise<IUser> {\n return this.axios.$put(`user/${id}`, params);\n }\n getInfo(params?: QueryGet): Promise<IUser> {\n return this.axios.$get('user', { params });\n }\n delete(id: number): Promise<number> {\n return this.axios.$delete(`users/${id}`);\n }\n\n updatePassword(id: number, body: QueryUpdatePassword): Promise<Partial<IUser>> {\n return this.axios.$patch(`/users/${id}/password`, body);\n }\n\n getByRoles(params: { roles: Role[] }): Promise<IUser[]> {\n return this.axios.$get('users/roles', { params });\n }\n export(params: QueryUserExport): Promise<Buffer> {\n return this.axios.$get('users/export', {\n params,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {\n return this.axios.$post('users/prospect', body);\n }\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { AddWebexRegistrantBody, GetWebinarsParams, PaginatedWebinars, WebexRegistrant } from '../../types';
2
+ import { Resource } from '../Resource';
3
+ export declare class Webex extends Resource {
4
+ getWebinars(params?: GetWebinarsParams): Promise<PaginatedWebinars>;
5
+ getWebinarById(meetingId: string): Promise<any>;
6
+ addRegistrant(meetingId: string, registrant: AddWebexRegistrantBody): Promise<WebexRegistrant>;
7
+ }
8
+ //# sourceMappingURL=Webex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Webex.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/Webex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,qBAAa,KAAM,SAAQ,QAAQ;IACjC,WAAW,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAInE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAI/C,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;CAG/F"}
@@ -0,0 +1,13 @@
1
+ import { Resource } from '../Resource';
2
+ export class Webex extends Resource {
3
+ getWebinars(params) {
4
+ return this.axios.$get('/connectors/webex/webinars', { params });
5
+ }
6
+ getWebinarById(meetingId) {
7
+ return this.axios.$get(`/connectors/webex/webinars/${meetingId}`);
8
+ }
9
+ addRegistrant(meetingId, registrant) {
10
+ return this.axios.$post(`/connectors/webex/webinars/${meetingId}/registrants`, registrant);
11
+ }
12
+ }
13
+ //# sourceMappingURL=Webex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Webex.js","sourceRoot":"","sources":["../../../../ts/api/resources/Webex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,OAAO,KAAM,SAAQ,QAAQ;IACjC,WAAW,CAAC,MAA0B;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,cAAc,CAAC,SAAiB;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,SAAS,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,aAAa,CAAC,SAAiB,EAAE,UAAkC;QACjE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,8BAA8B,SAAS,cAAc,EAAE,UAAU,CAAC,CAAC;IAC7F,CAAC;CACF","sourcesContent":["import { AddWebexRegistrantBody, GetWebinarsParams, PaginatedWebinars, WebexRegistrant } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class Webex extends Resource {\n getWebinars(params?: GetWebinarsParams): Promise<PaginatedWebinars> {\n return this.axios.$get('/connectors/webex/webinars', { params });\n }\n\n getWebinarById(meetingId: string): Promise<any> {\n return this.axios.$get(`/connectors/webex/webinars/${meetingId}`);\n }\n\n addRegistrant(meetingId: string, registrant: AddWebexRegistrantBody): Promise<WebexRegistrant> {\n return this.axios.$post(`/connectors/webex/webinars/${meetingId}/registrants`, registrant);\n }\n}\n"]}
@@ -1,11 +1,10 @@
1
1
  import { Resource } from '../Resource';
2
- import { QueryAvailableCommercialTimeSlot, QueryAvailableTimeSlot, QueryGetSpecialHoursForTeam, ReadWorkingSchedule, SpecialHours, TimeSlots, IWorkingSchedule } from '../..';
2
+ import { QueryAvailableCommercialTimeSlot, QueryAvailableTimeSlot, QueryGetSpecialHoursForTeam, ReadWorkingSchedule, SpecialHours, TimeSlots } from '../..';
3
3
  export declare class WorkingSchedule extends Resource {
4
4
  getSpecialHoursForCollaborator(idUser: number, startDate: Date, endDate: Date): Promise<SpecialHours>;
5
5
  getSpecialHoursForTeam(params: QueryGetSpecialHoursForTeam, signal?: AbortSignal): Promise<SpecialHours>;
6
6
  getPdf(id: number, modifDate?: string): Promise<Buffer>;
7
7
  get(id: number): Promise<ReadWorkingSchedule>;
8
- deleteAndCreate(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<WorkingSchedule[]>;
9
8
  getAvailableTimeSlots(params: QueryAvailableTimeSlot): Promise<TimeSlots[]>;
10
9
  getCommercialAvailableTimeSlots(params: QueryAvailableCommercialTimeSlot): Promise<TimeSlots[]>;
11
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WorkingSchedule.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/WorkingSchedule.ts"],"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C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAMrG,sBAAsB,CAAC,MAAM,EAAE,2BAA2B,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAOxG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUvD,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI7C,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAM3E,+BAA+B,CAAC,MAAM,EAAE,gCAAgC,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;CAKhG"}
@@ -23,9 +23,6 @@ export class WorkingSchedule extends Resource {
23
23
  get(id) {
24
24
  return this.axios.$get(`workingSchedule/${id}`);
25
25
  }
26
- deleteAndCreate(idUser, workingSchedules) {
27
- return this.axios.$post(`workingSchedule/delete-and-create/${idUser}`, workingSchedules);
28
- }
29
26
  getAvailableTimeSlots(params) {
30
27
  return this.axios.$get('workingSchedule/available-time-slots', {
31
28
  params,
@@ -1 +1 @@
1
- {"version":3,"file":"WorkingSchedule.js","sourceRoot":"","sources":["../../../../ts/api/resources/WorkingSchedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAWvC,MAAM,OAAO,eAAgB,SAAQ,QAAQ;IAC3C,8BAA8B,CAAC,MAAc,EAAE,SAAe,EAAE,OAAa;QAC3E,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iDAAiD,EAAE;YACxE,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;IAED,sBAAsB,CAAC,MAAmC,EAAE,MAAoB;QAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,yCAAyC,EAAE;YAChE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7B,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,SAAkB;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,MAAM,EAAE;YAClD,MAAM,EAAE,EAAE,SAAS,EAAE;YACrB,YAAY,EAAE,aAAa;YAC3B,OAAO,EAAE;gBACP,MAAM,EAAE,iBAAiB;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAED,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,eAAe,CAAC,MAAc,EAAE,gBAAgD;QAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,qCAAqC,MAAM,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAC3F,CAAC;IAED,qBAAqB,CAAC,MAA8B;QAClD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,sCAAsC,EAAE;YAC7D,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,+BAA+B,CAAC,MAAwC;QACtE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iDAAiD,EAAE;YACxE,MAAM;SACP,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport {\n QueryAvailableCommercialTimeSlot,\n QueryAvailableTimeSlot,\n QueryGetSpecialHoursForTeam,\n ReadWorkingSchedule,\n SpecialHours,\n TimeSlots,\n IWorkingSchedule\n} from '../..';\n\nexport class WorkingSchedule extends Resource {\n getSpecialHoursForCollaborator(idUser: number, startDate: Date, endDate: Date): Promise<SpecialHours> {\n return this.axios.$get('/workingSchedule/special-hours-for-collaborator', {\n params: { idUser, startDate, endDate },\n });\n }\n\n getSpecialHoursForTeam(params: QueryGetSpecialHoursForTeam, signal?: AbortSignal): Promise<SpecialHours> {\n return this.axios.$get('/workingSchedule/special-hours-for-team', {\n ...(signal ? { signal } : {}),\n params,\n });\n }\n\n getPdf(id: number, modifDate?: string): Promise<Buffer> {\n return this.axios.$get(`workingSchedule/${id}/pdf`, {\n params: { modifDate },\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/pdf',\n },\n });\n }\n\n get(id: number): Promise<ReadWorkingSchedule> {\n return this.axios.$get(`workingSchedule/${id}`);\n }\n\n deleteAndCreate(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<WorkingSchedule[]> {\n return this.axios.$post(`workingSchedule/delete-and-create/${idUser}`, workingSchedules);\n }\n\n getAvailableTimeSlots(params: QueryAvailableTimeSlot): Promise<TimeSlots[]> {\n return this.axios.$get('workingSchedule/available-time-slots', {\n params,\n });\n }\n\n getCommercialAvailableTimeSlots(params: QueryAvailableCommercialTimeSlot): Promise<TimeSlots[]> {\n return this.axios.$get('workingSchedule/commercial-available-time-slots', {\n params,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"WorkingSchedule.js","sourceRoot":"","sources":["../../../../ts/api/resources/WorkingSchedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAUvC,MAAM,OAAO,eAAgB,SAAQ,QAAQ;IAC3C,8BAA8B,CAAC,MAAc,EAAE,SAAe,EAAE,OAAa;QAC3E,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iDAAiD,EAAE;YACxE,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;IAED,sBAAsB,CAAC,MAAmC,EAAE,MAAoB;QAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,yCAAyC,EAAE;YAChE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7B,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,SAAkB;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,MAAM,EAAE;YAClD,MAAM,EAAE,EAAE,SAAS,EAAE;YACrB,YAAY,EAAE,aAAa;YAC3B,OAAO,EAAE;gBACP,MAAM,EAAE,iBAAiB;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAED,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,qBAAqB,CAAC,MAA8B;QAClD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,sCAAsC,EAAE;YAC7D,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,+BAA+B,CAAC,MAAwC;QACtE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iDAAiD,EAAE;YACxE,MAAM;SACP,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport {\n QueryAvailableCommercialTimeSlot,\n QueryAvailableTimeSlot,\n QueryGetSpecialHoursForTeam,\n ReadWorkingSchedule,\n SpecialHours,\n TimeSlots,\n} from '../..';\n\nexport class WorkingSchedule extends Resource {\n getSpecialHoursForCollaborator(idUser: number, startDate: Date, endDate: Date): Promise<SpecialHours> {\n return this.axios.$get('/workingSchedule/special-hours-for-collaborator', {\n params: { idUser, startDate, endDate },\n });\n }\n\n getSpecialHoursForTeam(params: QueryGetSpecialHoursForTeam, signal?: AbortSignal): Promise<SpecialHours> {\n return this.axios.$get('/workingSchedule/special-hours-for-team', {\n ...(signal ? { signal } : {}),\n params,\n });\n }\n\n getPdf(id: number, modifDate?: string): Promise<Buffer> {\n return this.axios.$get(`workingSchedule/${id}/pdf`, {\n params: { modifDate },\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/pdf',\n },\n });\n }\n\n get(id: number): Promise<ReadWorkingSchedule> {\n return this.axios.$get(`workingSchedule/${id}`);\n }\n\n getAvailableTimeSlots(params: QueryAvailableTimeSlot): Promise<TimeSlots[]> {\n return this.axios.$get('workingSchedule/available-time-slots', {\n params,\n });\n }\n\n getCommercialAvailableTimeSlots(params: QueryAvailableCommercialTimeSlot): Promise<TimeSlots[]> {\n return this.axios.$get('workingSchedule/commercial-available-time-slots', {\n params,\n });\n }\n}\n"]}