@metarisc/metarisc-js 0.0.1-alpha.90 → 0.0.1-alpha.92

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 (84) hide show
  1. package/README.md +7 -3
  2. package/lib/api/AnomaliesAPI.js +19 -3
  3. package/lib/api/CommissionsAPI.js +41 -5
  4. package/lib/api/CommissionsMembresAPI.js +19 -3
  5. package/lib/api/ContactsAPI.js +19 -3
  6. package/lib/api/ControlesPEIAPI.js +14 -2
  7. package/lib/api/DatesPassageCommissionAPI.js +28 -4
  8. package/lib/api/DocumentsAPI.js +19 -3
  9. package/lib/api/DossiersAPI.d.ts +1 -1
  10. package/lib/api/DossiersAPI.js +138 -17
  11. package/lib/api/DossiersAffectationsAPI.js +9 -1
  12. package/lib/api/ERPAPI.d.ts +4 -4
  13. package/lib/api/ERPAPI.js +97 -14
  14. package/lib/api/EnveloppesAPI.js +23 -3
  15. package/lib/api/EvenementsAPI.js +24 -4
  16. package/lib/api/FeedAPI.d.ts +3 -3
  17. package/lib/api/FeedAPI.js +9 -1
  18. package/lib/api/HealthcheckAPI.js +5 -1
  19. package/lib/api/MainsCourantesAPI.js +32 -4
  20. package/lib/api/MainsCourantesParticipantsAPI.js +5 -1
  21. package/lib/api/MoiAPI.js +5 -1
  22. package/lib/api/NotificationsAPI.js +24 -4
  23. package/lib/api/OrdresDuJourAPI.js +32 -4
  24. package/lib/api/OrganisationsAPI.js +68 -8
  25. package/lib/api/PEIAPI.js +70 -8
  26. package/lib/api/PermissionsAPI.js +5 -1
  27. package/lib/api/PingAPI.js +5 -1
  28. package/lib/api/PrescriptionsAPI.js +42 -6
  29. package/lib/api/SitesGeographiquesAPI.js +23 -3
  30. package/lib/api/TourneesDECIAPI.js +41 -5
  31. package/lib/api/UtilisateursAPI.js +39 -7
  32. package/lib/api/WorkflowsAPI.js +9 -1
  33. package/lib/client.d.ts +2 -5
  34. package/lib/client.js +4 -8
  35. package/lib/core.d.ts +2 -12
  36. package/lib/model/Clicdvcrem.d.ts +11 -11
  37. package/lib/model/Clicdvcrem.js +8 -8
  38. package/lib/model/DossierBase.d.ts +2 -2
  39. package/lib/model/ERP.d.ts +2 -2
  40. package/lib/model/Evenement.d.ts +2 -0
  41. package/lib/model/Evenement.js +0 -1
  42. package/lib/model/ReglesDeci.d.ts +2 -2
  43. package/package.json +1 -1
  44. package/src/api/AnomaliesAPI.ts +19 -3
  45. package/src/api/CommissionsAPI.ts +41 -5
  46. package/src/api/CommissionsMembresAPI.ts +19 -3
  47. package/src/api/ContactsAPI.ts +19 -3
  48. package/src/api/ControlesPEIAPI.ts +14 -2
  49. package/src/api/DatesPassageCommissionAPI.ts +28 -4
  50. package/src/api/DocumentsAPI.ts +19 -3
  51. package/src/api/DossiersAPI.ts +139 -17
  52. package/src/api/DossiersAffectationsAPI.ts +9 -1
  53. package/src/api/ERPAPI.ts +105 -17
  54. package/src/api/EnveloppesAPI.ts +23 -3
  55. package/src/api/EvenementsAPI.ts +24 -4
  56. package/src/api/FeedAPI.ts +12 -4
  57. package/src/api/HealthcheckAPI.ts +5 -1
  58. package/src/api/MainsCourantesAPI.ts +32 -4
  59. package/src/api/MainsCourantesParticipantsAPI.ts +5 -1
  60. package/src/api/MoiAPI.ts +5 -1
  61. package/src/api/NotificationsAPI.ts +24 -4
  62. package/src/api/OrdresDuJourAPI.ts +32 -4
  63. package/src/api/OrganisationsAPI.ts +68 -8
  64. package/src/api/PEIAPI.ts +70 -8
  65. package/src/api/PermissionsAPI.ts +5 -1
  66. package/src/api/PingAPI.ts +5 -1
  67. package/src/api/PrescriptionsAPI.ts +42 -6
  68. package/src/api/SitesGeographiquesAPI.ts +23 -3
  69. package/src/api/TourneesDECIAPI.ts +41 -5
  70. package/src/api/UtilisateursAPI.ts +39 -7
  71. package/src/api/WorkflowsAPI.ts +9 -1
  72. package/src/client.ts +5 -17
  73. package/src/core.ts +2 -14
  74. package/src/model/Clicdvcrem.ts +11 -11
  75. package/src/model/DossierBase.ts +2 -2
  76. package/src/model/ERP.ts +2 -2
  77. package/src/model/Evenement.ts +2 -0
  78. package/src/model/ReglesDeci.ts +2 -2
  79. package/lib/model/DescriptifTechniqueERP.d.ts +0 -8
  80. package/lib/model/DescriptifTechniqueERP.js +0 -10
  81. package/lib/model/FeedMessage.d.ts +0 -6
  82. package/lib/model/FeedMessage.js +0 -8
  83. package/src/model/DescriptifTechniqueERP.ts +0 -11
  84. package/src/model/FeedMessage.ts +0 -9
