@silexpert/core 2.0.56 → 2.0.58-zendesk

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 (161) hide show
  1. package/dist/api/resources/CommercialDocument.d.ts +4 -1
  2. package/dist/api/resources/CommercialDocument.d.ts.map +1 -1
  3. package/dist/api/resources/CommercialDocument.js +9 -0
  4. package/dist/api/resources/CommercialDocument.js.map +1 -1
  5. package/dist/api/resources/zendesk/Ticket.d.ts +12 -0
  6. package/dist/api/resources/zendesk/Ticket.d.ts.map +1 -0
  7. package/dist/api/resources/zendesk/Ticket.js +40 -0
  8. package/dist/api/resources/zendesk/Ticket.js.map +1 -0
  9. package/dist/api/resources.d.ts +2 -0
  10. package/dist/api/resources.d.ts.map +1 -1
  11. package/dist/api/resources.js +2 -0
  12. package/dist/api/resources.js.map +1 -1
  13. package/dist/types/Enum/Annotation.d.ts +4 -0
  14. package/dist/types/Enum/Annotation.d.ts.map +1 -1
  15. package/dist/types/Enum/Annotation.js +2 -0
  16. package/dist/types/Enum/Annotation.js.map +1 -1
  17. package/dist/types/Enum/BalanceSheet.d.ts +1 -1
  18. package/dist/types/Enum/BalanceSheet.js +1 -1
  19. package/dist/types/Enum/BalanceSheet.js.map +1 -1
  20. package/dist/types/Enum/BrandClementine.d.ts.map +1 -1
  21. package/dist/types/Enum/BrandClementine.js +1 -0
  22. package/dist/types/Enum/BrandClementine.js.map +1 -1
  23. package/dist/types/Enum/CustomerSignature.d.ts +2 -1
  24. package/dist/types/Enum/CustomerSignature.d.ts.map +1 -1
  25. package/dist/types/Enum/CustomerSignature.js +1 -0
  26. package/dist/types/Enum/CustomerSignature.js.map +1 -1
  27. package/dist/types/Enum/EInvoicingDirection.d.ts +5 -0
  28. package/dist/types/Enum/EInvoicingDirection.d.ts.map +1 -0
  29. package/dist/types/Enum/EInvoicingDirection.js +6 -0
  30. package/dist/types/Enum/EInvoicingDirection.js.map +1 -0
  31. package/dist/types/Enum/EInvoicingReasonType.d.ts +44 -0
  32. package/dist/types/Enum/EInvoicingReasonType.d.ts.map +1 -0
  33. package/dist/types/Enum/EInvoicingReasonType.js +143 -0
  34. package/dist/types/Enum/EInvoicingReasonType.js.map +1 -0
  35. package/dist/types/Enum/EInvoicingStatusCode.d.ts +16 -0
  36. package/dist/types/Enum/EInvoicingStatusCode.d.ts.map +1 -0
  37. package/dist/types/Enum/EInvoicingStatusCode.js +20 -0
  38. package/dist/types/Enum/EInvoicingStatusCode.js.map +1 -0
  39. package/dist/types/Enum/MimeType.d.ts +2 -0
  40. package/dist/types/Enum/MimeType.d.ts.map +1 -1
  41. package/dist/types/Enum/MimeType.js +1 -0
  42. package/dist/types/Enum/MimeType.js.map +1 -1
  43. package/dist/types/Enum/SalesContractBrandClementine.js +1 -1
  44. package/dist/types/Enum/SalesContractBrandClementine.js.map +1 -1
  45. package/dist/types/Enum/Unit.d.ts +2 -0
  46. package/dist/types/Enum/Unit.d.ts.map +1 -1
  47. package/dist/types/Enum/Unit.js +22 -0
  48. package/dist/types/Enum/Unit.js.map +1 -1
  49. package/dist/types/Enum/Zendesk.d.ts +40 -0
  50. package/dist/types/Enum/Zendesk.d.ts.map +1 -0
  51. package/dist/types/Enum/Zendesk.js +40 -0
  52. package/dist/types/Enum/Zendesk.js.map +1 -0
  53. package/dist/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +1 -0
  54. package/dist/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
  55. package/dist/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
  56. package/dist/types/Interface/api/commercialManagement/Read.d.ts +113 -0
  57. package/dist/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
  58. package/dist/types/Interface/api/commercialManagement/Read.js.map +1 -1
  59. package/dist/types/Interface/api/docoon/Create.d.ts +17 -0
  60. package/dist/types/Interface/api/docoon/Create.d.ts.map +1 -1
  61. package/dist/types/Interface/api/docoon/Create.js +72 -1
  62. package/dist/types/Interface/api/docoon/Create.js.map +1 -1
  63. package/dist/types/Interface/api/docoon/DocoonInvoice.d.ts +195 -0
  64. package/dist/types/Interface/api/docoon/DocoonInvoice.d.ts.map +1 -0
  65. package/dist/types/Interface/api/docoon/DocoonInvoice.js +2 -0
  66. package/dist/types/Interface/api/docoon/DocoonInvoice.js.map +1 -0
  67. package/dist/types/Interface/api/docoon/Query.js +1 -1
  68. package/dist/types/Interface/api/docoon/Query.js.map +1 -1
  69. package/dist/types/Interface/api/society/QueryUnpaid.d.ts +4 -0
  70. package/dist/types/Interface/api/society/QueryUnpaid.d.ts.map +1 -1
  71. package/dist/types/Interface/api/society/QueryUnpaid.js +27 -0
  72. package/dist/types/Interface/api/society/QueryUnpaid.js.map +1 -1
  73. package/dist/types/Interface/api/thirdParty/CreateThirdPartyForm.d.ts +2 -0
  74. package/dist/types/Interface/api/thirdParty/CreateThirdPartyForm.d.ts.map +1 -1
  75. package/dist/types/Interface/api/thirdParty/CreateThirdPartyForm.js +10 -0
  76. package/dist/types/Interface/api/thirdParty/CreateThirdPartyForm.js.map +1 -1
  77. package/dist/types/Interface/api/thirdParty/UpdateThirdPartyForm.d.ts +2 -0
  78. package/dist/types/Interface/api/thirdParty/UpdateThirdPartyForm.d.ts.map +1 -1
  79. package/dist/types/Interface/api/thirdParty/UpdateThirdPartyForm.js +12 -0
  80. package/dist/types/Interface/api/thirdParty/UpdateThirdPartyForm.js.map +1 -1
  81. package/dist/types/Interface/api/zendesk/QueryTicket.d.ts +39 -0
  82. package/dist/types/Interface/api/zendesk/QueryTicket.d.ts.map +1 -0
  83. package/dist/types/Interface/api/zendesk/QueryTicket.js +244 -0
  84. package/dist/types/Interface/api/zendesk/QueryTicket.js.map +1 -0
  85. package/dist/types/Interface/api/zendesk/ReadTicket.d.ts +99 -0
  86. package/dist/types/Interface/api/zendesk/ReadTicket.d.ts.map +1 -0
  87. package/dist/types/Interface/api/zendesk/ReadTicket.js +2 -0
  88. package/dist/types/Interface/api/zendesk/ReadTicket.js.map +1 -0
  89. package/dist/types/Interface/models/IAccountingFile.d.ts +10 -0
  90. package/dist/types/Interface/models/IAccountingFile.d.ts.map +1 -1
  91. package/dist/types/Interface/models/IAccountingFile.js +8 -0
  92. package/dist/types/Interface/models/IAccountingFile.js.map +1 -1
  93. package/dist/types/Interface/models/IAccountingTransaction.d.ts +3 -0
  94. package/dist/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  95. package/dist/types/Interface/models/IAccountingTransaction.js +2 -0
  96. package/dist/types/Interface/models/IAccountingTransaction.js.map +1 -1
  97. package/dist/types/Interface/models/IEInvoicing.d.ts +18 -0
  98. package/dist/types/Interface/models/IEInvoicing.d.ts.map +1 -0
  99. package/dist/types/Interface/models/IEInvoicing.js +13 -0
  100. package/dist/types/Interface/models/IEInvoicing.js.map +1 -0
  101. package/dist/types/Interface/models/IEInvoicingStatus.d.ts +17 -0
  102. package/dist/types/Interface/models/IEInvoicingStatus.d.ts.map +1 -0
  103. package/dist/types/Interface/models/IEInvoicingStatus.js +13 -0
  104. package/dist/types/Interface/models/IEInvoicingStatus.js.map +1 -0
  105. package/dist/types/Interface/models/IPayment.d.ts +3 -0
  106. package/dist/types/Interface/models/IPayment.d.ts.map +1 -1
  107. package/dist/types/Interface/models/IPayment.js +2 -0
  108. package/dist/types/Interface/models/IPayment.js.map +1 -1
  109. package/dist/types/Interface/models/ISocietyDetail.d.ts +1 -0
  110. package/dist/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
  111. package/dist/types/Interface/models/ISocietyDetail.js +1 -0
  112. package/dist/types/Interface/models/ISocietyDetail.js.map +1 -1
  113. package/dist/types/Interface/models/IThirdParty.d.ts +2 -0
  114. package/dist/types/Interface/models/IThirdParty.d.ts.map +1 -1
  115. package/dist/types/Interface/models/IThirdParty.js +2 -0
  116. package/dist/types/Interface/models/IThirdParty.js.map +1 -1
  117. package/dist/types/index.d.ts +13 -0
  118. package/dist/types/index.d.ts.map +1 -1
  119. package/dist/types/index.js +13 -0
  120. package/dist/types/index.js.map +1 -1
  121. package/dist/utils/prestation.d.ts.map +1 -1
  122. package/dist/utils/prestation.js +7 -3
  123. package/dist/utils/prestation.js.map +1 -1
  124. package/dist/utils/vat/centuries.d.ts.map +1 -1
  125. package/dist/utils/vat/centuries.js +11 -1
  126. package/dist/utils/vat/centuries.js.map +1 -1
  127. package/package.json +1 -1
  128. package/ts/api/resources/CommercialDocument.ts +16 -0
  129. package/ts/api/resources/zendesk/Ticket.ts +58 -0
  130. package/ts/api/resources.ts +2 -0
  131. package/ts/types/Enum/Annotation.ts +3 -0
  132. package/ts/types/Enum/BalanceSheet.ts +1 -1
  133. package/ts/types/Enum/BrandClementine.ts +1 -0
  134. package/ts/types/Enum/CustomerSignature.ts +2 -1
  135. package/ts/types/Enum/EInvoicingDirection.ts +4 -0
  136. package/ts/types/Enum/EInvoicingReasonType.ts +156 -0
  137. package/ts/types/Enum/EInvoicingStatusCode.ts +18 -0
  138. package/ts/types/Enum/MimeType.ts +1 -0
  139. package/ts/types/Enum/SalesContractBrandClementine.ts +1 -1
  140. package/ts/types/Enum/Unit.ts +24 -1
  141. package/ts/types/Enum/Zendesk.ts +56 -0
  142. package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +1 -0
  143. package/ts/types/Interface/api/commercialManagement/Read.ts +110 -0
  144. package/ts/types/Interface/api/docoon/Create.ts +46 -0
  145. package/ts/types/Interface/api/docoon/DocoonInvoice.ts +201 -0
  146. package/ts/types/Interface/api/docoon/Query.ts +1 -1
  147. package/ts/types/Interface/api/society/QueryUnpaid.ts +19 -0
  148. package/ts/types/Interface/api/thirdParty/CreateThirdPartyForm.ts +6 -0
  149. package/ts/types/Interface/api/thirdParty/UpdateThirdPartyForm.ts +8 -0
  150. package/ts/types/Interface/api/zendesk/QueryTicket.ts +192 -0
  151. package/ts/types/Interface/api/zendesk/ReadTicket.ts +110 -0
  152. package/ts/types/Interface/models/IAccountingFile.ts +10 -0
  153. package/ts/types/Interface/models/IAccountingTransaction.ts +3 -0
  154. package/ts/types/Interface/models/IEInvoicing.ts +21 -0
  155. package/ts/types/Interface/models/IEInvoicingStatus.ts +18 -0
  156. package/ts/types/Interface/models/IPayment.ts +3 -0
  157. package/ts/types/Interface/models/ISocietyDetail.ts +1 -0
  158. package/ts/types/Interface/models/IThirdParty.ts +2 -0
  159. package/ts/types/index.ts +13 -0
  160. package/ts/utils/prestation.ts +9 -3
  161. package/ts/utils/vat/centuries.ts +11 -1
