@silexpert/core 1.1.143 → 1.1.145

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 (33) hide show
  1. package/dist/cjs/api/resources/Authenticate.d.ts +5 -2
  2. package/dist/cjs/api/resources/Authenticate.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Authenticate.js +5 -0
  4. package/dist/cjs/api/resources/Authenticate.js.map +1 -1
  5. package/dist/cjs/api/resources/BudgetInsight.d.ts +3 -1
  6. package/dist/cjs/api/resources/BudgetInsight.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/BudgetInsight.js +6 -0
  8. package/dist/cjs/api/resources/BudgetInsight.js.map +1 -1
  9. package/dist/cjs/api/resources/Exercice.d.ts +1 -0
  10. package/dist/cjs/api/resources/Exercice.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/Exercice.js +3 -0
  12. package/dist/cjs/api/resources/Exercice.js.map +1 -1
  13. package/dist/cjs/types/Enum/PrestationType.js +1 -1
  14. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  15. package/dist/mjs/api/resources/Authenticate.d.ts +5 -2
  16. package/dist/mjs/api/resources/Authenticate.d.ts.map +1 -1
  17. package/dist/mjs/api/resources/Authenticate.js +3 -0
  18. package/dist/mjs/api/resources/Authenticate.js.map +1 -1
  19. package/dist/mjs/api/resources/BudgetInsight.d.ts +3 -1
  20. package/dist/mjs/api/resources/BudgetInsight.d.ts.map +1 -1
  21. package/dist/mjs/api/resources/BudgetInsight.js +6 -0
  22. package/dist/mjs/api/resources/BudgetInsight.js.map +1 -1
  23. package/dist/mjs/api/resources/Exercice.d.ts +1 -0
  24. package/dist/mjs/api/resources/Exercice.d.ts.map +1 -1
  25. package/dist/mjs/api/resources/Exercice.js +3 -0
  26. package/dist/mjs/api/resources/Exercice.js.map +1 -1
  27. package/dist/mjs/types/Enum/PrestationType.js +1 -1
  28. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  29. package/package.json +1 -1
  30. package/ts/api/resources/Authenticate.ts +6 -2
  31. package/ts/api/resources/BudgetInsight.ts +9 -1
  32. package/ts/api/resources/Exercice.ts +4 -0
  33. package/ts/types/Enum/PrestationType.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.143",
3
+ "version": "1.1.145",
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",
@@ -1,11 +1,15 @@
1
- import { FormAuthenticate, ReadConnectAs } from '../../types';
1
+ import { FormAuthenticate, ReadAuthenticateCollaborater, ReadConnectAs } from '../../types';
2
2
  import { Resource } from '../Resource';
3
3
 
4
4
  export class Authenticate extends Resource {
5
- async authentificateCollaborater(payload: FormAuthenticate) {
5
+ async authentificateCollaborater(payload: FormAuthenticate): Promise<ReadAuthenticateCollaborater> {
6
6
  return this.axios.$post('/authenticate/collaborater', payload);
7
7
  }
8
8
 
9
+ async authentificate(payload: FormAuthenticate): Promise<{ token: string }> {
10
+ return this.axios.$post('/authenticate', payload);
11
+ }
12
+
9
13
  async connectAs(idSociety: number): Promise<ReadConnectAs> {
10
14
  return this.axios.$post(`/authenticate/societies/${idSociety}`);
11
15
  }
@@ -1,11 +1,15 @@
1
1
  import { Resource } from '../Resource';
2
- import { CreateOrUpdateAccessToken, IAccessToken } from '../../types';
2
+ import { CreateOrUpdateAccessToken, IAccessToken, ReadUserConnection } from '../../types';
3
3
 
4
4
  export class BudgetInsight extends Resource {
5
5
  getTokens(): Promise<IAccessToken | null> {
6
6
  return this.axios.$get('/connectors/budget-insight/tokens');
7
7
  }
8
8
 
9
+ getTemporaryToken(): Promise<IAccessToken | null> {
10
+ return this.axios.$get('/connectors/budget-insight/tokens/temporary');
11
+ }
12
+
9
13
  updateOrCreateToken(payload: CreateOrUpdateAccessToken): Promise<IAccessToken> {
10
14
  return this.axios.$post('/connectors/budget-insight/tokens', payload);
11
15
  }
@@ -13,4 +17,8 @@ export class BudgetInsight extends Resource {
13
17
  authentificate(): Promise<IAccessToken> {
14
18
  return this.axios.$post('/connectors/budget-insight/authentificate');
15
19
  }
20
+
21
+ getAllConnections(): Promise<ReadUserConnection> {
22
+ return this.axios.$get('/connectors/budget-insight/connections');
23
+ }
16
24
  }
@@ -27,4 +27,8 @@ export class Exercice extends Resource {
27
27
  getAllAdjustments(id: number): Promise<IAdjustment[]> {
28
28
  return this.axios.$get(`/exercices/${id}/adjustments`);
29
29
  }
30
+
31
+ delete(id: number): Promise<boolean> {
32
+ return this.axios.$delete(`/exercices/${id}`);
33
+ }
30
34
  }
@@ -2991,7 +2991,7 @@ export const PrestationDetail: PrestationDetailEnum = {
2991
2991
  inAverageCart: true,
2992
2992
  isBack: false,
2993
2993
  price: 299,
2994
- isCatalog: false,
2994
+ isCatalog: true,
2995
2995
  hidden: false,
2996
2996
  isComplementary: false,
2997
2997
  signaturePosition: '',