@silexpert/core 1.3.183 → 1.3.184-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 (135) hide show
  1. package/dist/cjs/api/resources/Card.d.ts +1 -23
  2. package/dist/cjs/api/resources/Card.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Card.js +0 -36
  4. package/dist/cjs/api/resources/Card.js.map +1 -1
  5. package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts +0 -1
  6. package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts.map +1 -1
  7. package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js +0 -6
  8. package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js.map +1 -1
  9. package/dist/cjs/types/Interface/api/card/Cron.d.ts +3 -0
  10. package/dist/cjs/types/Interface/api/card/Cron.d.ts.map +1 -1
  11. package/dist/cjs/types/Interface/api/card/Cron.js +10 -1
  12. package/dist/cjs/types/Interface/api/card/Cron.js.map +1 -1
  13. package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts +0 -11
  14. package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
  15. package/dist/cjs/types/Interface/api/card/QueryUserCards.js +1 -44
  16. package/dist/cjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/card/UpdateCard.d.ts +0 -13
  18. package/dist/cjs/types/Interface/api/card/UpdateCard.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/card/UpdateCard.js +1 -58
  20. package/dist/cjs/types/Interface/api/card/UpdateCard.js.map +1 -1
  21. package/dist/cjs/types/Interface/models/IBalanceSheet.d.ts +0 -3
  22. package/dist/cjs/types/Interface/models/IBalanceSheet.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/models/IBalanceSheet.js.map +1 -1
  24. package/dist/cjs/types/Interface/models/ICard.d.ts +0 -19
  25. package/dist/cjs/types/Interface/models/ICard.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/models/ICard.js.map +1 -1
  27. package/dist/cjs/types/Interface/models/ICardHistory.d.ts +0 -4
  28. package/dist/cjs/types/Interface/models/ICardHistory.d.ts.map +1 -1
  29. package/dist/cjs/types/Interface/models/ICardHistory.js.map +1 -1
  30. package/dist/cjs/types/Interface/models/ICustomerVat.d.ts +0 -1
  31. package/dist/cjs/types/Interface/models/ICustomerVat.d.ts.map +1 -1
  32. package/dist/cjs/types/Interface/models/ICustomerVat.js.map +1 -1
  33. package/dist/cjs/types/index.d.ts +0 -5
  34. package/dist/cjs/types/index.d.ts.map +1 -1
  35. package/dist/cjs/types/index.js +0 -5
  36. package/dist/cjs/types/index.js.map +1 -1
  37. package/dist/cjs/utils/vat/utils.d.ts.map +1 -1
  38. package/dist/cjs/utils/vat/utils.js +5 -2
  39. package/dist/cjs/utils/vat/utils.js.map +1 -1
  40. package/dist/mjs/api/resources/Card.d.ts +1 -23
  41. package/dist/mjs/api/resources/Card.d.ts.map +1 -1
  42. package/dist/mjs/api/resources/Card.js +0 -45
  43. package/dist/mjs/api/resources/Card.js.map +1 -1
  44. package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts +0 -1
  45. package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts.map +1 -1
  46. package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js +0 -7
  47. package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js.map +1 -1
  48. package/dist/mjs/types/Interface/api/card/Cron.d.ts +3 -0
  49. package/dist/mjs/types/Interface/api/card/Cron.d.ts.map +1 -1
  50. package/dist/mjs/types/Interface/api/card/Cron.js +8 -0
  51. package/dist/mjs/types/Interface/api/card/Cron.js.map +1 -1
  52. package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts +0 -11
  53. package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
  54. package/dist/mjs/types/Interface/api/card/QueryUserCards.js +1 -43
  55. package/dist/mjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
  56. package/dist/mjs/types/Interface/api/card/UpdateCard.d.ts +0 -13
  57. package/dist/mjs/types/Interface/api/card/UpdateCard.d.ts.map +1 -1
  58. package/dist/mjs/types/Interface/api/card/UpdateCard.js +1 -65
  59. package/dist/mjs/types/Interface/api/card/UpdateCard.js.map +1 -1
  60. package/dist/mjs/types/Interface/models/IBalanceSheet.d.ts +0 -3
  61. package/dist/mjs/types/Interface/models/IBalanceSheet.d.ts.map +1 -1
  62. package/dist/mjs/types/Interface/models/IBalanceSheet.js.map +1 -1
  63. package/dist/mjs/types/Interface/models/ICard.d.ts +0 -19
  64. package/dist/mjs/types/Interface/models/ICard.d.ts.map +1 -1
  65. package/dist/mjs/types/Interface/models/ICard.js.map +1 -1
  66. package/dist/mjs/types/Interface/models/ICardHistory.d.ts +0 -4
  67. package/dist/mjs/types/Interface/models/ICardHistory.d.ts.map +1 -1
  68. package/dist/mjs/types/Interface/models/ICardHistory.js.map +1 -1
  69. package/dist/mjs/types/Interface/models/ICustomerVat.d.ts +0 -1
  70. package/dist/mjs/types/Interface/models/ICustomerVat.d.ts.map +1 -1
  71. package/dist/mjs/types/Interface/models/ICustomerVat.js.map +1 -1
  72. package/dist/mjs/types/index.d.ts +0 -5
  73. package/dist/mjs/types/index.d.ts.map +1 -1
  74. package/dist/mjs/types/index.js +0 -5
  75. package/dist/mjs/types/index.js.map +1 -1
  76. package/dist/mjs/utils/vat/utils.d.ts.map +1 -1
  77. package/dist/mjs/utils/vat/utils.js +5 -2
  78. package/dist/mjs/utils/vat/utils.js.map +1 -1
  79. package/package.json +1 -1
  80. package/ts/api/resources/Card.ts +0 -61
  81. package/ts/types/Interface/api/balanceSheet/UpdateBalanceSheet.ts +0 -5
  82. package/ts/types/Interface/api/card/Cron.ts +8 -1
  83. package/ts/types/Interface/api/card/QueryUserCards.ts +1 -36
  84. package/ts/types/Interface/api/card/UpdateCard.ts +2 -50
  85. package/ts/types/Interface/models/IBalanceSheet.ts +0 -3
  86. package/ts/types/Interface/models/ICard.ts +0 -20
  87. package/ts/types/Interface/models/ICardHistory.ts +0 -4
  88. package/ts/types/Interface/models/ICustomerVat.ts +0 -1
  89. package/ts/types/index.ts +0 -5
  90. package/ts/utils/vat/utils.ts +7 -2
  91. package/dist/cjs/types/Interface/api/card/ModifyAcceptation.d.ts +0 -9
  92. package/dist/cjs/types/Interface/api/card/ModifyAcceptation.d.ts.map +0 -1
  93. package/dist/cjs/types/Interface/api/card/ModifyAcceptation.js +0 -43
  94. package/dist/cjs/types/Interface/api/card/ModifyAcceptation.js.map +0 -1
  95. package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.d.ts +0 -25
  96. package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.d.ts.map +0 -1
  97. package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.js +0 -106
  98. package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.js.map +0 -1
  99. package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.d.ts +0 -5
  100. package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.d.ts.map +0 -1
  101. package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.js +0 -29
  102. package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.js.map +0 -1
  103. package/dist/cjs/types/Interface/api/card/ModifyPlanning.d.ts +0 -18
  104. package/dist/cjs/types/Interface/api/card/ModifyPlanning.d.ts.map +0 -1
  105. package/dist/cjs/types/Interface/api/card/ModifyPlanning.js +0 -79
  106. package/dist/cjs/types/Interface/api/card/ModifyPlanning.js.map +0 -1
  107. package/dist/cjs/types/Interface/api/card/Query.d.ts +0 -8
  108. package/dist/cjs/types/Interface/api/card/Query.d.ts.map +0 -1
  109. package/dist/cjs/types/Interface/api/card/Query.js +0 -37
  110. package/dist/cjs/types/Interface/api/card/Query.js.map +0 -1
  111. package/dist/mjs/types/Interface/api/card/ModifyAcceptation.d.ts +0 -9
  112. package/dist/mjs/types/Interface/api/card/ModifyAcceptation.d.ts.map +0 -1
  113. package/dist/mjs/types/Interface/api/card/ModifyAcceptation.js +0 -42
  114. package/dist/mjs/types/Interface/api/card/ModifyAcceptation.js.map +0 -1
  115. package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.d.ts +0 -25
  116. package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.d.ts.map +0 -1
  117. package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.js +0 -115
  118. package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.js.map +0 -1
  119. package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.d.ts +0 -5
  120. package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.d.ts.map +0 -1
  121. package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.js +0 -27
  122. package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.js.map +0 -1
  123. package/dist/mjs/types/Interface/api/card/ModifyPlanning.d.ts +0 -18
  124. package/dist/mjs/types/Interface/api/card/ModifyPlanning.d.ts.map +0 -1
  125. package/dist/mjs/types/Interface/api/card/ModifyPlanning.js +0 -84
  126. package/dist/mjs/types/Interface/api/card/ModifyPlanning.js.map +0 -1
  127. package/dist/mjs/types/Interface/api/card/Query.d.ts +0 -8
  128. package/dist/mjs/types/Interface/api/card/Query.d.ts.map +0 -1
  129. package/dist/mjs/types/Interface/api/card/Query.js +0 -34
  130. package/dist/mjs/types/Interface/api/card/Query.js.map +0 -1
  131. package/ts/types/Interface/api/card/ModifyAcceptation.ts +0 -24
  132. package/ts/types/Interface/api/card/ModifyBalanceSheet.ts +0 -81
  133. package/ts/types/Interface/api/card/ModifyCustomerVat.ts +0 -13
  134. package/ts/types/Interface/api/card/ModifyPlanning.ts +0 -52
  135. package/ts/types/Interface/api/card/Query.ts +0 -19
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../ts/utils/vat/utils.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AC;QAClG,OAAO,GAAG,CAAC,YAAY,CAAC;IAC1B,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC;AACnB,CAAC","sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat, VatType } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n accountingEntry.account.number.toString().startsWith(number)\n ) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0),\n precision,\n );\n return isAbs ? Math.abs(result) : result;\n}\n\nexport function setZeroIfIsNegative(value: number): number {\n return value < 0 ? 0 : value;\n}\n\nexport function getTaxAmountByAccountNumber(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n logging = false,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n accountingEntry.account.number.toString().startsWith(number)\n ) {\n // eslint-disable-next-line no-console\n if (logging) console.log('\\'\\'');\n // eslint-disable-next-line no-console\n if (logging) console.log(accountingEntry);\n\n accTmp +=\n (accountingEntry.debit - accountingEntry.credit) *\n ((Object.values(Vat).find((v) => v.id === accountingEntry.idVat)?.value ?? 0) / 100);\n return true;\n }\n return false;\n });\n return isAbs ? Math.abs(accTmp) : accTmp;\n }, precision),\n );\n}\n\nexport function textFormatting(value: any, length: number | null = null, start?: number): string | null {\n if (value && typeof value === 'string') {\n let formattedValue = value.replace(/[\\u2018\\u2019]/g, '\\''); // Suppression des \"Curly Quotes\"\n formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &\n formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !\n formattedValue = formattedValue.replace(/[\\t]/g, ''); // Suppression des tabulations\n\n formattedValue = formattedValue.replace(/`/g, '\\''); // Suppression des `\n formattedValue = formattedValue.replace(/\"/g, ''); // Suppression des \"\n formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début\n formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin\n formattedValue = formattedValue.replace(/€/g, 'EUR');\n formattedValue = formattedValue.replace(/œ/g, 'oe');\n if (length) formattedValue = formattedValue.slice(start ?? 0, (start ?? 0) + length);\n return formattedValue;\n }\n return null;\n}\n\nexport function getTaxesIncludedAmount(amountHt: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find((v) => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountHt * ((100 + vatRate) / 100);\n\n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}\n\nexport function getTaxesExcludedAmount(amountTtc: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find((v) => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountTtc / ((100 + vatRate) / 100);\n\n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}\n\nexport function getInternalInvoicingVatByZipCode(zipCode: string | null): VatType {\n if (zipCode?.startsWith('971') || zipCode?.startsWith('972') || zipCode?.startsWith('974')) {\n return Vat.TX_8_5;\n } else if (zipCode?.startsWith('973') || zipCode?.startsWith('976') || zipCode?.startsWith('977')) {\n return Vat.WITHOUT_TAXE;\n }\n return Vat.TX_20;\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,I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GAAG,CAAC,KAAK,CAAC;AACnB,CAAC","sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat, VatType } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n accountingEntry.account.number.toString().startsWith(number)\n ) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0),\n precision,\n );\n return isAbs ? Math.abs(result) : result;\n}\n\nexport function setZeroIfIsNegative(value: number): number {\n return value < 0 ? 0 : value;\n}\n\nexport function getTaxAmountByAccountNumber(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n logging = false,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n accountingEntry.account.number.toString().startsWith(number)\n ) {\n // eslint-disable-next-line no-console\n if (logging) console.log('\\'\\'');\n // eslint-disable-next-line no-console\n if (logging) console.log(accountingEntry);\n\n accTmp +=\n (accountingEntry.debit - accountingEntry.credit) *\n ((Object.values(Vat).find((v) => v.id === accountingEntry.idVat)?.value ?? 0) / 100);\n return true;\n }\n return false;\n });\n return isAbs ? Math.abs(accTmp) : accTmp;\n }, precision),\n );\n}\n\nexport function textFormatting(value: any, length: number | null = null, start?: number): string | null {\n if (value && typeof value === 'string') {\n let formattedValue = value.replace(/[\\u2018\\u2019]/g, '\\''); // Suppression des \"Curly Quotes\"\n formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &\n formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !\n formattedValue = formattedValue.replace(/[\\t]/g, ''); // Suppression des tabulations\n\n formattedValue = formattedValue.replace(/`/g, '\\''); // Suppression des `\n formattedValue = formattedValue.replace(/\"/g, ''); // Suppression des \"\n formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début\n formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin\n formattedValue = formattedValue.replace(/€/g, 'EUR');\n formattedValue = formattedValue.replace(/œ/g, 'oe');\n if (length) formattedValue = formattedValue.slice(start ?? 0, (start ?? 0) + length);\n return formattedValue;\n }\n return null;\n}\n\nexport function getTaxesIncludedAmount(amountHt: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find((v) => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountHt * ((100 + vatRate) / 100);\n\n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}\n\nexport function getTaxesExcludedAmount(amountTtc: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find((v) => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountTtc / ((100 + vatRate) / 100);\n\n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}\n\nexport function getInternalInvoicingVatByZipCode(zipCode: string | null): VatType {\n if (zipCode?.startsWith('972') || zipCode?.startsWith('974')) {\n return Vat.TX_8_5;\n } else if (\n zipCode?.startsWith('971') ||\n zipCode?.startsWith('973') ||\n zipCode?.startsWith('976') ||\n zipCode?.startsWith('977')\n ) {\n return Vat.WITHOUT_TAXE;\n }\n return Vat.TX_20;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.183",
3
+ "version": "1.3.184-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",
@@ -3,15 +3,6 @@ import {
3
3
  ICard,
4
4
  QueryUserCards,
5
5
  QueryUserCardsPaginated,
6
- QueryUserCardsStats,
7
- CardsStatsGroup,
8
- UpdateCard,
9
- ModifyTeamPlanning,
10
- ModifyExercisePlanning,
11
- OrganizeBalanceSheets,
12
- OrganizeBalanceSheetsResponse,
13
- QueryInternalCardsStats,
14
- InternalCardStats,
15
6
  BasePaginate,
16
7
  UpdateCardV2,
17
8
  AssignCard,
@@ -38,62 +29,10 @@ export class Card extends Resource {
38
29
  });
39
30
  }
