@silexpert/core 1.3.37-1 → 1.3.37-4

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 (58) hide show
  1. package/dist/cjs/api/resources/Card.d.ts +17 -1
  2. package/dist/cjs/api/resources/Card.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Card.js +19 -0
  4. package/dist/cjs/api/resources/Card.js.map +1 -1
  5. package/dist/cjs/types/Enum/Account.d.ts +4 -0
  6. package/dist/cjs/types/Enum/Account.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/Account.js +4 -0
  8. package/dist/cjs/types/Enum/Account.js.map +1 -1
  9. package/dist/cjs/types/Enum/Card.d.ts +12 -50
  10. package/dist/cjs/types/Enum/Card.d.ts.map +1 -1
  11. package/dist/cjs/types/Enum/Card.js +10 -0
  12. package/dist/cjs/types/Enum/Card.js.map +1 -1
  13. package/dist/cjs/types/Enum/TeamType.d.ts +8 -5
  14. package/dist/cjs/types/Enum/TeamType.d.ts.map +1 -1
  15. package/dist/cjs/types/Enum/TeamType.js +8 -5
  16. package/dist/cjs/types/Enum/TeamType.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/cerfa/2571.d.ts +2 -0
  18. package/dist/cjs/types/Interface/api/cerfa/2571.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/cerfa/2571.js.map +1 -1
  20. package/dist/cjs/types/Interface/api/cerfa/2573.d.ts +3 -1
  21. package/dist/cjs/types/Interface/api/cerfa/2573.d.ts.map +1 -1
  22. package/dist/cjs/types/Interface/api/cerfa/2573.js.map +1 -1
  23. package/dist/cjs/types/Interface/api/cerfa/ReadCerfa.d.ts +2 -2
  24. package/dist/cjs/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -1
  25. package/dist/cjs/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
  26. package/dist/mjs/api/resources/Card.d.ts +17 -1
  27. package/dist/mjs/api/resources/Card.d.ts.map +1 -1
  28. package/dist/mjs/api/resources/Card.js +19 -0
  29. package/dist/mjs/api/resources/Card.js.map +1 -1
  30. package/dist/mjs/types/Enum/Account.d.ts +4 -0
  31. package/dist/mjs/types/Enum/Account.d.ts.map +1 -1
  32. package/dist/mjs/types/Enum/Account.js +4 -0
  33. package/dist/mjs/types/Enum/Account.js.map +1 -1
  34. package/dist/mjs/types/Enum/Card.d.ts +12 -50
  35. package/dist/mjs/types/Enum/Card.d.ts.map +1 -1
  36. package/dist/mjs/types/Enum/Card.js +10 -0
  37. package/dist/mjs/types/Enum/Card.js.map +1 -1
  38. package/dist/mjs/types/Enum/TeamType.d.ts +8 -5
  39. package/dist/mjs/types/Enum/TeamType.d.ts.map +1 -1
  40. package/dist/mjs/types/Enum/TeamType.js +8 -5
  41. package/dist/mjs/types/Enum/TeamType.js.map +1 -1
  42. package/dist/mjs/types/Interface/api/cerfa/2571.d.ts +2 -0
  43. package/dist/mjs/types/Interface/api/cerfa/2571.d.ts.map +1 -1
  44. package/dist/mjs/types/Interface/api/cerfa/2571.js.map +1 -1
  45. package/dist/mjs/types/Interface/api/cerfa/2573.d.ts +3 -1
  46. package/dist/mjs/types/Interface/api/cerfa/2573.d.ts.map +1 -1
  47. package/dist/mjs/types/Interface/api/cerfa/2573.js.map +1 -1
  48. package/dist/mjs/types/Interface/api/cerfa/ReadCerfa.d.ts +2 -2
  49. package/dist/mjs/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -1
  50. package/dist/mjs/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
  51. package/package.json +1 -1
  52. package/ts/api/resources/Card.ts +23 -0
  53. package/ts/types/Enum/Account.ts +4 -0
  54. package/ts/types/Enum/Card.ts +28 -9
  55. package/ts/types/Enum/TeamType.ts +8 -5
  56. package/ts/types/Interface/api/cerfa/2571.ts +4 -0
  57. package/ts/types/Interface/api/cerfa/2573.ts +4 -1
  58. package/ts/types/Interface/api/cerfa/ReadCerfa.ts +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.37-1",
3
+ "version": "1.3.37-4",
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",
@@ -14,6 +14,8 @@ import {
14
14
  QueryInternalCardsStats,
15
15
  InternalCardStats,
16
16
  BasePaginate,
17
+ UpdateCardV2,
18
+ CardType,
17
19
  } from '../../types';
18
20
 
19
21
  export class Card extends Resource {
@@ -61,6 +63,9 @@ export class Card extends Resource {
61
63
  });
62
64
  }
63
65
 
66
+ /**
67
+ * @deprecated Use updateV2 instead
68
+ */
64
69
  update(id: number, data: UpdateCard): Promise<ICard> {
65
70
  return this.axios.$put(`/cards/${id}`, data);
66
71
  }
