@silexpert/core 1.1.321 → 1.1.323

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 (98) hide show
  1. package/dist/cjs/api/resources/Letter.d.ts +2 -2
  2. package/dist/cjs/api/resources/Letter.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Letter.js +4 -4
  4. package/dist/cjs/api/resources/Letter.js.map +1 -1
  5. package/dist/cjs/api/resources/User.d.ts +2 -1
  6. package/dist/cjs/api/resources/User.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/User.js +17 -0
  8. package/dist/cjs/api/resources/User.js.map +1 -1
  9. package/dist/cjs/types/Enum/GeneralThirdParty.d.ts.map +1 -1
  10. package/dist/cjs/types/Enum/GeneralThirdParty.js +9 -3
  11. package/dist/cjs/types/Enum/GeneralThirdParty.js.map +1 -1
  12. package/dist/cjs/types/Enum/TimeSlot.d.ts +18 -1
  13. package/dist/cjs/types/Enum/TimeSlot.d.ts.map +1 -1
  14. package/dist/cjs/types/Enum/TimeSlot.js +118 -25
  15. package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
  16. package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts +1 -0
  17. package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts.map +1 -1
  18. package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js +7 -0
  19. package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js.map +1 -1
  20. package/dist/cjs/types/Interface/api/letter/Query.d.ts +1 -0
  21. package/dist/cjs/types/Interface/api/letter/Query.d.ts.map +1 -1
  22. package/dist/cjs/types/Interface/api/letter/Query.js +6 -0
  23. package/dist/cjs/types/Interface/api/letter/Query.js.map +1 -1
  24. package/dist/cjs/types/Interface/api/user/CreateCoworker.d.ts +3 -0
  25. package/dist/cjs/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/api/user/CreateCoworker.js +13 -0
  27. package/dist/cjs/types/Interface/api/user/CreateCoworker.js.map +1 -1
  28. package/dist/cjs/types/Interface/api/user/UpdateCoworker.d.ts +25 -0
  29. package/dist/cjs/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -0
  30. package/dist/cjs/types/Interface/api/user/UpdateCoworker.js +147 -0
  31. package/dist/cjs/types/Interface/api/user/UpdateCoworker.js.map +1 -0
  32. package/dist/cjs/types/index.d.ts +1 -0
  33. package/dist/cjs/types/index.d.ts.map +1 -1
  34. package/dist/cjs/types/index.js +1 -0
  35. package/dist/cjs/types/index.js.map +1 -1
  36. package/dist/cjs/utils/stringUtils/clean.d.ts +1 -0
  37. package/dist/cjs/utils/stringUtils/clean.d.ts.map +1 -1
  38. package/dist/cjs/utils/stringUtils/clean.js +3 -3
  39. package/dist/cjs/utils/stringUtils/clean.js.map +1 -1
  40. package/dist/cjs/utils/subscription.d.ts +1 -0
  41. package/dist/cjs/utils/subscription.d.ts.map +1 -1
  42. package/dist/cjs/utils/subscription.js +2 -1
  43. package/dist/cjs/utils/subscription.js.map +1 -1
  44. package/dist/mjs/api/resources/Letter.d.ts +2 -2
  45. package/dist/mjs/api/resources/Letter.d.ts.map +1 -1
  46. package/dist/mjs/api/resources/Letter.js +10 -4
  47. package/dist/mjs/api/resources/Letter.js.map +1 -1
  48. package/dist/mjs/api/resources/User.d.ts +2 -1
  49. package/dist/mjs/api/resources/User.d.ts.map +1 -1
  50. package/dist/mjs/api/resources/User.js +17 -0
  51. package/dist/mjs/api/resources/User.js.map +1 -1
  52. package/dist/mjs/types/Enum/GeneralThirdParty.d.ts.map +1 -1
  53. package/dist/mjs/types/Enum/GeneralThirdParty.js +9 -3
  54. package/dist/mjs/types/Enum/GeneralThirdParty.js.map +1 -1
  55. package/dist/mjs/types/Enum/TimeSlot.d.ts +18 -1
  56. package/dist/mjs/types/Enum/TimeSlot.d.ts.map +1 -1
  57. package/dist/mjs/types/Enum/TimeSlot.js +116 -24
  58. package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
  59. package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts +1 -0
  60. package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts.map +1 -1
  61. package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js +8 -0
  62. package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js.map +1 -1
  63. package/dist/mjs/types/Interface/api/letter/Query.d.ts +1 -0
  64. package/dist/mjs/types/Interface/api/letter/Query.d.ts.map +1 -1
  65. package/dist/mjs/types/Interface/api/letter/Query.js +7 -0
  66. package/dist/mjs/types/Interface/api/letter/Query.js.map +1 -1
  67. package/dist/mjs/types/Interface/api/user/CreateCoworker.d.ts +3 -0
  68. package/dist/mjs/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
  69. package/dist/mjs/types/Interface/api/user/CreateCoworker.js +16 -1
  70. package/dist/mjs/types/Interface/api/user/CreateCoworker.js.map +1 -1
  71. package/dist/mjs/types/Interface/api/user/UpdateCoworker.d.ts +25 -0
  72. package/dist/mjs/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -0
  73. package/dist/mjs/types/Interface/api/user/UpdateCoworker.js +164 -0
  74. package/dist/mjs/types/Interface/api/user/UpdateCoworker.js.map +1 -0
  75. package/dist/mjs/types/index.d.ts +1 -0
  76. package/dist/mjs/types/index.d.ts.map +1 -1
  77. package/dist/mjs/types/index.js +1 -0
  78. package/dist/mjs/types/index.js.map +1 -1
  79. package/dist/mjs/utils/stringUtils/clean.d.ts +1 -0
  80. package/dist/mjs/utils/stringUtils/clean.d.ts.map +1 -1
  81. package/dist/mjs/utils/stringUtils/clean.js +1 -1
  82. package/dist/mjs/utils/stringUtils/clean.js.map +1 -1
  83. package/dist/mjs/utils/subscription.d.ts +1 -0
  84. package/dist/mjs/utils/subscription.d.ts.map +1 -1
  85. package/dist/mjs/utils/subscription.js +1 -0
  86. package/dist/mjs/utils/subscription.js.map +1 -1
  87. package/package.json +1 -1
  88. package/ts/api/resources/Letter.ts +10 -4
  89. package/ts/api/resources/User.ts +19 -0
  90. package/ts/types/Enum/GeneralThirdParty.ts +9 -3
  91. package/ts/types/Enum/TimeSlot.ts +121 -24
  92. package/ts/types/Interface/api/calendarEvent/queryCalendarEventCall.ts +6 -0
  93. package/ts/types/Interface/api/letter/Query.ts +5 -0
  94. package/ts/types/Interface/api/user/CreateCoworker.ts +12 -1
  95. package/ts/types/Interface/api/user/UpdateCoworker.ts +112 -0
  96. package/ts/types/index.ts +1 -0
  97. package/ts/utils/stringUtils/clean.ts +1 -1
  98. package/ts/utils/subscription.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../ts/utils/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAkBpD,MAAM,SAAS,GAAY,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;AAE1G,sCAAsC;AACtC,MAAM,4BAA4B,GAAG,CAAC,SAAS;IAC7C,CAAC,CAAC,gCAAgC;IAClC,CAAC,CAAC,gCAAgC,CAAC;AAErC,uCAAuC;AACvC,MAAM,6BAA6B,GAAG,CAAC,SAAS;IAC9C,CAAC,CAAC,gCAAgC;IAClC,CAAC,CAAC,gCAAgC,CAAC;AAErC,kDAAkD;AAClD,MAAM,iCAAiC,GAAG,CAAC,SAAS;IAClD,CAAC,CAAC,gCAAgC;IAClC,CAAC,CAAC,gCAAgC,CAAC;AAErC,kDAAkD;AAClD,MAAM,kCAAkC,GAAG,CAAC,SAAS;IACnD,CAAC,CAAC,gCAAgC;IAClC,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ACF,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,MAAmB;IACjD,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAEpE,MAAM,OAAO,GAAG,iBAAiB,CAAC,iBAAiB,KAAK,WAAW,CAAC;IACpE,MAAM,WAAW,GAAG,YAAY;QAC9B,CAAC,CAAC;YACA,UAAU,CAAC,UAAU;YACrB,UAAU,CAAC,qBAAqB;YAChC,UAAU,CAAC,kBAAkB;SAC9B,CAAC,QAAQ,CAAC,YAAY,CAAC;QACxB,CAAC,CAAC,KAAK,CAAC;IACV,MAAM,YAAY,GAAG,WAAW,KAAK,SAAS,CAAC,EAAE,CAAC;IAElD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CACvB,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,OAAO,KAAK,OAAO;QACrB,CAAC,CAAC,QAAQ,KAAK,QAAQ;QACvB,CAAC,CAAC,WAAW,KAAK,WAAW;QAC7B,CAAC,CAAC,YAAY,KAAK,YAAY,CAClC,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtC,CAAC","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'].includes(process.env.NODE_ENV ?? '');\n\n// AE | Annuel | Forfait Bilan complet\nconst ID_SUBSCRIPTION_MICRO_ANNUAL = !isTestKey\n ? 'price_1PFyHHIHo1jEedppVjwrqPr1'\n : 'price_1MRyi1IHo1jEedppRKdY06Re';\n\n// AE | Mensuel | Forfait Bilan complet\nconst ID_SUBSCRIPTION_MICRO_MENSUAL = !isTestKey\n ? 'price_1LBJ4xIHo1jEedppylxr3fFa'\n : '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\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 ? [\n ComptaType.CASH_BASED,\n ComptaType.CASH_BASED_ASSISTANCE,\n ComptaType.CASH_BASED_SEIZURE,\n ].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}"]}
