@silexpert/core 1.3.73 → 1.3.74-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 (44) hide show
  1. package/dist/cjs/api/resources/Refund.d.ts +29 -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/api/resources/Society.d.ts +3 -1
  6. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/Society.js +6 -0
  8. package/dist/cjs/api/resources/Society.js.map +1 -1
  9. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +13 -0
  10. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +1 -0
  11. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js +60 -0
  12. package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js.map +1 -0
  13. package/dist/cjs/types/Interface/models/IRefund.d.ts +9 -1
  14. package/dist/cjs/types/Interface/models/IRefund.d.ts.map +1 -1
  15. package/dist/cjs/types/Interface/models/IRefund.js.map +1 -1
  16. package/dist/cjs/types/index.d.ts +1 -0
  17. package/dist/cjs/types/index.d.ts.map +1 -1
  18. package/dist/cjs/types/index.js +1 -0
  19. package/dist/cjs/types/index.js.map +1 -1
  20. package/dist/mjs/api/resources/Refund.d.ts +29 -1
  21. package/dist/mjs/api/resources/Refund.d.ts.map +1 -1
  22. package/dist/mjs/api/resources/Refund.js +12 -0
  23. package/dist/mjs/api/resources/Refund.js.map +1 -1
  24. package/dist/mjs/api/resources/Society.d.ts +3 -1
  25. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  26. package/dist/mjs/api/resources/Society.js +6 -0
  27. package/dist/mjs/api/resources/Society.js.map +1 -1
  28. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +13 -0
  29. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +1 -0
  30. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js +64 -0
  31. package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js.map +1 -0
  32. package/dist/mjs/types/Interface/models/IRefund.d.ts +9 -1
  33. package/dist/mjs/types/Interface/models/IRefund.d.ts.map +1 -1
  34. package/dist/mjs/types/Interface/models/IRefund.js.map +1 -1
  35. package/dist/mjs/types/index.d.ts +1 -0
  36. package/dist/mjs/types/index.d.ts.map +1 -1
  37. package/dist/mjs/types/index.js +1 -0
  38. package/dist/mjs/types/index.js.map +1 -1
  39. package/package.json +1 -1
  40. package/ts/api/resources/Refund.ts +17 -1
  41. package/ts/api/resources/Society.ts +11 -0
  42. package/ts/types/Interface/api/refund/QueryRefundPaginated.ts +39 -0
  43. package/ts/types/Interface/models/IRefund.ts +13 -1
  44. package/ts/types/index.ts +1 -0
@@ -29,8 +29,10 @@ import {
29
29
  ReadSocietyUnpaidStats,
30
30
  DataCustomersCsv,
31
31
  ReadCurrentPrestations,
32
+ IComment,
32
33
  } from '../../types';
33
34
  import { CancelToken } from 'axios';
35
+ import { User } from './User';
34
36
 
35
37
  export class Society extends Resource {
36
38
  public get(params: QuerySociety): Promise<ISociety> {
@@ -103,6 +105,15 @@ export class Society extends Resource {
103
105
  getAccountant(): Promise<IUser | null> {
104
106
  return this.axios.$get('/society/accountant');
105
107
  }
108
+
109
+ createComment(idSociety: number, payload: Omit<IComment, 'id' | 'idSociety'>): Promise<IComment> {
110
+ return this.axios.$post(`/society/${idSociety}/comment`, payload);
111
+ }
112
+
113
+ updateComment(idComment: number, payload: Partial<IComment>): Promise<IComment> {
114
+ return this.axios.$put(`/society/comment/${idComment}`, payload);
115
+ }
116
+
106
117
  deleteUser(idSociety: number, idUser: number): Promise<true> {
107
118
  return this.axios.$delete(`/society/${idSociety}/user/${idUser}`);
108
119
  }
@@ -0,0 +1,39 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
+ import { RequiredQueryPaginate } from '../BasePaginate';
3
+ import { Order } from '../BaseRequest';
4
+ import { IsBoolean, IsDate, 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
+ @IsOptional()
26
+ startDate?: Date;
27
+
28
+ @ApiPropertyOptional()
29
+ @IsOptional()
30
+ endDate?: Date;
31
+
32
+ @ApiPropertyOptional()
33
+ orderBy?: string;
34
+
35
+ @ApiPropertyOptional()
36
+ @IsBoolean()
37
+ @IsOptional()
38
+ descending?: boolean;
39
+ }
@@ -4,16 +4,26 @@ import { IUser } from './IUser';
4
4
 
5
5
  // refunds
6
6
  export interface IRefund {
7
- id?: number;
7
+ idRefund?: number;
8
8
  amount: number | null;
9
9
  comment: string | null;
10
10
  refundDate: Date | null;
11
+ refundAt?: Date | null;
11
12
  processed: boolean;
13
+
12
14
  isAmountChecked?: boolean;
15
+
13
16
  idRefundMotif: number;
14
17
  idSociety: number;
15
18
  idUserDemand: number;
19
+ refundBy?: number | null;
16
20
  idFile?: number | null; //non obligatoire désormais, utilisé avant pour rattacher le RIB
21
+ idUserAgreement?: number | null;
22
+ dateAgreement?: Date | null;
23
+
24
+ exceptionalAgreement?: boolean | null;
25
+ agreement?: number | null;
26
+
17
27
  createdAt?: Date | null;
18
28
  updatedAt?: Date | null;
19
29
 
@@ -21,4 +31,6 @@ export interface IRefund {
21
31
  society?: ISociety;
22
32
  file?: IFile;
23
33
  userDemand?: IUser;
34
+ refundByUser?: IUser;
35
+ agreementUser?: IUser;
24
36
  }
package/ts/types/index.ts CHANGED
@@ -1165,3 +1165,4 @@ export * from './Interface/api/regulation/Read';
1165
1165
  export * from './Interface/api/regulation/Create';
1166
1166
  export * from './Interface/api/marketing/NewLeadSheet';
1167
1167
  export * from './Interface/api/ai/AskQuestionCollaborator';
1168
+ export * from './Interface/api/refund/QueryRefundPaginated';