@silexpert/core 0.4.144 → 0.4.147

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 (107) hide show
  1. package/es/api/resources/Payment.d.ts +6 -0
  2. package/es/api/resources/Payment.d.ts.map +1 -0
  3. package/es/api/resources/Payment.js +13 -0
  4. package/es/api/resources/Payment.js.map +1 -0
  5. package/es/api/resources/VatDeclaration.d.ts +3 -0
  6. package/es/api/resources/VatDeclaration.d.ts.map +1 -1
  7. package/es/api/resources/VatDeclaration.js +6 -0
  8. package/es/api/resources/VatDeclaration.js.map +1 -1
  9. package/es/api/resources.d.ts +2 -0
  10. package/es/api/resources.d.ts.map +1 -1
  11. package/es/api/resources.js +2 -0
  12. package/es/api/resources.js.map +1 -1
  13. package/es/types/Enum/BalanceSheetQuestion.d.ts +6 -1
  14. package/es/types/Enum/BalanceSheetQuestion.d.ts.map +1 -1
  15. package/es/types/Enum/BalanceSheetQuestion.js +5 -0
  16. package/es/types/Enum/BalanceSheetQuestion.js.map +1 -1
  17. package/es/types/Enum/BalanceSheetQuestionWording.d.ts +17 -4
  18. package/es/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
  19. package/es/types/Enum/BalanceSheetQuestionWording.js +14 -4
  20. package/es/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
  21. package/es/types/Enum/KilometricAllowanceScale.d.ts +4 -1
  22. package/es/types/Enum/KilometricAllowanceScale.d.ts.map +1 -1
  23. package/es/types/Enum/KilometricAllowanceScale.js +227 -106
  24. package/es/types/Enum/KilometricAllowanceScale.js.map +1 -1
  25. package/es/types/Enum/VatDeclarationType.d.ts +15 -0
  26. package/es/types/Enum/VatDeclarationType.d.ts.map +1 -0
  27. package/es/types/Enum/VatDeclarationType.js +238 -0
  28. package/es/types/Enum/VatDeclarationType.js.map +1 -0
  29. package/es/types/Interface/api/jeDeclare/Util.d.ts +1 -1
  30. package/es/types/Interface/api/jeDeclare/Util.d.ts.map +1 -1
  31. package/es/types/Interface/api/jeDeclare/Util.js.map +1 -1
  32. package/es/types/Interface/api/payment/QueryMonthlyPayment.d.ts +4 -0
  33. package/es/types/Interface/api/payment/QueryMonthlyPayment.d.ts.map +1 -0
  34. package/es/types/Interface/api/payment/QueryMonthlyPayment.js +24 -0
  35. package/es/types/Interface/api/payment/QueryMonthlyPayment.js.map +1 -0
  36. package/es/types/Interface/api/user/CreateCoworker.d.ts +8 -10
  37. package/es/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
  38. package/es/types/Interface/api/user/CreateCoworker.js +17 -12
  39. package/es/types/Interface/api/user/CreateCoworker.js.map +1 -1
  40. package/es/types/Interface/api/vatDeclaration/ReadVatVariousOperations.d.ts +10 -0
  41. package/es/types/Interface/api/vatDeclaration/ReadVatVariousOperations.d.ts.map +1 -0
  42. package/es/types/Interface/api/vatDeclaration/ReadVatVariousOperations.js +2 -0
  43. package/es/types/Interface/api/vatDeclaration/ReadVatVariousOperations.js.map +1 -0
  44. package/es/types/Interface/api/vatDeclaration/ResultFormatToEntries.d.ts +6 -0
  45. package/es/types/Interface/api/vatDeclaration/ResultFormatToEntries.d.ts.map +1 -0
  46. package/es/types/Interface/api/vatDeclaration/ResultFormatToEntries.js +2 -0
  47. package/es/types/Interface/api/vatDeclaration/ResultFormatToEntries.js.map +1 -0
  48. package/es/types/Interface/models/IApiError.d.ts +1 -0
  49. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  50. package/es/types/Interface/models/IApiError.js +1 -0
  51. package/es/types/Interface/models/IApiError.js.map +1 -1
  52. package/es/types/Interface/models/IUser.d.ts +50 -50
  53. package/es/types/Interface/models/IUser.d.ts.map +1 -1
  54. package/es/types/Interface/models/IUser.js.map +1 -1
  55. package/es/types/index.d.ts +4 -0
  56. package/es/types/index.d.ts.map +1 -1
  57. package/es/types/index.js +4 -0
  58. package/es/types/index.js.map +1 -1
  59. package/es/utils/brands.d.ts +2 -1
  60. package/es/utils/brands.d.ts.map +1 -1
  61. package/es/utils/brands.js +12 -1
  62. package/es/utils/brands.js.map +1 -1
  63. package/js/api/resources/Payment.js +24 -0
  64. package/js/api/resources/Payment.js.map +1 -0
  65. package/js/api/resources/VatDeclaration.js +8 -0
  66. package/js/api/resources/VatDeclaration.js.map +1 -1
  67. package/js/api/resources.js +3 -0
  68. package/js/api/resources.js.map +1 -1
  69. package/js/types/Enum/BalanceSheetQuestion.js +6 -0
  70. package/js/types/Enum/BalanceSheetQuestion.js.map +1 -1
  71. package/js/types/Enum/BalanceSheetQuestionWording.js +17 -4
  72. package/js/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
  73. package/js/types/Enum/KilometricAllowanceScale.js +471 -230
  74. package/js/types/Enum/KilometricAllowanceScale.js.map +1 -1
  75. package/js/types/Enum/VatDeclarationType.js +234 -0
  76. package/js/types/Enum/VatDeclarationType.js.map +1 -0
  77. package/js/types/Interface/api/payment/QueryMonthlyPayment.js +34 -0
  78. package/js/types/Interface/api/payment/QueryMonthlyPayment.js.map +1 -0
  79. package/js/types/Interface/api/user/CreateCoworker.js +18 -18
  80. package/js/types/Interface/api/user/CreateCoworker.js.map +1 -1
  81. package/js/types/Interface/api/vatDeclaration/ReadVatVariousOperations.js +6 -0
  82. package/js/types/Interface/api/vatDeclaration/ReadVatVariousOperations.js.map +1 -0
  83. package/js/types/Interface/api/vatDeclaration/ResultFormatToEntries.js +6 -0
  84. package/js/types/Interface/api/vatDeclaration/ResultFormatToEntries.js.map +1 -0
  85. package/js/types/Interface/models/IApiError.js +2 -1
  86. package/js/types/Interface/models/IApiError.js.map +1 -1
  87. package/js/types/index.js +48 -0
  88. package/js/types/index.js.map +1 -1
  89. package/js/utils/brands.js +10 -1
  90. package/js/utils/brands.js.map +1 -1
  91. package/package.json +1 -1
  92. package/ts/api/resources/Payment.ts +14 -0
  93. package/ts/api/resources/VatDeclaration.ts +9 -1
  94. package/ts/api/resources.ts +2 -0
  95. package/ts/types/Enum/BalanceSheetQuestion.ts +7 -0
  96. package/ts/types/Enum/BalanceSheetQuestionWording.ts +20 -4
  97. package/ts/types/Enum/KilometricAllowanceScale.ts +233 -107
  98. package/ts/types/Enum/VatDeclarationType.ts +253 -0
  99. package/ts/types/Interface/api/jeDeclare/Util.ts +1 -1
  100. package/ts/types/Interface/api/payment/QueryMonthlyPayment.ts +13 -0
  101. package/ts/types/Interface/api/user/CreateCoworker.ts +24 -17
  102. package/ts/types/Interface/api/vatDeclaration/ReadVatVariousOperations.ts +9 -0
  103. package/ts/types/Interface/api/vatDeclaration/ResultFormatToEntries.ts +5 -0
  104. package/ts/types/Interface/models/IApiError.ts +1 -0
  105. package/ts/types/Interface/models/IUser.ts +50 -50
  106. package/ts/types/index.ts +4 -0
  107. package/ts/utils/brands.ts +9 -1
