@silexpert/core 1.3.64 → 1.3.65

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 (94) hide show
  1. package/dist/cjs/api/resources/Refund.d.ts +21 -1
  2. package/dist/cjs/api/resources/Refund.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Refund.js +12 -0
  4. package/dist/cjs/api/resources/Refund.js.map +1 -1
  5. package/dist/cjs/types/Enum/PaymentAttempt.d.ts +6 -0
  6. package/dist/cjs/types/Enum/PaymentAttempt.d.ts.map +1 -0
  7. package/dist/cjs/types/Enum/PaymentAttempt.js +10 -0
  8. package/dist/cjs/types/Enum/PaymentAttempt.js.map +1 -0
  9. package/dist/cjs/types/Enum/PaymentMethod.d.ts +22 -10
  10. package/dist/cjs/types/Enum/PaymentMethod.d.ts.map +1 -1
  11. package/dist/cjs/types/Enum/PaymentMethod.js +24 -11
  12. package/dist/cjs/types/Enum/PaymentMethod.js.map +1 -1
  13. package/dist/cjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts +2 -1
  14. package/dist/cjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts.map +1 -1
  15. package/dist/cjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js +6 -0
  16. package/dist/cjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +11 -0
  18. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +1 -0
  19. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js +50 -0
  20. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js.map +1 -0
  21. package/dist/cjs/types/Interface/api/stripe/Create.d.ts +3 -0
  22. package/dist/cjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/api/stripe/Create.js +10 -1
  24. package/dist/cjs/types/Interface/api/stripe/Create.js.map +1 -1
  25. package/dist/cjs/types/Interface/models/IAppNotification.d.ts +3 -3
  26. package/dist/cjs/types/Interface/models/IAppNotification.d.ts.map +1 -1
  27. package/dist/cjs/types/Interface/models/IAppNotification.js.map +1 -1
  28. package/dist/cjs/types/Interface/models/IMobileNotificationLog.d.ts +4 -2
  29. package/dist/cjs/types/Interface/models/IMobileNotificationLog.d.ts.map +1 -1
  30. package/dist/cjs/types/Interface/models/IMobileNotificationLog.js.map +1 -1
  31. package/dist/cjs/types/Interface/models/IPayment.d.ts +2 -0
  32. package/dist/cjs/types/Interface/models/IPayment.d.ts.map +1 -1
  33. package/dist/cjs/types/Interface/models/IPayment.js.map +1 -1
  34. package/dist/cjs/types/Interface/models/IPaymentAttempt.d.ts +15 -0
  35. package/dist/cjs/types/Interface/models/IPaymentAttempt.d.ts.map +1 -0
  36. package/dist/cjs/types/Interface/models/IPaymentAttempt.js +3 -0
  37. package/dist/cjs/types/Interface/models/IPaymentAttempt.js.map +1 -0
  38. package/dist/cjs/types/index.d.ts +3 -0
  39. package/dist/cjs/types/index.d.ts.map +1 -1
  40. package/dist/cjs/types/index.js +3 -0
  41. package/dist/cjs/types/index.js.map +1 -1
  42. package/dist/mjs/api/resources/Refund.d.ts +21 -1
  43. package/dist/mjs/api/resources/Refund.d.ts.map +1 -1
  44. package/dist/mjs/api/resources/Refund.js +12 -0
  45. package/dist/mjs/api/resources/Refund.js.map +1 -1
  46. package/dist/mjs/types/Enum/PaymentAttempt.d.ts +6 -0
  47. package/dist/mjs/types/Enum/PaymentAttempt.d.ts.map +1 -0
  48. package/dist/mjs/types/Enum/PaymentAttempt.js +7 -0
  49. package/dist/mjs/types/Enum/PaymentAttempt.js.map +1 -0
  50. package/dist/mjs/types/Enum/PaymentMethod.d.ts +22 -10
  51. package/dist/mjs/types/Enum/PaymentMethod.d.ts.map +1 -1
  52. package/dist/mjs/types/Enum/PaymentMethod.js +23 -10
  53. package/dist/mjs/types/Enum/PaymentMethod.js.map +1 -1
  54. package/dist/mjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts +2 -1
  55. package/dist/mjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts.map +1 -1
  56. package/dist/mjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js +8 -1
  57. package/dist/mjs/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js.map +1 -1
  58. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +11 -0
  59. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +1 -0
  60. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js +52 -0
  61. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js.map +1 -0
  62. package/dist/mjs/types/Interface/api/stripe/Create.d.ts +3 -0
  63. package/dist/mjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  64. package/dist/mjs/types/Interface/api/stripe/Create.js +9 -0
  65. package/dist/mjs/types/Interface/api/stripe/Create.js.map +1 -1
  66. package/dist/mjs/types/Interface/models/IAppNotification.d.ts +3 -3
  67. package/dist/mjs/types/Interface/models/IAppNotification.d.ts.map +1 -1
  68. package/dist/mjs/types/Interface/models/IAppNotification.js.map +1 -1
  69. package/dist/mjs/types/Interface/models/IMobileNotificationLog.d.ts +4 -2
  70. package/dist/mjs/types/Interface/models/IMobileNotificationLog.d.ts.map +1 -1
  71. package/dist/mjs/types/Interface/models/IMobileNotificationLog.js.map +1 -1
  72. package/dist/mjs/types/Interface/models/IPayment.d.ts +2 -0
  73. package/dist/mjs/types/Interface/models/IPayment.d.ts.map +1 -1
  74. package/dist/mjs/types/Interface/models/IPayment.js.map +1 -1
  75. package/dist/mjs/types/Interface/models/IPaymentAttempt.d.ts +15 -0
  76. package/dist/mjs/types/Interface/models/IPaymentAttempt.d.ts.map +1 -0
  77. package/dist/mjs/types/Interface/models/IPaymentAttempt.js +2 -0
  78. package/dist/mjs/types/Interface/models/IPaymentAttempt.js.map +1 -0
  79. package/dist/mjs/types/index.d.ts +3 -0
  80. package/dist/mjs/types/index.d.ts.map +1 -1
  81. package/dist/mjs/types/index.js +3 -0
  82. package/dist/mjs/types/index.js.map +1 -1
  83. package/package.json +1 -1
  84. package/ts/api/resources/Refund.ts +17 -1
  85. package/ts/types/Enum/PaymentAttempt.ts +5 -0
  86. package/ts/types/Enum/PaymentMethod.ts +23 -10
  87. package/ts/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.ts +7 -2
  88. package/ts/types/Interface/api/refund/QueryRefundPaginated.ts +31 -0
  89. package/ts/types/Interface/api/stripe/Create.ts +7 -0
  90. package/ts/types/Interface/models/IAppNotification.ts +3 -3
  91. package/ts/types/Interface/models/IMobileNotificationLog.ts +4 -2
  92. package/ts/types/Interface/models/IPayment.ts +3 -1
  93. package/ts/types/Interface/models/IPaymentAttempt.ts +16 -0
  94. package/ts/types/index.ts +3 -0
