@silexpert/core 1.0.182 → 1.0.183
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/Notification.d.ts +3 -0
- package/es/api/resources/Notification.d.ts.map +1 -1
- package/es/api/resources/Notification.js +7 -1
- package/es/api/resources/Notification.js.map +1 -1
- package/es/types/Enum/BrandPourcentage.js +4 -4
- package/es/types/Enum/BrandPourcentage.js.map +1 -1
- package/es/types/Enum/NotificationType.d.ts +14 -2
- package/es/types/Enum/NotificationType.d.ts.map +1 -1
- package/es/types/Enum/NotificationType.js +35 -5
- package/es/types/Enum/NotificationType.js.map +1 -1
- package/es/types/Interface/api/appNotification/Update.d.ts +5 -0
- package/es/types/Interface/api/appNotification/Update.d.ts.map +1 -0
- package/es/types/Interface/api/appNotification/Update.js +25 -0
- package/es/types/Interface/api/appNotification/Update.js.map +1 -0
- package/es/types/Interface/api/notification/CreateNotification.d.ts +2 -2
- package/es/types/Interface/api/notification/CreateNotification.d.ts.map +1 -1
- package/es/types/Interface/api/notification/CreateNotification.js +2 -2
- package/es/types/Interface/api/notification/CreateNotification.js.map +1 -1
- package/es/types/Interface/api/notificationSetting/CreateNotificationSetting.d.ts +2 -2
- package/es/types/Interface/api/notificationSetting/CreateNotificationSetting.d.ts.map +1 -1
- package/es/types/Interface/api/notificationSetting/CreateNotificationSetting.js +2 -2
- package/es/types/Interface/api/notificationSetting/CreateNotificationSetting.js.map +1 -1
- package/es/types/Interface/api/notificationSetting/UpdateNotificationSetting.d.ts +2 -2
- package/es/types/Interface/api/notificationSetting/UpdateNotificationSetting.d.ts.map +1 -1
- package/es/types/Interface/api/notificationSetting/UpdateNotificationSetting.js +2 -2
- package/es/types/Interface/api/notificationSetting/UpdateNotificationSetting.js.map +1 -1
- package/es/types/Interface/models/IAppNotification.d.ts +19 -0
- package/es/types/Interface/models/IAppNotification.d.ts.map +1 -0
- package/es/types/Interface/models/IAppNotification.js +2 -0
- package/es/types/Interface/models/IAppNotification.js.map +1 -0
- package/es/types/Interface/models/IMobileNotificationLog.d.ts +2 -2
- package/es/types/Interface/models/IMobileNotificationLog.d.ts.map +1 -1
- package/es/types/Interface/models/IMobileNotificationLog.js.map +1 -1
- package/es/types/Interface/models/IMobileNotificationSetting.d.ts +2 -2
- package/es/types/Interface/models/IMobileNotificationSetting.d.ts.map +1 -1
- package/es/types/Interface/models/IMobileNotificationSetting.js.map +1 -1
- package/es/types/index.d.ts +2 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +2 -0
- package/es/types/index.js.map +1 -1
- package/js/api/resources/Notification.js +7 -1
- package/js/api/resources/Notification.js.map +1 -1
- package/js/types/Enum/BrandPourcentage.js +4 -4
- package/js/types/Enum/BrandPourcentage.js.map +1 -1
- package/js/types/Enum/NotificationType.js +35 -5
- package/js/types/Enum/NotificationType.js.map +1 -1
- package/js/types/Interface/api/appNotification/Update.js +24 -0
- package/js/types/Interface/api/appNotification/Update.js.map +1 -0
- package/js/types/Interface/api/notification/CreateNotification.js +1 -1
- package/js/types/Interface/api/notification/CreateNotification.js.map +1 -1
- package/js/types/Interface/api/notificationSetting/CreateNotificationSetting.js +1 -1
- package/js/types/Interface/api/notificationSetting/CreateNotificationSetting.js.map +1 -1
- package/js/types/Interface/api/notificationSetting/UpdateNotificationSetting.js +1 -1
- package/js/types/Interface/api/notificationSetting/UpdateNotificationSetting.js.map +1 -1
- package/js/types/Interface/models/IAppNotification.js +6 -0
- package/js/types/Interface/models/IAppNotification.js.map +1 -0
- package/js/types/Interface/models/IMobileNotificationLog.js.map +1 -1
- package/js/types/Interface/models/IMobileNotificationSetting.js.map +1 -1
- package/js/types/index.js +20 -0
- package/js/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Notification.ts +10 -1
- package/ts/types/Enum/BrandPourcentage.ts +4 -4
- package/ts/types/Enum/NotificationType.ts +43 -2
- package/ts/types/Interface/api/appNotification/Update.ts +13 -0
- package/ts/types/Interface/api/notification/CreateNotification.ts +3 -3
- package/ts/types/Interface/api/notificationSetting/CreateNotificationSetting.ts +3 -3
- package/ts/types/Interface/api/notificationSetting/UpdateNotificationSetting.ts +3 -3
- package/ts/types/Interface/models/IAppNotification.ts +21 -0
- package/ts/types/Interface/models/IMobileNotificationLog.ts +2 -2
- package/ts/types/Interface/models/IMobileNotificationSetting.ts +2 -2
- package/ts/types/index.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.183",
|
|
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,7 +1,16 @@
|
|
|
1
|
+
import { IAppNotification, UpdateAppNotificationStatus } from '../../types';
|
|
1
2
|
import { Resource } from '../Resource';
|
|
2
3
|
|
|
3
4
|
export class Notification extends Resource {
|
|
4
5
|
createTestNotification(idUser: number): Promise<string> {
|
|
5
|
-
return this.axios.$post(`/notifications/${idUser}`);
|
|
6
|
+
return this.axios.$post(`/mobile/notifications/${idUser}`);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
getAllBySociety(id: number): Promise<IAppNotification[]> {
|
|
10
|
+
return this.axios.$get(`societies/${id}/notifications`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
updateStatus(params: UpdateAppNotificationStatus): Promise<number> {
|
|
14
|
+
return this.axios.$put('/notifications/status', params);
|
|
6
15
|
}
|
|
7
16
|
}
|
|
@@ -3,7 +3,7 @@ export const BrandPourcentage = [
|
|
|
3
3
|
idTypeBrand: 1,
|
|
4
4
|
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-pourcentage/',
|
|
5
5
|
logoS3: 'config/pourcentage-logo.png',
|
|
6
|
-
name: 'Pourcentage
|
|
6
|
+
name: 'Pourcentage Online',
|
|
7
7
|
colors: {
|
|
8
8
|
primary: '#1e6f5c',
|
|
9
9
|
primary50: '#DFF9F1',
|
|
@@ -264,7 +264,7 @@ export const BrandPourcentage = [
|
|
|
264
264
|
idTypeBrand: 4,
|
|
265
265
|
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-pourcentage/',
|
|
266
266
|
logoS3: 'config/pourcentage-logo.png',
|
|
267
|
-
name: '
|
|
267
|
+
name: 'Epinal', // Pourcentage EPINAL
|
|
268
268
|
colors: {
|
|
269
269
|
primary: '#1e6f5c',
|
|
270
270
|
primary50: '#DFF9F1',
|
|
@@ -351,7 +351,7 @@ export const BrandPourcentage = [
|
|
|
351
351
|
idTypeBrand: 5,
|
|
352
352
|
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-pourcentage/',
|
|
353
353
|
logoS3: 'config/pourcentage-logo.png',
|
|
354
|
-
name: '
|
|
354
|
+
name: 'Nice', // AMEX
|
|
355
355
|
colors: {
|
|
356
356
|
primary: '#1e6f5c',
|
|
357
357
|
primary50: '#DFF9F1',
|
|
@@ -435,7 +435,7 @@ export const BrandPourcentage = [
|
|
|
435
435
|
},
|
|
436
436
|
},
|
|
437
437
|
{
|
|
438
|
-
idTypeBrand:
|
|
438
|
+
idTypeBrand: 6,
|
|
439
439
|
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-pourcentage/',
|
|
440
440
|
logoS3: 'config/pourcentage-logo.png',
|
|
441
441
|
name: 'Marseille', // Pourcentage Marseille
|
|
@@ -1,4 +1,45 @@
|
|
|
1
|
-
export enum
|
|
1
|
+
export enum NotificationTypeEnum {
|
|
2
2
|
ANNOTATE_COUNT = 1,
|
|
3
3
|
BANK_ACCOUNT_SYNCHRONISATION = 2,
|
|
4
|
-
|
|
4
|
+
INVOICE_HAS_BEEN_PAID = 3,
|
|
5
|
+
ESTIMATE_ALMOST_EXPIRED = 4,
|
|
6
|
+
INVOICE_ALMOST_EXPIRED = 5,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type NotificationTypeType = {
|
|
10
|
+
id: number;
|
|
11
|
+
title: string;
|
|
12
|
+
linkTitle: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type NotificationTypeTypeEnum = {
|
|
16
|
+
[key: string]: NotificationTypeType
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const NotificationType: NotificationTypeTypeEnum = {
|
|
20
|
+
ANNOTATE_COUNT: {
|
|
21
|
+
id: NotificationTypeEnum.ANNOTATE_COUNT,
|
|
22
|
+
title: 'Vous avez des lignes non annotées',
|
|
23
|
+
linkTitle: 'Annoter',
|
|
24
|
+
},
|
|
25
|
+
BANK_ACCOUNT_SYNCHRONISATION: {
|
|
26
|
+
id: NotificationTypeEnum.BANK_ACCOUNT_SYNCHRONISATION,
|
|
27
|
+
title: 'Un de vos comptes bancaires est désynchronisé',
|
|
28
|
+
linkTitle: 'Synchroniser mon compte',
|
|
29
|
+
},
|
|
30
|
+
INVOICE_HAS_BEEN_PAID: {
|
|
31
|
+
id: NotificationTypeEnum.INVOICE_HAS_BEEN_PAID,
|
|
32
|
+
title: 'Vous avez été payé !',
|
|
33
|
+
linkTitle: 'Consulter la facture',
|
|
34
|
+
},
|
|
35
|
+
ESTIMATE_ALMOST_EXPIRED: {
|
|
36
|
+
id: NotificationTypeEnum.ESTIMATE_ALMOST_EXPIRED,
|
|
37
|
+
title: 'Un devis est bientôt expiré',
|
|
38
|
+
linkTitle: 'Consulter le devis',
|
|
39
|
+
},
|
|
40
|
+
INVOICE_ALMOST_EXPIRED: {
|
|
41
|
+
id: NotificationTypeEnum.INVOICE_ALMOST_EXPIRED,
|
|
42
|
+
title: 'Une facture arrive à échéance',
|
|
43
|
+
linkTitle: 'Consulter la facture',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IsBoolean } from 'class-validator';
|
|
2
|
+
import { ApiPropertyOptional, ApiProperty } from '../../../../utils';
|
|
3
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
+
|
|
5
|
+
export class UpdateAppNotificationStatus {
|
|
6
|
+
@ApiPropertyOptional()
|
|
7
|
+
idNotifications?: number[] | null;
|
|
8
|
+
|
|
9
|
+
@ApiProperty()
|
|
10
|
+
@IsBoolean()
|
|
11
|
+
@ToBoolean()
|
|
12
|
+
markAsRead: boolean;
|
|
13
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { IsEnum, IsInt } from 'class-validator';
|
|
2
2
|
import { ApiProperty } from '../../../../utils';
|
|
3
|
-
import {
|
|
3
|
+
import { NotificationTypeEnum } from '../../../Enum/NotificationType';
|
|
4
4
|
|
|
5
5
|
export class CreateNotification {
|
|
6
6
|
@ApiProperty()
|
|
7
7
|
@IsInt()
|
|
8
|
-
@IsEnum(
|
|
9
|
-
notificationType:
|
|
8
|
+
@IsEnum(NotificationTypeEnum)
|
|
9
|
+
notificationType: NotificationTypeEnum;
|
|
10
10
|
|
|
11
11
|
@ApiProperty()
|
|
12
12
|
token: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IsBoolean, IsEnum, IsInt } from 'class-validator';
|
|
2
2
|
import { ApiProperty } from '../../../../utils';
|
|
3
3
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
-
import {
|
|
4
|
+
import { NotificationTypeEnum } from '../../../Enum/NotificationType';
|
|
5
5
|
|
|
6
6
|
export class CreateNotificationSetting {
|
|
7
7
|
@ApiProperty()
|
|
8
8
|
@IsInt()
|
|
9
|
-
@IsEnum(
|
|
10
|
-
notificationType:
|
|
9
|
+
@IsEnum(NotificationTypeEnum)
|
|
10
|
+
notificationType: NotificationTypeEnum;
|
|
11
11
|
|
|
12
12
|
@ApiProperty()
|
|
13
13
|
@IsBoolean()
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IsBoolean, IsEnum, IsInt } from 'class-validator';
|
|
2
2
|
import { ApiProperty } from '../../../../utils';
|
|
3
3
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
-
import {
|
|
4
|
+
import { NotificationTypeEnum } from '../../../Enum/NotificationType';
|
|
5
5
|
|
|
6
6
|
export class UpdateNotificationSetting {
|
|
7
7
|
@ApiProperty()
|
|
8
8
|
@IsInt()
|
|
9
|
-
@IsEnum(
|
|
10
|
-
notificationType:
|
|
9
|
+
@IsEnum(NotificationTypeEnum)
|
|
10
|
+
notificationType: NotificationTypeEnum;
|
|
11
11
|
|
|
12
12
|
@ApiProperty()
|
|
13
13
|
@IsBoolean()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NotificationTypeEnum } from '../../Enum/NotificationType';
|
|
2
|
+
import { ISociety } from './ISociety';
|
|
3
|
+
import { IUser } from './IUser';
|
|
4
|
+
|
|
5
|
+
export interface IAppNotification {
|
|
6
|
+
id: number;
|
|
7
|
+
title: string;
|
|
8
|
+
message: string;
|
|
9
|
+
link?: string;
|
|
10
|
+
documentId?: number;
|
|
11
|
+
read: boolean;
|
|
12
|
+
idNotificationtype: NotificationTypeEnum;
|
|
13
|
+
idSociety: number;
|
|
14
|
+
idUser: number;
|
|
15
|
+
createdAt?: Date | null;
|
|
16
|
+
updatedAt?: Date | null;
|
|
17
|
+
|
|
18
|
+
// associations
|
|
19
|
+
society: ISociety;
|
|
20
|
+
user: IUser;
|
|
21
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NotificationTypeEnum } from '../../Enum/NotificationType';
|
|
2
2
|
|
|
3
3
|
export interface IMobileNotificationLog {
|
|
4
4
|
id: number;
|
|
5
|
-
idType:
|
|
5
|
+
idType: NotificationTypeEnum;
|
|
6
6
|
lastSent: Date | null;
|
|
7
7
|
nextSend: Date | null;
|
|
8
8
|
success: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NotificationTypeEnum } from '../../Enum/NotificationType';
|
|
2
2
|
|
|
3
3
|
export interface IMobileNotificationSetting {
|
|
4
4
|
id: number;
|
|
5
|
-
idType:
|
|
5
|
+
idType: NotificationTypeEnum;
|
|
6
6
|
active: boolean;
|
|
7
7
|
idUser: number;
|
|
8
8
|
createdAt?: Date | null;
|
package/ts/types/index.ts
CHANGED
|
@@ -322,6 +322,7 @@ export * from './Interface/models/IRegistration';
|
|
|
322
322
|
export * from './Interface/models/IVatRegimeHistory';
|
|
323
323
|
export * from './Interface/models/ICustomerAcceptance';
|
|
324
324
|
export * from './Interface/models/IUnpaidCallHistory';
|
|
325
|
+
export * from './Interface/models/IAppNotification';
|
|
325
326
|
// Forms
|
|
326
327
|
export * from './Form/FormAuthenticate';
|
|
327
328
|
export * from './Form/FormConnector';
|
|
@@ -915,4 +916,5 @@ export * from './Interface/api/affectedPatrimony/CreateInKindAffectedPatrimony';
|
|
|
915
916
|
export * from './Interface/api/affectedPatrimony/ResultCreateAffectedPatrimony';
|
|
916
917
|
export * from './Interface/api/affectedPatrimony/ReadAffectedPatrimony';
|
|
917
918
|
export * from './Interface/api/notificationSetting/CreateNotificationSetting';
|
|
918
|
-
export * from './Interface/api/notificationSetting/UpdateNotificationSetting';
|
|
919
|
+
export * from './Interface/api/notificationSetting/UpdateNotificationSetting';
|
|
920
|
+
export * from './Interface/api/appNotification/Update';
|