@silexpert/core 0.4.172 → 0.4.175

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 (125) hide show
  1. package/es/api/resources/GeneralLedger.d.ts +3 -1
  2. package/es/api/resources/GeneralLedger.d.ts.map +1 -1
  3. package/es/api/resources/GeneralLedger.js +5 -0
  4. package/es/api/resources/GeneralLedger.js.map +1 -1
  5. package/es/api/resources/Tax.js.map +1 -1
  6. package/es/api/resources/Transaction.d.ts +1 -0
  7. package/es/api/resources/Transaction.d.ts.map +1 -1
  8. package/es/api/resources/Transaction.js +3 -0
  9. package/es/api/resources/Transaction.js.map +1 -1
  10. package/es/types/Enum/Aspone.d.ts +4 -3
  11. package/es/types/Enum/Aspone.d.ts.map +1 -1
  12. package/es/types/Enum/Aspone.js +4 -3
  13. package/es/types/Enum/Aspone.js.map +1 -1
  14. package/es/types/Enum/BalanceSheet.d.ts.map +1 -1
  15. package/es/types/Enum/BalanceSheet.js +9 -5
  16. package/es/types/Enum/BalanceSheet.js.map +1 -1
  17. package/es/types/Enum/BrandClementine.js +1 -1
  18. package/es/types/Enum/BrandClementine.js.map +1 -1
  19. package/es/types/Enum/BrandComptalib.js +3 -3
  20. package/es/types/Enum/BrandComptalib.js.map +1 -1
  21. package/es/types/Enum/MailFlag.d.ts +5 -0
  22. package/es/types/Enum/MailFlag.d.ts.map +1 -0
  23. package/es/types/Enum/MailFlag.js +6 -0
  24. package/es/types/Enum/MailFlag.js.map +1 -0
  25. package/es/types/Interface/api/BasePaginate.d.ts +6 -0
  26. package/es/types/Interface/api/BasePaginate.d.ts.map +1 -1
  27. package/es/types/Interface/api/BasePaginate.js.map +1 -1
  28. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +2 -0
  29. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
  30. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
  31. package/es/types/Interface/api/generalLedger/QueryGeneralLedger.d.ts +4 -0
  32. package/es/types/Interface/api/generalLedger/QueryGeneralLedger.d.ts.map +1 -1
  33. package/es/types/Interface/api/generalLedger/QueryGeneralLedger.js +28 -1
  34. package/es/types/Interface/api/generalLedger/QueryGeneralLedger.js.map +1 -1
  35. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts +2 -0
  36. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts.map +1 -1
  37. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js +5 -0
  38. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
  39. package/es/types/Interface/api/transactions/QueryUnexport.d.ts +2 -2
  40. package/es/types/Interface/api/transactions/QueryUnexport.d.ts.map +1 -1
  41. package/es/types/Interface/api/transactions/QueryUnexport.js.map +1 -1
  42. package/es/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts.map +1 -1
  43. package/es/types/Interface/api/vatDeclaration/QueryVatDeclaration.js +2 -0
  44. package/es/types/Interface/api/vatDeclaration/QueryVatDeclaration.js.map +1 -1
  45. package/es/types/Interface/api/webmail/CreateMailFromLambda.d.ts +25 -0
  46. package/es/types/Interface/api/webmail/CreateMailFromLambda.d.ts.map +1 -0
  47. package/es/types/Interface/api/webmail/CreateMailFromLambda.js +109 -0
  48. package/es/types/Interface/api/webmail/CreateMailFromLambda.js.map +1 -0
  49. package/es/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.d.ts +6 -0
  50. package/es/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.d.ts.map +1 -1
  51. package/es/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.js +17 -2
  52. package/es/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.js.map +1 -1
  53. package/es/types/Interface/models/IMail.d.ts +49 -0
  54. package/es/types/Interface/models/IMail.d.ts.map +1 -0
  55. package/es/types/Interface/models/IMail.js +2 -0
  56. package/es/types/Interface/models/IMail.js.map +1 -0
  57. package/es/types/Interface/models/IMailAttachment.d.ts +12 -0
  58. package/es/types/Interface/models/IMailAttachment.d.ts.map +1 -0
  59. package/es/types/Interface/models/IMailAttachment.js +2 -0
  60. package/es/types/Interface/models/IMailAttachment.js.map +1 -0
  61. package/es/types/Interface/models/IMailContent.d.ts +9 -0
  62. package/es/types/Interface/models/IMailContent.d.ts.map +1 -0
  63. package/es/types/Interface/models/IMailContent.js +2 -0
  64. package/es/types/Interface/models/IMailContent.js.map +1 -0
  65. package/es/types/index.d.ts +5 -0
  66. package/es/types/index.d.ts.map +1 -1
  67. package/es/types/index.js +5 -0
  68. package/es/types/index.js.map +1 -1
  69. package/js/api/resources/GeneralLedger.js +6 -0
  70. package/js/api/resources/GeneralLedger.js.map +1 -1
  71. package/js/api/resources/Tax.js.map +1 -1
  72. package/js/api/resources/Transaction.js +4 -0
  73. package/js/api/resources/Transaction.js.map +1 -1
  74. package/js/types/Enum/Aspone.js +4 -3
  75. package/js/types/Enum/Aspone.js.map +1 -1
  76. package/js/types/Enum/BalanceSheet.js +9 -5
  77. package/js/types/Enum/BalanceSheet.js.map +1 -1
  78. package/js/types/Enum/BrandClementine.js +1 -1
  79. package/js/types/Enum/BrandClementine.js.map +1 -1
  80. package/js/types/Enum/BrandComptalib.js +3 -3
  81. package/js/types/Enum/BrandComptalib.js.map +1 -1
  82. package/js/types/Enum/MailFlag.js +12 -0
  83. package/js/types/Enum/MailFlag.js.map +1 -0
  84. package/js/types/Interface/api/BasePaginate.js.map +1 -1
  85. package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
  86. package/js/types/Interface/api/generalLedger/QueryGeneralLedger.js +14 -0
  87. package/js/types/Interface/api/generalLedger/QueryGeneralLedger.js.map +1 -1
  88. package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js +7 -0
  89. package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
  90. package/js/types/Interface/api/transactions/QueryUnexport.js.map +1 -1
  91. package/js/types/Interface/api/vatDeclaration/QueryVatDeclaration.js +3 -1
  92. package/js/types/Interface/api/vatDeclaration/QueryVatDeclaration.js.map +1 -1
  93. package/js/types/Interface/api/webmail/CreateMailFromLambda.js +61 -0
  94. package/js/types/Interface/api/webmail/CreateMailFromLambda.js.map +1 -0
  95. package/js/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.js +18 -3
  96. package/js/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.js.map +1 -1
  97. package/js/types/Interface/models/IMail.js +6 -0
  98. package/js/types/Interface/models/IMail.js.map +1 -0
  99. package/js/types/Interface/models/IMailAttachment.js +6 -0
  100. package/js/types/Interface/models/IMailAttachment.js.map +1 -0
  101. package/js/types/Interface/models/IMailContent.js +6 -0
  102. package/js/types/Interface/models/IMailContent.js.map +1 -0
  103. package/js/types/index.js +60 -0
  104. package/js/types/index.js.map +1 -1
  105. package/package.json +1 -1
  106. package/ts/api/resources/GeneralLedger.ts +8 -1
  107. package/ts/api/resources/Tax.ts +1 -1
  108. package/ts/api/resources/Transaction.ts +4 -0
  109. package/ts/types/Enum/Aspone.ts +4 -3
  110. package/ts/types/Enum/BalanceSheet.ts +9 -5
  111. package/ts/types/Enum/BrandClementine.ts +1 -1
  112. package/ts/types/Enum/BrandComptalib.ts +3 -3
  113. package/ts/types/Enum/MailFlag.ts +4 -0
  114. package/ts/types/Interface/api/BasePaginate.ts +7 -0
  115. package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +2 -0
  116. package/ts/types/Interface/api/generalLedger/QueryGeneralLedger.ts +26 -1
  117. package/ts/types/Interface/api/taxDeadline/QueryTaxDeadline.ts +4 -0
  118. package/ts/types/Interface/api/transactions/QueryUnexport.ts +2 -2
  119. package/ts/types/Interface/api/vatDeclaration/QueryVatDeclaration.ts +2 -0
  120. package/ts/types/Interface/api/webmail/CreateMailFromLambda.ts +87 -0
  121. package/ts/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.ts +13 -2
  122. package/ts/types/Interface/models/IMail.ts +52 -0
  123. package/ts/types/Interface/models/IMailAttachment.ts +15 -0
  124. package/ts/types/Interface/models/IMailContent.ts +12 -0
  125. package/ts/types/index.ts +5 -0