@@ -0,0 +1,156 @@
1
+ import { EInvoicingDirection } from './EInvoicingDirection.js';
2
+
3
+ export enum EInvoicingReasonType {
4
+ INCORRECT_AMOUNT = 1,
5
+ CALCULATION_ERROR = 2,
6
+ E_ADDRESS_ERROR = 3,
7
+ SEMANTIC_ERROR = 4,
8
+ CONSISTENCY_CHECK_ERROR = 5,
9
+ E_ADDRESS_CONTROL_ERROR = 6,
10
+ B2G_CONTROL_ERROR = 7,
11
+ ATTACHMENT_REFERENCE_ERROR = 8,
12
+ ATTACHMENT_ASSOCIATION_ERROR = 9,
13
+ RECIPIENT_ERROR = 10,
14
+ ROUTING_ERROR = 11,
15
+ UNITY_ERROR = 12,
16
+ DUPLICATE_INVOICE = 13,
17
+ }
18
+
19
+ export enum EInvoicingReasonTypeCode {
20
+ INCORRECT_AMOUNT = 'MONTANTTOTAL_ERR',
21
+ CALCULATION_ERROR = 'CALCUL_ERR',
22
+ E_ADDRESS_ERROR = 'ADR_ERR',
23
+ SEMANTIC_ERROR = 'REJ_SEMAN',
24
+ CONSISTENCY_CHECK_ERROR = 'REJ_COH',
25
+ E_ADDRESS_CONTROL_ERROR = 'REJ_ADR',
26
+ B2G_CONTROL_ERROR = 'REJ_CONT_B2G',
27
+ ATTACHMENT_REFERENCE_ERROR = 'REJ_REF_PJ',
28
+ ATTACHMENT_ASSOCIATION_ERROR = 'REJ_ASS_PJ',
29
+ RECIPIENT_ERROR = 'DEST_INC',
30
+ ROUTING_ERROR = 'ROUTAGE_ERR',
31
+ UNITY_ERROR = 'REJ_UNI',
32
+ DUPLICATE_INVOICE = 'DOUBLON',
33
+ }
34
+
35
+ export type EInvoicingReason = {
36
+ id: EInvoicingReasonType;
37
+ reasonCode: EInvoicingReasonTypeCode;
38
+ label: string;
39
+ description: string;
40
+ type: EInvoicingDirection[];
41
+ isVisibleByClient: boolean;
42
+ };
43
+
44
+ export type EInvocingReasonListType = {
45
+ [key: string]: EInvoicingReason;
46
+ };
47
+
48
+ export const einvoicingReasonList: EInvocingReasonListType = {
49
+ INCORRECT_AMOUNT: {
50
+ id: EInvoicingReasonType.INCORRECT_AMOUNT,
51
+ reasonCode: EInvoicingReasonTypeCode.INCORRECT_AMOUNT,
52
+ label: 'Montant total erroné',
53
+ description: 'Un des montants totaux de la facutre est erronée, par exemple Net à payer',
54
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
55
+ isVisibleByClient: true,
56
+ },
57
+ CALCULATION_ERROR: {
58
+ id: EInvoicingReasonType.CALCULATION_ERROR,
59
+ reasonCode: EInvoicingReasonTypeCode.CALCULATION_ERROR,
60
+ label: 'Erreur de calcul de la facture',
61
+ description: 'Soit détecté au schematron, soit après (pour les lignes, ou arrondi non accepté)',
62
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
63
+ isVisibleByClient: true,
64
+ },
65
+ E_ADDRESS_ERROR: {
66
+ id: EInvoicingReasonType.E_ADDRESS_ERROR,
67
+ reasonCode: EInvoicingReasonTypeCode.E_ADDRESS_ERROR,
68
+ label: 'Adresse de facturation électronique erronée',
69
+ description: "L'adresse de facturation électronique du destinataire(BT-49 ou BT-34) est absente ou erronée",
70
+ type: [EInvoicingDirection.EMISSION],
71
+ isVisibleByClient: false,
72
+ },
73
+ SEMANTIC_ERROR: {
74
+ id: EInvoicingReasonType.SEMANTIC_ERROR,
75
+ reasonCode: EInvoicingReasonTypeCode.SEMANTIC_ERROR,
76
+ label: 'Rejet pour erreur sémantique',
77
+ description: 'Analyse du format sémantique',
78
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
79
+ isVisibleByClient: true,
80
+ },
81
+ CONSISTENCY_CHECK_ERROR: {
82
+ id: EInvoicingReasonType.CONSISTENCY_CHECK_ERROR,
83
+ reasonCode: EInvoicingReasonTypeCode.CONSISTENCY_CHECK_ERROR,
84
+ label: 'Rejet sur contrôle Cohérence de données',
85
+ description: 'Contrôle de cohérence des données (les balises et les référentiels)',
86
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
87
+ isVisibleByClient: false,
88
+ },
89
+ E_ADDRESS_CONTROL_ERROR: {
90
+ id: EInvoicingReasonType.E_ADDRESS_CONTROL_ERROR,
91
+ reasonCode: EInvoicingReasonTypeCode.E_ADDRESS_CONTROL_ERROR,
92
+ label: "Rejet sur Contrôle d'adressage",
93
+ description: "Contrôle d'adressage",
94
+ type: [EInvoicingDirection.EMISSION],
95
+ isVisibleByClient: false,
96
+ },
97
+ B2G_CONTROL_ERROR: {
98
+ id: EInvoicingReasonType.B2G_CONTROL_ERROR,
99
+ reasonCode: EInvoicingReasonTypeCode.B2G_CONTROL_ERROR,
100
+ label: 'Rejet sur Contrôle métier B2G',
101
+ description: "Contrôle B2G (vérification du n° d'engagement)",
102
+ type: [EInvoicingDirection.EMISSION],
103
+ isVisibleByClient: false,
104
+ },
105
+ ATTACHMENT_REFERENCE_ERROR: {
106
+ id: EInvoicingReasonType.ATTACHMENT_REFERENCE_ERROR,
107
+ reasonCode: EInvoicingReasonTypeCode.ATTACHMENT_REFERENCE_ERROR,
108
+ label: 'Rejet sur Référence de la PJ',
109
+ description: 'Référence de la PJ',
110
+ type: [EInvoicingDirection.EMISSION],
111
+ isVisibleByClient: false,
112
+ },
113
+ ATTACHMENT_ASSOCIATION_ERROR: {
114
+ id: EInvoicingReasonType.ATTACHMENT_ASSOCIATION_ERROR,
115
+ reasonCode: EInvoicingReasonTypeCode.ATTACHMENT_ASSOCIATION_ERROR,
116
+ label: "Rejet sur erreur d'association de la PJ",
117
+ description: "Erreur d'associartion de la PJ",
118
+ type: [EInvoicingDirection.EMISSION],
119
+ isVisibleByClient: false,
120
+ },
121
+ RECIPIENT_ERROR: {
122
+ id: EInvoicingReasonType.RECIPIENT_ERROR,
123
+ reasonCode: EInvoicingReasonTypeCode.RECIPIENT_ERROR,
124
+ label: 'Destinataire inconnu',
125
+ description: "À l'émission, le destinataire est inconnu. Il n'existe pas dans l'annuaire",
126
+ type: [EInvoicingDirection.EMISSION],
127
+ isVisibleByClient: false,
128
+ },
129
+ ROUTING_ERROR: {
130
+ id: EInvoicingReasonType.ROUTING_ERROR,
131
+ reasonCode: EInvoicingReasonTypeCode.ROUTING_ERROR,
132
+ label: 'Erreur de routage',
133
+ description: `Ce motif doit être utilisé dans le cas où les informations servant au routage de la facture sont devenues obsolètes. Ceci peut se produire par exmple:
134
+ - en case de décalage de mise à jour de l'annuaire
135
+ - une erreur de la PDP émettrice
136
+ Post correction de l'annuaire par le destinataire de la facture, la facture peut être transmise à nouveau (sans aucun changement sur les données de la facture)`,
137
+ type: [EInvoicingDirection.EMISSION],
138
+ isVisibleByClient: false,
139
+ },
140
+ UNITY_ERROR: {
141
+ id: EInvoicingReasonType.UNITY_ERROR,
142
+ reasonCode: EInvoicingReasonTypeCode.UNITY_ERROR,
143
+ label: 'Rejet sur contrôle unicité',
144
+ description: "Contôle d'unicité",
145
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
146
+ isVisibleByClient: true,
147
+ },
148
+ DUPLICATE_INVOICE: {
149
+ id: EInvoicingReasonType.DUPLICATE_INVOICE,
150
+ reasonCode: EInvoicingReasonTypeCode.DUPLICATE_INVOICE,
151
+ label: 'Facture en doublon',
152
+ description: 'Facture en doublon (même numéro, même fournisseur et même année de la date de la facture)',
153
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
154
+ isVisibleByClient: true,
155
+ },
156
+ };
@@ -0,0 +1,18 @@
1
+ // ENUM peuplé avec les états de base mais il faudra le peupler avec les codes
2
+ // de statuts de eInvoicing lors de la mise en place du cycle de vie
3
+ // des factures électroniques
4
+ export enum EInvoicingStatusCode {
5
+ RECEIVED = 1,
6
+ PENDING_VALIDATION = 2,
7
+ VALIDATED = 3,
8
+ REJECTED = 4,
9
+ PENDING_TRANSMISSION = 5,
10
+ TRANSMITTED = 6,
11
+ DELIVERED = 7,
12
+ ACCEPTED = 8,
13
+ PARTIALLY_PAID = 9,
14
+ PAID = 10,
15
+ CANCELLED = 11,
16
+ ERROR = 12,
17
+ REFUSED = 13,
18
+ }
@@ -21,6 +21,7 @@ export const MimeType = {
21
21
  JPG: 'image/jpg',
22
22
  XML: 'image/svg+xml',
23
23
  TEXTXML: 'text/xml',
24
+ APP_XML: 'application/xml',
24
25
  HEIC: 'image/heic',
25
26
  };
