@silexpert/core 1.1.110 → 1.1.113
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.
- package/es/api/resources/Authenticate.d.ts +2 -1
- package/es/api/resources/Authenticate.d.ts.map +1 -1
- package/es/api/resources/Authenticate.js +5 -0
- package/es/api/resources/Authenticate.js.map +1 -1
- package/es/api/resources/Society.d.ts +2 -2
- package/es/api/resources/Society.d.ts.map +1 -1
- package/es/api/resources/Society.js.map +1 -1
- package/es/types/Enum/Role.d.ts +1 -0
- package/es/types/Enum/Role.d.ts.map +1 -1
- package/es/types/Enum/Role.js +11 -0
- package/es/types/Enum/Role.js.map +1 -1
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +1 -1
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
- package/es/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +5 -0
- package/es/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
- package/es/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +2 -0
- package/es/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
- package/es/types/Interface/api/balanceSheet/Read.d.ts +4 -2
- package/es/types/Interface/api/balanceSheet/Read.d.ts.map +1 -1
- package/es/types/Interface/api/balanceSheet/Read.js.map +1 -1
- package/es/types/Interface/api/budgetInsight/Query.d.ts +1 -0
- package/es/types/Interface/api/budgetInsight/Query.d.ts.map +1 -1
- package/es/types/Interface/api/budgetInsight/Query.js.map +1 -1
- package/es/utils/vat/3310/century23.js +2 -2
- package/es/utils/vat/3310/century23.js.map +1 -1
- package/js/api/resources/Authenticate.js +5 -0
- package/js/api/resources/Authenticate.js.map +1 -1
- package/js/api/resources/Society.js.map +1 -1
- package/js/types/Enum/Role.js +1 -0
- package/js/types/Enum/Role.js.map +1 -1
- package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
- package/js/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +2 -0
- package/js/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
- package/js/types/Interface/api/balanceSheet/Read.js.map +1 -1
- package/js/types/Interface/api/budgetInsight/Query.js.map +1 -1
- package/js/utils/vat/3310/century23.js +2 -2
- package/js/utils/vat/3310/century23.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Authenticate.ts +5 -1
- package/ts/api/resources/Society.ts +2 -1
- package/ts/types/Enum/Role.ts +13 -1
- package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +1 -1
- package/ts/types/Interface/api/authentification/ReadAuthenticateCollaborater.ts +7 -0
- package/ts/types/Interface/api/balanceSheet/Read.ts +1 -2
- package/ts/types/Interface/api/budgetInsight/Query.ts +1 -0
- package/ts/utils/vat/3310/century23.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.113",
|
|
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": "js/index.js",
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { FormAuthenticate } from '../../types';
|
|
1
|
+
import { FormAuthenticate, ReadConnectAs } from '../../types';
|
|
2
2
|
import { Resource } from '../Resource';
|
|
3
3
|
|
|
4
4
|
export class Authenticate extends Resource {
|
|
5
5
|
async authentificateCollaborater(payload: FormAuthenticate) {
|
|
6
6
|
return this.axios.$post('/authenticate/collaborater', payload);
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
async connectAs(idSociety: number): Promise<ReadConnectAs> {
|
|
10
|
+
return this.axios.$post(`/authenticate/societies/${idSociety}`);
|
|
11
|
+
}
|
|
8
12
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
UpdateSocietyPayload,
|
|
21
21
|
QueryPaginatedSociety,
|
|
22
22
|
ReadInvalidFieldState,
|
|
23
|
+
BasePaginate,
|
|
23
24
|
} from '../../types';
|
|
24
25
|
|
|
25
26
|
export class Society extends Resource {
|
|
@@ -27,7 +28,7 @@ export class Society extends Resource {
|
|
|
27
28
|
return this.axios.$get('/society', { params });
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
public getPaginated(params: QueryPaginatedSociety, cancelToken?: CancelToken): Promise<ISociety
|
|
31
|
+
public getPaginated(params: QueryPaginatedSociety, cancelToken?: CancelToken): Promise<BasePaginate<ISociety>> {
|
|
31
32
|
return this.axios.$get('/society/paginated', {
|
|
32
33
|
...(cancelToken ? { cancelToken } : {}),
|
|
33
34
|
params,
|
package/ts/types/Enum/Role.ts
CHANGED
|
@@ -41,4 +41,16 @@ export enum Role {
|
|
|
41
41
|
DIRECTOR = 46,
|
|
42
42
|
REFERENT_LITIGE = 47,
|
|
43
43
|
REFERENT_CLIENT = 48,
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const RoleAllowedToLogInAsClient = [
|
|
47
|
+
Role.ADMIN,
|
|
48
|
+
Role.ACCOUNTANT,
|
|
49
|
+
Role.SUPER_ADMIN,
|
|
50
|
+
Role.COMMERCIAL,
|
|
51
|
+
Role.CUSTOMER_SUCCESS,
|
|
52
|
+
Role.SOCIAL,
|
|
53
|
+
Role.JURIDIC,
|
|
54
|
+
Role.DEVELOPER,
|
|
55
|
+
Role.PARTNERED_ACCOUNTANT,
|
|
56
|
+
];
|
|
@@ -213,4 +213,5 @@ export type BudgetInsightGetAllTransactions = {
|
|
|
213
213
|
max_value?: number, // Maximum (inclusive) value.
|
|
214
214
|
search?: string, // Search in wording, dates, values, categories.
|
|
215
215
|
value?: number, // Decimal or Value of the transaction. "XX|-XX" and "±XX" syntaxes are also accepted.
|
|
216
|
+
limit: number // devient obligatoire depuis le 1er octobre 2023. Max 1000 et si 100 si expand
|
|
216
217
|
};
|
|
@@ -28,8 +28,8 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
28
28
|
const oldEntries = flatten(updatedEntries?.map((u) => u.old));
|
|
29
29
|
const newEntries = flatten(updatedEntries?.map((u) => u.new));
|
|
30
30
|
|
|
31
|
-
const collectedOldAmount = getAmountByAccountNumber(oldEntries, ['4457'], 0);
|
|
32
|
-
const collectedNewAmount = getAmountByAccountNumber(newEntries, ['4457'], 0);
|
|
31
|
+
const collectedOldAmount = getAmountByAccountNumber(oldEntries, ['4457'], 0, true);
|
|
32
|
+
const collectedNewAmount = getAmountByAccountNumber(newEntries, ['4457'], 0, true);
|
|
33
33
|
|
|
34
34
|
const deductedOldAmount = getAmountByAccountNumber(oldEntries, ['4456'], 0);
|
|
35
35
|
const deductedNewAmount = getAmountByAccountNumber(newEntries, ['4456'], 0);
|