@silexpert/core 1.3.66 → 1.3.67-0

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 (103) hide show
  1. package/dist/cjs/api/resources/Refund.d.ts +21 -1
  2. package/dist/cjs/api/resources/Refund.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Refund.js +12 -0
  4. package/dist/cjs/api/resources/Refund.js.map +1 -1
  5. package/dist/cjs/types/Enum/PaymentMethod.d.ts +10 -29
  6. package/dist/cjs/types/Enum/PaymentMethod.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/PaymentMethod.js +11 -31
  8. package/dist/cjs/types/Enum/PaymentMethod.js.map +1 -1
  9. package/dist/cjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts +1 -2
  10. package/dist/cjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts.map +1 -1
  11. package/dist/cjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js +0 -6
  12. package/dist/cjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js.map +1 -1
  13. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +11 -0
  14. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +1 -0
  15. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js +51 -0
  16. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js.map +1 -0
  17. package/dist/cjs/types/Interface/api/stripe/Create.d.ts +0 -3
  18. package/dist/cjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/stripe/Create.js +1 -10
  20. package/dist/cjs/types/Interface/api/stripe/Create.js.map +1 -1
  21. package/dist/cjs/types/Interface/models/IAppNotification.d.ts +3 -3
  22. package/dist/cjs/types/Interface/models/IAppNotification.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/models/IAppNotification.js.map +1 -1
  24. package/dist/cjs/types/Interface/models/IMobileNotificationLog.d.ts +2 -4
  25. package/dist/cjs/types/Interface/models/IMobileNotificationLog.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/models/IMobileNotificationLog.js.map +1 -1
  27. package/dist/cjs/types/Interface/models/IPayment.d.ts +0 -2
  28. package/dist/cjs/types/Interface/models/IPayment.d.ts.map +1 -1
  29. package/dist/cjs/types/Interface/models/IPayment.js.map +1 -1
  30. package/dist/cjs/types/index.d.ts +1 -2
  31. package/dist/cjs/types/index.d.ts.map +1 -1
  32. package/dist/cjs/types/index.js +1 -2
  33. package/dist/cjs/types/index.js.map +1 -1
  34. package/dist/cjs/utils/subscription.d.ts +21 -0
  35. package/dist/cjs/utils/subscription.d.ts.map +1 -0
  36. package/dist/cjs/utils/subscription.js +97 -0
  37. package/dist/cjs/utils/subscription.js.map +1 -0
  38. package/dist/mjs/api/resources/Refund.d.ts +21 -1
  39. package/dist/mjs/api/resources/Refund.d.ts.map +1 -1
  40. package/dist/mjs/api/resources/Refund.js +12 -0
  41. package/dist/mjs/api/resources/Refund.js.map +1 -1
  42. package/dist/mjs/types/Enum/PaymentMethod.d.ts +10 -29
  43. package/dist/mjs/types/Enum/PaymentMethod.d.ts.map +1 -1
  44. package/dist/mjs/types/Enum/PaymentMethod.js +10 -30
  45. package/dist/mjs/types/Enum/PaymentMethod.js.map +1 -1
  46. package/dist/mjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts +1 -2
  47. package/dist/mjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts.map +1 -1
  48. package/dist/mjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js +1 -8
  49. package/dist/mjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js.map +1 -1
  50. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +11 -0
  51. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +1 -0
  52. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js +53 -0
  53. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js.map +1 -0
  54. package/dist/mjs/types/Interface/api/stripe/Create.d.ts +0 -3
  55. package/dist/mjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  56. package/dist/mjs/types/Interface/api/stripe/Create.js +0 -9
  57. package/dist/mjs/types/Interface/api/stripe/Create.js.map +1 -1
  58. package/dist/mjs/types/Interface/models/IAppNotification.d.ts +3 -3
  59. package/dist/mjs/types/Interface/models/IAppNotification.d.ts.map +1 -1
  60. package/dist/mjs/types/Interface/models/IAppNotification.js.map +1 -1
  61. package/dist/mjs/types/Interface/models/IMobileNotificationLog.d.ts +2 -4
  62. package/dist/mjs/types/Interface/models/IMobileNotificationLog.d.ts.map +1 -1
  63. package/dist/mjs/types/Interface/models/IMobileNotificationLog.js.map +1 -1
  64. package/dist/mjs/types/Interface/models/IPayment.d.ts +0 -2
  65. package/dist/mjs/types/Interface/models/IPayment.d.ts.map +1 -1
  66. package/dist/mjs/types/Interface/models/IPayment.js.map +1 -1
  67. package/dist/mjs/types/index.d.ts +1 -2
  68. package/dist/mjs/types/index.d.ts.map +1 -1
  69. package/dist/mjs/types/index.js +1 -2
  70. package/dist/mjs/types/index.js.map +1 -1
  71. package/dist/mjs/utils/subscription.d.ts +21 -0
  72. package/dist/mjs/utils/subscription.d.ts.map +1 -0
  73. package/dist/mjs/utils/subscription.js +92 -0
  74. package/dist/mjs/utils/subscription.js.map +1 -0
  75. package/package.json +1 -1
  76. package/ts/api/resources/Refund.ts +17 -1
  77. package/ts/types/Enum/PaymentMethod.ts +10 -30
  78. package/ts/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.ts +2 -7
  79. package/ts/types/Interface/api/refund/QueryRefundPaginated.ts +32 -0
  80. package/ts/types/Interface/api/stripe/Create.ts +0 -7
  81. package/ts/types/Interface/models/IAppNotification.ts +3 -3
  82. package/ts/types/Interface/models/IMobileNotificationLog.ts +2 -4
  83. package/ts/types/Interface/models/IPayment.ts +1 -3
  84. package/ts/types/index.ts +1 -2
  85. package/ts/utils/subscription.ts +124 -0
  86. package/dist/cjs/types/Enum/PaymentAttempt.d.ts +0 -6
  87. package/dist/cjs/types/Enum/PaymentAttempt.d.ts.map +0 -1
  88. package/dist/cjs/types/Enum/PaymentAttempt.js +0 -10
  89. package/dist/cjs/types/Enum/PaymentAttempt.js.map +0 -1
  90. package/dist/cjs/types/Interface/models/IPaymentAttempt.d.ts +0 -15
  91. package/dist/cjs/types/Interface/models/IPaymentAttempt.d.ts.map +0 -1
  92. package/dist/cjs/types/Interface/models/IPaymentAttempt.js +0 -3
  93. package/dist/cjs/types/Interface/models/IPaymentAttempt.js.map +0 -1
  94. package/dist/mjs/types/Enum/PaymentAttempt.d.ts +0 -6
  95. package/dist/mjs/types/Enum/PaymentAttempt.d.ts.map +0 -1
  96. package/dist/mjs/types/Enum/PaymentAttempt.js +0 -7
  97. package/dist/mjs/types/Enum/PaymentAttempt.js.map +0 -1
  98. package/dist/mjs/types/Interface/models/IPaymentAttempt.d.ts +0 -15
  99. package/dist/mjs/types/Interface/models/IPaymentAttempt.d.ts.map +0 -1
  100. package/dist/mjs/types/Interface/models/IPaymentAttempt.js +0 -2
  101. package/dist/mjs/types/Interface/models/IPaymentAttempt.js.map +0 -1
  102. package/ts/types/Enum/PaymentAttempt.ts +0 -5
  103. package/ts/types/Interface/models/IPaymentAttempt.ts +0 -16
