@silexpert/core 1.3.59 → 1.3.60

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 (239) hide show
  1. package/dist/cjs/api/resources/Subscription.d.ts +2 -2
  2. package/dist/cjs/api/resources/Subscription.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Subscription.js +3 -4
  4. package/dist/cjs/api/resources/Subscription.js.map +1 -1
  5. package/dist/cjs/api/resources/User.d.ts +2 -1
  6. package/dist/cjs/api/resources/User.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/User.js +3 -0
  8. package/dist/cjs/api/resources/User.js.map +1 -1
  9. package/dist/cjs/api/resources.d.ts +0 -4
  10. package/dist/cjs/api/resources.d.ts.map +1 -1
  11. package/dist/cjs/api/resources.js +0 -4
  12. package/dist/cjs/api/resources.js.map +1 -1
  13. package/dist/cjs/types/Enum/BalanceSheet.js +12 -12
  14. package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
  15. package/dist/cjs/types/Enum/PrestationType.js +8 -8
  16. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts +1 -0
  18. package/dist/cjs/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/commercial/RequiredDocsTypeParams.js.map +1 -1
  20. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts +40 -71
  21. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  22. package/dist/cjs/types/Interface/api/config/ConfigType.js.map +1 -1
  23. package/dist/cjs/types/Interface/api/internalInvoicing/GetLastRef.d.ts +0 -2
  24. package/dist/cjs/types/Interface/api/internalInvoicing/GetLastRef.d.ts.map +1 -1
  25. package/dist/cjs/types/Interface/api/internalInvoicing/GetLastRef.js +0 -12
  26. package/dist/cjs/types/Interface/api/internalInvoicing/GetLastRef.js.map +1 -1
  27. package/dist/cjs/types/Interface/api/user/Query.d.ts +9 -0
  28. package/dist/cjs/types/Interface/api/user/Query.d.ts.map +1 -1
  29. package/dist/cjs/types/Interface/api/user/Query.js +30 -1
  30. package/dist/cjs/types/Interface/api/user/Query.js.map +1 -1
  31. package/dist/cjs/types/Interface/models/IApiError.d.ts +0 -1
  32. package/dist/cjs/types/Interface/models/IApiError.d.ts.map +1 -1
  33. package/dist/cjs/types/Interface/models/IApiError.js +0 -2
  34. package/dist/cjs/types/Interface/models/IApiError.js.map +1 -1
  35. package/dist/cjs/types/index.d.ts +0 -10
  36. package/dist/cjs/types/index.d.ts.map +1 -1
  37. package/dist/cjs/types/index.js +0 -11
  38. package/dist/cjs/types/index.js.map +1 -1
  39. package/dist/cjs/utils/index.d.ts +0 -1
  40. package/dist/cjs/utils/index.d.ts.map +1 -1
  41. package/dist/cjs/utils/index.js +0 -1
  42. package/dist/cjs/utils/index.js.map +1 -1
  43. package/dist/cjs/utils/payment.d.ts +1 -0
  44. package/dist/cjs/utils/payment.d.ts.map +1 -1
  45. package/dist/cjs/utils/payment.js.map +1 -1
  46. package/dist/cjs/utils/prestation.d.ts +2 -1
  47. package/dist/cjs/utils/prestation.d.ts.map +1 -1
  48. package/dist/cjs/utils/prestation.js +19 -4
  49. package/dist/cjs/utils/prestation.js.map +1 -1
  50. package/dist/cjs/utils/vat/utils.d.ts +2 -0
  51. package/dist/cjs/utils/vat/utils.d.ts.map +1 -1
  52. package/dist/cjs/utils/vat/utils.js +10 -0
  53. package/dist/cjs/utils/vat/utils.js.map +1 -1
  54. package/dist/mjs/api/resources/Subscription.d.ts +2 -2
  55. package/dist/mjs/api/resources/Subscription.d.ts.map +1 -1
  56. package/dist/mjs/api/resources/Subscription.js +3 -4
  57. package/dist/mjs/api/resources/Subscription.js.map +1 -1
  58. package/dist/mjs/api/resources/User.d.ts +2 -1
  59. package/dist/mjs/api/resources/User.d.ts.map +1 -1
  60. package/dist/mjs/api/resources/User.js +6 -0
  61. package/dist/mjs/api/resources/User.js.map +1 -1
  62. package/dist/mjs/api/resources.d.ts +0 -4
  63. package/dist/mjs/api/resources.d.ts.map +1 -1
  64. package/dist/mjs/api/resources.js +0 -4
  65. package/dist/mjs/api/resources.js.map +1 -1
  66. package/dist/mjs/types/Enum/BalanceSheet.js +12 -12
  67. package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
  68. package/dist/mjs/types/Enum/PrestationType.js +8 -8
  69. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  70. package/dist/mjs/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts +1 -0
  71. package/dist/mjs/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts.map +1 -1
  72. package/dist/mjs/types/Interface/api/commercial/RequiredDocsTypeParams.js.map +1 -1
  73. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts +40 -71
  74. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  75. package/dist/mjs/types/Interface/api/config/ConfigType.js.map +1 -1
  76. package/dist/mjs/types/Interface/api/internalInvoicing/GetLastRef.d.ts +0 -2
  77. package/dist/mjs/types/Interface/api/internalInvoicing/GetLastRef.d.ts.map +1 -1
  78. package/dist/mjs/types/Interface/api/internalInvoicing/GetLastRef.js +0 -14
  79. package/dist/mjs/types/Interface/api/internalInvoicing/GetLastRef.js.map +1 -1
  80. package/dist/mjs/types/Interface/api/user/Query.d.ts +9 -0
  81. package/dist/mjs/types/Interface/api/user/Query.d.ts.map +1 -1
  82. package/dist/mjs/types/Interface/api/user/Query.js +28 -0
  83. package/dist/mjs/types/Interface/api/user/Query.js.map +1 -1
  84. package/dist/mjs/types/Interface/models/IApiError.d.ts +0 -1
  85. package/dist/mjs/types/Interface/models/IApiError.d.ts.map +1 -1
  86. package/dist/mjs/types/Interface/models/IApiError.js +0 -2
  87. package/dist/mjs/types/Interface/models/IApiError.js.map +1 -1
  88. package/dist/mjs/types/index.d.ts +0 -10
  89. package/dist/mjs/types/index.d.ts.map +1 -1
  90. package/dist/mjs/types/index.js +0 -11
  91. package/dist/mjs/types/index.js.map +1 -1
  92. package/dist/mjs/utils/index.d.ts +0 -1
  93. package/dist/mjs/utils/index.d.ts.map +1 -1
  94. package/dist/mjs/utils/index.js +0 -1
  95. package/dist/mjs/utils/index.js.map +1 -1
  96. package/dist/mjs/utils/payment.d.ts +1 -0
  97. package/dist/mjs/utils/payment.d.ts.map +1 -1
  98. package/dist/mjs/utils/payment.js.map +1 -1
  99. package/dist/mjs/utils/prestation.d.ts +2 -1
  100. package/dist/mjs/utils/prestation.d.ts.map +1 -1
  101. package/dist/mjs/utils/prestation.js +17 -4
  102. package/dist/mjs/utils/prestation.js.map +1 -1
  103. package/dist/mjs/utils/vat/utils.d.ts +2 -0
  104. package/dist/mjs/utils/vat/utils.d.ts.map +1 -1
  105. package/dist/mjs/utils/vat/utils.js +9 -0
  106. package/dist/mjs/utils/vat/utils.js.map +1 -1
  107. package/package.json +1 -1
  108. package/ts/api/resources/Subscription.ts +5 -15
  109. package/ts/api/resources/User.ts +8 -0
  110. package/ts/api/resources.ts +0 -4
  111. package/ts/types/Enum/BalanceSheet.ts +12 -12
  112. package/ts/types/Enum/PrestationType.ts +8 -8
  113. package/ts/types/Interface/api/commercial/RequiredDocsTypeParams.ts +1 -0
  114. package/ts/types/Interface/api/config/ConfigType.ts +39 -75
  115. package/ts/types/Interface/api/internalInvoicing/GetLastRef.ts +0 -10
  116. package/ts/types/Interface/api/user/Query.ts +26 -0
  117. package/ts/types/Interface/models/IApiError.ts +0 -3
  118. package/ts/types/index.ts +0 -11
  119. package/ts/utils/index.ts +0 -1
  120. package/ts/utils/payment.ts +1 -0
  121. package/ts/utils/prestation.ts +30 -5
  122. package/ts/utils/vat/utils.ts +10 -1
  123. package/dist/cjs/api/resources/PromoCode.d.ts +0 -14
  124. package/dist/cjs/api/resources/PromoCode.d.ts.map +0 -1
  125. package/dist/cjs/api/resources/PromoCode.js +0 -35
  126. package/dist/cjs/api/resources/PromoCode.js.map +0 -1
  127. package/dist/cjs/api/resources/SocietyPromoCode.d.ts +0 -8
  128. package/dist/cjs/api/resources/SocietyPromoCode.d.ts.map +0 -1
  129. package/dist/cjs/api/resources/SocietyPromoCode.js +0 -17
  130. package/dist/cjs/api/resources/SocietyPromoCode.js.map +0 -1
  131. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts +0 -14
  132. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +0 -1
  133. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +0 -85
  134. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +0 -1
  135. package/dist/cjs/types/Interface/api/promoCode/CreatePromoCode.d.ts +0 -12
  136. package/dist/cjs/types/Interface/api/promoCode/CreatePromoCode.d.ts.map +0 -1
  137. package/dist/cjs/types/Interface/api/promoCode/CreatePromoCode.js +0 -53
  138. package/dist/cjs/types/Interface/api/promoCode/CreatePromoCode.js.map +0 -1
  139. package/dist/cjs/types/Interface/api/promoCode/QueryDefaultPromotion.d.ts +0 -8
  140. package/dist/cjs/types/Interface/api/promoCode/QueryDefaultPromotion.d.ts.map +0 -1
  141. package/dist/cjs/types/Interface/api/promoCode/QueryDefaultPromotion.js +0 -49
  142. package/dist/cjs/types/Interface/api/promoCode/QueryDefaultPromotion.js.map +0 -1
  143. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.d.ts +0 -5
  144. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.d.ts.map +0 -1
  145. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.js +0 -34
  146. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.js.map +0 -1
  147. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts +0 -7
  148. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts.map +0 -1
  149. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.js +0 -3
  150. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.js.map +0 -1
  151. package/dist/cjs/types/Interface/api/promoCode/UpdatePromoCode.d.ts +0 -12
  152. package/dist/cjs/types/Interface/api/promoCode/UpdatePromoCode.d.ts.map +0 -1
  153. package/dist/cjs/types/Interface/api/promoCode/UpdatePromoCode.js +0 -53
  154. package/dist/cjs/types/Interface/api/promoCode/UpdatePromoCode.js.map +0 -1
  155. package/dist/cjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.d.ts +0 -5
  156. package/dist/cjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.d.ts.map +0 -1
  157. package/dist/cjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.js +0 -25
  158. package/dist/cjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.js.map +0 -1
  159. package/dist/cjs/types/Interface/models/IDefaultPromotion.d.ts +0 -17
  160. package/dist/cjs/types/Interface/models/IDefaultPromotion.d.ts.map +0 -1
  161. package/dist/cjs/types/Interface/models/IDefaultPromotion.js +0 -3
  162. package/dist/cjs/types/Interface/models/IDefaultPromotion.js.map +0 -1
  163. package/dist/cjs/types/Interface/models/IPromoCode.d.ts +0 -15
  164. package/dist/cjs/types/Interface/models/IPromoCode.d.ts.map +0 -1
  165. package/dist/cjs/types/Interface/models/IPromoCode.js +0 -3
  166. package/dist/cjs/types/Interface/models/IPromoCode.js.map +0 -1
  167. package/dist/cjs/types/Interface/models/ISocietyPromoCode.d.ts +0 -8
  168. package/dist/cjs/types/Interface/models/ISocietyPromoCode.d.ts.map +0 -1
  169. package/dist/cjs/types/Interface/models/ISocietyPromoCode.js +0 -3
  170. package/dist/cjs/types/Interface/models/ISocietyPromoCode.js.map +0 -1
  171. package/dist/cjs/utils/subscription.d.ts +0 -21
  172. package/dist/cjs/utils/subscription.d.ts.map +0 -1
  173. package/dist/cjs/utils/subscription.js +0 -97
  174. package/dist/cjs/utils/subscription.js.map +0 -1
  175. package/dist/mjs/api/resources/PromoCode.d.ts +0 -14
  176. package/dist/mjs/api/resources/PromoCode.d.ts.map +0 -1
  177. package/dist/mjs/api/resources/PromoCode.js +0 -31
  178. package/dist/mjs/api/resources/PromoCode.js.map +0 -1
  179. package/dist/mjs/api/resources/SocietyPromoCode.d.ts +0 -8
  180. package/dist/mjs/api/resources/SocietyPromoCode.d.ts.map +0 -1
  181. package/dist/mjs/api/resources/SocietyPromoCode.js +0 -13
  182. package/dist/mjs/api/resources/SocietyPromoCode.js.map +0 -1
  183. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts +0 -14
  184. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +0 -1
  185. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +0 -93
  186. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +0 -1
  187. package/dist/mjs/types/Interface/api/promoCode/CreatePromoCode.d.ts +0 -12
  188. package/dist/mjs/types/Interface/api/promoCode/CreatePromoCode.d.ts.map +0 -1
  189. package/dist/mjs/types/Interface/api/promoCode/CreatePromoCode.js +0 -58
  190. package/dist/mjs/types/Interface/api/promoCode/CreatePromoCode.js.map +0 -1
  191. package/dist/mjs/types/Interface/api/promoCode/QueryDefaultPromotion.d.ts +0 -8
  192. package/dist/mjs/types/Interface/api/promoCode/QueryDefaultPromotion.d.ts.map +0 -1
  193. package/dist/mjs/types/Interface/api/promoCode/QueryDefaultPromotion.js +0 -50
  194. package/dist/mjs/types/Interface/api/promoCode/QueryDefaultPromotion.js.map +0 -1
  195. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.d.ts +0 -5
  196. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.d.ts.map +0 -1
  197. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.js +0 -28
  198. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.js.map +0 -1
  199. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts +0 -7
  200. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts.map +0 -1
  201. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.js +0 -2
  202. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.js.map +0 -1
  203. package/dist/mjs/types/Interface/api/promoCode/UpdatePromoCode.d.ts +0 -12
  204. package/dist/mjs/types/Interface/api/promoCode/UpdatePromoCode.d.ts.map +0 -1
  205. package/dist/mjs/types/Interface/api/promoCode/UpdatePromoCode.js +0 -58
  206. package/dist/mjs/types/Interface/api/promoCode/UpdatePromoCode.js.map +0 -1
  207. package/dist/mjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.d.ts +0 -5
  208. package/dist/mjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.d.ts.map +0 -1
  209. package/dist/mjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.js +0 -23
  210. package/dist/mjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.js.map +0 -1
  211. package/dist/mjs/types/Interface/models/IDefaultPromotion.d.ts +0 -17
  212. package/dist/mjs/types/Interface/models/IDefaultPromotion.d.ts.map +0 -1
  213. package/dist/mjs/types/Interface/models/IDefaultPromotion.js +0 -2
  214. package/dist/mjs/types/Interface/models/IDefaultPromotion.js.map +0 -1
  215. package/dist/mjs/types/Interface/models/IPromoCode.d.ts +0 -15
  216. package/dist/mjs/types/Interface/models/IPromoCode.d.ts.map +0 -1
  217. package/dist/mjs/types/Interface/models/IPromoCode.js +0 -2
  218. package/dist/mjs/types/Interface/models/IPromoCode.js.map +0 -1
  219. package/dist/mjs/types/Interface/models/ISocietyPromoCode.d.ts +0 -8
  220. package/dist/mjs/types/Interface/models/ISocietyPromoCode.d.ts.map +0 -1
  221. package/dist/mjs/types/Interface/models/ISocietyPromoCode.js +0 -2
  222. package/dist/mjs/types/Interface/models/ISocietyPromoCode.js.map +0 -1
  223. package/dist/mjs/utils/subscription.d.ts +0 -21
  224. package/dist/mjs/utils/subscription.d.ts.map +0 -1
  225. package/dist/mjs/utils/subscription.js +0 -92
  226. package/dist/mjs/utils/subscription.js.map +0 -1
  227. package/ts/api/resources/PromoCode.ts +0 -50
  228. package/ts/api/resources/SocietyPromoCode.ts +0 -16
  229. package/ts/types/Interface/api/promoCode/CreateDefaultPromoCode.ts +0 -59
  230. package/ts/types/Interface/api/promoCode/CreatePromoCode.ts +0 -30
  231. package/ts/types/Interface/api/promoCode/QueryDefaultPromotion.ts +0 -30
  232. package/ts/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.ts +0 -14
  233. package/ts/types/Interface/api/promoCode/ReadDefaultPromotion.ts +0 -7
  234. package/ts/types/Interface/api/promoCode/UpdatePromoCode.ts +0 -30
  235. package/ts/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.ts +0 -9
  236. package/ts/types/Interface/models/IDefaultPromotion.ts +0 -16
  237. package/ts/types/Interface/models/IPromoCode.ts +0 -14
  238. package/ts/types/Interface/models/ISocietyPromoCode.ts +0 -7
  239. package/ts/utils/subscription.ts +0 -124