40
31
 
41
- /**
42
- * @deprecated Use getAll instead
43
- */
44
- getAllAdmin(params: QueryUserCards, signal?: AbortSignal): Promise<ICard[]> {
45
- return this.axios.$get('/cards', {
46
- ...(signal ? { signal } : {}),
47
- params,
48
- });
49
- }
50
-
51
- getStats(params: QueryUserCardsStats, signal?: AbortSignal): Promise<CardsStatsGroup[]> {
52
- return this.axios.$get('/cards/stats', {
53
- ...(signal ? { signal } : {}),
54
- params,
55
- });
56
- }
57
-
58
- getInternalStats(params: QueryInternalCardsStats, signal?: AbortSignal): Promise<InternalCardStats[]> {
59
- return this.axios.$get('/cards/internal/stats', {
60
- ...(signal ? { signal } : {}),
61
- params,
62
- });
63
- }
64
-
65
- /**
66
- * @deprecated Use updateV2 instead
67
- */
68
- update(id: number, data: UpdateCard): Promise<ICard> {
69
- return this.axios.$put(`/cards/${id}`, data);
70
- }
71
-
72
32
  delete(id: number): Promise<void> {
73
33
  return this.axios.$delete(`/cards/${id}`);
74
34
  }
75
35
 
76
- /**
77
- * @deprecated comptallo v1 endpoint
78
- */
79
- modifyTeamPlanning(data: ModifyTeamPlanning): Promise<true> {
80
- return this.axios.$put('/cards/assign/modify-team-planning', data);
81
- }
82
-
83
- /**
84
- * @deprecated comptallo v1 endpoint
85
- */
86
- modifyExercisePlanning(data: ModifyExercisePlanning): Promise<true> {
87
- return this.axios.$put('/cards/assign/modify-exercise-planning', data);
88
- }
89
-
90
- /**
91
- * @deprecated comptallo v1 endpoint
92
- */
93
- organizeFutureBalanceSheets(data: OrganizeBalanceSheets): Promise<OrganizeBalanceSheetsResponse> {
94
- return this.axios.$post('/cards/accountant/organize/future-balance-sheets', data);
95
- }
96
-
97
36
  updateV2(idCard: number, data: UpdateCardV2): Promise<ICard> {
98
37
  return this.axios.$put(`/cards/${idCard}/v2`, data);
99
38
  }
