@abyss-project/main 1.0.79 → 1.0.81
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/dist/api/user.admin.api.d.ts +3 -1
- package/dist/api/user.admin.api.js +9 -1
- package/dist/api/user.api.d.ts +3 -1
- package/dist/api/user.api.js +9 -1
- package/dist/translate/en.translate.d.ts +30 -0
- package/dist/translate/en.translate.js +30 -0
- package/dist/translate/fr.translate.d.ts +30 -0
- package/dist/translate/fr.translate.js +30 -0
- package/dist/types/enum/abyss-application-event.enum.d.ts +5 -0
- package/dist/types/enum/abyss-application-event.enum.js +5 -0
- package/dist/types/enum/user-notification-content-type.enum.d.ts +41 -2
- package/dist/types/enum/user-notification-content-type.enum.js +8 -1
- package/dist/types/interface/api/requests/user.admin.request.d.ts +42 -0
- package/dist/types/interface/api/requests/user.request.d.ts +8 -1
- package/dist/types/interface/api/responses/user.admin.response.d.ts +10 -0
- package/dist/types/interface/api/responses/user.response.d.ts +4 -0
- package/dist/types/interface/index.d.ts +1 -0
- package/dist/types/interface/index.js +1 -0
- package/dist/types/interface/models/device-token.model.d.ts +12 -0
- package/dist/types/interface/models/device-token.model.js +2 -0
- package/dist/types/interface/models/user-notification.model.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IGetUserAdminParams, IGetUserAdminResponse, IPaginateUserAdminQuery, IPaginateUserAdminResponse, IUpdateUserAdminParams, IUpdateUserAdminBody, IUpdateUserAdminResponse, IActivateServiceUserAdminResponse, IActivateServiceUserAdminQuery, IActivateServiceUserAdminParams, IUpdateSettingsUserAdminBody, IUpdateSettingsUserAdminResponse, IUpdateSettingsUserAdminParams, IConnectAsAdminUserAdminResponse, IConnectAsAdminUserAdminParams, IJoinNewsletterUserAdminParams, IJoinNewsletterUserAdminResponse, ILeaveNewsletterUserAdminParams, ILeaveNewsletterUserAdminResponse, IUnsubscribeNewsletterUserAdminBody, IUnsubscribeNewsletterUserAdminResponse, IGetDetailsUserAdminBody, IGetDetailsUserAdminResponse, IListBoardUserAdminResponse, IListBoardUserAdminParams } from '../types';
|
|
1
|
+
import { IGetUserAdminParams, IGetUserAdminResponse, IPaginateUserAdminQuery, IPaginateUserAdminResponse, IUpdateUserAdminParams, IUpdateUserAdminBody, IUpdateUserAdminResponse, IActivateServiceUserAdminResponse, IActivateServiceUserAdminQuery, IActivateServiceUserAdminParams, IUpdateSettingsUserAdminBody, IUpdateSettingsUserAdminResponse, IUpdateSettingsUserAdminParams, IConnectAsAdminUserAdminResponse, IConnectAsAdminUserAdminParams, IJoinNewsletterUserAdminParams, IJoinNewsletterUserAdminResponse, ILeaveNewsletterUserAdminParams, ILeaveNewsletterUserAdminResponse, IUnsubscribeNewsletterUserAdminBody, IUnsubscribeNewsletterUserAdminResponse, IGetDetailsUserAdminBody, IGetDetailsUserAdminResponse, IListBoardUserAdminResponse, IListBoardUserAdminParams, IDeleteDeviceTokenUserAdminParams, IDeleteDeviceTokenUserAdminResponse, ISendBulkPushNotificationUserAdminBody, ISendBulkPushNotificationUserAdminResponse } from '../types';
|
|
2
2
|
export declare const getUserAdmin: (params: IGetUserAdminParams) => Promise<IGetUserAdminResponse>;
|
|
3
3
|
export declare const paginateUserAdmin: (query: IPaginateUserAdminQuery) => Promise<IPaginateUserAdminResponse>;
|
|
4
4
|
export declare const updateUserAdmin: (params: IUpdateUserAdminParams, body: IUpdateUserAdminBody) => Promise<IUpdateUserAdminResponse>;
|
|
@@ -10,3 +10,5 @@ export declare const leaveNewsletterUserAdmin: (params: ILeaveNewsletterUserAdmi
|
|
|
10
10
|
export declare const unsubscribeNewsletterUserAdmin: (body: IUnsubscribeNewsletterUserAdminBody) => Promise<IUnsubscribeNewsletterUserAdminResponse>;
|
|
11
11
|
export declare const getDetailsUserAdmin: (body: IGetDetailsUserAdminBody) => Promise<IGetDetailsUserAdminResponse>;
|
|
12
12
|
export declare const listBoardUserAdmin: (params: IListBoardUserAdminParams) => Promise<IListBoardUserAdminResponse>;
|
|
13
|
+
export declare const deleteDeviceTokenUserAdmin: (params: IDeleteDeviceTokenUserAdminParams) => Promise<IDeleteDeviceTokenUserAdminResponse>;
|
|
14
|
+
export declare const sendBulkPushNotificationUserAdmin: (body: ISendBulkPushNotificationUserAdminBody) => Promise<ISendBulkPushNotificationUserAdminResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listBoardUserAdmin = exports.getDetailsUserAdmin = exports.unsubscribeNewsletterUserAdmin = exports.leaveNewsletterUserAdmin = exports.joinNewsletterUserAdmin = exports.connectAsAdminUserAdmin = exports.activateServiceUserAdmin = exports.updateSettingsUserAdmin = exports.updateUserAdmin = exports.paginateUserAdmin = exports.getUserAdmin = void 0;
|
|
3
|
+
exports.sendBulkPushNotificationUserAdmin = exports.deleteDeviceTokenUserAdmin = exports.listBoardUserAdmin = exports.getDetailsUserAdmin = exports.unsubscribeNewsletterUserAdmin = exports.leaveNewsletterUserAdmin = exports.joinNewsletterUserAdmin = exports.connectAsAdminUserAdmin = exports.activateServiceUserAdmin = exports.updateSettingsUserAdmin = exports.updateUserAdmin = exports.paginateUserAdmin = exports.getUserAdmin = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const getUserAdmin = async (params) => {
|
|
6
6
|
return (await __1.AbyssCore.axios.get(`user/admin/${params.userId}`)).data;
|
|
@@ -48,3 +48,11 @@ const listBoardUserAdmin = async (params) => {
|
|
|
48
48
|
return (await __1.AbyssCore.axios.get(`user/admin/${params.userId}/board/list`)).data;
|
|
49
49
|
};
|
|
50
50
|
exports.listBoardUserAdmin = listBoardUserAdmin;
|
|
51
|
+
const deleteDeviceTokenUserAdmin = async (params) => {
|
|
52
|
+
return (await __1.AbyssCore.axios.delete(`user/admin/device-token/${params.deviceTokenId}`)).data;
|
|
53
|
+
};
|
|
54
|
+
exports.deleteDeviceTokenUserAdmin = deleteDeviceTokenUserAdmin;
|
|
55
|
+
const sendBulkPushNotificationUserAdmin = async (body) => {
|
|
56
|
+
return (await __1.AbyssCore.axios.post(`user/admin/device-token`, body)).data;
|
|
57
|
+
};
|
|
58
|
+
exports.sendBulkPushNotificationUserAdmin = sendBulkPushNotificationUserAdmin;
|
package/dist/api/user.api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ISponsorUserQuery, ISponsorUserResponse, IMeUserResponse, IUpdateUserBody, IUpdateUserResponse, IPaginateSponsorUserQuery, IPaginateSponsorUserResponse, IUpdateSettingsUserBody, IUpdateSettingsUserResponse, ICreateSubscriptionUserBody, ICreateSubscriptionUserResponse, IRenewSubscriptionUserResponse, IUpdateSubscriptionUserResponse, IUpdateSubscriptionUserBody, IInviteUserBody, IInviteUserResponse, IGetPublicUserBody, IGetPublicUserResponse, IPictureUserResponse, IImportProfilePictureFromCollectionUserBody, IImportProfilePictureFromCollectionUserResponse, ICloudSaveUserParams, ICloudSaveUserBody, ICloudSaveUserResponse, ICloudImportUserParams, ICloudImportUserBody, IJoinNewsletterUserResponse, ILeaveNewsletterUserResponse, IUnsubscribeNewsletterUserResponse, IUnsubscribeNewsletterUserQuery, ISubscribeNewsletterUserQuery, ISubscribeNewsletterUserResponse, IListBoardUserResponse } from '../types';
|
|
1
|
+
import { ISponsorUserQuery, ISponsorUserResponse, IMeUserResponse, IUpdateUserBody, IUpdateUserResponse, IPaginateSponsorUserQuery, IPaginateSponsorUserResponse, IUpdateSettingsUserBody, IUpdateSettingsUserResponse, ICreateSubscriptionUserBody, ICreateSubscriptionUserResponse, IRenewSubscriptionUserResponse, IUpdateSubscriptionUserResponse, IUpdateSubscriptionUserBody, IInviteUserBody, IInviteUserResponse, IGetPublicUserBody, IGetPublicUserResponse, IPictureUserResponse, IImportProfilePictureFromCollectionUserBody, IImportProfilePictureFromCollectionUserResponse, ICloudSaveUserParams, ICloudSaveUserBody, ICloudSaveUserResponse, ICloudImportUserParams, ICloudImportUserBody, IJoinNewsletterUserResponse, ILeaveNewsletterUserResponse, IUnsubscribeNewsletterUserResponse, IUnsubscribeNewsletterUserQuery, ISubscribeNewsletterUserQuery, ISubscribeNewsletterUserResponse, IListBoardUserResponse, IRegisterDeviceTokenUserBody, IRegisterDeviceTokenUserResponse, IUnregisterDeviceTokenUserBody, IUnregisterDeviceTokenUserResponse } from '../types';
|
|
2
2
|
export declare const sponsorUser: (query: ISponsorUserQuery) => Promise<ISponsorUserResponse>;
|
|
3
3
|
export declare const getPublicUser: (body: IGetPublicUserBody) => Promise<IGetPublicUserResponse>;
|
|
4
4
|
export declare const inviteUser: (body: IInviteUserBody) => Promise<IInviteUserResponse>;
|
|
@@ -18,3 +18,5 @@ export declare const leaveNewsletterUser: () => Promise<ILeaveNewsletterUserResp
|
|
|
18
18
|
export declare const unsubscribeNewsletterUser: (query: IUnsubscribeNewsletterUserQuery) => Promise<IUnsubscribeNewsletterUserResponse>;
|
|
19
19
|
export declare const subscribeNewsletterUser: (query: ISubscribeNewsletterUserQuery) => Promise<ISubscribeNewsletterUserResponse>;
|
|
20
20
|
export declare const listBoardUser: () => Promise<IListBoardUserResponse>;
|
|
21
|
+
export declare const registerDeviceTokenUser: (body: IRegisterDeviceTokenUserBody) => Promise<IRegisterDeviceTokenUserResponse>;
|
|
22
|
+
export declare const unregisterDeviceTokenUser: (body: IUnregisterDeviceTokenUserBody) => Promise<IUnregisterDeviceTokenUserResponse>;
|
package/dist/api/user.api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listBoardUser = exports.subscribeNewsletterUser = exports.unsubscribeNewsletterUser = exports.leaveNewsletterUser = exports.joinNewsletterUser = exports.cloudImportUser = exports.cloudSaveUser = exports.importProfilePictureFromCollectionUser = exports.updateSubscriptionUser = exports.renewSubscriptionUser = exports.createSubscriptionUser = exports.paginateSponsorUser = exports.updateSettingsUser = exports.pictureUser = exports.updateUser = exports.meUser = exports.inviteUser = exports.getPublicUser = exports.sponsorUser = void 0;
|
|
3
|
+
exports.unregisterDeviceTokenUser = exports.registerDeviceTokenUser = exports.listBoardUser = exports.subscribeNewsletterUser = exports.unsubscribeNewsletterUser = exports.leaveNewsletterUser = exports.joinNewsletterUser = exports.cloudImportUser = exports.cloudSaveUser = exports.importProfilePictureFromCollectionUser = exports.updateSubscriptionUser = exports.renewSubscriptionUser = exports.createSubscriptionUser = exports.paginateSponsorUser = exports.updateSettingsUser = exports.pictureUser = exports.updateUser = exports.meUser = exports.inviteUser = exports.getPublicUser = exports.sponsorUser = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const sponsorUser = async (query) => {
|
|
6
6
|
return (await __1.AbyssCore.axios.get('user/sponsor', { params: query })).data;
|
|
@@ -86,3 +86,11 @@ const listBoardUser = async () => {
|
|
|
86
86
|
return (await __1.AbyssCore.axios.get(`user/board/list`)).data;
|
|
87
87
|
};
|
|
88
88
|
exports.listBoardUser = listBoardUser;
|
|
89
|
+
const registerDeviceTokenUser = async (body) => {
|
|
90
|
+
return (await __1.AbyssCore.axios.post(`user/device-token/register`, body)).data;
|
|
91
|
+
};
|
|
92
|
+
exports.registerDeviceTokenUser = registerDeviceTokenUser;
|
|
93
|
+
const unregisterDeviceTokenUser = async (body) => {
|
|
94
|
+
return (await __1.AbyssCore.axios.delete(`user/device-token/unregister`, { data: body })).data;
|
|
95
|
+
};
|
|
96
|
+
exports.unregisterDeviceTokenUser = unregisterDeviceTokenUser;
|
|
@@ -228,5 +228,35 @@ export declare const enTranslation: {
|
|
|
228
228
|
content: string;
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
|
+
ABYSS_TRAINING: {
|
|
232
|
+
"training-inactivity-7-days": {
|
|
233
|
+
title: string;
|
|
234
|
+
content: string;
|
|
235
|
+
};
|
|
236
|
+
"training-inactivity-5-days": {
|
|
237
|
+
title: string;
|
|
238
|
+
content: string;
|
|
239
|
+
};
|
|
240
|
+
"training-inactivity-2-days": {
|
|
241
|
+
title: string;
|
|
242
|
+
content: string;
|
|
243
|
+
};
|
|
244
|
+
"training-never-trained": {
|
|
245
|
+
title: string;
|
|
246
|
+
content: string;
|
|
247
|
+
};
|
|
248
|
+
"training-today-workout-reminder-morning": {
|
|
249
|
+
title: string;
|
|
250
|
+
content: string;
|
|
251
|
+
};
|
|
252
|
+
"training-today-workout-reminder-afternoon": {
|
|
253
|
+
title: string;
|
|
254
|
+
content: string;
|
|
255
|
+
};
|
|
256
|
+
"training-today-workout-reminder-evening": {
|
|
257
|
+
title: string;
|
|
258
|
+
content: string;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
231
261
|
};
|
|
232
262
|
};
|
|
@@ -232,5 +232,35 @@ exports.enTranslation = {
|
|
|
232
232
|
content: 'The submission limit ({limitReachedCount}) for form "{formTitle}" has been reached',
|
|
233
233
|
},
|
|
234
234
|
},
|
|
235
|
+
[types_1.AbyssService.ABYSS_TRAINING]: {
|
|
236
|
+
[types_1.UserNotificationContentType.TRAINING_INACTIVITY_7_DAYS]: {
|
|
237
|
+
title: 'We miss you!',
|
|
238
|
+
content: "It's been over 7 days since your last workout. Come back!",
|
|
239
|
+
},
|
|
240
|
+
[types_1.UserNotificationContentType.TRAINING_INACTIVITY_5_DAYS]: {
|
|
241
|
+
title: 'Ready to get back?',
|
|
242
|
+
content: "It's been 5-6 days without training. How about a quick session?",
|
|
243
|
+
},
|
|
244
|
+
[types_1.UserNotificationContentType.TRAINING_INACTIVITY_2_DAYS]: {
|
|
245
|
+
title: "Let's get back to it!",
|
|
246
|
+
content: "It's been a few days without training. Keep the momentum going!",
|
|
247
|
+
},
|
|
248
|
+
[types_1.UserNotificationContentType.TRAINING_NEVER_TRAINED]: {
|
|
249
|
+
title: 'Ready to start?',
|
|
250
|
+
content: "You haven't completed your first session yet. Let's go!",
|
|
251
|
+
},
|
|
252
|
+
[types_1.UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_MORNING]: {
|
|
253
|
+
title: "Today's Schedule",
|
|
254
|
+
content: 'You have {scheduledWorkoutsCount} session(s) planned: {workoutName}. Plan your day!',
|
|
255
|
+
},
|
|
256
|
+
[types_1.UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_AFTERNOON]: {
|
|
257
|
+
title: "Don't forget your session",
|
|
258
|
+
content: 'You still have {scheduledWorkoutsCount} session(s) today: {workoutName}. Now is the time!',
|
|
259
|
+
},
|
|
260
|
+
[types_1.UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_EVENING]: {
|
|
261
|
+
title: 'Final stretch',
|
|
262
|
+
content: 'Just a few hours left for your session: {workoutName}. You got this!',
|
|
263
|
+
},
|
|
264
|
+
},
|
|
235
265
|
},
|
|
236
266
|
};
|
|
@@ -228,5 +228,35 @@ export declare const frTranslation: {
|
|
|
228
228
|
content: string;
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
|
+
ABYSS_TRAINING: {
|
|
232
|
+
"training-inactivity-7-days": {
|
|
233
|
+
title: string;
|
|
234
|
+
content: string;
|
|
235
|
+
};
|
|
236
|
+
"training-inactivity-5-days": {
|
|
237
|
+
title: string;
|
|
238
|
+
content: string;
|
|
239
|
+
};
|
|
240
|
+
"training-inactivity-2-days": {
|
|
241
|
+
title: string;
|
|
242
|
+
content: string;
|
|
243
|
+
};
|
|
244
|
+
"training-never-trained": {
|
|
245
|
+
title: string;
|
|
246
|
+
content: string;
|
|
247
|
+
};
|
|
248
|
+
"training-today-workout-reminder-morning": {
|
|
249
|
+
title: string;
|
|
250
|
+
content: string;
|
|
251
|
+
};
|
|
252
|
+
"training-today-workout-reminder-afternoon": {
|
|
253
|
+
title: string;
|
|
254
|
+
content: string;
|
|
255
|
+
};
|
|
256
|
+
"training-today-workout-reminder-evening": {
|
|
257
|
+
title: string;
|
|
258
|
+
content: string;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
231
261
|
};
|
|
232
262
|
};
|
|
@@ -232,5 +232,35 @@ exports.frTranslation = {
|
|
|
232
232
|
content: 'La limite de soumission ({limitReachedCount}) pour le formulaire "{formTitle}" a été atteinte',
|
|
233
233
|
},
|
|
234
234
|
},
|
|
235
|
+
[types_1.AbyssService.ABYSS_TRAINING]: {
|
|
236
|
+
[types_1.UserNotificationContentType.TRAINING_INACTIVITY_7_DAYS]: {
|
|
237
|
+
title: 'Tu nous manques !',
|
|
238
|
+
content: "Cela fait plus de 7 jours que tu ne t'es pas entraîné. Reviens vite !",
|
|
239
|
+
},
|
|
240
|
+
[types_1.UserNotificationContentType.TRAINING_INACTIVITY_5_DAYS]: {
|
|
241
|
+
title: 'Prêt à reprendre ?',
|
|
242
|
+
content: 'Cela fait 5-6 jours sans entraînement. Une petite séance ?',
|
|
243
|
+
},
|
|
244
|
+
[types_1.UserNotificationContentType.TRAINING_INACTIVITY_2_DAYS]: {
|
|
245
|
+
title: 'On reprend ?',
|
|
246
|
+
content: 'Cela fait quelques jours sans entraînement. Garde le rythme !',
|
|
247
|
+
},
|
|
248
|
+
[types_1.UserNotificationContentType.TRAINING_NEVER_TRAINED]: {
|
|
249
|
+
title: 'Prêt à commencer ?',
|
|
250
|
+
content: "Tu n'as pas encore effectué ta première séance. Lance-toi !",
|
|
251
|
+
},
|
|
252
|
+
[types_1.UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_MORNING]: {
|
|
253
|
+
title: 'Programme du jour',
|
|
254
|
+
content: 'Tu as {scheduledWorkoutsCount} séance(s) prévue(s) : {workoutName}. Organise ta journée !',
|
|
255
|
+
},
|
|
256
|
+
[types_1.UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_AFTERNOON]: {
|
|
257
|
+
title: "N'oublie pas ta séance",
|
|
258
|
+
content: "Il te reste {scheduledWorkoutsCount} séance(s) aujourd'hui : {workoutName}. C'est le moment !",
|
|
259
|
+
},
|
|
260
|
+
[types_1.UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_EVENING]: {
|
|
261
|
+
title: 'Dernière ligne droite',
|
|
262
|
+
content: 'Plus que quelques heures pour ta séance : {workoutName}. Tu peux le faire !',
|
|
263
|
+
},
|
|
264
|
+
},
|
|
235
265
|
},
|
|
236
266
|
};
|
|
@@ -6,6 +6,11 @@ export declare enum AbyssApplicationEvent {
|
|
|
6
6
|
MAILING_EMAIL_SEND = "mailing.email.send",
|
|
7
7
|
USER_NOTIFICATION_CREATE = "user.notification.create",
|
|
8
8
|
USER_NOTIFICATION_OPEN = "user.notification.open",
|
|
9
|
+
USER_DEVICE_TOKEN_REGISTER = "user.device-token.register",
|
|
10
|
+
USER_DEVICE_TOKEN_UNREGISTER = "user.device-token.unregister",
|
|
11
|
+
USER_DEVICE_TOKEN_DELETE = "user.device-token.delete",
|
|
12
|
+
USER_PUSH_NOTIFICATION_SEND = "user.push-notification.send",
|
|
13
|
+
USER_PUSH_NOTIFICATION_SEND_BULK = "user.push-notification.send-bulk",
|
|
9
14
|
SERVER_SENT_EVENTS_BOARD_OPEN = "server-sent-events.board.open",
|
|
10
15
|
SERVER_SENT_EVENTS_BOARD_CLOSE = "server-sent-events.board.close",
|
|
11
16
|
SERVER_SENT_EVENTS_BOARD_SEND = "server-sent-events.board.send",
|
|
@@ -10,6 +10,11 @@ var AbyssApplicationEvent;
|
|
|
10
10
|
AbyssApplicationEvent["MAILING_EMAIL_SEND"] = "mailing.email.send";
|
|
11
11
|
AbyssApplicationEvent["USER_NOTIFICATION_CREATE"] = "user.notification.create";
|
|
12
12
|
AbyssApplicationEvent["USER_NOTIFICATION_OPEN"] = "user.notification.open";
|
|
13
|
+
AbyssApplicationEvent["USER_DEVICE_TOKEN_REGISTER"] = "user.device-token.register";
|
|
14
|
+
AbyssApplicationEvent["USER_DEVICE_TOKEN_UNREGISTER"] = "user.device-token.unregister";
|
|
15
|
+
AbyssApplicationEvent["USER_DEVICE_TOKEN_DELETE"] = "user.device-token.delete";
|
|
16
|
+
AbyssApplicationEvent["USER_PUSH_NOTIFICATION_SEND"] = "user.push-notification.send";
|
|
17
|
+
AbyssApplicationEvent["USER_PUSH_NOTIFICATION_SEND_BULK"] = "user.push-notification.send-bulk";
|
|
13
18
|
AbyssApplicationEvent["SERVER_SENT_EVENTS_BOARD_OPEN"] = "server-sent-events.board.open";
|
|
14
19
|
AbyssApplicationEvent["SERVER_SENT_EVENTS_BOARD_CLOSE"] = "server-sent-events.board.close";
|
|
15
20
|
AbyssApplicationEvent["SERVER_SENT_EVENTS_BOARD_SEND"] = "server-sent-events.board.send";
|
|
@@ -51,9 +51,16 @@ export declare enum UserNotificationContentType {
|
|
|
51
51
|
FORM_DAILY_SUBMISSION_LIMIT_REACHED = "form-daily-submission-limit-reached",
|
|
52
52
|
FORM_SUBMISSION_LIMIT_REACHED = "form-submission-limit-reached",
|
|
53
53
|
FORM_WEBHOOK_UNDELIVERABLE = "form-webhook-undeliverable",
|
|
54
|
-
FORM_WEBHOOK_UNDELIVERABLE_DISABLE = "form-webhook-undeliverable-disable"
|
|
54
|
+
FORM_WEBHOOK_UNDELIVERABLE_DISABLE = "form-webhook-undeliverable-disable",
|
|
55
|
+
TRAINING_INACTIVITY_7_DAYS = "training-inactivity-7-days",
|
|
56
|
+
TRAINING_INACTIVITY_5_DAYS = "training-inactivity-5-days",
|
|
57
|
+
TRAINING_INACTIVITY_2_DAYS = "training-inactivity-2-days",
|
|
58
|
+
TRAINING_NEVER_TRAINED = "training-never-trained",
|
|
59
|
+
TRAINING_TODAY_WORKOUT_REMINDER_MORNING = "training-today-workout-reminder-morning",
|
|
60
|
+
TRAINING_TODAY_WORKOUT_REMINDER_AFTERNOON = "training-today-workout-reminder-afternoon",
|
|
61
|
+
TRAINING_TODAY_WORKOUT_REMINDER_EVENING = "training-today-workout-reminder-evening"
|
|
55
62
|
}
|
|
56
|
-
export declare class UserNotificationContentTypeData implements Record<UserNotificationContentType, Record<string, string | null>> {
|
|
63
|
+
export declare class UserNotificationContentTypeData implements Record<UserNotificationContentType, Record<string, string | null | boolean>> {
|
|
57
64
|
[UserNotificationContentType.USER_CREDIT_PURCHASE]: {
|
|
58
65
|
amount: string;
|
|
59
66
|
};
|
|
@@ -392,4 +399,36 @@ export declare class UserNotificationContentTypeData implements Record<UserNotif
|
|
|
392
399
|
formTitle: string;
|
|
393
400
|
limitReachedCount: string;
|
|
394
401
|
};
|
|
402
|
+
[UserNotificationContentType.TRAINING_INACTIVITY_7_DAYS]: {
|
|
403
|
+
daysSinceLastWorkout: string;
|
|
404
|
+
totalCompletedSessions: string;
|
|
405
|
+
firstCompletedAt: string;
|
|
406
|
+
hasActivePrograms: boolean;
|
|
407
|
+
};
|
|
408
|
+
[UserNotificationContentType.TRAINING_INACTIVITY_5_DAYS]: {
|
|
409
|
+
daysSinceLastWorkout: string;
|
|
410
|
+
hasActivePrograms: boolean;
|
|
411
|
+
};
|
|
412
|
+
[UserNotificationContentType.TRAINING_INACTIVITY_2_DAYS]: {
|
|
413
|
+
daysSinceLastWorkout: string;
|
|
414
|
+
hasActivePrograms: boolean;
|
|
415
|
+
};
|
|
416
|
+
[UserNotificationContentType.TRAINING_NEVER_TRAINED]: {
|
|
417
|
+
hasActivePrograms: boolean;
|
|
418
|
+
};
|
|
419
|
+
[UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_MORNING]: {
|
|
420
|
+
programName: string;
|
|
421
|
+
workoutName: string;
|
|
422
|
+
scheduledWorkoutsCount: string;
|
|
423
|
+
};
|
|
424
|
+
[UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_AFTERNOON]: {
|
|
425
|
+
programName: string;
|
|
426
|
+
workoutName: string;
|
|
427
|
+
scheduledWorkoutsCount: string;
|
|
428
|
+
};
|
|
429
|
+
[UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_EVENING]: {
|
|
430
|
+
programName: string;
|
|
431
|
+
workoutName: string;
|
|
432
|
+
scheduledWorkoutsCount: string;
|
|
433
|
+
};
|
|
395
434
|
}
|
|
@@ -56,8 +56,15 @@ var UserNotificationContentType;
|
|
|
56
56
|
UserNotificationContentType["FORM_SUBMISSION_LIMIT_REACHED"] = "form-submission-limit-reached";
|
|
57
57
|
UserNotificationContentType["FORM_WEBHOOK_UNDELIVERABLE"] = "form-webhook-undeliverable";
|
|
58
58
|
UserNotificationContentType["FORM_WEBHOOK_UNDELIVERABLE_DISABLE"] = "form-webhook-undeliverable-disable";
|
|
59
|
+
UserNotificationContentType["TRAINING_INACTIVITY_7_DAYS"] = "training-inactivity-7-days";
|
|
60
|
+
UserNotificationContentType["TRAINING_INACTIVITY_5_DAYS"] = "training-inactivity-5-days";
|
|
61
|
+
UserNotificationContentType["TRAINING_INACTIVITY_2_DAYS"] = "training-inactivity-2-days";
|
|
62
|
+
UserNotificationContentType["TRAINING_NEVER_TRAINED"] = "training-never-trained";
|
|
63
|
+
UserNotificationContentType["TRAINING_TODAY_WORKOUT_REMINDER_MORNING"] = "training-today-workout-reminder-morning";
|
|
64
|
+
UserNotificationContentType["TRAINING_TODAY_WORKOUT_REMINDER_AFTERNOON"] = "training-today-workout-reminder-afternoon";
|
|
65
|
+
UserNotificationContentType["TRAINING_TODAY_WORKOUT_REMINDER_EVENING"] = "training-today-workout-reminder-evening";
|
|
59
66
|
})(UserNotificationContentType || (exports.UserNotificationContentType = UserNotificationContentType = {}));
|
|
60
67
|
class UserNotificationContentTypeData {
|
|
61
68
|
}
|
|
62
69
|
exports.UserNotificationContentTypeData = UserNotificationContentTypeData;
|
|
63
|
-
UserNotificationContentType.USER_CREDIT_PURCHASE, UserNotificationContentType.USER_TICKET_RESPONSE, UserNotificationContentType.INVITE_USER_PROJECT, UserNotificationContentType.PROJECT_SET_OWNERSHIP, UserNotificationContentType.USER_SUBSCRIPTION_NO_FUNDS_AUTO_RENEW_DISABLED, UserNotificationContentType.USER_SUBSCRIPTION_AUTO_RENEW_ENABLED, UserNotificationContentType.USER_SUBSCRIPTION_AUTO_RENEW_DISABLED, UserNotificationContentType.PROJECT_SUBSCRIPTION_NO_FUNDS_AUTO_RENEW_DISABLED, UserNotificationContentType.PROJECT_SUBSCRIPTION_AUTO_RENEW_ENABLED, UserNotificationContentType.PROJECT_SUBSCRIPTION_AUTO_RENEW_DISABLED, UserNotificationContentType.USER_SUBSCRIPTION_EXPIRATION, UserNotificationContentType.PROJECT_SUBSCRIPTION_EXPIRATION, UserNotificationContentType.USER_SUBSCRIPTION_EXPIRATION_WITHOUT_AUTO_RENEW, UserNotificationContentType.PROJECT_SUBSCRIPTION_EXPIRATION_WITHOUT_AUTO_RENEW, UserNotificationContentType.USER_SUBSCRIPTION_RENEW_SUCCESS, UserNotificationContentType.PROJECT_SUBSCRIPTION_RENEW_SUCCESS, UserNotificationContentType.USER_SUBSCRIPTION_AUTO_RENEW_SUCCESS, UserNotificationContentType.PROJECT_SUBSCRIPTION_AUTO_RENEW_SUCCESS, UserNotificationContentType.USER_SUBSCRIPTION_CREATE, UserNotificationContentType.PROJECT_SUBSCRIPTION_CREATE, UserNotificationContentType.USER_SUBSCRIPTION_CREATE_WITHOUT_AUTO_RENEW, UserNotificationContentType.PROJECT_SUBSCRIPTION_CREATE_WITHOUT_AUTO_RENEW, UserNotificationContentType.BOARD_CARD_LATE, UserNotificationContentType.BOARD_CARD_ALMOST_LATE, UserNotificationContentType.CREATE_CLOUD_SHARE, UserNotificationContentType.DELETE_CLOUD_SHARE, UserNotificationContentType.CREATE_CLOUD, UserNotificationContentType.DELETE_CLOUD, UserNotificationContentType.ADMIN_CREATE_CLOUD, UserNotificationContentType.ADMIN_DELETE_CLOUD, UserNotificationContentType.JOIN_CLOUD_SHARE, UserNotificationContentType.DECLINE_CLOUD_SHARE, UserNotificationContentType.LEAVE_CLOUD_SHARE, UserNotificationContentType.WEBHOOK_UNDELIVERABLE, UserNotificationContentType.WEBHOOK_UNDELIVERABLE_DISABLE, UserNotificationContentType.CRON_TASK_FAILED, UserNotificationContentType.CRON_TASK_DISABLED, UserNotificationContentType.MONITOR_WEBHOOK_UNDELIVERABLE, UserNotificationContentType.MONITOR_WEBHOOK_UNDELIVERABLE_DISABLE, UserNotificationContentType.MONITOR_SENTINEL_CHECK_SUCCESS, UserNotificationContentType.MONITOR_SENTINEL_CHECK_FAILED, UserNotificationContentType.MONITOR_SENTINEL_DISABLE_ON_FAILURE, UserNotificationContentType.INVITE_EVENT, UserNotificationContentType.CHANGE_OWNER_EVENT, UserNotificationContentType.CREATE_POLL_EVENT, UserNotificationContentType.BANK_CONNECTION_SUCCESS, UserNotificationContentType.BANK_CONNECTION_EXPIRE, UserNotificationContentType.SPOTLIGHT_PROJECT_NEW_POST, UserNotificationContentType.FORM_SUBMISSION_COMPLETED, UserNotificationContentType.FORM_WEBHOOK_UNDELIVERABLE, UserNotificationContentType.FORM_WEBHOOK_UNDELIVERABLE_DISABLE, UserNotificationContentType.FORM_DAILY_SUBMISSION_LIMIT_REACHED, UserNotificationContentType.FORM_SUBMISSION_LIMIT_REACHED;
|
|
70
|
+
UserNotificationContentType.USER_CREDIT_PURCHASE, UserNotificationContentType.USER_TICKET_RESPONSE, UserNotificationContentType.INVITE_USER_PROJECT, UserNotificationContentType.PROJECT_SET_OWNERSHIP, UserNotificationContentType.USER_SUBSCRIPTION_NO_FUNDS_AUTO_RENEW_DISABLED, UserNotificationContentType.USER_SUBSCRIPTION_AUTO_RENEW_ENABLED, UserNotificationContentType.USER_SUBSCRIPTION_AUTO_RENEW_DISABLED, UserNotificationContentType.PROJECT_SUBSCRIPTION_NO_FUNDS_AUTO_RENEW_DISABLED, UserNotificationContentType.PROJECT_SUBSCRIPTION_AUTO_RENEW_ENABLED, UserNotificationContentType.PROJECT_SUBSCRIPTION_AUTO_RENEW_DISABLED, UserNotificationContentType.USER_SUBSCRIPTION_EXPIRATION, UserNotificationContentType.PROJECT_SUBSCRIPTION_EXPIRATION, UserNotificationContentType.USER_SUBSCRIPTION_EXPIRATION_WITHOUT_AUTO_RENEW, UserNotificationContentType.PROJECT_SUBSCRIPTION_EXPIRATION_WITHOUT_AUTO_RENEW, UserNotificationContentType.USER_SUBSCRIPTION_RENEW_SUCCESS, UserNotificationContentType.PROJECT_SUBSCRIPTION_RENEW_SUCCESS, UserNotificationContentType.USER_SUBSCRIPTION_AUTO_RENEW_SUCCESS, UserNotificationContentType.PROJECT_SUBSCRIPTION_AUTO_RENEW_SUCCESS, UserNotificationContentType.USER_SUBSCRIPTION_CREATE, UserNotificationContentType.PROJECT_SUBSCRIPTION_CREATE, UserNotificationContentType.USER_SUBSCRIPTION_CREATE_WITHOUT_AUTO_RENEW, UserNotificationContentType.PROJECT_SUBSCRIPTION_CREATE_WITHOUT_AUTO_RENEW, UserNotificationContentType.BOARD_CARD_LATE, UserNotificationContentType.BOARD_CARD_ALMOST_LATE, UserNotificationContentType.CREATE_CLOUD_SHARE, UserNotificationContentType.DELETE_CLOUD_SHARE, UserNotificationContentType.CREATE_CLOUD, UserNotificationContentType.DELETE_CLOUD, UserNotificationContentType.ADMIN_CREATE_CLOUD, UserNotificationContentType.ADMIN_DELETE_CLOUD, UserNotificationContentType.JOIN_CLOUD_SHARE, UserNotificationContentType.DECLINE_CLOUD_SHARE, UserNotificationContentType.LEAVE_CLOUD_SHARE, UserNotificationContentType.WEBHOOK_UNDELIVERABLE, UserNotificationContentType.WEBHOOK_UNDELIVERABLE_DISABLE, UserNotificationContentType.CRON_TASK_FAILED, UserNotificationContentType.CRON_TASK_DISABLED, UserNotificationContentType.MONITOR_WEBHOOK_UNDELIVERABLE, UserNotificationContentType.MONITOR_WEBHOOK_UNDELIVERABLE_DISABLE, UserNotificationContentType.MONITOR_SENTINEL_CHECK_SUCCESS, UserNotificationContentType.MONITOR_SENTINEL_CHECK_FAILED, UserNotificationContentType.MONITOR_SENTINEL_DISABLE_ON_FAILURE, UserNotificationContentType.INVITE_EVENT, UserNotificationContentType.CHANGE_OWNER_EVENT, UserNotificationContentType.CREATE_POLL_EVENT, UserNotificationContentType.BANK_CONNECTION_SUCCESS, UserNotificationContentType.BANK_CONNECTION_EXPIRE, UserNotificationContentType.SPOTLIGHT_PROJECT_NEW_POST, UserNotificationContentType.FORM_SUBMISSION_COMPLETED, UserNotificationContentType.FORM_WEBHOOK_UNDELIVERABLE, UserNotificationContentType.FORM_WEBHOOK_UNDELIVERABLE_DISABLE, UserNotificationContentType.FORM_DAILY_SUBMISSION_LIMIT_REACHED, UserNotificationContentType.FORM_SUBMISSION_LIMIT_REACHED, UserNotificationContentType.TRAINING_INACTIVITY_7_DAYS, UserNotificationContentType.TRAINING_INACTIVITY_5_DAYS, UserNotificationContentType.TRAINING_INACTIVITY_2_DAYS, UserNotificationContentType.TRAINING_NEVER_TRAINED, UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_MORNING, UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_AFTERNOON, UserNotificationContentType.TRAINING_TODAY_WORKOUT_REMINDER_EVENING;
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { QueryPaginate } from '..';
|
|
2
2
|
import { AbyssService, UserLanguage } from '../../..';
|
|
3
|
+
export interface AndroidNotificationConfig {
|
|
4
|
+
channelId: string;
|
|
5
|
+
priority?: 'default' | 'min' | 'low' | 'high' | 'max';
|
|
6
|
+
sound?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
tag?: string;
|
|
9
|
+
clickAction?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IosNotificationConfig {
|
|
12
|
+
sound?: string | {
|
|
13
|
+
name: string;
|
|
14
|
+
critical?: boolean;
|
|
15
|
+
volume?: number;
|
|
16
|
+
};
|
|
17
|
+
badge?: number;
|
|
18
|
+
threadId?: string;
|
|
19
|
+
category?: string;
|
|
20
|
+
contentAvailable?: boolean;
|
|
21
|
+
mutableContent?: boolean;
|
|
22
|
+
}
|
|
3
23
|
export interface IGetUserAdminParams {
|
|
4
24
|
userId: string;
|
|
5
25
|
}
|
|
@@ -53,3 +73,25 @@ export interface IGetDetailsUserAdminBody {
|
|
|
53
73
|
export interface IListBoardUserAdminParams {
|
|
54
74
|
userId: string;
|
|
55
75
|
}
|
|
76
|
+
export interface IGetDeviceTokenUserAdminParams {
|
|
77
|
+
deviceTokenId: string;
|
|
78
|
+
}
|
|
79
|
+
export type IPaginateDeviceTokenUserAdminQuery = {
|
|
80
|
+
userId?: string;
|
|
81
|
+
isActive?: boolean;
|
|
82
|
+
} & QueryPaginate;
|
|
83
|
+
export interface IDeleteDeviceTokenUserAdminParams {
|
|
84
|
+
deviceTokenId: string;
|
|
85
|
+
}
|
|
86
|
+
export interface ISendBulkPushNotificationUserAdminBody {
|
|
87
|
+
notifications: {
|
|
88
|
+
userId: string;
|
|
89
|
+
title: string;
|
|
90
|
+
body: string;
|
|
91
|
+
data?: Record<string, string>;
|
|
92
|
+
imageUrl?: string;
|
|
93
|
+
service?: AbyssService;
|
|
94
|
+
android: AndroidNotificationConfig;
|
|
95
|
+
ios?: IosNotificationConfig;
|
|
96
|
+
}[];
|
|
97
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MeasurementSystem, SubscriptionLevel, UserCreditPurchaseCurrency, UserLanguage } from '../../../enum';
|
|
1
|
+
import { MeasurementSystem, SubscriptionLevel, UserCreditPurchaseCurrency, UserLanguage, AbyssService } from '../../../enum';
|
|
2
2
|
import { TokenHistoryMetadataUserInvitation } from '../../models/token-history.model';
|
|
3
3
|
import { UserOnboardingStatus } from '../../models/user.model';
|
|
4
4
|
import { QueryPaginate } from '../type-message/base-paginate';
|
|
@@ -98,3 +98,10 @@ export interface IUnsubscribeNewsletterUserQuery {
|
|
|
98
98
|
export interface ISubscribeNewsletterUserQuery {
|
|
99
99
|
email: string;
|
|
100
100
|
}
|
|
101
|
+
export interface IRegisterDeviceTokenUserBody {
|
|
102
|
+
token: string;
|
|
103
|
+
service: AbyssService;
|
|
104
|
+
}
|
|
105
|
+
export interface IUnregisterDeviceTokenUserBody {
|
|
106
|
+
token: string;
|
|
107
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BasePaginate, IBoard, IResponse, IUser, IUserSetting } from '../..';
|
|
2
|
+
import { IDeviceToken } from '../../models/device-token.model';
|
|
2
3
|
export interface IGetUserAdminData {
|
|
3
4
|
user: IUser;
|
|
4
5
|
}
|
|
@@ -56,3 +57,12 @@ export interface IListBoardUserAdminData {
|
|
|
56
57
|
}[];
|
|
57
58
|
}
|
|
58
59
|
export type IListBoardUserAdminResponse = IResponse<IListBoardUserAdminData>;
|
|
60
|
+
export interface IGetDeviceTokenUserAdminData {
|
|
61
|
+
deviceToken: IDeviceToken;
|
|
62
|
+
}
|
|
63
|
+
export type IGetDeviceTokenUserAdminResponse = IResponse<IGetDeviceTokenUserAdminData>;
|
|
64
|
+
export type IPaginateDeviceTokenUserAdminResponse = IResponse<BasePaginate<IDeviceToken>>;
|
|
65
|
+
export type IDeleteDeviceTokenUserAdminData = Record<string, never>;
|
|
66
|
+
export type IDeleteDeviceTokenUserAdminResponse = IResponse<IDeleteDeviceTokenUserAdminData>;
|
|
67
|
+
export type ISendBulkPushNotificationUserAdminData = Record<string, never>;
|
|
68
|
+
export type ISendBulkPushNotificationUserAdminResponse = IResponse<ISendBulkPushNotificationUserAdminData>;
|
|
@@ -96,3 +96,7 @@ export interface IListBoardUserData {
|
|
|
96
96
|
}[];
|
|
97
97
|
}
|
|
98
98
|
export type IListBoardUserResponse = IResponse<IListBoardUserData>;
|
|
99
|
+
export type IRegisterDeviceTokenUserData = Record<string, never>;
|
|
100
|
+
export type IRegisterDeviceTokenUserResponse = IResponse<IRegisterDeviceTokenUserData>;
|
|
101
|
+
export type IUnregisterDeviceTokenUserData = Record<string, never>;
|
|
102
|
+
export type IUnregisterDeviceTokenUserResponse = IResponse<IUnregisterDeviceTokenUserData>;
|
|
@@ -13,6 +13,7 @@ export * from './models/user-ticket-message.model';
|
|
|
13
13
|
export * from './models/user-ticket-message-attachment.model';
|
|
14
14
|
export * from './models/oauth-account.model';
|
|
15
15
|
export * from './models/token-history.model';
|
|
16
|
+
export * from './models/device-token.model';
|
|
16
17
|
export * from './models/newsletter-member.model';
|
|
17
18
|
export * from './models/newsletter-history.model';
|
|
18
19
|
export * from './models/gift-code.model';
|
|
@@ -29,6 +29,7 @@ __exportStar(require("./models/user-ticket-message.model"), exports);
|
|
|
29
29
|
__exportStar(require("./models/user-ticket-message-attachment.model"), exports);
|
|
30
30
|
__exportStar(require("./models/oauth-account.model"), exports);
|
|
31
31
|
__exportStar(require("./models/token-history.model"), exports);
|
|
32
|
+
__exportStar(require("./models/device-token.model"), exports);
|
|
32
33
|
__exportStar(require("./models/newsletter-member.model"), exports);
|
|
33
34
|
__exportStar(require("./models/newsletter-history.model"), exports);
|
|
34
35
|
__exportStar(require("./models/gift-code.model"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IUser } from '..';
|
|
2
|
+
import { AbyssService } from '../../enum/abyss-service.enum';
|
|
3
|
+
export interface IDeviceToken {
|
|
4
|
+
id?: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
token: string;
|
|
7
|
+
service: AbyssService;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
user?: IUser;
|
|
12
|
+
}
|
|
@@ -5,7 +5,7 @@ export interface IUserNotification {
|
|
|
5
5
|
service: AbyssService;
|
|
6
6
|
type: UserNotificationType;
|
|
7
7
|
contentType: UserNotificationContentType;
|
|
8
|
-
data: Record<string, string | null>;
|
|
8
|
+
data: Record<string, string | null | boolean>;
|
|
9
9
|
openedAt: Date | null;
|
|
10
10
|
userId: string | null;
|
|
11
11
|
updatedAt?: Date;
|