@@ -1,30 +0,0 @@
1
- import { ApiPropertyOptional } from '../../../../utils';
2
-
3
- export class UpdatePromoCode {
4
- @ApiPropertyOptional()
5
- name?: string;
6
-
7
- @ApiPropertyOptional()
8
- microMonthly?: string | null;
9
-
10
- @ApiPropertyOptional()
11
- microMonthlyDescription?: string | null;
12
-
13
- @ApiPropertyOptional()
14
- microYearly?: string | null;
15
-
16
- @ApiPropertyOptional()
17
- microYearlyDescription?: string | null;
18
-
19
- @ApiPropertyOptional()
20
- businessMonthly?: string | null;
21
-
22
- @ApiPropertyOptional()
23
- businessMonthlyDescription?: string | null;
24
-
25
- @ApiPropertyOptional()
26
- businessYearly?: string | null;
27
-
28
- @ApiPropertyOptional()
29
- businessYearlyDescription?: string | null;
30
- }
@@ -1,9 +0,0 @@
1
- import { ApiProperty } from '../../../../utils';
2
-
3
- export class CreateSocietyPromoCode {
4
- @ApiProperty()
5
- idSociety: number;
6
-
7
- @ApiProperty()
8
- codeName: string;
9
- }
@@ -1,16 +0,0 @@
1
- export interface IDefaultPromotion {
2
- id?: number;
3
- label: string;
4
- startDate?: Date | null;
5
- endDate?: Date | null;
6
- isYearly: boolean;
7
- isMonthly: boolean;
8
- isMicroPlan: boolean;
9
- isCashBasedBusinessPlan: boolean;
10
- isAccrualBusinessPlan: boolean;
11
- isTest: boolean;
12
- metadata?: string | null;
13
- idStripeCoupon: string;
14
- createdAt?: Date | null;
15
- updatedAt?: Date | null;
16
- }
@@ -1,14 +0,0 @@
1
- export interface IPromoCode {
2
- id?: number;
3
- name: string;
4
- microMonthly?: string | null;
5
- microMonthlyDescription?: string | null;
6
- microYearly?: string | null;
7
- microYearlyDescription?: string | null;
8
- businessMonthly?: string | null;
9
- businessMonthlyDescription?: string | null;
10
- businessYearly?: string | null;
11
- businessYearlyDescription?: string | null;
12
- createdAt?: Date | null;
13
- updatedAt?: Date | null;
14
- }
@@ -1,7 +0,0 @@
1
- export interface ISocietyPromoCode {
2
- id?: number;
3
- idSociety: number;
4
- idPromoCode: number;
5
- createdAt?: Date | null;
6
- updatedAt?: Date | null;
7
- }
@@ -1,124 +0,0 @@
1
- import { ComptaType } from '../types/Enum/ComptaType';
2
- import { LegalFormTypeEnum } from '../types/Enum/LegalForm';
3
- import { TaxSystem } from '../types/Enum/TaxSystem';
4
-
5
- interface OfferParams {
6
- idLegalForm: LegalFormTypeEnum | null;
7
- idComptaType: ComptaType | null;
8
- idTaxSystem: TaxSystem | null;
9
- isYearly?: boolean;
10
- }
11
-
12
- interface StripeOffer {
13
- name: string;
14
- isYearly: boolean;
15
- isMicro: boolean;
16
- key: string;
17
- isCashBased: boolean;
18
- isSocietyTax?: boolean;
19
- }
20
-
21
- const isTestKey: boolean = ['dev', 'staging', 'development', 'test', 'gitlab'].includes(process.env.NODE_ENV ?? '');
22
-
23
- // AE | Annuel | Forfait Bilan complet
24
- const ID_SUBSCRIPTION_MICRO_ANNUAL = !isTestKey ? 'price_1PFyHHIHo1jEedppVjwrqPr1' : 'price_1MRyi1IHo1jEedppRKdY06Re';
25
-
26
- // AE | Mensuel | Forfait Bilan complet
27
- const ID_SUBSCRIPTION_MICRO_MENSUAL = !isTestKey ? 'price_1LBJ4xIHo1jEedppylxr3fFa' : 'price_1LBI57IHo1jEedpppnxskfgv';
28
-
29
- // Entreprise | Annuel | Forfait entreprise à l'IR
30
- const ID_SUBSCRIPTION_INCOME_TAX_ANNUAL = !isTestKey
31
- ? 'price_1PFyG8IHo1jEedpp73TUxiJd'
32
- : 'price_1MRyiJIHo1jEedppUe7MnPtW';
33
-
34
- // Entreprise | Mensuel | Forfaitentreprise à l'IR
35
- const ID_SUBSCRIPTION_INCOME_TAX_MENSUAL = !isTestKey
36
- ? 'price_1LBJ5YIHo1jEedppzwTErh9M'
37
- : 'price_1LBIA3IHo1jEedpp2taeQ7yW';
38
-
39
- // Entreprise | Annuel | Forfait entreprise à l'IS
40
- const ID_SUBSCRIPTION_SOCIETY_TAX_ANNUAL = !isTestKey
41
- ? 'price_1PFwE3IHo1jEedpphgWrgwkA'
42
- : 'price_1MRyiWIHo1jEedppp5tnksZe';
43
-
44
- // Entreprise | Mensuel | Forfait entreprise à l'IS
45
- const ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL = !isTestKey
46
- ? 'price_1LBJ69IHo1jEedppAWLeOk3I'
47
- : 'price_1LBIB7IHo1jEedppocxyc1ft';
48
-
49
- export const stripeTaxRate = isTestKey ? 'txr_1I9X9MIHo1jEedppM0DqL4iE' : 'txr_1I9X5wIHo1jEedppYttGFc0N';
50
-
51
- const list: StripeOffer[] = [
52
- {
53
- name: 'Offre auto-entrepreneur',
54
- isYearly: true,
55
- isMicro: true,
56
- key: ID_SUBSCRIPTION_MICRO_ANNUAL,
57
- isCashBased: true,
58
- isSocietyTax: false,
59
- },
60
- {
61
- name: 'Offre auto-entrepreneur',
62
- isYearly: false,
63
- isMicro: true,
64
- key: ID_SUBSCRIPTION_MICRO_MENSUAL,
65
- isCashBased: true,
66
- isSocietyTax: false,
67
- },
68
- {
69
- name: 'Offre entreprise IS',
70
- isYearly: true,
71
- isMicro: false,
72
- key: ID_SUBSCRIPTION_SOCIETY_TAX_ANNUAL,
73
- isCashBased: false,
74
- isSocietyTax: true,
75
- },
76
- {
77
- name: 'Offre entreprise IS',
78
- isMicro: false,
79
- isYearly: false,
80
- key: ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL,
81
- isCashBased: false,
82
- isSocietyTax: true,
83
- },
84
- {
85
- name: 'Offre entreprise IR',
86
- isMicro: false,
87
- isYearly: true,
88
- isCashBased: true,
89
- isSocietyTax: false,
90
- key: ID_SUBSCRIPTION_INCOME_TAX_ANNUAL,
91
- },
92
- {
93
- name: 'Offre entreprise IR',
94
- isMicro: false,
95
- isYearly: false,
96
- key: ID_SUBSCRIPTION_INCOME_TAX_MENSUAL,
97
- isCashBased: true,
98
- isSocietyTax: false,
99
- },
100
- ];
101
-
102
- export function getDefaultOffer(params: OfferParams): StripeOffer {
103
- const { idLegalForm, idComptaType, isYearly, idTaxSystem } = params;
104
-
105
- const isMicro = LegalFormTypeEnum.AUTO_ENTREPRENEUR === idLegalForm;
106
- const isCashBased = idComptaType
107
- ? [ComptaType.CASH_BASED, ComptaType.CASH_BASED_ASSISTANCE, ComptaType.CASH_BASED_SEIZURE].includes(idComptaType)
108
- : false;
109
- const isSocietyTax = idTaxSystem === TaxSystem.IS;
110
-
111
- const newPlan = list.find(
112
- (l) =>
113
- l.isMicro === isMicro &&
114
- l.isYearly === isYearly &&
115
- l.isCashBased === isCashBased &&
116
- l.isSocietyTax === isSocietyTax,
117
- );
118
-
119
- if (newPlan) {
120
- return newPlan;
121
- }
122
-
123
- return isYearly ? list[2] : list[3];
124
- }