@@ -0,0 +1,92 @@
1
+ import { ComptaType } from '../types/Enum/ComptaType';
2
+ import { LegalFormTypeEnum } from '../types/Enum/LegalForm';
3
+ import { TaxSystem } from '../types/Enum/TaxSystem';
4
+ const isTestKey = ['dev', 'staging', 'development', 'test', 'gitlab'].includes(process.env.NODE_ENV ?? '');
5
+ // AE | Annuel | Forfait Bilan complet
6
+ const ID_SUBSCRIPTION_MICRO_ANNUAL = !isTestKey ? 'price_1PFyHHIHo1jEedppVjwrqPr1' : 'price_1MRyi1IHo1jEedppRKdY06Re';
7
+ // AE | Mensuel | Forfait Bilan complet
8
+ const ID_SUBSCRIPTION_MICRO_MENSUAL = !isTestKey ? 'price_1LBJ4xIHo1jEedppylxr3fFa' : 'price_1LBI57IHo1jEedpppnxskfgv';
9
+ // Entreprise | Annuel | Forfait entreprise à l'IR
10
+ const ID_SUBSCRIPTION_INCOME_TAX_ANNUAL = !isTestKey
11
+ ? 'price_1PFyG8IHo1jEedpp73TUxiJd'
12
+ : 'price_1MRyiJIHo1jEedppUe7MnPtW';
13
+ // Entreprise | Mensuel | Forfaitentreprise à l'IR
14
+ const ID_SUBSCRIPTION_INCOME_TAX_MENSUAL = !isTestKey
15
+ ? 'price_1LBJ5YIHo1jEedppzwTErh9M'
16
+ : 'price_1LBIA3IHo1jEedpp2taeQ7yW';
17
+ // Entreprise | Annuel | Forfait entreprise à l'IS
18
+ const ID_SUBSCRIPTION_SOCIETY_TAX_ANNUAL = !isTestKey
19
+ ? 'price_1PFwE3IHo1jEedpphgWrgwkA'
20
+ : 'price_1MRyiWIHo1jEedppp5tnksZe';
21
+ // Entreprise | Mensuel | Forfait entreprise à l'IS
22
+ const ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL = !isTestKey
23
+ ? 'price_1LBJ69IHo1jEedppAWLeOk3I'
24
+ : 'price_1LBIB7IHo1jEedppocxyc1ft';
25
+ export const stripeTaxRate = isTestKey ? 'txr_1I9X9MIHo1jEedppM0DqL4iE' : 'txr_1I9X5wIHo1jEedppYttGFc0N';
26
+ const list = [
27
+ {
28
+ name: 'Offre auto-entrepreneur',
29
+ isYearly: true,
30
+ isMicro: true,
31
+ key: ID_SUBSCRIPTION_MICRO_ANNUAL,
32
+ isCashBased: true,
33
+ isSocietyTax: false,
34
+ },
35
+ {
36
+ name: 'Offre auto-entrepreneur',
37
+ isYearly: false,
38
+ isMicro: true,
39
+ key: ID_SUBSCRIPTION_MICRO_MENSUAL,
40
+ isCashBased: true,
41
+ isSocietyTax: false,
42
+ },
43
+ {
44
+ name: 'Offre entreprise IS',
45
+ isYearly: true,
46
+ isMicro: false,
47
+ key: ID_SUBSCRIPTION_SOCIETY_TAX_ANNUAL,
48
+ isCashBased: false,
49
+ isSocietyTax: true,
50
+ },
51
+ {
52
+ name: 'Offre entreprise IS',
53
+ isMicro: false,
54
+ isYearly: false,
55
+ key: ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL,
56
+ isCashBased: false,
57
+ isSocietyTax: true,
58
+ },
59
+ {
60
+ name: 'Offre entreprise IR',
61
+ isMicro: false,
62
+ isYearly: true,
63
+ isCashBased: true,
64
+ isSocietyTax: false,
65
+ key: ID_SUBSCRIPTION_INCOME_TAX_ANNUAL,
66
+ },
67
+ {
68
+ name: 'Offre entreprise IR',
69
+ isMicro: false,
70
+ isYearly: false,
71
+ key: ID_SUBSCRIPTION_INCOME_TAX_MENSUAL,
72
+ isCashBased: true,
73
+ isSocietyTax: false,
74
+ },
75
+ ];
76
+ export function getDefaultOffer(params) {
77
+ const { idLegalForm, idComptaType, isYearly, idTaxSystem } = params;
78
+ const isMicro = LegalFormTypeEnum.AUTO_ENTREPRENEUR === idLegalForm;
79
+ const isCashBased = idComptaType
80
+ ? [ComptaType.CASH_BASED, ComptaType.CASH_BASED_ASSISTANCE, ComptaType.CASH_BASED_SEIZURE].includes(idComptaType)
81
+ : false;
82
+ const isSocietyTax = idTaxSystem === TaxSystem.IS;
83
+ const newPlan = list.find((l) => l.isMicro === isMicro &&
84
+ l.isYearly === isYearly &&
85
+ l.isCashBased === isCashBased &&
86
+ l.isSocietyTax === isSocietyTax);
87
+ if (newPlan) {
88
+ return newPlan;
89
+ }
90
+ return isYearly ? list[2] : list[3];
91
+ }
92
+ //# sourceMappingURL=subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../ts/utils/subscription.ts"],"names":[],"mappings":"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","sourcesContent":["import { ComptaType } from '../types/Enum/ComptaType';\nimport { LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport { TaxSystem } from '../types/Enum/TaxSystem';\n\ninterface OfferParams {\n idLegalForm: LegalFormTypeEnum | null;\n idComptaType: ComptaType | null;\n idTaxSystem: TaxSystem | null;\n isYearly?: boolean;\n}\n\ninterface StripeOffer {\n name: string;\n isYearly: boolean;\n isMicro: boolean;\n key: string;\n isCashBased: boolean;\n isSocietyTax?: boolean;\n}\n\nconst isTestKey: boolean = ['dev', 'staging', 'development', 'test', 'gitlab'].includes(process.env.NODE_ENV ?? '');\n\n// AE | Annuel | Forfait Bilan complet\nconst ID_SUBSCRIPTION_MICRO_ANNUAL = !isTestKey ? 'price_1PFyHHIHo1jEedppVjwrqPr1' : 'price_1MRyi1IHo1jEedppRKdY06Re';\n\n// AE | Mensuel | Forfait Bilan complet\nconst ID_SUBSCRIPTION_MICRO_MENSUAL = !isTestKey ? 'price_1LBJ4xIHo1jEedppylxr3fFa' : 'price_1LBI57IHo1jEedpppnxskfgv';\n\n// Entreprise | Annuel | Forfait entreprise à l'IR\nconst ID_SUBSCRIPTION_INCOME_TAX_ANNUAL = !isTestKey\n ? 'price_1PFyG8IHo1jEedpp73TUxiJd'\n : 'price_1MRyiJIHo1jEedppUe7MnPtW';\n\n// Entreprise | Mensuel | Forfaitentreprise à l'IR\nconst ID_SUBSCRIPTION_INCOME_TAX_MENSUAL = !isTestKey\n ? 'price_1LBJ5YIHo1jEedppzwTErh9M'\n : 'price_1LBIA3IHo1jEedpp2taeQ7yW';\n\n// Entreprise | Annuel | Forfait entreprise à l'IS\nconst ID_SUBSCRIPTION_SOCIETY_TAX_ANNUAL = !isTestKey\n ? 'price_1PFwE3IHo1jEedpphgWrgwkA'\n : 'price_1MRyiWIHo1jEedppp5tnksZe';\n\n// Entreprise | Mensuel | Forfait entreprise à l'IS\nconst ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL = !isTestKey\n ? 'price_1LBJ69IHo1jEedppAWLeOk3I'\n : 'price_1LBIB7IHo1jEedppocxyc1ft';\n\nexport const stripeTaxRate = isTestKey ? 'txr_1I9X9MIHo1jEedppM0DqL4iE' : 'txr_1I9X5wIHo1jEedppYttGFc0N';\n\nconst list: StripeOffer[] = [\n {\n name: 'Offre auto-entrepreneur',\n isYearly: true,\n isMicro: true,\n key: ID_SUBSCRIPTION_MICRO_ANNUAL,\n isCashBased: true,\n isSocietyTax: false,\n },\n {\n name: 'Offre auto-entrepreneur',\n isYearly: false,\n isMicro: true,\n key: ID_SUBSCRIPTION_MICRO_MENSUAL,\n isCashBased: true,\n isSocietyTax: false,\n },\n {\n name: 'Offre entreprise IS',\n isYearly: true,\n isMicro: false,\n key: ID_SUBSCRIPTION_SOCIETY_TAX_ANNUAL,\n isCashBased: false,\n isSocietyTax: true,\n },\n {\n name: 'Offre entreprise IS',\n isMicro: false,\n isYearly: false,\n key: ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL,\n isCashBased: false,\n isSocietyTax: true,\n },\n {\n name: 'Offre entreprise IR',\n isMicro: false,\n isYearly: true,\n isCashBased: true,\n isSocietyTax: false,\n key: ID_SUBSCRIPTION_INCOME_TAX_ANNUAL,\n },\n {\n name: 'Offre entreprise IR',\n isMicro: false,\n isYearly: false,\n key: ID_SUBSCRIPTION_INCOME_TAX_MENSUAL,\n isCashBased: true,\n isSocietyTax: false,\n },\n];\n\nexport function getDefaultOffer(params: OfferParams): StripeOffer {\n const { idLegalForm, idComptaType, isYearly, idTaxSystem } = params;\n\n const isMicro = LegalFormTypeEnum.AUTO_ENTREPRENEUR === idLegalForm;\n const isCashBased = idComptaType\n ? [ComptaType.CASH_BASED, ComptaType.CASH_BASED_ASSISTANCE, ComptaType.CASH_BASED_SEIZURE].includes(idComptaType)\n : false;\n const isSocietyTax = idTaxSystem === TaxSystem.IS;\n\n const newPlan = list.find(\n (l) =>\n l.isMicro === isMicro &&\n l.isYearly === isYearly &&\n l.isCashBased === isCashBased &&\n l.isSocietyTax === isSocietyTax,\n );\n\n if (newPlan) {\n return newPlan;\n }\n\n return isYearly ? list[2] : list[3];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.66",
3
+ "version": "1.3.67-0",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "dist/cjs/index.js",
@@ -1,5 +1,5 @@
1
1
  import { Resource } from '../Resource';