1
+ {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../ts/utils/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAkBpD,MAAM,SAAS,GAAY,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ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AAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtC,CAAC","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'].includes(process.env.NODE_ENV ?? '');\n\n// AE | Annuel | Forfait Bilan complet\nconst ID_SUBSCRIPTION_MICRO_ANNUAL = !isTestKey\n ? 'price_1PFyHHIHo1jEedppVjwrqPr1'\n : 'price_1MRyi1IHo1jEedppRKdY06Re';\n\n// AE | Mensuel | Forfait Bilan complet\nconst ID_SUBSCRIPTION_MICRO_MENSUAL = !isTestKey\n ? 'price_1LBJ4xIHo1jEedppylxr3fFa'\n : '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 ? [\n ComptaType.CASH_BASED,\n ComptaType.CASH_BASED_ASSISTANCE,\n ComptaType.CASH_BASED_SEIZURE,\n ].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}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.321",
3
+ "version": "1.1.323",
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",
@@ -8,12 +8,18 @@ export class Letter extends Resource {
8
8
  return this.axios.$post('/letters', params, { headers: { 'Content-Type': 'multipart/form-data' } });
9
9
  }
10
10
 
11
- getPaginate(params: QueryLetterPaginate): Promise<BasePaginate<ILetter>> {
12
- return this.axios.$get('/letters/paginated', { params });
11
+ getPaginate(params: QueryLetterPaginate, signal?: AbortSignal): Promise<BasePaginate<ILetter>> {
12
+ return this.axios.$get('/letters/paginated', {
13
+ ...(signal ? { signal } : {}),
14
+ params,
15
+ });
13
16
  }
14
17
 
15
- getStats(params: QueryLetter): Promise<ILetter> {
16
- return this.axios.$get('/letters/stats', { params });
18
+ getStats(params: QueryLetter, signal?: AbortSignal): Promise<ILetter> {
19
+ return this.axios.$get('/letters/stats', {
20
+ ...(signal ? { signal } : {}),
21
+ params,
22
+ });
17
23
  }
18
24
 
19
25
  update(id: number, params: Partial<ILetter>): Promise<ILetter> {
@@ -3,6 +3,7 @@ import {
3
3
  IUser, QueryConfirm, QueryResendConfirmationLink, CreateUser, CreateCoworker, QueryUserSmsConfirmation, QueryGetAllFromSociety, ISociety, Role, TimeCounterType, QueryGetAllCollaborators, QueryGetAllCollaboratorsByRoles, QueryUserSociety, QueryGetAllWithoutBp,
4
4
  CollaboratorsByRoles,
5
5
  QueryUserExport,
6
+ UpdateCorworker,
6
7
  } from '../../types';
7
8
 
8
9
  export class User extends Resource {
@@ -18,6 +19,24 @@ export class User extends Resource {
18
19
  coworker(data: CreateCoworker): Promise<IUser> {
19
20
  return this.axios.$post('user/coworker', data);
20
21
  }
22
+ updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser> {
23
+ const formData = new FormData();
24
+ Object.entries(params).forEach(([key, value]) => {
25
+ if (value || value === false || value === 0) {
26
+ if (Array.isArray(value)) {
27
+ value.forEach((v: number | string) => {
28
+ formData.append(`${key}[]`, `${v}`);
29
+ });
30
+ } else if (key === 'file')
31
+ formData.append('file', value);
32
+ else
33
+ formData.append(key, `${value}`);
34
+ }
35
+ });
36
+
37
+ return this.axios.$put(`/user/coworker/${idUser}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } });
38
+ }
39
+
21
40
  sendNewCode(id: number): Promise<IUser> {
22
41
  return this.axios.$put(`user/${id}/sendNewSmsCode`);
23
42
  }
@@ -88,7 +88,7 @@ export const generalThirdParties: GeneralThirdParty[] = [
88
88
  { company:'PICARD', idAccount:117, number:'625100' },
89
89
  { company:'FRICHTI', idAccount:117, number:'625100' },
90
90
  { company:'GOOGLE', idAccount:108, number:'623100' },
91
- { company:'NAVIGO', idAccount:58383, number:'625300' },
91
+ { company:'FACEBOOK', idAccount:108, number:'623100' },
92
92
  { company:'STARBUCKS', idAccount:117, number:'625100' },
93
93
  { company:'HYPER U', idAccount:117, number:'625100' },
94
94
  { company:'TRAINLINE', idAccount:58383, number:'625300' },
@@ -111,6 +111,7 @@ export const generalThirdParties: GeneralThirdParty[] = [
111
111
  { company:'ENI', idAccount:22, number:'606130' },
112
112
  { company:'ALIBABA', idAccount:24, number:'606300' },
113
113
  { company:'SHELL', idAccount:22, number:'606130' },
114
+ { company:'INTERMARCHE ESSENCE', idAccount:22, number:'606130' },
114
115
  { company:'LAGARDERE TR', idAccount:24, number:'606300' },
115
116
  { company:'CARREFOUR MARKET', idAccount:117, number:'625100' },
116
117
  { company:'AXA', idAccount:27292, number:'616100' },
@@ -132,7 +133,6 @@ export const generalThirdParties: GeneralThirdParty[] = [
132
133
  { company:'GEDIMAT', idAccount:24, number:'606300' },
133
134
  { company:'MAIRIE DE PARIS', idAccount:173, number:'671200' },
134
135
  { company:'SEDOMICILIER', idAccount:113, number:'613400' },
135
- { company:'RESTAURANT MCDONALD S', idAccount:117, number:'625100' },
136
136
  { company:'WEMIND', idAccount:27292, number:'616100' },
137
137
  { company:'SHOPIFY', idAccount:123, number:'626200' },
138
138
  { company:'NAULIER & ASSOCIES', idAccount:104, number:'622600' },
@@ -283,6 +283,7 @@ export const generalThirdParties: GeneralThirdParty[] = [
283
283
  { company:'YESSS ELECTRIQUE', idAccount:18, number:'602000' },
284
284
  { company:'CHAUSSON MATERIAUX', idAccount:18, number:'602000' },
285
285
  { company:'E.LECLERC', idAccount:117, number:'625100' },
286
+ { company:'ELECLERC', idAccount:117, number:'625100' },
286
287
  { company:'CIFFREO BONA', idAccount:18, number:'602000' },
287
288
  { company:'APRIL', idAccount:58379, number:'615210' },
288
289
  { company:'GDI CONSEIL', idAccount:58381, number:'622610' },
@@ -504,6 +505,8 @@ export const generalThirdParties: GeneralThirdParty[] = [
504
505
  { company:'MOBEL LINEA', idAccount:280, number:'218400' },
505
506
  { company:'HENRY SCHEIN FRANCE', idAccount:18, number:'602000' },
506
507
  { company:'AMAZON.FR', idAccount:24, number:'606300' },
508
+ { company:'AMAZON SARL', idAccount:24, number:'606300' },
509
+ { company:'AMAZON PAYMENTS', idAccount:24, number:'606300' },
507
510
  { company:'MAXITYRE', idAccount:27, number:'607300' },
508
511
  { company:'EUREST', idAccount:117, number:'625100' },
509
512
  { company:'AIRFRANCE', idAccount:58383, number:'625300' },
@@ -1011,6 +1014,9 @@ export const generalThirdParties: GeneralThirdParty[] = [
1011
1014
  { company:'ENEDIS', idAccount:21, number:'606120' },
1012
1015
  { company:'CLIM PLUS', idAccount:27587, number:'215000' },
1013
1016
  { company:'PARIS', idAccount:58384, number:'625400' },
1017
+ { company:'SANEF', idAccount:58384, number:'625400' },
1018
+ { company:'APRR', idAccount:58384, number:'625400' },
1019
+ { company:'VINCI', idAccount:58384, number:'625400' },
1014
1020
  { company:'NUXIT', idAccount:123, number:'626200' },
1015
1021
  { company:'NOBEL BIOCARE', idAccount:18, number:'602000' },
1016
1022
  { company:'FRANFINANCE', idAccount:58381, number:'622610' },
@@ -1464,6 +1470,7 @@ export const generalThirdParties: GeneralThirdParty[] = [
1464
1470
  { company:'YOU', idAccount:123, number:'626200' },
1465
1471
  { company:'SIMC', idAccount:27587, number:'215000' },
1466
1472
  { company:'NAVIGO ANNUEL', idAccount:58383, number:'625300' },
1473
+ { company:'NAVIGO', idAccount:58383, number:'625300' },
1467
1474
  { company:'LR BIO', idAccount:14, number:'601100' },
1468
1475
  { company:'CAFE DE LA POSTE', idAccount:117, number:'625100' },
1469
1476
  { company:'BRANGEON', idAccount:16941, number:'624100' },
@@ -4191,7 +4198,6 @@ export const generalThirdParties: GeneralThirdParty[] = [
4191
4198
  { company:'CBS', idAccount:108, number:'623100' },
4192
4199
  { company:'CAFE DE LA BANQUE', idAccount:117, number:'625100' },
4193
4200
  { company:'BIP GO', idAccount:58384, number:'625400' },
4194
- { company:'BIENVENUE', idAccount:117, number:'625100' },
4195
4201
  { company:'AUX MERVEILLEUX', idAccount:117, number:'625100' },
4196
4202
  { company:'AUBERGE DE LA POIRIE', idAccount:117, number:'625100' },
4197
4203
  { company:'ALPHA MATTE', idAccount:17, number:'604100' },
@@ -12,18 +12,49 @@ export enum TimeSlot {
12
12
  BILLING = 8,
13
13
  SALES = 9,
14
14
  APPOINTMENT = 10,
15
+ SUPPORTING_CREATION_OF_SOCIETY = 11,
16
+ APPROVAL_FINANCIAL_STATEMENTS_AND_DISTRIBUTE_DIVIDENDS = 12,
17
+ EDIT_SOCIETY = 13,
18
+ CLOSE_SOCIETY = 14,
19
+ TAX_ADVICE_OR_COMPLEX_LEGAL_ARRANGEMENTS = 15,
20
+ FIX_UNPAID = 16,
21
+ }
22
+ export enum TimeSlotCategory {
23
+ ACCOUNTING = 1,
24
+ JURIDIC = 2,
25
+ BILLING = 3,
15
26
  }
16
27
 
17
28
  export type TimeSlotDetailType = {
18
29
  id: number;
19
30
  name: string;
20
31
  internalName: string;
32
+ category?: string,
21
33
  duration: number;
22
34
  idRole: number[];
23
35
  forWholeService?: boolean
24
36
  idRoleExcluded?: number[];
25
37
  idTimeCounterType: number;
26
38
  };
39
+ export type TimeSlotCategoryDetailType = {
40
+ id: number;
41
+ name: string;
42
+ };
43
+
44
+ export const TimeSlotCategoryDetail:TimeSlotCategoryDetailType[] = [
45
+ {
46
+ id: TimeSlotCategory.ACCOUNTING,
47
+ name: 'Comptable',
48
+ },
49
+ {
50
+ id: TimeSlotCategory.JURIDIC,
51
+ name: 'Juridique',
52
+ },
53
+ {
54
+ id: TimeSlotCategory.BILLING,
55
+ name: 'Facturation',
56
+ },
57
+ ];
27
58
 
28
59
  export const TimeSlotDetail:TimeSlotDetailType[] = [
29
60
  {
@@ -44,23 +75,27 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
44
75
  forWholeService: true,
45
76
  idTimeCounterType: TimeCounterType.ONBOARDING.id,
46
77
  },
47
- // {
48
- // id: TimeSlot.BILAN,
49
- // name: 'Bilan',
50
- // internalName: 'Bilan',
51
- // duration: 60,
52
- // idRole: [Role.ACCOUNTANT],
53
- // forWholeService: false,
54
- // },
55
- // {
56
- // id: TimeSlot.TVA,
57
- // name: 'Tva',
58
- // internalName: 'Tva',
59
- // duration: 15,
60
- // idRole:[Role.ACCOUNTANT],
61
- // idRoleExcluded:[Role.MANAGER],
62
- // forWholeService: false,
63
- // },
78
+ {
79
+ id: TimeSlot.BILAN,
80
+ name: 'Questions concernant mon bilan',
81
+ internalName: 'Questions concernant mon bilan',
82
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.ACCOUNTING)?.name,
83
+ duration: 30,
84
+ idRole: [Role.ACCOUNTANT],
85
+ forWholeService: false,
86
+ idTimeCounterType: TimeCounterType.BILAN.id,
87
+ },
88
+ {
89
+ id: TimeSlot.TVA,
90
+ name: 'Questions concernant ma TVA',
91
+ internalName: 'Questions concernant ma TVA',
92
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.ACCOUNTING)?.name,
93
+ duration: 30,
94
+ idRole:[Role.ACCOUNTANT],
95
+ idRoleExcluded:[Role.MANAGER],
96
+ forWholeService: false,
97
+ idTimeCounterType: TimeCounterType.VAT.id,
98
+ },
64
99
  // {
65
100
  // id: TimeSlot.TVA_MANAGER,
66
101
  // name: 'Tva',
@@ -80,8 +115,9 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
80
115
  // },
81
116
  {
82
117
  id: TimeSlot.ACCOUNTING_RDV,
83
- name: 'Rdv comptable',
84
- internalName: 'Rdv comptable',
118
+ name: 'Conseils',
119
+ internalName: 'Conseils',
120
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.ACCOUNTING)?.name,
85
121
  duration: 30,
86
122
  idRole:[Role.ACCOUNTANT],
87
123
  idRoleExcluded:[Role.MANAGER],
@@ -90,11 +126,12 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
90
126
  },
91
127
  {
92
128
  id: TimeSlot.BILLING,
93
- name: 'Facturation',
94
- internalName: 'Facturation',
95
- duration: 45,
129
+ name: 'Questions concernant ma facturation',
130
+ internalName: 'Questions concernant ma facturation',
131
+ duration: 30,
132
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.BILLING)?.name,
96
133
  idRole:[Role.FACTURATION],
97
- forWholeService: false,
134
+ forWholeService: true,
98
135
  idTimeCounterType: TimeCounterType.CALENDLY.id,
99
136
  },
100
137
  {
@@ -107,7 +144,7 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
107
144
  idTimeCounterType: TimeCounterType.CALENDLY.id,
108
145
  },
109
146
  {
110
- id: TimeSlot.APPOINTMENT,
147
+ id: TimeSlot.APPOINTMENT, //TODO: à commenter ? remplacé par idType 7 ?
111
148
  name: 'Rdv',
112
149
  internalName: 'Rdv',
113
150
  duration: 20,
@@ -115,4 +152,64 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
115
152
  forWholeService: false,
116
153
  idTimeCounterType: TimeCounterType.CALENDLY.id,
117
154
  },
155
+ {
156
+ id: TimeSlot.SUPPORTING_CREATION_OF_SOCIETY,
157
+ name: 'Accompagnement pour la création de mon entreprise',
158
+ internalName: 'Accompagnement pour la création de mon entreprise',
159
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
160
+ duration: 30,
161
+ idRole: [Role.JURIDIC],
162
+ forWholeService: false,
163
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
164
+ },
165
+ {
166
+ id: TimeSlot.APPROVAL_FINANCIAL_STATEMENTS_AND_DISTRIBUTE_DIVIDENDS,
167
+ name: 'Approuver les comptes et/ou distribuer des dividendes',
168
+ internalName: 'Approuver les comptes et/ou distribuer des dividendes',
169
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
170
+ duration: 30,
171
+ idRole: [Role.JURIDIC],
172
+ forWholeService: false,
173
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
174
+ },
175
+ {
176
+ id: TimeSlot.EDIT_SOCIETY,
177
+ name: 'Modifier mon entreprise',
178
+ internalName: 'Modifier mon entreprise',
179
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
180
+ duration: 30,
181
+ idRole: [Role.JURIDIC],
182
+ forWholeService: false,
183
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
184
+ },
185
+ {
186
+ id: TimeSlot.CLOSE_SOCIETY,
187
+ name: 'Fermer mon entreprise',
188
+ internalName: 'Fermer mon entreprise',
189
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
190
+ duration: 30,
191
+ idRole: [Role.JURIDIC],
192
+ forWholeService: false,
193
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
194
+ },
195
+ {
196
+ id: TimeSlot.TAX_ADVICE_OR_COMPLEX_LEGAL_ARRANGEMENTS,
197
+ name: 'Conseils fiscaux ou montages juridiques complexes',
198
+ internalName: 'Conseils fiscaux ou montages juridiques complexes',
199
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
200
+ duration: 60,
201
+ idRole: [Role.JURIDIC, Role.DIRECTOR],
202
+ forWholeService: true,
203
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
204
+ },
205
+ {
206
+ id: TimeSlot.FIX_UNPAID,
207
+ name: 'Régulariser un paiement',
208
+ internalName: 'Régulariser un paiement',
209
+ duration: 30,
210
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.BILLING)?.name,
211
+ idRole:[Role.FACTURATION],
212
+ forWholeService: true,
213
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
214
+ },
118
215
  ];
@@ -1,3 +1,4 @@
1
+ import { IsBoolean, IsOptional } from 'class-validator';
1
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
3
 
3
4
  export class QueryCalendarEventCall {
@@ -9,4 +10,9 @@ export class QueryCalendarEventCall {
9
10
 
10
11
  @ApiProperty()
11
12
  endDate: Date;
13
+
14
+ @IsBoolean()
15
+ @ApiPropertyOptional()
16
+ @IsOptional()
17
+ noHonoredCall?: boolean;
12
18
  }
@@ -3,6 +3,11 @@ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
4
 
5
5
  export class QueryLetter {
6
+ @ApiPropertyOptional()
7
+ @IsOptional()
8
+ @IsInt()
9
+ idLetter?: number | null;
10
+
6
11
  @ApiPropertyOptional()
7
12
  @IsOptional()
8
13
  @IsString()
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  IsArray,
3
- IsBoolean, IsDate, IsDefined, IsEmail, IsInt, IsNumber, IsOptional, IsPhoneNumber, IsString,
3
+ IsBoolean, IsDate, IsDefined, IsEmail, IsEnum, IsInt, IsNumber, IsOptional, IsPhoneNumber, IsString,
4
4
  } from 'class-validator';
5
5
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
6
6
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
7
+ import { EntityType } from '../../../Enum/EntityType';
7
8
 
8
9
  export class CreateCoworker {
9
10
  @ApiProperty()
@@ -81,6 +82,16 @@ export class CreateCoworker {
81
82
  @IsDate()
82
83
  confirmedAt?: Date;
83
84
 
85
+ @ApiProperty()
86
+ @IsDefined()
87
+ @IsInt()
88
+ idOffice: number;
89
+
90
+ @ApiProperty()
91
+ @IsDefined()
92
+ @IsEnum(EntityType)
93
+ entity: EntityType;
94
+
84
95
  @ApiProperty()
85
96
  @IsDefined()
86
97
  @IsArray()
@@ -0,0 +1,112 @@
1
+ import { IsOptional, IsString, IsPhoneNumber, IsNumber, IsBoolean, IsDate, IsArray, IsEnum } from 'class-validator';
2
+ import { CommercialGrade, EntityType, IUser, TFile } from '../../..';
3
+ import { ApiPropertyOptional } from '../../../../utils';
4
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
5
+
6
+ export class UpdateCorworker implements IUser {
7
+ @ApiPropertyOptional()
8
+ @IsOptional()
9
+ @IsNumber()
10
+ idCivility?: number;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ @IsString()
15
+ firstname?: string;
16
+
17
+ @ApiPropertyOptional()
18
+ @IsOptional()
19
+ @IsString()
20
+ lastname?: string;
21
+
22
+ @ApiPropertyOptional()
23
+ @IsOptional()
24
+ @IsPhoneNumber('FR')
25
+ phone?: string;
26
+
27
+ @ApiPropertyOptional()
28
+ @IsOptional()
29
+ @IsString()
30
+ email?: string;
31
+
32
+ @ApiPropertyOptional()
33
+ @IsOptional()
34
+ @IsString()
35
+ username?: string;
36
+
37
+ @ApiPropertyOptional()
38
+ @IsOptional()
39
+ @IsString()
40
+ password?: string;
41
+
42
+ @ApiPropertyOptional()
43
+ @IsOptional()
44
+ @IsBoolean()
45
+ @ToBoolean()
46
+ active?: boolean;
47
+
48
+ @ApiPropertyOptional()
49
+ @IsOptional()
50
+ @IsBoolean()
51
+ @ToBoolean()
52
+ longAbsence?: boolean;
53
+
54
+ @ApiPropertyOptional()
55
+ @IsOptional()
56
+ @IsString()
57
+ positionLabel?: string;
58
+
59
+ @ApiPropertyOptional()
60
+ @IsOptional()
61
+ @IsBoolean()
62
+ @ToBoolean()
63
+ apprentice?: boolean;
64
+
65
+ @ApiPropertyOptional()
66
+ @IsOptional()
67
+ @IsDate()
68
+ birthdate?: Date;
69
+
70
+ @ApiPropertyOptional()
71
+ @IsOptional()
72
+ @IsDate()
73
+ arrivalDate?: Date;
74
+
75
+ @ApiPropertyOptional()
76
+ @IsOptional()
77
+ @IsNumber()
78
+ idOffice?: number;
79
+
80
+ @ApiPropertyOptional()
81
+ @IsOptional()
82
+ @IsEnum(EntityType)
83
+ entity?: EntityType;
84
+
85
+ @ApiPropertyOptional()
86
+ @IsOptional()
87
+ @IsEnum(CommercialGrade)
88
+ idCommercialGrade?: CommercialGrade;
89
+
90
+ @ApiPropertyOptional()
91
+ file?: TFile;
92
+
93
+ @ApiPropertyOptional()
94
+ @IsOptional()
95
+ @IsArray()
96
+ idRoles?: number[];
97
+
98
+ @ApiPropertyOptional()
99
+ @IsOptional()
100
+ @IsArray()
101
+ idTeams?: number[];
102
+
103
+ @ApiPropertyOptional()
104
+ @IsOptional()
105
+ @IsArray()
106
+ idUsersBrands?: number[];
107
+
108
+ @ApiPropertyOptional()
109
+ @IsOptional()
110
+ @IsArray()
111
+ idBusinessLines?: number[];
112
+ }
package/ts/types/index.ts CHANGED
@@ -590,6 +590,7 @@ export * from './Interface/api/user/ParamsGetAll';
590
590
  export * from './Interface/api/user/ParamsGetAllUserWithRoles';
591
591
  export * from './Interface/api/user/ParamsGetAllCollaborators';
592
592
  export * from './Interface/api/user/CreateCoworker';
593
+ export * from './Interface/api/user/UpdateCoworker';
593
594
  export * from './Interface/api/user/Permissions';
594
595
  export * from './Interface/api/user/CollaboratorsByRoles';
595
596
  export * from './Interface/api/account/Read';
@@ -1,4 +1,4 @@
1
- const wordsToExclude = ['cheque', 'prelevement', 'cheques', 'prelevements', 'prlvt', 'prlv', 'valeur', 'euro', 'solde', 'dont'];
1
+ export const wordsToExclude = ['cheque', 'prelevement', 'cheques', 'prelevements', 'prlvt', 'prlv', 'valeur', 'euro', 'solde', 'dont'];
2
2
  export const minWordsForDesignation = 2;
3
3
 
4
4
  export function cleanForRules(string: string) : string {
@@ -50,6 +50,8 @@ const ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL = !isTestKey
50
50
  ? 'price_1LBJ69IHo1jEedppAWLeOk3I'
51
51
  : 'price_1LBIB7IHo1jEedppocxyc1ft';
52
52
 
53
+ export const stripeTaxRate = isTestKey ? 'txr_1I9X9MIHo1jEedppM0DqL4iE' : 'txr_1I9X5wIHo1jEedppYttGFc0N';
54
+
53
55
  const list: StripeOffer[] = [
54
56
  {
55
57
  name: 'Offre auto-entrepreneur',