@@ -69,15 +74,33 @@ export class Card extends Resource {
69
74
  return this.axios.$delete(`/cards/${id}`);
70
75
  }
71
76
 
77
+ /**
78
+ * @deprecated comptallo v1 endpoint
79
+ */
72
80
  modifyTeamPlanning(data: ModifyTeamPlanning): Promise<true> {
73
81
  return this.axios.$put('/cards/assign/modify-team-planning', data);
74
82
  }
75
83
 
84
+ /**
85
+ * @deprecated comptallo v1 endpoint
86
+ */
76
87
  modifyExercisePlanning(data: ModifyExercisePlanning): Promise<true> {
77
88
  return this.axios.$put('/cards/assign/modify-exercise-planning', data);
78
89
  }
79
90
 
91
+ /**
92
+ * @deprecated comptallo v1 endpoint
93
+ */
80
94
  organizeFutureBalanceSheets(data: OrganizeBalanceSheets): Promise<OrganizeBalanceSheetsResponse> {
81
95
  return this.axios.$post('/cards/accountant/organize/future-balance-sheets', data);
82
96
  }
97
+
98
+ updateV2(idCard: number, data: UpdateCardV2): Promise<ICard> {
99
+ return this.axios.$put(`/cards/${idCard}/v2`, data);
100
+ }
101
+
102
+ // TODO: improve types
103
+ assignCard(payload: { type: CardType }): Promise<ICard> {
104
+ return this.axios.$post('/cards/assign', payload);
105
+ }
83
106
  }
@@ -91,6 +91,10 @@ export const Account = {
91
91
  id: 117,
92
92
  number: 625100,
93
93
  },