@@ -48,11 +48,6 @@ export class UpdateBalanceSheet {
48
48
  @IsOptional()
49
49
  bankCollectingState?: number;
50
50
 
51
- @ApiPropertyOptional()
52
- @IsNumber()
53
- @IsOptional()
54
- idCard?: number;
55
-
56
51
  @ApiPropertyOptional()
57
52
  @IsString()
58
53
  @IsOptional()
@@ -18,4 +18,11 @@ export class GenerateAdvanceISCard {
18
18
  @IsOptional()
19
19
  @IsInt()
20
20
  month?: number;
21
- }
21
+ }
22
+
23
+ export class QueryCronCards {
24
+ @ApiPropertyOptional()
25
+ @IsOptional()
26
+ @IsInt()
27
+ declare idSociety?: number;
28
+ }
@@ -1,4 +1,4 @@
1
- import { IsArray, IsBoolean, IsDate, IsDateString, IsEnum, IsInt, IsOptional, IsString, Min } from 'class-validator';
1
+ import { IsArray, IsBoolean, IsDateString, IsInt, IsOptional, IsString, Min } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { CardType, CardState } from '../../../Enum/Card';
4
4
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
@@ -57,38 +57,3 @@ export class QueryUserCardsPaginated extends QueryUserCards {
57
57
  @Min(1)
58
58
  limit: number;
59
59
  }