26
27
 
@@ -461,7 +461,7 @@ export const SalesContractClementine: SaleContract[] = [
461
461
  name: 'page_detail_ldm_2025',
462
462
  needBgImage: false,
463
463
  versionable: false,
464
- idPrestationType: allPrestations2025WithCGV,
464
+ idPrestationType: allPrestations2025WithBrochure,
465
465
  },
466
466
  {
467
467
  label: 'Devis 2025',
@@ -3,6 +3,7 @@ export class IUnit {
3
3
  id: number;
4
4
  name: string;
5
5
  shortName: string;
6
+ codeEN16931: string;
6
7
  };
7
8
  }
8
9
 
@@ -31,118 +32,140 @@ export enum UnitId {
31
32
  GRAM = 22,
32
33
  }
33
34
 
34
- export type IUnitList = Array<{ name: string; id: number; shortName: string }>;
35
+ export type IUnitList = Array<{ name: string; id: number; shortName: string; eInvoicingCode: string | null }>;
35
36
 
36
37
  export const Unit: IUnit = {
37
38
  ITEM: {
38
39
  id: UnitId.ITEM,
39
40
  name: 'Article',
40
41
  shortName: 'art',
42
+ codeEN16931: 'NAR',
41
43
  },
42
44
  HOUR: {
43
45
  id: UnitId.HOUR,
44
46
  name: 'Heure',
45
47
  shortName: 'h',
48
+ codeEN16931: 'HUR',
46
49
  },
47
50
  DAY: {
48
51
  id: UnitId.DAY,
49
52
  name: 'Jour',
50
53
  shortName: 'j',
54
+ codeEN16931: 'DAY',
51
55
  },
52
56
  KILOGRAM: {
53
57
  id: UnitId.KILOGRAM,
54
58
  name: 'Kilogramme',
55
59
  shortName: 'kg',
60
+ codeEN16931: 'KGM',
56
61
  },
57
62
  LITER: {
58
63
  id: UnitId.LITER,
59
64
  name: 'Litre',
60
65
  shortName: 'l',
66
+ codeEN16931: 'LTR',
61
67
  },
62
68
  KILOMETER: {
63
69
  id: UnitId.KILOMETER,
64
70
  name: 'Kilomètres',
65
71
  shortName: 'km',
72
+ codeEN16931: 'KMT',
66
73
  },
67
74
  HALF_DAY: {
68
75
  id: UnitId.HALF_DAY,
69
76
  name: 'Demi journée',
70
77
  shortName: 'demi j',
78
+ codeEN16931: 'LS', // (Half hour existe, mais pas de code standard pour "demi-journée")
71
79
  },
72
80
  YEAR: {
73
81
  id: UnitId.YEAR,
74
82
  name: 'Année',
75
83
  shortName: 'an',
84
+ codeEN16931: 'ANN',
76
85
  },
77
86
  WEEK: {
78
87
  id: UnitId.WEEK,
79
88
  name: 'Semaine',
80
89
  shortName: 'sem',
90
+ codeEN16931: 'WEE',
81
91
  },
82
92
  MONTH: {
83
93
  id: UnitId.MONTH,
84
94
  name: 'Mois',
85
95
  shortName: 'mois',
96
+ codeEN16931: 'MON',
86
97
  },
87
98
  QUARTER: {
88
99
  id: UnitId.QUARTER,
89
100
  name: 'Trimestre',
90
101
  shortName: 'trim',
102
+ codeEN16931: 'QAN',
91
103
  },
92
104
  PIECE: {
93
105
  id: UnitId.PIECE,
94
106
  name: 'Pièce',
95
107
  shortName: 'p',
108
+ codeEN16931: 'H87',
96
109
  },
97
110
  FIXED: {
98
111
  id: UnitId.FIXED,
99
112
  name: 'Forfaitaire',
100
113
  shortName: 'f',
114
+ codeEN16931: 'LS',
101
115
  },
102
116
  SQUARE_METER: {
103
117
  id: UnitId.SQUARE_METER,
104
118
  name: 'Mètre carré',
105
119
  shortName: 'm2',
120
+ codeEN16931: 'MTK',
106
121
  },
107
122
  CUBIC_METER: {
108
123
  id: UnitId.CUBIC_METER,
109
124
  name: 'Mètre cube',
110
125
  shortName: 'm3',
126
+ codeEN16931: 'MTQ',
111
127
  },
112
128
  METER: {
113
129
  id: UnitId.METER,
114
130
  name: 'Mètre',
115
131
  shortName: 'm',
132
+ codeEN16931: 'MTR',
116
133
  },
117
134
  SUBSCRIPTION: {
118
135
  id: UnitId.SUBSCRIPTION,
119
136
  name: 'Abonnement',
120
137
  shortName: 'abo',
138
+ codeEN16931: 'LS',
121
139
  },
122
140
  NIGHT: {
123
141
  id: UnitId.NIGHT,
124
142
  name: 'Nuitée',
125
143
  shortName: 'nuit',
144
+ codeEN16931: 'NI',
126
145
  },
127
146
  TON: {
128
147
  id: UnitId.TON,
129
148
  name: 'Tonne',
130
149
  shortName: 't',
150
+ codeEN16931: 'TNE',
131
151
  },
132
152
  HECTARE: {
133
153
  id: UnitId.HECTARE,
134
154
  name: 'Hectare',
135
155
  shortName: 'ha',
156
+ codeEN16931: 'HAR',
136
157
  },
137
158
  MINUTE: {
138
159
  id: UnitId.MINUTE,
139
160
  name: 'Minute',
140
161
  shortName: 'min',
162
+ codeEN16931: 'MIN',
141
163
  },
142
164
  GRAM: {
143
165
  id: UnitId.GRAM,
144
166
  name: 'Gramme',
145
167
  shortName: 'g',
168
+ codeEN16931: 'GRM',
146
169
  },
147
170
  };