@@ -1,60 +1,73 @@
1
+ export enum PaymentMethodIds {
2
+ DIRECT_DEBIT = 1,
3
+ BANK_TRANSFER = 2,
4
+ BANK_CARD = 3,
5
+ BANK_CHECK = 4,
6
+ DIRECT_DEBIT_REJECTION_1 = 5,
7
+ DIRECT_DEBIT_REJECTION_2 = 6,
8
+ VARIOUS_UNPAID = 7,
9
+ STRIPE_ECB = 8,
10
+ STRIPE = 9,
11
+ CASH = 10,
12
+ }
13
+
1
14
  export const PaymentMethod = {
2
15
  DIRECT_DEBIT: {
3
- id: 1,
16
+ id: PaymentMethodIds.DIRECT_DEBIT,
4
17
  name: 'Prélèvement',
5
18
  isSpecial: 0,
6
19
  isOverdue: 0,
7
20
  },
8
21
  BANK_TRANSFER: {
9
- id: 2,
22
+ id: PaymentMethodIds.BANK_TRANSFER,
10
23
  name: 'Virement',
11
24
  isSpecial: 0,
12
25
  isOverdue: 0,
13
26
  },
14
27
  BANK_CARD: {
15
- id: 3,
28
+ id: PaymentMethodIds.BANK_CARD,
16
29
  name: 'CB',
17
30
  isSpecial: 0,
18
31
  isOverdue: 0,
19
32
  },
20
33
  BANK_CHECK: {
21
- id: 4,
34
+ id: PaymentMethodIds.BANK_CHECK,
22
35
  name: 'Chèque',
23
36
  isSpecial: 0,
24
37
  isOverdue: 0,
25
38
  },
26
39
  DIRECT_DEBIT_REJECTION_1: {
27
- id: 5,
40
+ id: PaymentMethodIds.DIRECT_DEBIT_REJECTION_1,
28
41
  name: 'Rejet de prélèvement 1',
29
42
  isSpecial: 1,
30
43
  isOverdue: 1,
31
44
  },
32
45
  DIRECT_DEBIT_REJECTION_2: {
33
- id: 6,
46
+ id: PaymentMethodIds.DIRECT_DEBIT_REJECTION_2,
34
47
  name: 'Rejet de prélèvement 2',
35
48
  isSpecial: 1,
36
49
  isOverdue: 1,
37
50
  },
38
51
  VARIOUS_UNPAID: {
39
- id: 7,
52
+ id: PaymentMethodIds.VARIOUS_UNPAID,
40
53
  name: 'Impayés divers',
41
54
  isSpecial: 1,
42
55
  isOverdue: 1,
43
56
  },
44
57
  STRIPE_ECB: {
45
- id: 8,
58
+ id: PaymentMethodIds.STRIPE_ECB,
46
59
  name: 'Stripe (ECB)',
47
60
  isSpecial: 0,
48
61
  isOverdue: 0,
49
62
  },
50
63
  STRIPE: {
51
- id: 9,
64
+ id: PaymentMethodIds.STRIPE,
52
65
  name: 'Stripe',
53
66
  isSpecial: 0,
54
67
  isOverdue: 0,
55
68
  },
56
69
  CASH: {
57
- id: 10,
70
+ id: PaymentMethodIds.CASH,
58
71
  name: 'Espèces',
59
72
  isSpecial: 0,
60
73
  isOverdue: 0,
@@ -1,11 +1,16 @@
1
- import { IsArray, IsNumber, IsOptional } from 'class-validator';
1
+ import { IsArray, IsInt, IsNumber, IsOptional } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
 
4
4
  export class RegenerateInternalInvoicing {
5
5
  @ApiPropertyOptional()
6
6
  @IsOptional()
7
7
  @IsArray()
8
- idSociety: Array<number>;
8
+ idSociety?: Array<number>;
9
+
10
+ @ApiPropertyOptional()
11
+ @IsOptional()
12
+ @IsInt()
13
+ idFile?: number | null;
9
14
 
10
15
  @ApiProperty()
11
16
  @IsNumber()
@@ -0,0 +1,31 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
+ import { RequiredQueryPaginate } from '../BasePaginate';
3
+ import { Order } from '../BaseRequest';
4
+ import { IsBoolean, IsInt, IsOptional } from 'class-validator';
5
+
6
+ export class QueryRefundPaginated extends RequiredQueryPaginate implements Order {
7
+ @ApiPropertyOptional()
8
+ search?: string;
9
+
10
+ @ApiProperty()
11
+ @IsInt()
12
+ year: number;
13
+
14
+ @ApiPropertyOptional()
15
+ @IsInt()
16
+ @IsOptional()
17
+ month?: number;
18
+
19
+ @ApiPropertyOptional()
20
+ @IsInt()
21
+ @IsOptional()
22
+ motif?: number;
23
+
24
+ @ApiPropertyOptional()
25
+ orderBy?: string;
26
+
27
+ @ApiPropertyOptional()
28
+ @IsBoolean()
29
+ @IsOptional()
30
+ descending?: boolean;
31
+ }
@@ -95,3 +95,10 @@ export class CreatePaymentIntent {
95
95
  @ApiPropertyOptional()
96
96
  metadata?: Stripe.MetadataParam;
97
97
  }
98
+
99
+ export class PostProcessPaymentAutomatically {
100
+ @ApiPropertyOptional()
101
+ @IsInt()
102
+ @IsOptional()
103
+ idSociety?: number;
104
+ }
@@ -3,7 +3,7 @@ import { ISociety } from './ISociety';
3
3
  import { IUser } from './IUser';
4
4
 
5
5
  export interface IAppNotification {
6
- id: number;
6
+ id?: number;
7
7
  title: string;
8
8
  message: string;
9
9
  link?: string;
@@ -17,6 +17,6 @@ export interface IAppNotification {
17
17
  updatedAt?: Date | null;
18
18
 
19
19
  // associations
20
- society: ISociety;
21
- user: IUser;
20
+ society?: ISociety;
21
+ user?: IUser;
22
22
  }
@@ -3,8 +3,10 @@ import { NotificationTypeEnum } from '../../Enum/NotificationType';
3
3
  export interface IMobileNotificationLog {
4
4
  id: number;
5
5
  idType: NotificationTypeEnum;
6
- lastSent: Date | null;
7
- nextSend: Date | null;
6
+ /** @deprecated useless */
7
+ lastSent?: Date | null;
8
+ /** @deprecated useless */
9
+ nextSend?: Date | null;
8
10
  success: boolean;
9
11
  error: string | null;
10
12
  count: number;
@@ -4,6 +4,7 @@ import { IUser } from './IUser';
4
4
  import { IExercice } from './IExercice';
5
5
  import { IFile } from './IFile';
6
6
  import { IPaymentExpectation } from './IPaymentExpectation';
7
+ import { IPaymentAttempt } from './IPaymentAttempt';
7
8
 
8
9
  // payments
9
10
  export interface IPayment {
@@ -15,7 +16,7 @@ export interface IPayment {
15
16
  isOverpaid?: boolean;
16
17
  isFirst?: boolean;
17
18
  // @deprecated Use isCollectable instead
18
- toCollect?: boolean;
19
+ toCollect?: boolean;
19
20
  countRejects?: number;
20
21
  isCollectable?: boolean;
21
22
  isAsset?: boolean;
@@ -44,4 +45,5 @@ export interface IPayment {
44
45
  user?: IUser;
45
46
  exercice?: IExercice;
46
47
  files?: IFile;
48
+ paymentAttempts?: IPaymentAttempt[];
47
49
  }
@@ -0,0 +1,16 @@
1
+ import { PaymentAttemptStatus } from '../../Enum/PaymentAttempt';
2
+ import { PaymentMethodIds } from '../../Enum/PaymentMethod';
3
+ import { IPayment } from './IPayment';
4
+
5
+ export interface IPaymentAttempt {
6
+ id?: number;
7
+ reference: string | null;
8
+ comment: string | null;
9
+ status: PaymentAttemptStatus;
10
+ idPaymentMethod: PaymentMethodIds;
11
+ idPayment: number;
12
+ createdAt?: string;
13
+ updatedAt?: string;
14
+
15
+ payment?: IPayment;
16
+ }
package/ts/types/index.ts CHANGED
@@ -323,6 +323,7 @@ export * from './Interface/models/IReminderAttachment';
323
323
  export * from './Interface/models/IStateBankAccount';
324
324
  export * from './Interface/models/IAIQuestion';
325
325
  export * from './Interface/models/IAIConversation';
326
+ export * from './Interface/models/IPaymentAttempt';
326
327
 
327
328
  // Schemas
328
329
  export * from './Interface/schemas/IRegistrationDetail';
@@ -553,6 +554,7 @@ export * from './Enum/SocietyTypeExportCsv';
553
554
  export * from './Enum/TeamType';
554
555
  export * from './Enum/PartneredAccountantServiceType';
555
556
  export * from './Enum/PartneredAccountantServiceTypeId';
557
+ export * from './Enum/PaymentAttempt';
556
558
 
557
559
  // Interfaces API
558
560
  export * from './Interface/api/exercice/ReadExercice';
@@ -1161,3 +1163,4 @@ export * from './Interface/api/regulation/Read';
1161
1163
  export * from './Interface/api/regulation/Create';
1162
1164
  export * from './Interface/api/marketing/NewLeadSheet';
1163
1165
  export * from './Interface/api/ai/AskQuestionCollaborator';
1166
+ export * from './Interface/api/refund/QueryRefundPaginated';