2
- import { IRefund } from '../../types';
2
+ import { IRefund, QueryRefundPaginated } from '../../types';
3
3
 
4
4
  export class Refund extends Resource {
5
5
  public create(payload: IRefund): Promise<IRefund> {
@@ -8,4 +8,20 @@ export class Refund extends Resource {
8
8
  public update(id: number, params: Partial<IRefund>): Promise<boolean> {
9
9
  return this.axios.$patch(`/refunds/${id}`, { ...params });
10
10
  }
11
+
12
+ public getAll(query: QueryRefundPaginated) {
13
+ return this.axios.$get('/refunds', { params: query });
14
+ }
15
+
16
+ public getOneById(id: number) {
17
+ return this.axios.$get(`/refunds/${id}`);
18
+ }
19
+
20
+ public validate(id: number, params: Partial<IRefund>) {
21
+ return this.axios.$put(`/refunds/${id}`, { ...params });
22
+ }
23
+
24
+ public delete(id: number) {
25
+ return this.axios.$delete(`/refunds/${id}`);
26
+ }
11
27
  }
@@ -1,84 +1,64 @@
1
- export enum PaymentMethodIds {
2
- DIRECT_DEBIT = 1,
3
- BANK_TRANSFER = 2,
4
- BANK_CARD = 3,
5
- BANK_CHECK = 4,
6
- DIRECT_DEBIT_REJECTION_1 = 5,
7
- DIRECT_DEBIT_REJECTION_2 = 6,
8
- VARIOUS_UNPAID = 7,
9
- STRIPE_ECB = 8,
10
- STRIPE = 9,
11
- CASH = 10,
12
- STRIPE_ECB_REJECTION = 11,
13
- }
14
-
15
1
  export const PaymentMethod = {
16
2
  DIRECT_DEBIT: {
17
- id: PaymentMethodIds.DIRECT_DEBIT,
3
+ id: 1,
18
4
  name: 'Prélèvement',
19
5
  isSpecial: 0,
20
6
  isOverdue: 0,
21
7
  },
22
8
  BANK_TRANSFER: {
23
- id: PaymentMethodIds.BANK_TRANSFER,
9
+ id: 2,
24
10
  name: 'Virement',
25
11
  isSpecial: 0,
26
12
  isOverdue: 0,
27
13
  },
28
14
  BANK_CARD: {
29
- id: PaymentMethodIds.BANK_CARD,
15
+ id: 3,
30
16
  name: 'CB',
31
17
  isSpecial: 0,
32
18
  isOverdue: 0,
33
19
  },
34
20
  BANK_CHECK: {
35
- id: PaymentMethodIds.BANK_CHECK,
21
+ id: 4,
36
22
  name: 'Chèque',
37
23
  isSpecial: 0,
38
24
  isOverdue: 0,
39
25
  },
40
26
  DIRECT_DEBIT_REJECTION_1: {
41
- id: PaymentMethodIds.DIRECT_DEBIT_REJECTION_1,
27
+ id: 5,
42
28
  name: 'Rejet de prélèvement 1',
43
29
  isSpecial: 1,
44
30
  isOverdue: 1,
45
31
  },
46
32
  DIRECT_DEBIT_REJECTION_2: {
47
- id: PaymentMethodIds.DIRECT_DEBIT_REJECTION_2,
33
+ id: 6,
48
34
  name: 'Rejet de prélèvement 2',
49
35
  isSpecial: 1,
50
36
  isOverdue: 1,
51
37
  },
52
38
  VARIOUS_UNPAID: {
53
- id: PaymentMethodIds.VARIOUS_UNPAID,
39
+ id: 7,
54
40
  name: 'Impayés divers',
55
41
  isSpecial: 1,
56
42
  isOverdue: 1,
57
43
  },
58
44
  STRIPE_ECB: {
59
- id: PaymentMethodIds.STRIPE_ECB,
45
+ id: 8,
60
46
  name: 'Stripe (ECB)',
61
47
  isSpecial: 0,
62
48
  isOverdue: 0,
63
49
  },
64
50
  STRIPE: {
65
- id: PaymentMethodIds.STRIPE,
51
+ id: 9,
66
52
  name: 'Stripe',
67
53
  isSpecial: 0,
68
54
  isOverdue: 0,
69
55
  },
70
56
  CASH: {
71
- id: PaymentMethodIds.CASH,
57
+ id: 10,
72
58
  name: 'Espèces',
73
59
  isSpecial: 0,
74
60
  isOverdue: 0,
75
61
  },
76
- STRIPE_ECB_REJECTION: {
77
- id: PaymentMethodIds.STRIPE_ECB_REJECTION,
78
- name: 'Rejet Stripe ECB',
79
- isSpecial: 1,
80
- isOverdue: 1,
81
- },
82
62
  };
83
63
 
84
64
  export const PaymentParams = {
@@ -1,16 +1,11 @@
1
- import { IsArray, IsInt, IsNumber, IsOptional } from 'class-validator';
1
+ import { IsArray, IsNumber, IsOptional } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
 
4
4
  export class RegenerateInternalInvoicing {
5
5
  @ApiPropertyOptional()
6
6
  @IsOptional()
7
7
  @IsArray()
8
- idSociety?: Array<number>;
9
-
10
- @ApiPropertyOptional()
11
- @IsOptional()
12
- @IsInt()
13
- idFile?: number | null;
8
+ idSociety: Array<number>;
14
9
 
15
10
  @ApiProperty()
16
11
  @IsNumber()
@@ -0,0 +1,32 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
+ import { RequiredQueryPaginate } from '../BasePaginate';
3
+ import { Order } from '../BaseRequest';
4
+ import { Type } from 'class-transformer';
5
+ import { IsBoolean, IsOptional } from 'class-validator';
6
+
7
+ export class QueryRefundPaginated extends RequiredQueryPaginate implements Order {
8
+ @ApiPropertyOptional()
9
+ search?: string;
10
+
11
+ @ApiProperty()
12
+ @Type(() => Number)
13
+ year: number;
14
+
15
+ @ApiPropertyOptional()
16
+ @Type(() => Number)
17
+ @IsOptional()
18
+ month?: number;
19
+
20
+ @ApiPropertyOptional()
21
+ @Type(() => Number)
22
+ @IsOptional()
23
+ motif?: number;
24
+
25
+ @ApiPropertyOptional()
26
+ orderBy?: string;
27
+
28
+ @ApiPropertyOptional()
29
+ @IsBoolean()
30
+ @IsOptional()
31
+ descending?: boolean;
32
+ }
@@ -95,10 +95,3 @@ export class CreatePaymentIntent {
95
95
  @ApiPropertyOptional()
96
96
  metadata?: Stripe.MetadataParam;
97
97
  }
98
-
99
- export class PostProcessPaymentAutomatically {
100
- @ApiPropertyOptional()
101
- @IsInt()
102
- @IsOptional()
103
- idSociety?: number;
104
- }
@@ -3,7 +3,7 @@ import { ISociety } from './ISociety';
3
3
  import { IUser } from './IUser';
4
4
 
5
5
  export interface IAppNotification {
6
- id?: number;
6
+ id: number;
7
7
  title: string;
8
8
  message: string;
9
9
  link?: string;
@@ -17,6 +17,6 @@ export interface IAppNotification {
17
17
  updatedAt?: Date | null;
18
18
 
19
19
  // associations
20
- society?: ISociety;
21
- user?: IUser;
20
+ society: ISociety;
21
+ user: IUser;
22
22
  }
@@ -3,10 +3,8 @@ import { NotificationTypeEnum } from '../../Enum/NotificationType';
3
3
  export interface IMobileNotificationLog {
4
4
  id: number;
5
5
  idType: NotificationTypeEnum;
6
- /** @deprecated useless */
7
- lastSent?: Date | null;
8
- /** @deprecated useless */
9
- nextSend?: Date | null;
6
+ lastSent: Date | null;
7
+ nextSend: Date | null;
10
8
  success: boolean;
11
9
  error: string | null;
12
10
  count: number;
@@ -4,7 +4,6 @@ import { IUser } from './IUser';
4
4
  import { IExercice } from './IExercice';
5
5
  import { IFile } from './IFile';
6
6
  import { IPaymentExpectation } from './IPaymentExpectation';
7
- import { IPaymentAttempt } from './IPaymentAttempt';
8
7
 
9
8
  // payments
10
9
  export interface IPayment {
@@ -16,7 +15,7 @@ export interface IPayment {
16
15
  isOverpaid?: boolean;
17
16
  isFirst?: boolean;
18
17
  // @deprecated Use isCollectable instead
19
- toCollect?: boolean;
18
+ toCollect?: boolean;
20
19
  countRejects?: number;
21
20
  isCollectable?: boolean;
22
21
  isAsset?: boolean;
@@ -45,5 +44,4 @@ export interface IPayment {
45
44
  user?: IUser;
46
45
  exercice?: IExercice;
47
46
  files?: IFile;
48
- paymentAttempts?: IPaymentAttempt[];
49
47
  }
package/ts/types/index.ts CHANGED
@@ -323,7 +323,6 @@ export * from './Interface/models/IReminderAttachment';
323
323
  export * from './Interface/models/IStateBankAccount';
324
324
  export * from './Interface/models/IAIQuestion';
325
325
  export * from './Interface/models/IAIConversation';
326
- export * from './Interface/models/IPaymentAttempt';
327
326
 
328
327
  // Schemas
329
328
  export * from './Interface/schemas/IRegistrationDetail';
@@ -554,7 +553,6 @@ export * from './Enum/SocietyTypeExportCsv';
554
553
  export * from './Enum/TeamType';
555
554
  export * from './Enum/PartneredAccountantServiceType';
556
555
  export * from './Enum/PartneredAccountantServiceTypeId';
557
- export * from './Enum/PaymentAttempt';
558
556
 
559
557
  // Interfaces API
560
558
  export * from './Interface/api/exercice/ReadExercice';
@@ -1163,3 +1161,4 @@ export * from './Interface/api/regulation/Read';
1163
1161
  export * from './Interface/api/regulation/Create';
1164
1162
  export * from './Interface/api/marketing/NewLeadSheet';
1165
1163
  export * from './Interface/api/ai/AskQuestionCollaborator';
1164
+ export * from './Interface/api/refund/QueryRefundPaginated';
@@ -0,0 +1,124 @@
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
+ }
@@ -1,6 +0,0 @@
1
- export declare enum PaymentAttemptStatus {
2
- ERROR = 0,
3
- SUCCESS = 1,
4
- BLOCKING_ERROR = 3
5
- }
6
- //# sourceMappingURL=PaymentAttempt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentAttempt.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/PaymentAttempt.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,KAAK,IAAI;IACT,OAAO,IAAI;IACX,cAAc,IAAI;CACnB"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentAttemptStatus = void 0;
4
- var PaymentAttemptStatus;
5
- (function (PaymentAttemptStatus) {
6
- PaymentAttemptStatus[PaymentAttemptStatus["ERROR"] = 0] = "ERROR";
7
- PaymentAttemptStatus[PaymentAttemptStatus["SUCCESS"] = 1] = "SUCCESS";
8
- PaymentAttemptStatus[PaymentAttemptStatus["BLOCKING_ERROR"] = 3] = "BLOCKING_ERROR";
9
- })(PaymentAttemptStatus || (exports.PaymentAttemptStatus = PaymentAttemptStatus = {}));
10
- //# sourceMappingURL=PaymentAttempt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentAttempt.js","sourceRoot":"","sources":["../../../../ts/types/Enum/PaymentAttempt.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,iEAAS,CAAA;IACT,qEAAW,CAAA;IACX,mFAAkB,CAAA;AACpB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B","sourcesContent":["export enum PaymentAttemptStatus {\n ERROR = 0,\n SUCCESS = 1,\n BLOCKING_ERROR = 3, // Erreur bloquante, plus aucune tentative de paiement n'aura lieu\n}\n"]}
@@ -1,15 +0,0 @@
1
- import { PaymentAttemptStatus } from '../../Enum/PaymentAttempt';
2
- import { PaymentMethodIds } from '../../Enum/PaymentMethod';
3
- import { IPayment } from './IPayment';
4
- export interface IPaymentAttempt {
5
- id?: number;
6
- reference: string | null;
7
- comment: string | null;
8
- status: PaymentAttemptStatus;
9
- idPaymentMethod: PaymentMethodIds;
10
- idPayment: number;
11
- createdAt?: string;
12
- updatedAt?: string;
13
- payment?: IPayment;
14
- }
15
- //# sourceMappingURL=IPaymentAttempt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPaymentAttempt.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IPaymentAttempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,eAAe,EAAE,gBAAgB,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IPaymentAttempt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPaymentAttempt.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IPaymentAttempt.ts"],"names":[],"mappings":"","sourcesContent":["import { PaymentAttemptStatus } from '../../Enum/PaymentAttempt';\nimport { PaymentMethodIds } from '../../Enum/PaymentMethod';\nimport { IPayment } from './IPayment';\n\nexport interface IPaymentAttempt {\n id?: number;\n reference: string | null;\n comment: string | null;\n status: PaymentAttemptStatus;\n idPaymentMethod: PaymentMethodIds;\n idPayment: number;\n createdAt?: string;\n updatedAt?: string;\n\n payment?: IPayment;\n}\n"]}
@@ -1,6 +0,0 @@
1
- export declare enum PaymentAttemptStatus {
2
- ERROR = 0,
3
- SUCCESS = 1,
4
- BLOCKING_ERROR = 3
5
- }
6
- //# sourceMappingURL=PaymentAttempt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentAttempt.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/PaymentAttempt.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,KAAK,IAAI;IACT,OAAO,IAAI;IACX,cAAc,IAAI;CACnB"}
@@ -1,7 +0,0 @@
1
- export var PaymentAttemptStatus;
2
- (function (PaymentAttemptStatus) {
3
- PaymentAttemptStatus[PaymentAttemptStatus["ERROR"] = 0] = "ERROR";
4
- PaymentAttemptStatus[PaymentAttemptStatus["SUCCESS"] = 1] = "SUCCESS";
5
- PaymentAttemptStatus[PaymentAttemptStatus["BLOCKING_ERROR"] = 3] = "BLOCKING_ERROR";
6
- })(PaymentAttemptStatus || (PaymentAttemptStatus = {}));
7
- //# sourceMappingURL=PaymentAttempt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentAttempt.js","sourceRoot":"","sources":["../../../../ts/types/Enum/PaymentAttempt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,iEAAS,CAAA;IACT,qEAAW,CAAA;IACX,mFAAkB,CAAA;AACpB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B","sourcesContent":["export enum PaymentAttemptStatus {\n ERROR = 0,\n SUCCESS = 1,\n BLOCKING_ERROR = 3, // Erreur bloquante, plus aucune tentative de paiement n'aura lieu\n}\n"]}
@@ -1,15 +0,0 @@
1
- import { PaymentAttemptStatus } from '../../Enum/PaymentAttempt';
2
- import { PaymentMethodIds } from '../../Enum/PaymentMethod';
3
- import { IPayment } from './IPayment';
4
- export interface IPaymentAttempt {
5
- id?: number;
6
- reference: string | null;
7
- comment: string | null;
8
- status: PaymentAttemptStatus;
9
- idPaymentMethod: PaymentMethodIds;
10
- idPayment: number;
11
- createdAt?: string;
12
- updatedAt?: string;
13
- payment?: IPayment;
14
- }
15
- //# sourceMappingURL=IPaymentAttempt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPaymentAttempt.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IPaymentAttempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,eAAe,EAAE,gBAAgB,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IPaymentAttempt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPaymentAttempt.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IPaymentAttempt.ts"],"names":[],"mappings":"","sourcesContent":["import { PaymentAttemptStatus } from '../../Enum/PaymentAttempt';\nimport { PaymentMethodIds } from '../../Enum/PaymentMethod';\nimport { IPayment } from './IPayment';\n\nexport interface IPaymentAttempt {\n id?: number;\n reference: string | null;\n comment: string | null;\n status: PaymentAttemptStatus;\n idPaymentMethod: PaymentMethodIds;\n idPayment: number;\n createdAt?: string;\n updatedAt?: string;\n\n payment?: IPayment;\n}\n"]}
@@ -1,5 +0,0 @@
1
- export enum PaymentAttemptStatus {
2
- ERROR = 0,
3
- SUCCESS = 1,
4
- BLOCKING_ERROR = 3, // Erreur bloquante, plus aucune tentative de paiement n'aura lieu
5
- }
@@ -1,16 +0,0 @@
1
- import { PaymentAttemptStatus } from '../../Enum/PaymentAttempt';
2
- import { PaymentMethodIds } from '../../Enum/PaymentMethod';
3
- import { IPayment } from './IPayment';
4
-
5
- export interface IPaymentAttempt {
6
- id?: number;
7
- reference: string | null;
8
- comment: string | null;
9
- status: PaymentAttemptStatus;
10
- idPaymentMethod: PaymentMethodIds;
11
- idPayment: number;
12
- createdAt?: string;
13
- updatedAt?: string;
14
-
15
- payment?: IPayment;
16
- }