@silexpert/core 0.4.253 → 0.4.255
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/CalendarEvent.d.ts +2 -1
- package/es/api/resources/CalendarEvent.d.ts.map +1 -1
- package/es/api/resources/CalendarEvent.js +3 -0
- package/es/api/resources/CalendarEvent.js.map +1 -1
- package/es/api/resources/Connection.d.ts +6 -0
- package/es/api/resources/Connection.d.ts.map +1 -0
- package/es/api/resources/Connection.js +7 -0
- package/es/api/resources/Connection.js.map +1 -0
- package/es/api/resources.d.ts +2 -0
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +2 -0
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/BrandPourcentage.js +1 -1
- package/es/types/Enum/BrandPourcentage.js.map +1 -1
- package/es/types/Enum/ConnectionError.d.ts +9 -0
- package/es/types/Enum/ConnectionError.d.ts.map +1 -0
- package/es/types/Enum/ConnectionError.js +59 -0
- package/es/types/Enum/ConnectionError.js.map +1 -0
- package/es/types/Enum/SubscriptionType.d.ts +4 -0
- package/es/types/Enum/SubscriptionType.d.ts.map +1 -1
- package/es/types/Enum/SubscriptionType.js +14 -0
- package/es/types/Enum/SubscriptionType.js.map +1 -1
- package/es/types/Interface/api/calendarEvent/verifyCalendarEvent.d.ts +6 -0
- package/es/types/Interface/api/calendarEvent/verifyCalendarEvent.d.ts.map +1 -0
- package/es/types/Interface/api/calendarEvent/verifyCalendarEvent.js +2 -0
- package/es/types/Interface/api/calendarEvent/verifyCalendarEvent.js.map +1 -0
- package/es/types/Interface/api/connection/QueryConnectionState.d.ts +4 -0
- package/es/types/Interface/api/connection/QueryConnectionState.d.ts.map +1 -0
- package/es/types/Interface/api/connection/QueryConnectionState.js +17 -0
- package/es/types/Interface/api/connection/QueryConnectionState.js.map +1 -0
- package/es/types/Interface/api/connection/ReadConnectionState.d.ts +23 -0
- package/es/types/Interface/api/connection/ReadConnectionState.d.ts.map +1 -0
- package/es/types/Interface/api/connection/ReadConnectionState.js +3 -0
- package/es/types/Interface/api/connection/ReadConnectionState.js.map +1 -0
- package/es/types/Interface/api/dashboard/ReadTopBuys.d.ts +8 -0
- package/es/types/Interface/api/dashboard/ReadTopBuys.d.ts.map +1 -1
- package/es/types/Interface/api/dashboard/ReadTopBuys.js +2 -0
- package/es/types/Interface/api/dashboard/ReadTopBuys.js.map +1 -1
- package/es/types/Interface/api/dashboard/ReadTopProviders.d.ts +8 -0
- package/es/types/Interface/api/dashboard/ReadTopProviders.d.ts.map +1 -1
- package/es/types/Interface/api/dashboard/ReadTopProviders.js +2 -0
- package/es/types/Interface/api/dashboard/ReadTopProviders.js.map +1 -1
- package/es/types/index.d.ts +4 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +4 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/date.d.ts.map +1 -1
- package/es/utils/date.js +36 -0
- package/es/utils/date.js.map +1 -1
- package/js/api/resources/CalendarEvent.js +4 -0
- package/js/api/resources/CalendarEvent.js.map +1 -1
- package/js/api/resources/Connection.js +20 -0
- package/js/api/resources/Connection.js.map +1 -0
- package/js/api/resources.js +4 -1
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/BrandPourcentage.js +1 -1
- package/js/types/Enum/BrandPourcentage.js.map +1 -1
- package/js/types/Enum/ConnectionError.js +55 -0
- package/js/types/Enum/ConnectionError.js.map +1 -0
- package/js/types/Enum/SubscriptionType.js +11 -0
- package/js/types/Enum/SubscriptionType.js.map +1 -1
- package/js/types/Interface/api/calendarEvent/verifyCalendarEvent.js +6 -0
- package/js/types/Interface/api/calendarEvent/verifyCalendarEvent.js.map +1 -0
- package/js/types/Interface/api/connection/QueryConnectionState.js +27 -0
- package/js/types/Interface/api/connection/QueryConnectionState.js.map +1 -0
- package/js/types/Interface/api/connection/ReadConnectionState.js +10 -0
- package/js/types/Interface/api/connection/ReadConnectionState.js.map +1 -0
- package/js/types/Interface/api/dashboard/ReadTopBuys.js +4 -0
- package/js/types/Interface/api/dashboard/ReadTopBuys.js.map +1 -1
- package/js/types/Interface/api/dashboard/ReadTopProviders.js +4 -0
- package/js/types/Interface/api/dashboard/ReadTopProviders.js.map +1 -1
- package/js/types/index.js +48 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/date.js +34 -0
- package/js/utils/date.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/CalendarEvent.ts +5 -1
- package/ts/api/resources/Connection.ts +8 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/BrandPourcentage.ts +1 -1
- package/ts/types/Enum/ConnectionError.ts +66 -0
- package/ts/types/Enum/SubscriptionType.ts +16 -1
- package/ts/types/Interface/api/calendarEvent/verifyCalendarEvent.ts +6 -0
- package/ts/types/Interface/api/connection/QueryConnectionState.ts +6 -0
- package/ts/types/Interface/api/connection/ReadConnectionState.ts +22 -0
- package/ts/types/Interface/api/dashboard/ReadTopBuys.ts +9 -0
- package/ts/types/Interface/api/dashboard/ReadTopProviders.ts +9 -0
- package/ts/types/index.ts +4 -0
- package/ts/utils/date.ts +34 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export type ConnectionError = {
|
|
2
|
+
key: string;
|
|
3
|
+
description: {
|
|
4
|
+
title: string;
|
|
5
|
+
content: string;
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const connectionErrors: ConnectionError[] = [
|
|
10
|
+
{
|
|
11
|
+
key: 'SCARequired',
|
|
12
|
+
description: {
|
|
13
|
+
title: 'Double authentification',
|
|
14
|
+
content: 'Votre connexion est en attente d\'une double authentification auprès de votre banque. Notez que certaines banques peuvent éxiger un renouvellement d\'authentification sur une période allant de 3 jours à 3 mois. Vous pouvez cependant modifier ce paramètre dans l\'espace client de votre banque.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
key: 'actionNeeded',
|
|
19
|
+
description: {
|
|
20
|
+
title: 'Votre banque demande une action de votre part',
|
|
21
|
+
content: 'Votre banque demande une action supplémentaire afin de valider (ou rétablir) votre connexion. vous pouvez le faire en vous rendant sur votre espace bancaire.',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: 'wrongpass',
|
|
26
|
+
description: {
|
|
27
|
+
title: 'Mauvais identifiants',
|
|
28
|
+
content: 'Il semblerait que les identifiants renseignés soient incorrects. Veuiller vous rendre sur la webview de notre partenaire afin de rétablir la connexion',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
key: 'webauthRequired',
|
|
33
|
+
description: {
|
|
34
|
+
title: 'Une authentification est nécéssaire',
|
|
35
|
+
content: 'Votre banque demande une nouvelle authentification. Nous vous invitons a vous rendre sur la webview de notre partenaire afin de renouveler votre connexion auprès de votre banque.',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: 'websiteUnavailable',
|
|
40
|
+
description: {
|
|
41
|
+
title: 'L\'espace de votre banque ne semble pas disponible',
|
|
42
|
+
content: 'Il semblerait que votre banque ne puisse pas aboutir à vôtre démarche car leur espace ne semble pas disponible. Nous vous invitons a ré-essayer une connexion via la webview de notre partenaire afin de rétablir la connexion. Si le problème persiste, merci de vous rapprocher de votre banque.',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: 'decoupled',
|
|
47
|
+
description: {
|
|
48
|
+
title: 'Une demande de validation est en attente de réception',
|
|
49
|
+
content: 'Votre banque attend une action de votre part afin de finaliser la connexion. Veuiller vous rendre sur la webview de notre partenaie afin de terminer le processus',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: 'bug',
|
|
54
|
+
description: {
|
|
55
|
+
title: 'Une erreur est survenue lors de votre demande',
|
|
56
|
+
content: 'Il semblerait qu\'une erreur soit survenue lors du processus. Nos équipes techniques sont prévenues, afin de régler le problème au plus vite.',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: 'rateLimit',
|
|
61
|
+
description: {
|
|
62
|
+
title: 'Victime de notre succès',
|
|
63
|
+
content: 'Il semblerait qu\'il y ait eu trop de demandes de connexion au même moment que vous, et votre demande n\'a pas pu aboutir. Nous vous invitons à renouveler votre démarche dans quelques instants.',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
];
|
|
@@ -2,4 +2,19 @@ export enum SubscriptionType {
|
|
|
2
2
|
FREEMIUM = 1,
|
|
3
3
|
FREEMIUM_PRO = 2,
|
|
4
4
|
PREMIUM = 3,
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const subscriptionList = [
|
|
8
|
+
{
|
|
9
|
+
id: SubscriptionType.FREEMIUM,
|
|
10
|
+
name: 'Essai gratuit',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: SubscriptionType.FREEMIUM_PRO,
|
|
14
|
+
name: 'Logiciel',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: SubscriptionType.PREMIUM,
|
|
18
|
+
name: 'Expertise-Comptable',
|
|
19
|
+
},
|
|
20
|
+
];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export class ReadConnectionState {
|
|
2
|
+
bankName: string;
|
|
3
|
+
id: number;
|
|
4
|
+
idBudgetConnection?: number | null;
|
|
5
|
+
error: string | null;
|
|
6
|
+
bankAccounts: ReadConnectionBankAccountsState[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type ReadConnectionBankAccountsState = {
|
|
10
|
+
id: number;
|
|
11
|
+
identifierOb: string;
|
|
12
|
+
name: string;
|
|
13
|
+
amount: number;
|
|
14
|
+
balance: string;
|
|
15
|
+
lastUpdate: Date | null;
|
|
16
|
+
state: boolean;
|
|
17
|
+
error: string | null;
|
|
18
|
+
iban?: string;
|
|
19
|
+
idBudget?: number;
|
|
20
|
+
deleted?: Date;
|
|
21
|
+
disabled?: Date;
|
|
22
|
+
};
|
|
@@ -5,4 +5,13 @@ export class ReadTopProviders {
|
|
|
5
5
|
idThirdParty: number;
|
|
6
6
|
amount: number;
|
|
7
7
|
iconPNG: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class ReadTopCustomers {
|
|
11
|
+
icon: string;
|
|
12
|
+
color: string;
|
|
13
|
+
company: string;
|
|
14
|
+
idThirdParty: number;
|
|
15
|
+
amount: number;
|
|
16
|
+
iconPNG: string;
|
|
8
17
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -427,6 +427,7 @@ export * from './Enum/TaskResponseType';
|
|
|
427
427
|
export * from './Enum/InternalService';
|
|
428
428
|
export * from './Enum/SocietyTypeEvent';
|
|
429
429
|
export * from './Enum/Call';
|
|
430
|
+
export * from './Enum/ConnectionError';
|
|
430
431
|
|
|
431
432
|
// Interfaces API
|
|
432
433
|
export * from './Interface/api/partnerTransactionType/ReadPartnerTransactionType';
|
|
@@ -728,6 +729,7 @@ export * from './Interface/api/bankAccount/ReadExpiredBankAccount';
|
|
|
728
729
|
export * from './Interface/api/sheetMonthSchedule/QuerySheetMonthSchedule';
|
|
729
730
|
export * from './Interface/api/calendarEvent/createCalendarEvent';
|
|
730
731
|
export * from './Interface/api/calendarEvent/createCalendarEventForUsers';
|
|
732
|
+
export * from './Interface/api/calendarEvent/verifyCalendarEvent';
|
|
731
733
|
export * from './Interface/api/calendarEvent/updateCalendarEvent';
|
|
732
734
|
export * from './Interface/api/calendarEvent/interval';
|
|
733
735
|
export * from './Interface/api/calendarEvent/queryCalendarEvent';
|
|
@@ -756,6 +758,8 @@ export * from './Interface/api/3cx/Create3cxLog';
|
|
|
756
758
|
export * from './Interface/api/amount/FormattedAmount';
|
|
757
759
|
export * from './Interface/api/customerActivity/CreateCustomerActivityReport';
|
|
758
760
|
export * from './Interface/api/alert/CreateAlert';
|
|
761
|
+
export * from './Interface/api/connection/QueryConnectionState';
|
|
762
|
+
export * from './Interface/api/connection/ReadConnectionState';
|
|
759
763
|
|
|
760
764
|
// Enums types
|
|
761
765
|
export * from './Interface/enum/Util';
|
package/ts/utils/date.ts
CHANGED
|
@@ -26,6 +26,40 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
|
|
|
26
26
|
// on check si les horaires de l'event sont dans les horaires du collab sinon on les fait commencer à l'heure à laquelle il s'est connecté
|
|
27
27
|
res.dateStart = !((dateToCompareStart - dateStart) >= 0 && (dateToCompareStart - dateEnd) <= 0) ? new Date(dateStart) : new Date(dateToCompareStart);
|
|
28
28
|
res.dateEnd = !((dateToCompareEnd - dateStart) >= 0 && (dateToCompareEnd - dateEnd) <= 0) ? new Date(dateEnd) : new Date(dateToCompareEnd);
|
|
29
|
+
} else if (!hoursOfPeriod?.length) {
|
|
30
|
+
const hoursDiff = [];
|
|
31
|
+
// parcours de la liste des heures de connexions
|
|
32
|
+
for (let i = 0; i < listHours.length; i += 1) {
|
|
33
|
+
// ajout de la différence entre la date de début de notre événement et la date de début de notre période
|
|
34
|
+
hoursDiff.push({
|
|
35
|
+
id: i,
|
|
36
|
+
start: true,
|
|
37
|
+
end: false,
|
|
38
|
+
diff: Math.abs(dateToCompareStart - new Date(`${textDate} ${listHours[i].startTime}`).getTime()),
|
|
39
|
+
});
|
|
40
|
+
// ajout de la différence entre la date de début de notre événement et la date de fin de notre période
|
|
41
|
+
hoursDiff.push({
|
|
42
|
+
id: i,
|
|
43
|
+
start: false,
|
|
44
|
+
end: true,
|
|
45
|
+
diff: Math.abs(dateToCompareStart - new Date(`${textDate} ${listHours[i].endTime}`).getTime()),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
// tri de la liste par différence
|
|
49
|
+
hoursDiff.sort((a, b) => a.diff - b.diff);
|
|
50
|
+
// si proche de la date de début :
|
|
51
|
+
// date de début event = date de début période
|
|
52
|
+
// date de fin event = date de début période + 1 heure
|
|
53
|
+
if (hoursDiff[0].start) {
|
|
54
|
+
res.dateStart = new Date(`${textDate} ${listHours[hoursDiff[0].id].startTime}`);
|
|
55
|
+
res.dateEnd = new Date(new Date(`${textDate} ${listHours[hoursDiff[0].id].startTime}`).getTime() + 3600000);
|
|
56
|
+
// si proche de la date de fin :
|
|
57
|
+
// date de début event = date de fin période - 1 heure
|
|
58
|
+
// date de fin event = date de fin période
|
|
59
|
+
} else if (hoursDiff[0].end) {
|
|
60
|
+
res.dateStart = new Date(new Date(`${textDate} ${listHours[hoursDiff[0].id].endTime}`).getTime() - 3600000);
|
|
61
|
+
res.dateEnd = new Date(`${textDate} ${listHours[hoursDiff[0].id].endTime}`);
|
|
62
|
+
}
|
|
29
63
|
}
|
|
30
64
|
}
|
|
31
65
|
return res;
|