@@ -1,69 +1,76 @@
1
1
  import {
2
2
  IsBoolean, IsDate, IsDefined, IsEmail, IsNumber, IsOptional, IsPhoneNumber, IsString, IsUrl,
3
3
  } from 'class-validator';
4
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
4
5
 
5
6
  export class CreateCoworker {
7
+ @ApiProperty()
6
8
  @IsDefined()
7
9
  @IsString()
8
10
  firstname: string;
9
11
 
12
+ @ApiProperty()
10
13
  @IsDefined()
11
14
  @IsString()
12
15
  lastname: string;
13
16
 
17
+ @ApiProperty()
14
18
  @IsDefined()
15
19
  @IsEmail()
16
20
  email: string;
17
21
 
22
+ @ApiProperty()
18
23
  @IsDefined()
19
24
  @IsString()
20
25
  username: string;
21
26
 
27
+ @ApiProperty()
22
28
  @IsDefined()
23
29
  @IsString()
24
30
  password: string;
25
31
 
26
- @IsOptional()
27
- @IsString()
28
- hash: string;
29
-
32
+ @ApiProperty()
30
33
  @IsDefined()
31
34
  @IsPhoneNumber()
32
35
  phone: string;
33
36
 
34
- @IsDefined()
37
+ @ApiPropertyOptional()
38
+ @IsOptional()
35
39
  @IsNumber()
36
- idCivility: number;
40
+ idCivility?: number;
37
41
 
42
+ @ApiProperty({ default: true })
38
43
  @IsDefined()
39
44
  @IsBoolean()
40
- active: number;
45
+ active: boolean;
41
46
 
47
+ @ApiPropertyOptional()
42
48
  @IsOptional()
43
49
  @IsUrl()
44
- calendlyUrl: string;
50
+ calendlyUrl?: string;
45
51
 
52
+ @ApiPropertyOptional()
46
53
  @IsOptional()
47
54
  @IsString()
48
- positionLabel: string;
49
-
50
- @IsOptional()
51
- @IsBoolean()
52
- isNewProspect: number;
55
+ positionLabel?: string;
53
56
 
57
+ @ApiPropertyOptional()
54
58
  @IsOptional()
55
59
  @IsBoolean()
56
- apprentice: boolean;
60
+ apprentice?: boolean;
57
61
 
62
+ @ApiPropertyOptional()
58
63
  @IsOptional()
59
64
  @IsDate()
60
- birthdate: Date;
65
+ birthdate?: Date;
61
66
 
67
+ @ApiPropertyOptional()
62
68
  @IsOptional()
63
69
  @IsDate()
64
- arrivalDate: Date;
70
+ arrivalDate?: Date;
65
71
 
72
+ @ApiPropertyOptional()
66
73
  @IsOptional()
67
74
  @IsDate()
68
- confirmedAt: Date;
75
+ confirmedAt?: Date;
69
76
  }