94
+ TRAVELING_EXPENSES: {
95
+ id: 118,
96
+ number: 625110,
97
+ },
94
98
  DEDUCTIBLE_VAT: {
95
99
  id: 221,
96
100
  number: 445660,
@@ -1,4 +1,5 @@
1
1
  import { Role } from './Role';
2
+ import { TeamType } from './TeamType';
2
3
 
3
4
  export enum CardType {
4
5
  BALANCE_SHEET = 1,
@@ -32,6 +33,7 @@ export enum CardState {
32
33
  IN_PROGRESS = 2,
33
34
  DONE = 3,
34
35
  NOT_DONE = 4,
36
+ WAITING_CLIENT = 5,
35
37
  }
36
38
 
37
39
  export enum CardGroupEnum {
@@ -46,7 +48,16 @@ export enum CardGroupEnum {
46
48
  CUT_OFF = 9,
47
49
  }
48
50
 
49
- export const CardGroup = [
51
+ export interface CardGroupType {
52
+ id: CardGroupEnum;
53
+ label: string;
54
+ types: CardType[];
55
+ roles: Role[];
56
+ maxByDay?: number;
57
+ teamType: TeamType;
58
+ }
59
+
60
+ export const CardGroup: readonly CardGroupType[] = [
50
61
  {
51
62
  id: CardGroupEnum.BALANCE_SHEET_GROUP,
52
63
  label: 'Bilans',
@@ -59,15 +70,17 @@ export const CardGroup = [
59
70
  CardType.BALANCE_SHEET_PREPARATION,
60
71
  CardType.BALANCE_SHEET_SEND_SIE,
61
72
  CardType.BALANCE_SHEET_REFUSED,
62
- ] as CardType[],
73
+ ],
63
74
  roles: [Role.ACCOUNTANT],
75
+ teamType: TeamType.BALANCESHEET,
64
76
  maxByDay: 3,
65
77
  },
66
78
  {
67
79
  id: CardGroupEnum.VAT_GROUP,
68
80
  label: 'Déclarations',
69
- types: [CardType.VAT, CardType.VAT_EXPRESS, CardType.VAT_REFUSED, CardType.ADVANCE_IS, CardType.ADVANCE_IS_REFUSED] as CardType[],
81
+ types: [CardType.VAT, CardType.VAT_EXPRESS, CardType.VAT_REFUSED, CardType.ADVANCE_IS, CardType.ADVANCE_IS_REFUSED],
70
82
  roles: [Role.ACCOUNTANT],
83
+ teamType: TeamType.VAT,
71
84
  maxByDay: 6,
72
85
  },
73
86
  // {
@@ -80,44 +93,50 @@ export const CardGroup = [
80
93
  {
81
94
  id: CardGroupEnum.ACCEPTATION_GROUP,
82
95
  label: 'Contrôle solde bancaire & annotations',
83
- types: [CardType.CHECK_BALANCE_ANNOTATION_NEW_CLIENT, CardType.CHECK_BALANCE_ANNOTATION] as CardType[],
96
+ types: [CardType.CHECK_BALANCE_ANNOTATION_NEW_CLIENT, CardType.CHECK_BALANCE_ANNOTATION],
84
97
  roles: [Role.DATA_OFFICER],
85
98
  maxByDay: 25,
99
+ teamType: TeamType.ACCEPTATION,
86
100
  },
87
101
  {
88
102
  id: CardGroupEnum.CARRY_FORWARD,
89
103
  label: 'A nouveaux',
90
- types: [CardType.SETUP_AND_INTEGRATION_N_MINUS_1] as CardType[],
104
+ types: [CardType.SETUP_AND_INTEGRATION_N_MINUS_1],
91
105
  roles: [Role.ACCOUNTANT],
92
106
  maxByDay: 3,
107
+ teamType: TeamType.CARRY_FORWARD,
93
108
  },
94
109
  {
95
110
  id: CardGroupEnum.BANK,
96
111
  label: 'Banque',
97
- types: [CardType.SETUP_BANK_ACCOUNT, CardType.UPDATE_BANK_BALANCE] as CardType[],
112
+ types: [CardType.SETUP_BANK_ACCOUNT, CardType.UPDATE_BANK_BALANCE],
98
113
  roles: [Role.ACCOUNTANT],
99
114
  maxByDay: 3,
115
+ teamType: TeamType.BANK,
100
116
  },
101
117
  {
102
118
  id: CardGroupEnum.ANNOTATION,
103
119
  label: 'Annotations',
104
- types: [CardType.UPDATE_ANNOTATIONS, CardType.CONTROL_REVISION_SURVEY] as CardType[],
120
+ types: [CardType.UPDATE_ANNOTATIONS, CardType.CONTROL_REVISION_SURVEY],
105
121
  roles: [Role.ACCOUNTANT],
106
122
  maxByDay: 3,
123
+ teamType: TeamType.ANNOTATION,
107
124
  },
108
125
  {
109
126
  id: CardGroupEnum.CLR,
110
127
  label: 'CLR',
111
- types: [CardType.CLR, CardType.CLR_EXCEPTIONAL_MISSION] as CardType[],
128
+ types: [CardType.CLR, CardType.CLR_EXCEPTIONAL_MISSION],
112
129
  roles: [Role.ACCOUNTANT],
113
130
  maxByDay: 3,
131
+ teamType: TeamType.CLR,
114
132
  },
115
133
  {
116
134
  id: CardGroupEnum.CUT_OFF,
117
135
  label: 'Cut Off',
118
- types: [CardType.CUT_OFF] as CardType[],
136
+ types: [CardType.CUT_OFF],
119
137
  roles: [Role.ACCOUNTANT],
120
138
  maxByDay: 3,
139
+ teamType: TeamType.CUT_OFF,
121
140
  },
122
141
  ] as const;
123
142
 
@@ -1,7 +1,10 @@
1
1
  export enum TeamType {
2
- BANK = 1,
3
- BANK_STATEMENT = 2,
4
- ANNOTATION = 3,
5
- VAT = 4,
6
- BALANCESHEET = 5,
2
+ BALANCESHEET = 1,
3
+ VAT = 2,
4
+ ACCEPTATION = 3,
5
+ CARRY_FORWARD = 4,
6
+ BANK = 5,
7
+ ANNOTATION = 6,
8
+ CLR = 7,
9
+ CUT_OFF = 8,
7
10
  }
@@ -145,8 +145,12 @@ export class Cerfa2571_2024 {
145
145
  };
146
146
  }
147
147
 
148
+ export type Cerfa2571_2025 = Cerfa2571_2024;
149
+
148
150
  export type Prepare2571Params = {
149
151
  idSociety: number;
150
152
  idExercice: number;
151
153
  idRegistration: number;
152
154
  };
155
+
156
+ export type AnyCerfa2571Century = Cerfa2571_2025 | Cerfa2571_2023;
@@ -61,10 +61,13 @@ export type Cerfa2573_2024 = {
61
61
  transferts: Transfert[];
62
62
  };
63
63
 
64
+ export type Cerfa2573_2025 = Cerfa2573_2024;
65
+ export type AnyCerfa2573Century = Cerfa2573_2024;
66
+
64
67
  export type Prepare2573Params = {
65
68
  idSociety: number;
66
69
  idExercice: number;
67
- values: Cerfa2573_2024;
70
+ values: AnyCerfa2573Century;
68
71
  };
69
72
 
70
73
  export type Cerfa2573_Refund_Input = {
@@ -4,10 +4,9 @@ import {
4
4
  AnyCerfa2033Century,
5
5
  AnyCerfa2035Century,
6
6
  AnyCerfa2065Century,
7
+ AnyCerfa2571Century,
7
8
  AnyCerfa2572Century,
8
9
  Cerfa2069RCI_2024,
9
- Cerfa2571_2023,
10
- Cerfa2571_2024,
11
10
  Cerfa2573_2024,
12
11
  Cerfa3519_2017,
13
12
  FieldForGeneration,
@@ -119,7 +118,7 @@ export type AsponeFormField = { name: string; fields: FieldForGeneration[] };
119
118
  export interface RegistrationPayload {
120
119
  cerfa2573?: Cerfa2573_2024;
121
120
  cerfa2572?: AnyCerfa2572Century;
122
- cerfa2571?: Cerfa2571_2023 | Cerfa2571_2024;
121
+ cerfa2571?: AnyCerfa2571Century;
123
122
  cerfa2031?: AnyCerfa2031Century;
124
123
  cerfa2033?: AnyCerfa2033Century;
125
124
  cerfa2065?: AnyCerfa2065Century;