148
171
 
@@ -0,0 +1,56 @@
1
+ export type ZendeskTicketStatus = 'new' | 'open' | 'pending' | 'hold' | 'solved' | 'closed';
2
+ export type ZendeskTicketPriority = 'urgent' | 'high' | 'normal' | 'low';
3
+ export type ZendeskTicketType = 'problem' | 'incident' | 'question' | 'task';
4
+ export type ZendeskTicketChannel =
5
+ | 'api'
6
+ | 'chat'
7
+ | 'email'
8
+ | 'facebook'
9
+ | 'mobile'
10
+ | 'native_messaging'
11
+ | 'sample_ticket'
12
+ | 'sms'
13
+ | 'twitter'
14
+ | 'voice'
15
+ | 'web'
16
+ | 'web_service'
17
+ | 'whatsapp';
18
+
19
+ export enum ZendeskTicketStatusEnum {
20
+ NEW = 'new',
21
+ OPEN = 'open',
22
+ PENDING = 'pending',
23
+ HOLD = 'hold',
24
+ SOLVED = 'solved',
25
+ CLOSED = 'closed',
26
+ }
27
+
28
+ export enum ZendeskTicketPriorityEnum {
29
+ URGENT = 'urgent',
30
+ HIGH = 'high',
31
+ NORMAL = 'normal',
32
+ LOW = 'low',
33
+ }
34
+
35
+ export enum ZendeskTicketTypeEnum {
36
+ PROBLEM = 'problem',
37
+ INCIDENT = 'incident',
38
+ QUESTION = 'question',
39
+ TASK = 'task',
40
+ }
41
+
42
+ export enum ZendeskTicketChannelEnum {
43
+ API = 'api',
44
+ CHAT = 'chat',
45
+ EMAIL = 'email',
46
+ FACEBOOK = 'facebook',
47
+ MOBILE = 'mobile',
48
+ NATIVE_MESSAGING = 'native_messaging',
49
+ SAMPLE_TICKET = 'sample_ticket',
50
+ SMS = 'sms',
51
+ TWITTER = 'twitter',
52
+ VOICE = 'voice',
53
+ WEB = 'web',
54
+ WEB_SERVICE = 'web_service',
55
+ WHATSAPP = 'whatsapp',
56
+ }
@@ -94,4 +94,5 @@ export interface ReadFormattedAccountingTransaction extends IAccountingTransacti
94
94
  autoAnnotateWithML: boolean;