@@ -0,0 +1,9 @@
1
+ export interface ReadVatVariousOperations {
2
+ debit: number,
3
+ credit: number,
4
+ master: boolean,
5
+ designation: string,
6
+ dateValue: Date,
7
+ idAccount?: number,
8
+ idThirdParty?: number,
9
+ }
@@ -0,0 +1,5 @@
1
+ export interface ResultFormatToEntries {
2
+ name: string,
3
+ number: number,
4
+ amount: number
5
+ }
@@ -113,6 +113,7 @@ export enum Code {
113
113
  userEmailAlreadyExist = 'user-username-already-exists',
114
114
  userPhoneAlreadyExist = 'user-phone-already-exists',
115
115
  couldNotFindUser = 'could-not-find-user',
116
+ wrongBrandEmail = 'wrong-brand-email',
116
117
 
117
118
  // Cerfa
118
119
  civilityNotFound = 'civility_not_found',
@@ -19,60 +19,60 @@ type isAny<T> = T | any;
19
19
  // users
20
20
  export interface IUser {
21
21
  id?: number;
22
- firstname: string | null;
23
- lastname: string | null;
24
- fullname: string | null;
25
- email: string | null;
26
- email2: string | null;
27
- username: string | null;
28
- stripeCustomerId: string | null;
29
- positionLabel: string | null;
30
- sha: string | null;
31
- hash: string | null;
32
- password: string | null;
33
- idFile: number | null;
34
- quality: string | null;
35
- idQuality: number | null;
36
- phone: string | null;
37
- phone2: string | null;
38
- prefix: string | null;
39
- tokenLostPassword: string | null;
40
- tokenApi: string | null;
41
- tokenNotification: string | null;
42
- tokenSocket: string | null;
43
- authyId: string | null;
44
- authCode: string | null;
45
- authCodeDate: Date | null;
46
- tutoTransaction: boolean | null;
47
- lastConnection: Date | null;
48
- beforeLastConnection: Date | null;
49
- active: boolean | null;
50
- toContact: boolean;
51
- stateProspect: boolean | null;
52
- birthdate: Date | null;
53
- arrivalDate: Date | null;
54
- isNewProspect: boolean;
55
- hasAccountNumberDisplay: boolean;
56
- isAssociate: boolean | null;
57
- isResponderActive: boolean;
58
- suppDoublon: boolean | null;
59
- calendlyUrl: string | null;
60
- idCivility: number | null;
61
- idCommercialDoublon: number | null;
62
- idProspectIsWith: number | null;
63
- apprentice: boolean;
64
- smsNotAllowed: boolean;
65
- restDaysAbsence: number | null;
66
- startOnboarding: Date | null;
67
- societyByDefault: number | null;
68
- longAbsence: boolean | null;
69
- internationalPhone: string | null;
70
- isThemeLight: boolean;
22
+ firstname?: string | null;
23
+ lastname?: string | null;
24
+ fullname?: string | null;
25
+ email?: string | null;
26
+ email2?: string | null;
27
+ username?: string | null;
28
+ stripeCustomerId?: string | null;
29
+ positionLabel?: string | null;
30
+ sha?: string | null;
31
+ hash?: string | null;
32
+ password?: string | null;
33
+ idFile?: number | null;
34
+ quality?: string | null;
35
+ idQuality?: number | null;
36
+ phone?: string | null;
37
+ phone2?: string | null;
38
+ prefix?: string | null;
39
+ tokenLostPassword?: string | null;
40
+ tokenApi?: string | null;
41
+ tokenNotification?: string | null;
42
+ tokenSocket?: string | null;
43
+ authyId?: string | null;
44
+ authCode?: string | null;
45
+ authCodeDate?: Date | null;
46
+ tutoTransaction?: boolean | null;
47
+ lastConnection?: Date | null;
48
+ beforeLastConnection?: Date | null;
49
+ active?: boolean | null;
50
+ toContact?: boolean;
51
+ stateProspect?: boolean | null;
52
+ birthdate?: Date | null;
53
+ arrivalDate?: Date | null;
54
+ isNewProspect?: boolean;
55
+ hasAccountNumberDisplay?: boolean;
56
+ isAssociate?: boolean | null;
57
+ isResponderActive?: boolean;
58
+ suppDoublon?: boolean | null;
59
+ calendlyUrl?: string | null;
60
+ idCivility?: number | null;
61
+ idCommercialDoublon?: number | null;
62
+ idProspectIsWith?: number | null;
63
+ apprentice?: boolean;
64
+ smsNotAllowed?: boolean;
65
+ restDaysAbsence?: number | null;
66
+ startOnboarding?: Date | null;
67
+ societyByDefault?: number | null;
68
+ longAbsence?: boolean | null;
69
+ internationalPhone?: string | null;
70
+ isThemeLight?: boolean;
71
71
  createdAt?: Date | null;
72
72
  updatedAt?: Date | null;
73
73
  confirmedAt?: Date | null;
74
74
  tokenConfirmedAt?: string | null;
75
- idPoleLeader: number | null;
75
+ idPoleLeader?: number | null;
76
76
  affiliateTrackingId?: number | null;
77
77
 
78
78
  // Associations
package/ts/types/index.ts CHANGED
@@ -392,6 +392,7 @@ export * from './Enum/BalanceSheetModule';
392
392
  export * from './Enum/BalanceSheetStatus';
393
393
  export * from './Enum/FuelType';
394
394
  export * from './Enum/KilometricAllowanceScale';
395
+ export * from './Enum/VatDeclarationType';
395
396
 
396
397
  // Interfaces API
397
398
  export * from './Interface/api/jeDeclare/ReadJeDeclare';
@@ -404,6 +405,7 @@ export * from './Interface/api/accountingEntry/AnnotateAccountingTransaction';
404
405
  export * from './Interface/api/accountingEntry/CreateManualEntry';
405
406
  export * from './Interface/api/immobilization/ReadFormattedImmobilization';
406
407
  export * from './Interface/api/immobilization/CreateImmobilization';
408
+ export * from './Interface/api/payment/QueryMonthlyPayment';
407
409
  export * from './Interface/api/paymentExpectationCustomer/ReadPaymentExpectationCustomer';
408
410
  export * from './Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer';
409
411
  export * from './Interface/api/paymentExpectationCustomer/UpdatePaymentExpectationCustomer';
@@ -492,6 +494,8 @@ export * from './Interface/api/revision/QueryRevisionMergeIntoAccount';
492
494
  export * from './Interface/api/revision/ReadRevisionMergeIntoAccount';
493
495
  export * from './Interface/api/revision/QueryRevisionSearchEntries';
494
496
  export * from './Interface/api/vatDeclaration/QueryVatDeclaration';
497
+ export * from './Interface/api/vatDeclaration/ReadVatVariousOperations';
498
+ export * from './Interface/api/vatDeclaration/ResultFormatToEntries';
495
499
 
496
500
  // export * from './Interface/api/survey/QuerySurvey';
497
501
  export * from './Interface/api/survey/ReadSurvey';
@@ -77,4 +77,12 @@ const getBrandConfig = (params: getBrandConfigParams): brand => {
77
77
  return brand;
78
78
  };
79
79
 
80
- export { getBrandConfig, getBrandNameByNodeEnv };
80
+ const getBrandByEmail = (email: string): 'Legalstart'| 'Comptalib' | 'Clementine' | 'Pourcentage' | null => {
81
+ if (email.indexOf('legalstart.fr') > -1) return 'Legalstart';
82
+ if (email.indexOf('comptalib.com') > -1) return 'Comptalib';
83
+ if (email.indexOf('pourcentage.fr') > -1) return 'Pourcentage';
84
+ if (email.indexOf('compta-clementine.fr') > -1) return 'Clementine';
85
+ return null;
86
+ };
87
+
88
+ export { getBrandConfig, getBrandNameByNodeEnv, getBrandByEmail };