@@ -1,4 +1,8 @@
1
- import { ApiProperty } from '../../../../utils';
1
+ import {
2
+ IsBoolean, IsInt, IsOptional, Min,
3
+ } from 'class-validator';
4
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
5
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
2
6
 
3
7
  export class QueryGeneralLedger {
4
8
  @ApiProperty()
@@ -6,4 +10,25 @@ export class QueryGeneralLedger {
6
10
 
7
11
  @ApiProperty()
8
12
  dateEnd: string;
13
+
14
+ @ApiPropertyOptional()
15
+ @IsInt()
16
+ @Min(1)
17
+ @IsOptional()
18
+ limit?: number;
19
+
20
+ @ApiPropertyOptional()
21
+ @IsInt()
22
+ @Min(1)
23
+ @IsOptional()
24
+ page?: number;
25
+
26
+ @ApiPropertyOptional({ default: true })
27
+ @IsBoolean()
28
+ @ToBoolean()
29
+ @IsOptional()
30
+ descending?: boolean;
31
+
32
+ @ApiPropertyOptional()
33
+ search?: string;
9
34
  }
@@ -3,6 +3,7 @@ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { VatRegime, ToDoOrDone } from '../../..';
4
4
  import { ComptaType } from '../../../Enum/ComptaType';
5
5
  import { TaxSystem } from '../../../Enum/TaxSystem';
6
+ import { Supervision } from '../../../Enum/Supervision';
6
7
  import { BalanceSheetState } from '../../../Enum/BalanceSheet';
7
8
 
8
9
  export class QueryTaxDeadline {
@@ -45,6 +46,9 @@ export class QueryTaxDeadline {
45
46
  @ApiPropertyOptional({ description: 'Date de clôture inférieure ou égale à (format YYYY-MM-DD)' })
46
47
  maximalEndDate?: string;
47
48
 
49
+ @ApiPropertyOptional({ description: 'État de la supervision', enum: Supervision })
50
+ idSupervisionState?: Supervision;
51
+
48
52
  @ApiPropertyOptional({ description: 'Statuts de l\'IS/IR' })
49
53
  @IsOptional()
50
54
  @IsEnum(ToDoOrDone)
@@ -17,11 +17,11 @@ export class QueryUnexport {
17
17
  @ApiPropertyOptional()
18
18
  @IsOptional()
19
19
  @IsArray()
20
- idBankAccount: Array<number>;
20
+ idBankAccount?: Array<number>;
21
21
 
22
22
  @ApiPropertyOptional()
23
23
  @IsOptional()
24
24
  @IsNumber()
25
25
  @IsIn([AccountingJournal.AC, AccountingJournal.VE])
26
- idAccountingJournal: number;
26
+ idAccountingJournal?: number;
27
27
  }
@@ -3,6 +3,7 @@ import {
3
3
  IsDate, IsInt, IsOptional, IsString,
4
4
  } from 'class-validator';
5
5
  import { ApiPropertyOptional } from '../../../..';
6
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
6
7
 
7
8
  export class QueryVatDeclaration {
8
9
  @ApiPropertyOptional()
@@ -23,6 +24,7 @@ export class QueryVatDeclaration {
23
24
  @ApiPropertyOptional()
24
25
  @IsBoolean()
25
26
  @IsOptional()
27
+ @ToBoolean()
26
28
  isComplete?: boolean;
27
29
 
28
30
  @ApiPropertyOptional()
@@ -0,0 +1,87 @@
1
+ import {
2
+ IsArray, IsDate, IsIn, IsNotEmpty, IsObject, IsOptional, IsString,
3
+ } from 'class-validator';
4
+ import {
5
+ AddressObject, HeaderLines,
6
+ } from 'mailparser';
7
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
8
+
9
+ export class CreateMailFromLambda {
10
+ @ApiProperty()
11
+ @IsArray()
12
+ attachments: { [key: string]: any }[];
13
+
14
+ @ApiProperty()
15
+ @IsObject()
16
+ @IsNotEmpty()
17
+ headers: { [key: string]: any };
18
+
19
+ @ApiProperty()
20
+ @IsArray()
21
+ @IsNotEmpty()
22
+ headerLines: HeaderLines;
23
+
24
+ @ApiProperty()
25
+ html: string | false;
26
+
27
+ @ApiPropertyOptional()
28
+ @IsString()
29
+ @IsOptional()
30
+ text?: string;
31
+
32
+ @ApiPropertyOptional()
33
+ @IsString()
34
+ @IsOptional()
35
+ textAsHtml?: string;
36
+
37
+ @ApiPropertyOptional()
38
+ @IsString()
39
+ @IsOptional()
40
+ subject?: string;
41
+
42
+ @ApiPropertyOptional()
43
+ @IsOptional()
44
+ references?: string[] | string;
45
+
46
+ @ApiPropertyOptional()
47
+ @IsOptional()
48
+ @IsDate()
49
+ date?: Date;
50
+
51
+ @ApiPropertyOptional()
52
+ @IsOptional()
53
+ to?: AddressObject | AddressObject[];
54
+
55
+ @ApiPropertyOptional()
56
+ @IsObject()
57
+ @IsOptional()
58
+ from?: AddressObject;
59
+
60
+ @ApiPropertyOptional()
61
+ @IsOptional()
62
+ cc?: AddressObject | AddressObject[];
63
+
64
+ @ApiPropertyOptional()
65
+ @IsOptional()
66
+ bcc?: AddressObject | AddressObject[];
67
+
68
+ @ApiPropertyOptional()
69
+ @IsObject()
70
+ @IsOptional()
71
+ replyTo?: AddressObject;
72
+
73
+ @ApiPropertyOptional()
74
+ @IsString()
75
+ @IsOptional()
76
+ messageId?: string;
77
+
78
+ @ApiPropertyOptional()
79
+ @IsString()
80
+ @IsOptional()
81
+ inReplyTo?: string;
82
+
83
+ @ApiPropertyOptional()
84
+ @IsOptional()
85
+ @IsIn(['normal', 'low', 'high'])
86
+ priority?: 'normal' | 'low' | 'high';
87
+ }
@@ -1,5 +1,5 @@
1
1
  import {
2
- IsMimeType, IsNumber, IsOptional, IsString,
2
+ /* IsMimeType, */IsNumber, IsOptional, IsString,
3
3
  } from 'class-validator';
4
4
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
5
5
 
@@ -10,7 +10,7 @@ export class PostAttachmentEmailFromLambdaParams {
10
10
 
11
11
  @ApiProperty()
12
12
  @IsString()
13
- @IsMimeType()
13
+ // @IsMimeType() -> désactivé car pose pb avec certaines PJ ayant un mimetype comme 'image/*'
14
14
  mime: string;
15
15
 
16
16
  @ApiPropertyOptional()
@@ -23,8 +23,19 @@ export class PostAttachmentEmailFromLambdaParams {
23
23
  filename: string;
24
24
  }
25
25
 
26
+ // TODO: à supprimer
26
27
  export class CreateAttachmentOldWebmail extends PostAttachmentEmailFromLambdaParams {
27
28
  @ApiProperty()
28
29
  @IsNumber()
29
30
  idMail: number;
31
+ }
32
+ export class CreateAttachmentParams extends PostAttachmentEmailFromLambdaParams {
33
+ @ApiProperty()
34
+ @IsNumber()
35
+ idMail: number;
36
+ }
37
+ export class MigrateParams {
38
+ @ApiProperty({ default: 50 })
39
+ @IsNumber()
40
+ limit: number;
30
41
  }
@@ -0,0 +1,52 @@
1
+ import { ISociety } from './ISociety';
2
+ import { IUser } from './IUser';
3
+ import { IExercice } from './IExercice';
4
+ import { IRole } from './IRole';
5
+ import { IMailContent } from './IMailContent';
6
+
7
+ // mail
8
+ export interface IMail {
9
+ id?: number;
10
+ messageId?: string | null;
11
+ date: Date;
12
+ subject?: string | null;
13
+ fromName?: string | null;
14
+ fromAddress?: string;
15
+ to?: string;
16
+ cc?: string | null;
17
+ bcc?: string | null;
18
+ replyTo?: string | null;
19
+ inReplyTo?: string | null;
20
+ listReferences?: string | null;
21
+ spamScore?: number;
22
+ textMini?: string | null;
23
+ isSent: boolean;
24
+ isRead?: boolean;
25
+ isDraft?: boolean;
26
+ isImportant?: boolean;
27
+ isFollowed?: boolean;
28
+ idUser?: number;
29
+ idUserWhoAnswered?: number;
30
+ idUserWhoFlagged?: number;
31
+ idRole?: number | null;
32
+ idExercice?: number | null;
33
+ idSociety?: number | null;
34
+ idFlag?: number;
35
+ idType?: number; // ENUM
36
+ idMailAuto?: number;
37
+ receiptAcknowledgementAt?: Date | null;
38
+ processedAt?: Date | null;
39
+ responseAutoAt?: Date | null;
40
+ createdAt?: Date;
41
+ updatedAt?: Date;
42
+ deletedAt?: Date;
43
+
44
+ // Associations
45
+ webmailFlagUser?: IUser;
46
+ webmailAnswerUser?: IUser;
47
+ webmailSender?: IUser;
48
+ role?: IRole;
49
+ exercice?: IExercice;
50
+ webmailSocieties?: ISociety;
51
+ mailContent?: IMailContent;
52
+ }
@@ -0,0 +1,15 @@
1
+ import { IFile } from './IFile';
2
+ import { IMail } from './IMail';
3
+
4
+ // mailAttachment
5
+ export interface IMailAttachment {
6
+ id?: number;
7
+ idFile: number;
8
+ idMail: number;
9
+ createdAt?: Date | null;
10
+ updatedAt?: Date | null;
11
+
12
+ // Associations
13
+ mail?: IMail;
14
+ file?: IFile;
15
+ }
@@ -0,0 +1,12 @@
1
+ import { IMail } from './IMail';
2
+
3
+ // mailContent
4
+ export interface IMailContent {
5
+ id?: number;
6
+ textPlain?: string;
7
+ textHtml?: string;
8
+ idMail?: number;
9
+
10
+ // Associations
11
+ mail?: IMail;
12
+ }
package/ts/types/index.ts CHANGED
@@ -265,6 +265,9 @@ export * from './Interface/models/IUserTest';
265
265
  export * from './Interface/models/IVatDeclaration';
266
266
  export * from './Interface/models/IVatDeclarationCertificate';
267
267
  export * from './Interface/models/IVatDeclarationSocietyDetail';
268
+ export * from './Interface/models/IMail';
269
+ export * from './Interface/models/IMailAttachment';
270
+ export * from './Interface/models/IMailContent';
268
271
  export * from './Interface/models/IWebMail';
269
272
  export * from './Interface/models/IWebMailAttachment';
270
273
  export * from './Interface/models/IWebMailSpam';
@@ -397,6 +400,7 @@ export * from './Enum/KilometricAllowanceScale';
397
400
  export * from './Enum/VatDeclarationType';
398
401
  export * from './Enum/WebmailType';
399
402
  export * from './Enum/WebmailFlag';
403
+ export * from './Enum/MailFlag';
400
404
 
401
405
  // Interfaces API
402
406
  export * from './Interface/api/jeDeclare/ReadJeDeclare';
@@ -506,6 +510,7 @@ export * from './Interface/api/promoCode/ReadDefaultPromotion';
506
510
  export * from './Interface/api/SocietyTransaction/QuerySocietyTransactionCount';
507
511
  export * from './Interface/api/SocietyTransaction/ReadSocietyTransactionCount';
508
512
  export * from './Interface/api/webmail/CreateWebmailFromLambda';
513
+ export * from './Interface/api/webmail/CreateMailFromLambda';
509
514
  export * from './Interface/api/webmail/PostAttachmentEmailFromLambdaParams';
510
515
  export * from './Interface/api/webmail/GetMissingMailsInFinalBucket';
511
516
  export * from './Interface/api/promoCode/CreateDefaultPromoCode';