package/README.md CHANGED
@@ -24,9 +24,13 @@ Pour effectuer une requête sur Metarisc, il faut tout d'adord initialisé le cl
24
24
 
25
25
  ```ts
26
26
  const m = new Metarisc({
27
- metarisc_url: "https://api.metarisc.fr",
28
- client_id: "CLIENT_ID",
29
- client_secret: "CLIENT_SECRET"
27
+ metarisc_url: "https://api.metarisc.fr"
28
+ });
29
+
30
+ await m.authenticate(AuthMethod.CLIENT_CREDENTIALS, {
31
+ scope: 'openid profile email',
32
+ client_id: "client_id",
33
+ client_secret: "client_secret"
30
34
  });
31
35
 
32
36
  m.dossiers.getDossier("123456");
@@ -15,7 +15,11 @@ class AnomaliesAPI extends core_1.Core {
15
15
  const pathVariable = { 'anomalie_id': (new String(anomalieId)).toString() };
16
16
  return this.request({
17
17
  method: 'DELETE',
18
- endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies/{anomalie_id}')
18
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies/{anomalie_id}'),
19
+ transformResponse: [(data) => {
20
+ const parsedData = JSON.parse(data);
21
+ return parsedData;
22
+ }]
19
23
  });
20
24
  }
21
25
  /**
@@ -25,7 +29,11 @@ class AnomaliesAPI extends core_1.Core {
25
29
  const pathVariable = { 'anomalie_id': (new String(anomalieId)).toString() };
26
30
  return this.request({
27
31
  method: 'GET',
28
- endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies/{anomalie_id}')
32
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies/{anomalie_id}'),
33
+ transformResponse: [(data) => {
34
+ const parsedData = JSON.parse(data);
35
+ return parsedData;
36
+ }]
29
37
  });
30
38
  }
31
39
  /**
@@ -40,7 +48,11 @@ class AnomaliesAPI extends core_1.Core {
40
48
  'sort': sort === undefined ? undefined : (new String(sort)).toString(),
41
49
  'texte': texte === undefined ? undefined : (new String(texte)).toString(),
42
50
  'code': code === undefined ? undefined : (new String(code)).toString()
43
- })
51
+ }),
52
+ transformResponse: [(data) => {
53
+ const parsedData = JSON.parse(data);
54
+ return parsedData;
55
+ }]
44
56
  });
45
57
  }
46
58
  /**
@@ -51,6 +63,10 @@ class AnomaliesAPI extends core_1.Core {
51
63
  return this.request({
52
64
  method: 'POST',
53
65
  endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies'),
66
+ transformResponse: [(data) => {
67
+ const parsedData = JSON.parse(data);
68
+ return parsedData;
69
+ }],
54
70
  body: utils_1.Utils.payloadFilter(params)
55
71
  });
56
72
  }
@@ -15,7 +15,11 @@ class CommissionsAPI extends core_1.Core {
15
15
  const pathVariable = { 'commission_id': (new String(commissionId)).toString() };
16
16
  return this.request({
17
17
  method: 'GET',
18
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}')
18
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}'),
19
+ transformResponse: [(data) => {
20
+ const parsedData = JSON.parse(data);
21
+ return parsedData;
22
+ }]
19
23
  });
20
24
  }
21
25
  /**
@@ -25,7 +29,11 @@ class CommissionsAPI extends core_1.Core {
25
29
  const pathVariable = { 'commission_id': (new String(commissionId)).toString() };
26
30
  return this.request({
27
31
  method: 'GET',
28
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/preferences')
32
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/preferences'),
33
+ transformResponse: [(data) => {
34
+ const parsedData = JSON.parse(data);
35
+ return parsedData;
36
+ }]
29
37
  });
30
38
  }
31
39
  /**
@@ -39,7 +47,11 @@ class CommissionsAPI extends core_1.Core {
39
47
  params: utils_1.Utils.payloadFilter({
40
48
  'libelle': libelle === undefined ? undefined : (new String(libelle)).toString(),
41
49
  'type': type === undefined ? undefined : (new String(type)).toString()
42
- })
50
+ }),
51
+ transformResponse: [(data) => {
52
+ const parsedData = JSON.parse(data);
53
+ return parsedData;
54
+ }]
43
55
  });
44
56
  }
45
57
  /**
@@ -53,7 +65,11 @@ class CommissionsAPI extends core_1.Core {
53
65
  params: utils_1.Utils.payloadFilter({
54
66
  'from_date': fromDate === undefined ? undefined : (new String(fromDate)).toString(),
55
67
  'type': type === undefined ? undefined : (new String(type)).toString()
56
- })
68
+ }),
69
+ transformResponse: [(data) => {
70
+ const parsedData = JSON.parse(data);
71
+ return parsedData;
72
+ }]
57
73
  });
58
74
  }
59
75
  /**
@@ -66,7 +82,11 @@ class CommissionsAPI extends core_1.Core {
66
82
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/membres'),
67
83
  params: utils_1.Utils.payloadFilter({
68
84
  'commission': commission === undefined ? undefined : (new String(commission)).toString()
69
- })
85
+ }),
86
+ transformResponse: [(data) => {
87
+ const parsedData = JSON.parse(data);
88
+ return parsedData;
89
+ }]
70
90
  });
71
91
  }
72
92
  /**
@@ -77,6 +97,10 @@ class CommissionsAPI extends core_1.Core {
77
97
  return this.request({
78
98
  method: 'POST',
79
99
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions'),
100
+ transformResponse: [(data) => {
101
+ const parsedData = JSON.parse(data);
102
+ return parsedData;
103
+ }],
80
104
  body: utils_1.Utils.payloadFilter(params)
81
105
  });
82
106
  }
@@ -88,6 +112,10 @@ class CommissionsAPI extends core_1.Core {
88
112
  return this.request({
89
113
  method: 'POST',
90
114
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates'),
115
+ transformResponse: [(data) => {
116
+ const parsedData = JSON.parse(data);
117
+ return parsedData;
118
+ }],
91
119
  body: utils_1.Utils.payloadFilter(params)
92
120
  });
93
121
  }
@@ -99,6 +127,10 @@ class CommissionsAPI extends core_1.Core {
99
127
  return this.request({
100
128
  method: 'POST',
101
129
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/membres'),
130
+ transformResponse: [(data) => {
131
+ const parsedData = JSON.parse(data);
132
+ return parsedData;
133
+ }],
102
134
  body: utils_1.Utils.payloadFilter(params)
103
135
  });
104
136
  }
@@ -110,6 +142,10 @@ class CommissionsAPI extends core_1.Core {
110
142
  return this.request({
111
143
  method: 'POST',
112
144
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/preferences'),
145
+ transformResponse: [(data) => {
146
+ const parsedData = JSON.parse(data);
147
+ return parsedData;
148
+ }],
113
149
  body: utils_1.Utils.payloadFilter(params)
114
150
  });
115
151
  }
@@ -15,7 +15,11 @@ class CommissionsMembresAPI extends core_1.Core {
15
15
  const pathVariable = { 'membre_id': (new String(membreId)).toString() };
16
16
  return this.request({
17
17
  method: 'DELETE',
18
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions_membres/{membre_id}')
18
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions_membres/{membre_id}'),
19
+ transformResponse: [(data) => {
20
+ const parsedData = JSON.parse(data);
21
+ return parsedData;
22
+ }]
19
23
  });
20
24
  }
21
25
  /**
@@ -25,7 +29,11 @@ class CommissionsMembresAPI extends core_1.Core {
25
29
  const pathVariable = { 'membre_id': (new String(membreId)).toString() };
26
30
  return this.request({
27
31
  method: 'GET',
28
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions_membres/{membre_id}')
32
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions_membres/{membre_id}'),
33
+ transformResponse: [(data) => {
34
+ const parsedData = JSON.parse(data);
35
+ return parsedData;
36
+ }]
29
37
  });
30
38
  }
31
39
  /**
@@ -35,7 +43,11 @@ class CommissionsMembresAPI extends core_1.Core {
35
43
  const pathVariable = {};
36
44
  return this.collect({
37
45
  method: 'GET',
38
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions_membres')
46
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions_membres'),
47
+ transformResponse: [(data) => {
48
+ const parsedData = JSON.parse(data);
49
+ return parsedData;
50
+ }]
39
51
  });
40
52
  }
41
53
  /**
@@ -46,6 +58,10 @@ class CommissionsMembresAPI extends core_1.Core {
46
58
  return this.request({
47
59
  method: 'POST',
48
60
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions_membres/{membre_id}'),
61
+ transformResponse: [(data) => {
62
+ const parsedData = JSON.parse(data);
63
+ return parsedData;
64
+ }],
49
65
  body: utils_1.Utils.payloadFilter(params)
50
66
  });
51
67
  }
@@ -15,7 +15,11 @@ class ContactsAPI extends core_1.Core {
15
15
  const pathVariable = { 'contact_id': (new String(contactId)).toString() };
16
16
  return this.request({
17
17
  method: 'DELETE',
18
- endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts/{contact_id}')
18
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts/{contact_id}'),
19
+ transformResponse: [(data) => {
20
+ const parsedData = JSON.parse(data);
21
+ return parsedData;
22
+ }]
19
23
  });
20
24
  }
21
25
  /**
@@ -25,7 +29,11 @@ class ContactsAPI extends core_1.Core {
25
29
  const pathVariable = { 'contact_id': (new String(contactId)).toString() };
26
30
  return this.request({
27
31
  method: 'GET',
28
- endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts/{contact_id}')
32
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts/{contact_id}'),
33
+ transformResponse: [(data) => {
34
+ const parsedData = JSON.parse(data);
35
+ return parsedData;
36
+ }]
29
37
  });
30
38
  }
31
39
  /**
@@ -35,7 +43,11 @@ class ContactsAPI extends core_1.Core {
35
43
  const pathVariable = {};
36
44
  return this.collect({
37
45
  method: 'GET',
38
- endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts')
46
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts'),
47
+ transformResponse: [(data) => {
48
+ const parsedData = JSON.parse(data);
49
+ return parsedData;
50
+ }]
39
51
  });
40
52
  }
41
53
  /**
@@ -46,6 +58,10 @@ class ContactsAPI extends core_1.Core {
46
58
  return this.request({
47
59
  method: 'POST',
48
60
  endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts/{contact_id}'),
61
+ transformResponse: [(data) => {
62
+ const parsedData = JSON.parse(data);
63
+ return parsedData;
64
+ }],
49
65
  body: utils_1.Utils.payloadFilter(params)
50
66
  });
51
67
  }
@@ -15,7 +15,11 @@ class ControlesPEIAPI extends core_1.Core {
15
15
  const pathVariable = { 'pei_id': (new String(peiId)).toString() };
16
16
  return this.request({
17
17
  method: 'DELETE',
18
- endpoint: utils_1.Utils.constructPath(pathVariable, '/controles_pei/{pei_id}')
18
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/controles_pei/{pei_id}'),
19
+ transformResponse: [(data) => {
20
+ const parsedData = JSON.parse(data);
21
+ return parsedData;
22
+ }]
19
23
  });
20
24
  }
21
25
  /**
@@ -25,7 +29,11 @@ class ControlesPEIAPI extends core_1.Core {
25
29
  const pathVariable = { 'pei_id': (new String(peiId)).toString() };
26
30
  return this.request({
27
31
  method: 'GET',
28
- endpoint: utils_1.Utils.constructPath(pathVariable, '/controles_pei/{pei_id}')
32
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/controles_pei/{pei_id}'),
33
+ transformResponse: [(data) => {
34
+ const parsedData = JSON.parse(data);
35
+ return parsedData;
36
+ }]
29
37
  });
30
38
  }
31
39
  /**
@@ -36,6 +44,10 @@ class ControlesPEIAPI extends core_1.Core {
36
44
  return this.request({
37
45
  method: 'POST',
38
46
  endpoint: utils_1.Utils.constructPath(pathVariable, '/controles_pei/{pei_id}'),
47
+ transformResponse: [(data) => {
48
+ const parsedData = JSON.parse(data);
49
+ return parsedData;
50
+ }],
39
51
  body: utils_1.Utils.payloadFilter(params)
40
52
  });
41
53
  }
@@ -16,7 +16,11 @@ class DatesPassageCommissionAPI extends core_1.Core {
16
16
  return this.request({
17
17
  method: 'GET',
18
18
  responseType: 'blob',
19
- endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/compte_rendu_global_pdf')
19
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/compte_rendu_global_pdf'),
20
+ transformResponse: [(data) => {
21
+ const parsedData = JSON.parse(data);
22
+ return parsedData;
23
+ }]
20
24
  });
21
25
  }
22
26
  /**
@@ -27,7 +31,11 @@ class DatesPassageCommissionAPI extends core_1.Core {
27
31
  return this.request({
28
32
  method: 'GET',
29
33
  responseType: 'blob',
30
- endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/convocation_pdf')
34
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/convocation_pdf'),
35
+ transformResponse: [(data) => {
36
+ const parsedData = JSON.parse(data);
37
+ return parsedData;
38
+ }]
31
39
  });
32
40
  }
33
41
  /**
@@ -37,7 +45,11 @@ class DatesPassageCommissionAPI extends core_1.Core {
37
45
  const pathVariable = { 'date_id': (new String(dateId)).toString() };
38
46
  return this.request({
39
47
  method: 'GET',
40
- endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}')
48
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}'),
49
+ transformResponse: [(data) => {
50
+ const parsedData = JSON.parse(data);
51
+ return parsedData;
52
+ }]
41
53
  });
42
54
  }
43
55
  /**
@@ -47,7 +59,11 @@ class DatesPassageCommissionAPI extends core_1.Core {
47
59
  const pathVariable = { 'date_id': (new String(dateId)).toString() };
48
60
  return this.collect({
49
61
  method: 'GET',
50
- endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/ordre_du_jour')
62
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/ordre_du_jour'),
63
+ transformResponse: [(data) => {
64
+ const parsedData = JSON.parse(data);
65
+ return parsedData;
66
+ }]
51
67
  });
52
68
  }
53
69
  /**
@@ -58,6 +74,10 @@ class DatesPassageCommissionAPI extends core_1.Core {
58
74
  return this.request({
59
75
  method: 'POST',
60
76
  endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/ordre_du_jour'),
77
+ transformResponse: [(data) => {
78
+ const parsedData = JSON.parse(data);
79
+ return parsedData;
80
+ }],
61
81
  body: utils_1.Utils.payloadFilter(params)
62
82
  });
63
83
  }
@@ -69,6 +89,10 @@ class DatesPassageCommissionAPI extends core_1.Core {
69
89
  return this.request({
70
90
  method: 'POST',
71
91
  endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/reprogrammer'),
92
+ transformResponse: [(data) => {
93
+ const parsedData = JSON.parse(data);
94
+ return parsedData;
95
+ }],
72
96
  body: utils_1.Utils.payloadFilter(params)
73
97
  });
74
98
  }
@@ -15,7 +15,11 @@ class DocumentsAPI extends core_1.Core {
15
15
  const pathVariable = { 'document_id': (new String(documentId)).toString() };
16
16
  return this.request({
17
17
  method: 'DELETE',
18
- endpoint: utils_1.Utils.constructPath(pathVariable, '/documents/{document_id}')
18
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/documents/{document_id}'),
19
+ transformResponse: [(data) => {
20
+ const parsedData = JSON.parse(data);
21
+ return parsedData;
22
+ }]
19
23
  });
20
24
  }
21
25
  /**
@@ -25,7 +29,11 @@ class DocumentsAPI extends core_1.Core {
25
29
  const pathVariable = { 'document_id': (new String(documentId)).toString() };
26
30
  return this.request({
27
31
  method: 'GET',
28
- endpoint: utils_1.Utils.constructPath(pathVariable, '/documents/{document_id}')
32
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/documents/{document_id}'),
33
+ transformResponse: [(data) => {
34
+ const parsedData = JSON.parse(data);
35
+ return parsedData;
36
+ }]
29
37
  });
30
38
  }
31
39
  /**
@@ -35,7 +43,11 @@ class DocumentsAPI extends core_1.Core {
35
43
  const pathVariable = {};
36
44
  return this.collect({
37
45
  method: 'GET',
38
- endpoint: utils_1.Utils.constructPath(pathVariable, '/documents')
46
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/documents'),
47
+ transformResponse: [(data) => {
48
+ const parsedData = JSON.parse(data);
49
+ return parsedData;
50
+ }]
39
51
  });
40
52
  }
41
53
  /**
@@ -46,6 +58,10 @@ class DocumentsAPI extends core_1.Core {
46
58
  return this.request({
47
59
  method: 'POST',
48
60
  endpoint: utils_1.Utils.constructPath(pathVariable, '/documents/{document_id}'),
61
+ transformResponse: [(data) => {
62
+ const parsedData = JSON.parse(data);
63
+ return parsedData;
64
+ }],
49
65
  body: utils_1.Utils.payloadFilter(params)
50
66
  });
51
67
  }
@@ -77,7 +77,7 @@ export declare class DossiersAPI extends Core {
77
77
  /**
78
78
  * Récupération de la liste des dossiers selon des critères de recherche.
79
79
  */
80
- paginateDossiers(objet?: string, erp?: string, pei?: string, type?: string, workflowActif?: 'analyse_de_risque' | 'validation' | 'arrivee_sis' | 'arrivee_sis_prev' | 'arrivee_secretariat_commission' | 'consultation_sis' | 'passage_commission' | 'relecture' | 'visite' | 'arrivee_secretariat' | 'workflow' | 'reception_de_travaux_en_attente', affecte?: string, enveloppe?: string, numeroUrba?: string): Collection<Dossier>;
80
+ paginateDossiers(sort?: 'date_de_creation' | '-date_de_creation', objet?: string, erp?: string, pei?: string, type?: string | Array<string>, workflowActif?: 'analyse_de_risque' | 'validation' | 'arrivee_sis' | 'arrivee_sis_prev' | 'arrivee_secretariat_commission' | 'consultation_sis' | 'passage_commission' | 'relecture' | 'visite' | 'arrivee_secretariat' | 'workflow' | 'reception_de_travaux_en_attente', affecte?: string, enveloppe?: string, numeroUrba?: string): Collection<Dossier>;
81
81
  /**
82
82
  * Consulter l'espace d'échange pour le suivi du dossier.
83
83
  */