60
-
61
- /**
62
- * @deprecated Use QueryUserCards instead
63
- */
64
- export class QueryUserCardsAdmin {
65
- @ApiPropertyOptional()
66
- @IsOptional()
67
- @IsInt()
68
- declare idUser?: number;
69
-
70
- @ApiPropertyOptional()
71
- @IsOptional()
72
- @IsDate()
73
- declare startDate?: Date;
74
-
75
- @ApiPropertyOptional()
76
- @IsOptional()
77
- @IsDate()
78
- declare endDate?: Date;
79
-
80
- @ApiPropertyOptional()
81
- @IsOptional()
82
- @IsString()
83
- declare search?: string;
84
-
85
- @ApiPropertyOptional()
86
- @IsOptional()
87
- @IsArray()
88
- declare types?: CardType[];
89
-
90
- @ApiPropertyOptional()
91
- @IsOptional()
92
- @IsEnum(CardState)
93
- declare state?: CardState;
94
- }
@@ -1,7 +1,6 @@
1
- import { IsBoolean, IsDate, IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
1
+ import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { CardState, CardType, TransactionRangeFilter } from '../../../Enum/Card';
4
- import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
5
4
 
6
5
  export class AssignCard {
7
6
  @ApiProperty()
@@ -20,10 +19,6 @@ export class UpdateCardV2 {
20
19
  @IsEnum(CardState)
21
20
  state?: CardState;
22
21
 
23
- @ApiPropertyOptional()
24
- @IsOptional()
25
- plannedAt?: Date | null;
26
-
27
22
  @ApiPropertyOptional()
28
23
  @IsOptional()
29
24
  @IsInt()
@@ -38,47 +33,4 @@ export class UpdateCardV2 {
38
33
  @IsOptional()
39
34
  @IsInt()
40
35
  priority?: number;
41
- }
42
-
43
- /**
44
- * @deprecated Use UpdateCardV2 instead
45
- */
46
- export class UpdateCard {
47
- @ApiPropertyOptional()
48
- @IsOptional()
49
- @IsInt()
50
- @IsEnum(CardType)
51
- type?: CardType;
52
-
53
- @ApiPropertyOptional()
54
- @IsOptional()
55
- @IsBoolean()
56
- isManual?: boolean;
57
-
58
- @ApiPropertyOptional()
59
- @IsOptional()
60
- @IsBoolean()
61
- @ToBoolean()
62
- isBlocked?: boolean;
63
-
64
- @ApiPropertyOptional()
65
- @IsOptional()
66
- @IsInt()
67
- @IsEnum(CardState)
68
- state?: CardState;
69
-
70
- @ApiPropertyOptional()
71
- @IsOptional()
72
- @IsDate()
73
- plannedAt?: Date | null;
74
-
75
- @ApiPropertyOptional()
76
- @IsOptional()
77
- @IsInt()
78
- idUser?: number;
79
-
80
- @ApiPropertyOptional()
81
- @IsOptional()
82
- @IsString()
83
- comment?: string;
84
- }
36
+ }
@@ -4,7 +4,6 @@ import { ISupervision } from './ISupervision';
4
4
  import { IPrestation } from './IPrestation';
5
5
  import { IGedFile } from './IGedFile';
6
6
  import { IFile } from './IFile';
7
- import { ICard } from './ICard';
8
7
  import { IBalanceSheetHistory } from './IBalanceSheetHistory';
9
8
  import { IAdditionalBalance } from './IAdditionalBalance';
10
9
 
@@ -24,7 +23,6 @@ export interface IBalanceSheet {
24
23
  bankCollectingState?: number;
25
24
  idExercice?: number;
26
25
  idCalendarEvent?: number;
27
- idCard?: number;
28
26
  createdAt?: Date;
29
27
  updatedAt?: Date;
30
28
 
@@ -35,7 +33,6 @@ export interface IBalanceSheet {
35
33
  prestations?: IPrestation[];
36
34
  gedFiles?: IGedFile[];
37
35
  file?: IFile;
38
- card?: ICard;
39
36
  balanceSheetHistories?: IBalanceSheetHistory[];
40
37
  additionalBalance?: IAdditionalBalance;
41
38
  }
@@ -6,7 +6,6 @@ import { ICalendarEvent } from './ICalendarEvent';
6
6
  import { ICustomerVat } from './ICustomerVat';
7
7
  import { ICardHistory } from './ICardHistory';
8
8
  import { IComment } from './IComment';
9
- import { ITeam } from './ITeam';
10
9
  import { IChecklist } from './IChecklist';
11
10
  import { ICustomerIsRegime } from './ICustomerIsRegime';
12
11
  import { IExercice } from './IExercice';
@@ -15,12 +14,8 @@ export interface ICard {
15
14
  id?: number;
16
15
  type: CardType;
17
16
  state: CardState;
18
- isManual: boolean;
19
- isBlocked: boolean;
20
17
  priority?: number | null;
21
- plannedAt?: Date | null;
22
18
  idUser?: number | null;
23
- idTeam?: number | null;
24
19
  idSociety: number;
25
20
  idBalanceSheet?: number | null;
26
21
  idCustomerVat?: number | null;
@@ -33,28 +28,13 @@ export interface ICard {
33
28
 
34
29
  // Associations
35
30
  user?: IUser;
36
- team?: ITeam;
37
31
  society?: ISociety;
38
32
  balancesheet?: IBalanceSheet;
39
33
  vat?: ICustomerVat;
40
34
  customerIsRegime?: ICustomerIsRegime;
41
35
  checklist?: IChecklist;
42
36
  exercice?: IExercice;
43
- /**
44
- * @deprecated old relationship with balance sheet
45
- */
46
- balanceSheet?: IBalanceSheet;
47
- /**
48
- * @deprecated old relationship with customer vat
49
- */
50
- customerVat?: ICustomerVat;
51
37
  events?: ICalendarEvent[];
52
38
  history?: ICardHistory[];
53
39
  comment?: IComment;
54
40
  }
55
-
56
- export interface CardAnnotedTransaction {
57
- total: number;
58
- nbAnnoted: number;
59
- rate: number;
60
- }
@@ -1,15 +1,12 @@
1
1
  import { CardState } from '../../Enum/Card';
2
2
  import { IUser } from './IUser';
3
3
  import { ICard } from './ICard';
4
- import { ITeam } from './ITeam';
5
4
 
6
5
  export interface ICardHistory {
7
6
  id?: number;
8
7
  state: CardState;
9
- plannedAt: Date;
10
8
  idUserWhoChanged: number;
11
9
  idUserOrigin?: number;
12
- idTeamOrigin?: number;
13
10
  idCard: number;
14
11
  createdAt?: Date;
15
12
  updatedAt?: Date;
@@ -17,6 +14,5 @@ export interface ICardHistory {
17
14
  // Associations
18
15
  userWhoChanged?: Partial<IUser>;
19
16
  userOrigin?: Partial<IUser>;
20
- teamOrigin?: Partial<ITeam>;
21
17
  card?: ICard;
22
18
  }
@@ -21,7 +21,6 @@ export interface ICustomerVat {
21
21
  acceptation: boolean | null;
22
22
  acceptationDate: Date | null;
23
23
  idMail: number | null;
24
- idCard: number | null;
25
24
  idVatDeclaration?: number | null; // Obsolète
26
25
  createdAt?: Date | null;
27
26
  updatedAt?: Date | null;
package/ts/types/index.ts CHANGED
@@ -1074,9 +1074,7 @@ export * from './Interface/api/vatControl/QueryVatControl';
1074
1074
  export * from './Interface/api/terminationList/QueryPaginateTerminationList';
1075
1075
  export * from './Interface/api/card/QueryUserCards';
1076
1076
  export * from './Interface/api/card/QueryUserCardsStats';
1077
- export * from './Interface/api/card/Query';
1078
1077
  export * from './Interface/api/card/UpdateCard';
1079
- export * from './Interface/api/card/ModifyPlanning';
1080
1078
  export * from './Interface/api/notion/NotionResponse';
1081
1079
  export * from './Interface/api/IntermediateManagementRebate';
1082
1080
  export * from './Interface/api/equipment/Query';
@@ -1130,9 +1128,6 @@ export * from './Interface/api/previsionalForm/CreatePrevisionalForm';
1130
1128
  export * from './Interface/api/toDoExpress/Query';
1131
1129
  export * from './Interface/api/toDoExpress/Read';
1132
1130
  export * from './Interface/api/config/ConfigType';
1133
- export * from './Interface/api/card/ModifyBalanceSheet';
1134
- export * from './Interface/api/card/ModifyAcceptation';
1135
- export * from './Interface/api/card/ModifyCustomerVat';
1136
1131
  export * from './Interface/api/card/Cron';
1137
1132
  export * from './Interface/api/user/RegisterProspect';
1138
1133
  export * from './Interface/api/user/RegisterWebhook';
@@ -104,9 +104,14 @@ export function getTaxesExcludedAmount(amountTtc: number, idVat: number, isRound
104
104
  }
105
105
 
106
106
  export function getInternalInvoicingVatByZipCode(zipCode: string | null): VatType {
107
- if (zipCode?.startsWith('971') || zipCode?.startsWith('972') || zipCode?.startsWith('974')) {
107
+ if (zipCode?.startsWith('972') || zipCode?.startsWith('974')) {
108
108
  return Vat.TX_8_5;
109
- } else if (zipCode?.startsWith('973') || zipCode?.startsWith('976') || zipCode?.startsWith('977')) {
109
+ } else if (
110
+ zipCode?.startsWith('971') ||
111
+ zipCode?.startsWith('973') ||
112
+ zipCode?.startsWith('976') ||
113
+ zipCode?.startsWith('977')
114
+ ) {
110
115
  return Vat.WITHOUT_TAXE;
111
116
  }
112
117
  return Vat.TX_20;
@@ -1,9 +0,0 @@
1
- export declare class AssignAcceptationAutomaticly {
2
- idTeam: number;
3
- idSociety?: number;
4
- }
5
- export declare class AssignAcceptationNewClientAutomatically {
6
- idUser: number;
7
- idSociety?: number;
8
- }
9
- //# sourceMappingURL=ModifyAcceptation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModifyAcceptation.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/card/ModifyAcceptation.ts"],"names":[],"mappings":"AAGA,qBAAa,4BAA4B;IAGvC,MAAM,EAAE,MAAM,CAAC;IAKf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,uCAAuC;IAGlD,MAAM,EAAE,MAAM,CAAC;IAKf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AssignAcceptationNewClientAutomatically = exports.AssignAcceptationAutomaticly = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const utils_1 = require("../../../../utils");
15
- class AssignAcceptationAutomaticly {
16
- }
17
- exports.AssignAcceptationAutomaticly = AssignAcceptationAutomaticly;
18
- __decorate([
19
- (0, utils_1.ApiProperty)(),
20
- (0, class_validator_1.IsNumber)(),
21
- __metadata("design:type", Number)
22
- ], AssignAcceptationAutomaticly.prototype, "idTeam", void 0);
23
- __decorate([
24
- (0, utils_1.ApiPropertyOptional)(),
25
- (0, class_validator_1.IsOptional)(),
26
- (0, class_validator_1.IsNumber)(),
27
- __metadata("design:type", Number)
28
- ], AssignAcceptationAutomaticly.prototype, "idSociety", void 0);
29
- class AssignAcceptationNewClientAutomatically {
30
- }
31
- exports.AssignAcceptationNewClientAutomatically = AssignAcceptationNewClientAutomatically;
32
- __decorate([
33
- (0, utils_1.ApiProperty)(),
34
- (0, class_validator_1.IsNumber)(),
35
- __metadata("design:type", Number)
36
- ], AssignAcceptationNewClientAutomatically.prototype, "idUser", void 0);
37
- __decorate([
38
- (0, utils_1.ApiPropertyOptional)(),
39
- (0, class_validator_1.IsOptional)(),
40
- (0, class_validator_1.IsNumber)(),
41
- __metadata("design:type", Number)
42
- ], AssignAcceptationNewClientAutomatically.prototype, "idSociety", void 0);
43
- //# sourceMappingURL=ModifyAcceptation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModifyAcceptation.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/card/ModifyAcceptation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AACvD,6CAAqE;AAErE,MAAa,4BAA4B;CASxC;AATD,oEASC;AANC;IAFC,IAAA,mBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;4DACI;AAKf;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+DACQ;AAGrB,MAAa,uCAAuC;CASnD;AATD,0FASC;AANC;IAFC,IAAA,mBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;uEACI;AAKf;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0EACQ","sourcesContent":["import { IsNumber, IsOptional } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\n\nexport class AssignAcceptationAutomaticly {\n @ApiProperty()\n @IsNumber()\n idTeam: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idSociety?: number;\n}\n\nexport class AssignAcceptationNewClientAutomatically {\n @ApiProperty()\n @IsNumber()\n idUser: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idSociety?: number;\n}\n"]}
@@ -1,25 +0,0 @@
1
- import { ComptaType } from '../../../Enum/ComptaType';
2
- import { CardType } from '../../../Enum/Card';
3
- import { LegalFormTypeEnum } from '../../../Enum/LegalForm';
4
- export interface OrganizeBalanceSheetsResponse {
5
- plannedCardsCount: number;
6
- }
7
- export declare class OrganizeBalanceSheets {
8
- idTeam?: number;
9
- idAccountants?: number[];
10
- cardType: CardType[];
11
- exerciceMonthDate: Date;
12
- idComptaType: ComptaType;
13
- legalForms: LegalFormTypeEnum[];
14
- soldeIsOk: boolean;
15
- withSocial: boolean;
16
- assignDateStart: Date;
17
- assignDateEnd?: Date;
18
- nbCardByDay?: number;
19
- idSociety?: number;
20
- }
21
- export declare class AssignBalanceSheet {
22
- idTeam: number;
23
- idSociety?: number;
24
- }
25
- //# sourceMappingURL=ModifyBalanceSheet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModifyBalanceSheet.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/card/ModifyBalanceSheet.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,WAAW,6BAA6B;IAC5C,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,qBAAqB;IAIhC,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAKzB,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAIrB,iBAAiB,EAAE,IAAI,CAAC;IAIxB,YAAY,EAAE,UAAU,CAAC;IAKzB,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAKhC,SAAS,EAAE,OAAO,CAAC;IAKnB,UAAU,EAAE,OAAO,CAAC;IAIpB,eAAe,EAAE,IAAI,CAAC;IAKtB,aAAa,CAAC,EAAE,IAAI,CAAC;IAKrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,kBAAkB;IAG7B,MAAM,EAAE,MAAM,CAAC;IAKf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,106 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AssignBalanceSheet = exports.OrganizeBalanceSheets = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const utils_1 = require("../../../../utils");
15
- const ComptaType_1 = require("../../../Enum/ComptaType");
16
- const boolean_transform_1 = require("../../../../utils/transforms/boolean.transform");
17
- const Card_1 = require("../../../Enum/Card");
18
- const LegalForm_1 = require("../../../Enum/LegalForm");
19
- class OrganizeBalanceSheets {
20
- }
21
- exports.OrganizeBalanceSheets = OrganizeBalanceSheets;
22
- __decorate([
23
- (0, utils_1.ApiPropertyOptional)(),
24
- (0, class_validator_1.IsOptional)(),
25
- (0, class_validator_1.IsNumber)(),
26
- __metadata("design:type", Number)
27
- ], OrganizeBalanceSheets.prototype, "idTeam", void 0);
28
- __decorate([
29
- (0, utils_1.ApiPropertyOptional)(),
30
- (0, class_validator_1.IsOptional)(),
31
- (0, class_validator_1.IsArray)(),
32
- (0, class_validator_1.IsInt)({ each: true }),
33
- __metadata("design:type", Array)
34
- ], OrganizeBalanceSheets.prototype, "idAccountants", void 0);
35
- __decorate([
36
- (0, utils_1.ApiProperty)(),
37
- (0, class_validator_1.IsArray)(),
38
- (0, class_validator_1.IsEnum)(Card_1.CardType, { each: true }),
39
- __metadata("design:type", Array)
40
- ], OrganizeBalanceSheets.prototype, "cardType", void 0);
41
- __decorate([
42
- (0, utils_1.ApiProperty)(),
43
- (0, class_validator_1.IsDate)(),
44
- __metadata("design:type", Date)
45
- ], OrganizeBalanceSheets.prototype, "exerciceMonthDate", void 0);
46
- __decorate([
47
- (0, utils_1.ApiProperty)(),
48
- (0, class_validator_1.IsEnum)(ComptaType_1.ComptaType),
49
- __metadata("design:type", Number)
50
- ], OrganizeBalanceSheets.prototype, "idComptaType", void 0);
51
- __decorate([
52
- (0, utils_1.ApiProperty)(),
53
- (0, class_validator_1.IsArray)(),
54
- (0, class_validator_1.IsEnum)(LegalForm_1.LegalFormTypeEnum, { each: true }),
55
- __metadata("design:type", Array)
56
- ], OrganizeBalanceSheets.prototype, "legalForms", void 0);
57
- __decorate([
58
- (0, utils_1.ApiProperty)(),
59
- (0, class_validator_1.IsBoolean)(),
60
- (0, boolean_transform_1.ToBoolean)(),
61
- __metadata("design:type", Boolean)
62
- ], OrganizeBalanceSheets.prototype, "soldeIsOk", void 0);
63
- __decorate([
64
- (0, utils_1.ApiProperty)(),
65
- (0, class_validator_1.IsBoolean)(),
66
- (0, boolean_transform_1.ToBoolean)(),
67
- __metadata("design:type", Boolean)
68
- ], OrganizeBalanceSheets.prototype, "withSocial", void 0);
69
- __decorate([
70
- (0, utils_1.ApiProperty)(),
71
- (0, class_validator_1.IsDate)(),
72
- __metadata("design:type", Date)
73
- ], OrganizeBalanceSheets.prototype, "assignDateStart", void 0);
74
- __decorate([
75
- (0, utils_1.ApiPropertyOptional)(),
76
- (0, class_validator_1.IsOptional)(),
77
- (0, class_validator_1.IsDate)(),
78
- __metadata("design:type", Date)
79
- ], OrganizeBalanceSheets.prototype, "assignDateEnd", void 0);
80
- __decorate([
81
- (0, utils_1.ApiPropertyOptional)(),
82
- (0, class_validator_1.IsOptional)(),
83
- (0, class_validator_1.IsNumber)(),
84
- __metadata("design:type", Number)
85
- ], OrganizeBalanceSheets.prototype, "nbCardByDay", void 0);
86
- __decorate([
87
- (0, utils_1.ApiPropertyOptional)(),
88
- (0, class_validator_1.IsOptional)(),
89
- (0, class_validator_1.IsNumber)(),
90
- __metadata("design:type", Number)
91
- ], OrganizeBalanceSheets.prototype, "idSociety", void 0);
92
- class AssignBalanceSheet {
93
- }
94
- exports.AssignBalanceSheet = AssignBalanceSheet;
95
- __decorate([
96
- (0, utils_1.ApiProperty)(),
97
- (0, class_validator_1.IsNumber)(),
98
- __metadata("design:type", Number)
99
- ], AssignBalanceSheet.prototype, "idTeam", void 0);
100
- __decorate([
101
- (0, utils_1.ApiPropertyOptional)(),
102
- (0, class_validator_1.IsOptional)(),
103
- (0, class_validator_1.IsNumber)(),
104
- __metadata("design:type", Number)
105
- ], AssignBalanceSheet.prototype, "idSociety", void 0);
106
- //# sourceMappingURL=ModifyBalanceSheet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModifyBalanceSheet.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/card/ModifyBalanceSheet.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkG;AAClG,6CAAqE;AACrE,yDAAsD;AACtD,sFAA2E;AAC3E,6CAA8C;AAC9C,uDAA4D;AAM5D,MAAa,qBAAqB;CA0DjC;AA1DD,sDA0DC;AAtDC;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;qDACK;AAMhB;IAJC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,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ber, IsOptional } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ComptaType } from '../../../Enum/ComptaType';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { CardType } from '../../../Enum/Card';\nimport { LegalFormTypeEnum } from '../../../Enum/LegalForm';\n\nexport interface OrganizeBalanceSheetsResponse {\n plannedCardsCount: number;\n}\n\nexport class OrganizeBalanceSheets {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idTeam?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n @IsInt({ each: true })\n idAccountants?: number[];\n\n @ApiProperty()\n @IsArray()\n @IsEnum(CardType, { each: true })\n cardType: CardType[];\n\n @ApiProperty()\n @IsDate()\n exerciceMonthDate: Date;\n\n @ApiProperty()\n @IsEnum(ComptaType)\n idComptaType: ComptaType;\n\n @ApiProperty()\n @IsArray()\n @IsEnum(LegalFormTypeEnum, { each: true })\n legalForms: LegalFormTypeEnum[];\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n soldeIsOk: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n withSocial: boolean;\n\n @ApiProperty()\n @IsDate()\n assignDateStart: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n assignDateEnd?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n nbCardByDay?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idSociety?: number;\n}\n\nexport class AssignBalanceSheet {\n @ApiProperty()\n @IsNumber()\n idTeam: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idSociety?: number;\n}\n"]}
@@ -1,5 +0,0 @@
1
- export declare class assignCustomerVatAutomatically {
2
- idUser: number;
3
- idSociety?: number;
4
- }
5
- //# sourceMappingURL=ModifyCustomerVat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModifyCustomerVat.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/card/ModifyCustomerVat.ts"],"names":[],"mappings":"AAGA,qBAAa,8BAA8B;IAGzC,MAAM,EAAE,MAAM,CAAC;IAKf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}