95
95
  entries?: AnnotateAccountingTransaction;
96
96
  thirdPartySuggestions?: IThirdParty[];
97
+ isVerified?: boolean;
97
98
  }
@@ -8,6 +8,8 @@ import { EstimateStatus, FontIds, InvoiceStatus } from '../../../Enum/Commercial
8
8
  import { IThirdParty } from '../../models/IThirdParty.js';
9
9
  import { InternationalizationChoices } from '../../../../utils/commercialManagement/internationalization/type.js';
10
10
  import { ISaleEmail } from '../../models/ISaleEmail.js';
11
+ import { CountryId } from '#types/Enum/Country.js';
12
+ import { IAccountingTransaction } from '#types/Interface/models/IAccountingTransaction.js';
11
13
 
12
14
  export type ReadCashBasedInvoice = Partial<IAccountingFile>;
13
15
 
@@ -31,6 +33,17 @@ export type ReadThirdPartyEditing = IThirdParty & {
31
33
  country: string | null;
32
34
  };
33
35
 
36
+ export type FacturXInvoiceData = {
37
+ label: string;
38
+ invoiceNumber: string;
39
+ dateValue: string;
40
+ totalTaxIncluded: number;
41
+ totalTaxExcluded: number;
42
+ isAsset: boolean;
43
+ thirdParty: IThirdParty;
44
+ amounts: Array<{ idVat: number; amountBase: number; amountVat: number }>;
45
+ };
46
+
34
47
  export type ReadVatEditing = {
35
48
  id: number;
36
49
  name: string;
@@ -128,3 +141,100 @@ export type ReadStatisticRecurrentRevenue = {
128
141
  totalTaxIncluded: number;
129
142
  } | null;
130
143
  };
144
+
145
+ export type ReadEInvoicingReception = {
146
+ label: string;
147
+ reference: string;
148
+ emissionDate: string;
149
+ dueDate: string | undefined;
150
+ idCurrency: number;
151
+ type: EstimateInvoiceType;
152
+ purchaseOrderReference: string | undefined;
153
+ /** float, not in cent */
154
+ totalTaxExcluded: number;
155
+ /** float, not in cent */
156
+ totalTaxIncluded: number;
157
+ /** float, not in cent */
158
+ depositPaid: number;
159
+ /** float, not in cent */
160
+ amountToPay: number;
161
+ customer: {
162
+ reference: string | undefined;
163
+ name: string | undefined;
164
+ siren: string | undefined;
165
+ vatNumber: string | undefined;
166
+ idCountry: CountryId | undefined;
167
+ };
168
+ provider: {
169
+ name: string | undefined;
170
+ siren: string | undefined;
171
+ vatNumber: string | undefined;
172
+ email: string | undefined;
173
+ idCountry: CountryId | undefined;
174
+ };
175
+ products: Array<{
176
+ externalId: string;
177
+ name: string;
178
+ comment: string | null;
179
+ quantity: number;
180
+ taxExcluded: number;
181
+ totalTaxExcluded: number;
182
+ taxRate: number | undefined;
183
+ idVat: number | undefined;
184
+ externalData: {
185
+ id: string;
186
+ unit: string | undefined;
187
+ };
188
+ }>;
189
+ referencedInvoices: Array<{
190
+ number: string;
191
+ date: string;
192
+ }>;
193
+ vat: {
194
+ totalTaxExcluded: number | undefined;
195
+ list: Array<{
196
+ idVat: number | undefined;
197
+ amountBase: number;
198
+ taxAmount: number;
199
+ }>;
200
+ };
201
+ discount: {
202
+ document: Array<{
203
+ isCharge: boolean;
204
+ amount: number;
205
+ taxRate: number | undefined;
206
+ idVat: number | undefined;
207
+ externalData: {
208
+ reasonCode: string | undefined;
209
+ };
210
+ }>;
211
+ lines: Array<{
212
+ isCharge: boolean;
213
+ amount: number;
214
+ }>;
215
+ };
216
+ };
217
+
218
+ export type ProductInvoiceFromEInvoice = Omit<IProductInvoice, 'id' | 'idEstimateInvoice' | 'createdAt' | 'updatedAt'>;
219
+
220
+ export type ReadEinvoiceInfo = {
221
+ item: IAccountingFile | IAccountingTransaction;
222
+ products: ProductInvoiceFromEInvoice[];
223
+ };
224
+
225
+ export type ReadEInvoice = {
226
+ externalId: string;
227
+ direction: 'In' | 'Out';
228
+ type: string;
229
+ flow: 'CustomerInvoice' | 'SupplierInvoice';
230
+ syntax: 'UBL' | 'CII' | 'Factur-X';
231
+ category: 'FLUX1' | 'FLUX2' | 'FLUX3' | 'FLUX4' | 'FLUX5' | 'FLUX6';
232
+ name: string;
233
+ status: string;
234
+ statusDetails: Array<{ code: string; description: string; fullDescription: string }>;
235
+ updatedAt: string;
236
+ submittedAt: string;
237
+ documentStatus: string;
238
+ externalStructureId: string;
239
+ documentId: string;
240
+ };
@@ -1,3 +1,9 @@
1
+ import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';
2
+ import { IsString, IsOptional, IsArray, IsEnum, IsDateString } from 'class-validator';
3
+ import { DocoonFlowType } from './DocoonInvoice.js';
4
+ import { EInvoicingStatusCode } from '#types/Enum/EInvoicingStatusCode.js';
5
+ import { EInvoicingReasonType } from '#types/Enum/EInvoicingReasonType.js';
6
+
1
7
  export type CreateLegalEntity = {
2
8
  name: string;
3
9
  legalId: string;
@@ -40,3 +46,43 @@ export type RelaunchDirectoryLine = {
40
46
  addressingIdentifier: string;
41
47
  };
42
48
  };
49
+ export class ImportDocoonInvoice {
50
+ @ApiPropertyOptional()
51
+ @IsDateString()
52
+ @IsOptional()
53
+ updatedAfter?: string;
54
+
55
+ @ApiPropertyOptional()
56
+ @IsArray()
57
+ @IsString({ each: true })
58
+ @IsOptional()
59
+ flowType?: DocoonFlowType[];
60
+ }
61
+ export class RejectEInvoice {
62
+ @ApiProperty()
63
+ @IsEnum(EInvoicingStatusCode)
64
+ status: EInvoicingStatusCode;
65
+
66
+ @ApiProperty()
67
+ @IsEnum(EInvoicingReasonType)
68
+ reasonType: EInvoicingReasonType;
69
+
70
+ @ApiProperty()
71
+ @IsString()
72
+ reason: string;
73
+ }
74
+ export class AcceptEInvoice {
75
+ @ApiProperty()
76
+ @IsEnum(EInvoicingStatusCode)
77
+ status: EInvoicingStatusCode;
78
+
79
+ @ApiPropertyOptional()
80
+ @IsString()
81
+ @IsOptional()
82
+ internalNumber?: string;
83
+
84
+ @ApiPropertyOptional()
85
+ @IsString()
86
+ @IsOptional()
87
+ internalComment?: string;
88
+ }