playov2-js-utilities 0.3.70 → 0.3.74
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/README.md +28 -28
- package/index.js +4 -4
- package/lib/constants.js +20 -20
- package/lib/cron.js +43 -43
- package/lib/db/models/user.js +112 -0
- package/lib/db/mongo.js +3 -0
- package/lib/db_interface/mongo/index.js +5 -5
- package/lib/db_interface/mongo/schemas/activitySchemas/_activityIndex.js +10 -10
- package/lib/db_interface/mongo/schemas/activitySchemas/activityInsurance.js +17 -17
- package/lib/db_interface/mongo/schemas/activitySchemas/activityLocation.js +104 -104
- package/lib/db_interface/mongo/schemas/activitySchemas/activityQueryBlock.js +11 -11
- package/lib/db_interface/mongo/schemas/activitySchemas/activityView.js +13 -13
- package/lib/db_interface/mongo/schemas/activitySchemas/cronJobLog.js +12 -12
- package/lib/db_interface/mongo/schemas/activitySchemas/playogame.request.js +37 -37
- package/lib/db_interface/mongo/schemas/activitySchemas/scheduled.tasks.js +52 -52
- package/lib/db_interface/mongo/schemas/activitySchemas/userActivity.js +133 -133
- package/lib/db_interface/mongo/schemas/gamebookSchemas/_gamebookIndex.js +2 -2
- package/lib/db_interface/mongo/schemas/gamebookSchemas/activityNotes.js +19 -19
- package/lib/db_interface/mongo/schemas/gamebookSchemas/expense.js +36 -36
- package/lib/db_interface/mongo/schemas/gamebookSchemas/expenseLogs.js +13 -13
- package/lib/db_interface/mongo/schemas/gamebookSchemas/message.requests.js +29 -29
- package/lib/db_interface/mongo/schemas/gamebookSchemas/nonPlayoExpenseUsers.js +14 -14
- package/lib/db_interface/mongo/schemas/gamebookSchemas/playpals.js +69 -69
- package/lib/db_interface/mongo/schemas/gamebookSchemas/postActivity.js +51 -51
- package/lib/db_interface/mongo/schemas/gamebookSchemas/tags.js +12 -12
- package/lib/db_interface/mongo/schemas/userSchemas/QuickActions.js +25 -25
- package/lib/db_interface/mongo/schemas/userSchemas/_userIndex.js +7 -7
- package/lib/db_interface/mongo/schemas/userSchemas/blockedUser.js +11 -11
- package/lib/db_interface/mongo/schemas/userSchemas/city.js +62 -62
- package/lib/db_interface/mongo/schemas/userSchemas/country.js +63 -63
- package/lib/db_interface/mongo/schemas/userSchemas/emailOtp.js +12 -12
- package/lib/db_interface/mongo/schemas/userSchemas/emailVerificationToken.js +11 -11
- package/lib/db_interface/mongo/schemas/userSchemas/gt.trial.games.js +24 -24
- package/lib/db_interface/mongo/schemas/userSchemas/invite.js +14 -14
- package/lib/db_interface/mongo/schemas/userSchemas/karmaConfig.js +11 -11
- package/lib/db_interface/mongo/schemas/userSchemas/karmaLog.js +28 -28
- package/lib/db_interface/mongo/schemas/userSchemas/passwordResetToken.js +11 -11
- package/lib/db_interface/mongo/schemas/userSchemas/playo.subscription.pack.js +67 -67
- package/lib/db_interface/mongo/schemas/userSchemas/rankings.js +16 -16
- package/lib/db_interface/mongo/schemas/userSchemas/sports.js +26 -26
- package/lib/db_interface/mongo/schemas/userSchemas/sportsCategory.js +11 -11
- package/lib/db_interface/mongo/schemas/userSchemas/tempUser.js +35 -35
- package/lib/db_interface/mongo/schemas/userSchemas/trendingSports.js +14 -14
- package/lib/db_interface/mongo/schemas/userSchemas/user.activity.health.kit.data.js +26 -26
- package/lib/db_interface/mongo/schemas/userSchemas/user.contacts.js +33 -33
- package/lib/db_interface/mongo/schemas/userSchemas/user.js +111 -111
- package/lib/db_interface/mongo/schemas/userSchemas/userAlerts.js +23 -23
- package/lib/db_interface/mongo/schemas/userSchemas/userCredentials.js +50 -50
- package/lib/db_interface/mongo/schemas/userSchemas/userFavourites.js +81 -81
- package/lib/db_interface/mongo/schemas/userSchemas/userOtp.js +9 -9
- package/lib/db_interface/mongo/schemas/userSchemas/userReputation.js +21 -21
- package/lib/db_interface/mongo/schemas/userSchemas/userSocial.js +17 -17
- package/lib/db_interface/mongo/schemas/userSchemas/year.in.playo.js +51 -51
- package/lib/db_interface/mongo/schemas/venueSchemas/_venueIndex.js +3 -3
- package/lib/db_interface/mongo/schemas/venueSchemas/ameneties.js +9 -9
- package/lib/db_interface/mongo/schemas/venueSchemas/cityArea.js +45 -45
- package/lib/db_interface/mongo/schemas/venueSchemas/clubConstraints.js +17 -17
- package/lib/db_interface/mongo/schemas/venueSchemas/corporateOffer.js +17 -17
- package/lib/db_interface/mongo/schemas/venueSchemas/couponOffers.js +39 -39
- package/lib/db_interface/mongo/schemas/venueSchemas/gamebagMember.js +11 -11
- package/lib/db_interface/mongo/schemas/venueSchemas/offer.js +48 -48
- package/lib/db_interface/mongo/schemas/venueSchemas/thirdParty.js +12 -12
- package/lib/db_interface/mongo/schemas/venueSchemas/venue.js +136 -134
- package/lib/db_interface/mongo/schemas/venueSchemas/venueEnquires.js +22 -22
- package/lib/db_interface/mongo/schemas/venueSchemas/venueMembers.js +14 -14
- package/lib/db_interface/mongo/schemas/venueSchemas/venueRating.js +18 -18
- package/lib/index.js +22 -23
- package/lib/logger.js +115 -115
- package/lib/message_publisher/index.js +144 -144
- package/lib/middleware.js +46 -46
- package/lib/notification-templates.js +254 -254
- package/lib/notification.config.js +476 -476
- package/lib/playo.utils/playo.error.handler.js +23 -23
- package/lib/playo.utils/playo.http.handler.js +162 -162
- package/lib/playo.utils/playo.res.generator.js +58 -58
- package/lib/profanityFilter/profanityFilter.js +15 -16
- package/lib/profanityFilter/profanityWords.js +2 -2
- package/lib/ratings/index.js +95 -95
- package/lib/request.js +135 -135
- package/lib/responseHandler/responseHandler.js +52 -52
- package/lib/util.js +151 -151
- package/package.json +36 -36
|
@@ -1,477 +1,477 @@
|
|
|
1
|
-
|
|
2
|
-
//\-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- Private -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\//
|
|
3
|
-
// These categories correspond to notification preferences of the user
|
|
4
|
-
const notificationCategories = {
|
|
5
|
-
GROUP: 'group', // group updates
|
|
6
|
-
ACTIVITY: 'activity', // activity updates
|
|
7
|
-
KARMA: 'karma', //na
|
|
8
|
-
SPLIT_PAYMENTS: 'split_payments', //na
|
|
9
|
-
OFFERS: 'offers',
|
|
10
|
-
PLAYPAL_ACTIVITY: 'playpal-activity', // activity_suggestion_from_playpals
|
|
11
|
-
// MESSAGE: 'playomessages' //na
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// Android notification channels will be bound to categories
|
|
15
|
-
const notificationChannels = {
|
|
16
|
-
'karma': '8a9c67b9-1cdc-46a2-bb90-6f00f0e848eb', // done - 1 notification tagged
|
|
17
|
-
'activity_query': '99863ba1-88ba-44f6-b8b3-6df51d97ae03', // done - 2 notifications tagged
|
|
18
|
-
'activity_player_in_out': '5e6c5f64-1413-46ed-829d-763a3b7cab22',
|
|
19
|
-
'activity_updates': '14d7a740-2da3-4bb5-888f-80ed487d6567',// done - 8 notifications tagged
|
|
20
|
-
'activity_post_game': '23131b6a-2cf0-4a34-bc78-dd6f8676e319', // done - 1 notification tagged
|
|
21
|
-
'activity_suggestions': '3ab98c37-b93c-4d39-ab55-bb2cc6279cb8', // done - 1 notifications tagged
|
|
22
|
-
'expenses': '1eb30f33-2b3b-40ce-8798-fce55c1275e2', // done - 6 notifications tagged
|
|
23
|
-
'groups_manage_requests': '83c024d1-2cb7-47fa-989d-1d8ef343a51c', // done - 6 notifications tagged
|
|
24
|
-
'group_updates': '9e023a20-deab-4bc4-bd33-08a8d9316322', // done - 3 notifications tagged
|
|
25
|
-
'activity_reminders': '53c55399-a73c-4800-b824-3c750ac57b98'
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// ------------------------------------------ Exported (public) -----------------------------------------//
|
|
29
|
-
|
|
30
|
-
const notificationIds = {
|
|
31
|
-
ACTIVITY_NOTIFY_PUSH: 'activity-notify-push', // > DEPRECATED
|
|
32
|
-
ACTIVITY_NOTIFY_DRAWER: 'activity-notify-drawer', // > DEPRECATED
|
|
33
|
-
ACTIVITY_NOTIFY: 'activity-notify',
|
|
34
|
-
GROUP_INVITATION: 'group-invitation',
|
|
35
|
-
GROUP_INVITATION_RESPONSE: 'group-invitation-response',
|
|
36
|
-
GROUP_INVITATION_RESPONSE_PUSH: 'group-invitation-response-push', // > DEPRECATED
|
|
37
|
-
GROUP_INVITATION_RESPONSE_DRAWER: 'group-invitation-response-drawer', // > DEPRECATED
|
|
38
|
-
GROUP_REQUEST_PUSH: 'group-request-push', // > DEPRECATED
|
|
39
|
-
GROUP_REQUEST_DRAWER: 'group-request-drawer', // > DEPRECATED
|
|
40
|
-
GROUP_REQUEST: 'group-request',
|
|
41
|
-
GROUP_REQUEST_RESPONSE: 'group-request-response',
|
|
42
|
-
GROUP_NAME: 'group-name',
|
|
43
|
-
GROUP_NAME_PUSH: 'group-name-push', // > DEPRECATED
|
|
44
|
-
GROUP_NAME_DRAWER: 'group-name-drawer', // > DEPRECATED
|
|
45
|
-
ADMIN_STATUS: 'admin-status',
|
|
46
|
-
ADMIN_STATUS_PUSH: 'admin-status-push', // > DEPRECATED
|
|
47
|
-
ADMIN_STATUS_DRAWER: 'admin-status-drawer',// > DEPRECATED
|
|
48
|
-
NEW_MESSAGE_PUSH: 'new-message-push', // > DEPRECATED
|
|
49
|
-
NEW_MESSAGE_DRAWER: 'new-message-drawer', // > DEPRECATED
|
|
50
|
-
NEW_MESSAGE: 'new-message',
|
|
51
|
-
NEW_COMMENT_PUSH: 'new-comment-push', // > DEPRECATED
|
|
52
|
-
NEW_COMMENT_DRAWER: 'new-comment-drawer', // > DEPRECATED
|
|
53
|
-
NEW_COMMENT: 'new-comment',
|
|
54
|
-
ACTIVITY_INVITATION: 'activity-invitation',
|
|
55
|
-
ACTIVITY_INVITATION_RESPONSE: 'activity-invitation-response',
|
|
56
|
-
ACTIVITY_REQUEST: 'activity-request', // deprecated - use ACTIVITY_REQUEST_MANAGE
|
|
57
|
-
ACTIVITY_REQUEST_RESPONSE: 'activity-request-response',
|
|
58
|
-
HOST_RETIRED: 'host-retired',
|
|
59
|
-
JOINEE_RETIRED: 'joinee-retired',
|
|
60
|
-
EDIT_ACTIVITY: 'edit-activity',
|
|
61
|
-
ACTIVITY_FULL: 'activity-full',
|
|
62
|
-
VENUE_TAGGED: 'venue-tagged',
|
|
63
|
-
VENUE_BOOKED: 'venue-booked',
|
|
64
|
-
BOOKING_CANCELLED: 'booking-cancelled',
|
|
65
|
-
COHOST_ADDED: 'cohost-added',
|
|
66
|
-
COHOST_DELETED: 'cohost-deleted',
|
|
67
|
-
ACTIVITY_QUERY: 'activity-query',
|
|
68
|
-
ACTIVITY_CANCEL: 'activity-cancel',
|
|
69
|
-
ACTIVITY_HOSTED: 'activity-hosted',
|
|
70
|
-
ACTIVITY_REQUEST_MANAGE: 'activity-request-manage',
|
|
71
|
-
ACTIVITY_JOINED: 'activity-joined',
|
|
72
|
-
MATCH_RATING: 'match-rating',
|
|
73
|
-
BOOKING_RECEIPT: 'booking-receipt',
|
|
74
|
-
LOUNGE_QUESTION_SUGGEST: 'lounge-question-suggest',
|
|
75
|
-
LOUNGE_ANSWER: 'lounge-answer',
|
|
76
|
-
LOUNGE_COMMENT: 'lounge-comment',
|
|
77
|
-
LOUNGE_QUESTION_APPROVED: 'lounge-question-approved',
|
|
78
|
-
SPLIT_MARK_PAID: 'split-mark-paid',
|
|
79
|
-
SPLIT_REVERT_SETTLEMENT: 'split-revert-settlement',
|
|
80
|
-
SPLIT_EXPENSE_COMMENT: 'split-expense-comment',
|
|
81
|
-
SPLIT_EXPENSE_ADDED: 'split-expense-added',
|
|
82
|
-
SPLIT_EXPENSE_EDITED: 'split-expense-edited',
|
|
83
|
-
SPLIT_EXPENSE_DELETED: 'split-expense-deleted',
|
|
84
|
-
HOST_ACTIVITY_PAYOUT: 'host-activity-payout',
|
|
85
|
-
KARMA_CASHBACK: 'karma-cashback',
|
|
86
|
-
ACTIVITY_QUERY_ANSWERED: 'activity-query-answered',
|
|
87
|
-
ACTIVITY_REMINDER: 'activity-reminder',
|
|
88
|
-
MESSAGE_REQUEST: 'message-request',
|
|
89
|
-
USER_GOALS: 'user_goals'
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// TODO - Check targets against current value
|
|
93
|
-
|
|
94
|
-
const config = {
|
|
95
|
-
[notificationIds.ACTIVITY_NOTIFY]: {
|
|
96
|
-
category: notificationCategories.GROUP,
|
|
97
|
-
target: "group",
|
|
98
|
-
path: "timeline",
|
|
99
|
-
title: "Group Update",
|
|
100
|
-
type: ["drawer", "push"],
|
|
101
|
-
buttons: [],
|
|
102
|
-
android_channel_id: notificationChannels.activity_suggestions
|
|
103
|
-
},
|
|
104
|
-
[notificationIds.GROUP_INVITATION]: {
|
|
105
|
-
category: notificationCategories.GROUP,
|
|
106
|
-
target: "group",
|
|
107
|
-
path: "manage",
|
|
108
|
-
title: "Group Invitation",
|
|
109
|
-
type: ["push", "drawer"],
|
|
110
|
-
buttons: [],
|
|
111
|
-
android_channel_id: notificationChannels.groups_manage_requests
|
|
112
|
-
},
|
|
113
|
-
[notificationIds.GROUP_INVITATION_RESPONSE]: {
|
|
114
|
-
category: notificationCategories.GROUP,
|
|
115
|
-
target: "group",
|
|
116
|
-
path: "manage",
|
|
117
|
-
title: "Group Update",
|
|
118
|
-
type: ["push", "drawer"],
|
|
119
|
-
buttons: [],
|
|
120
|
-
android_channel_id: notificationChannels.groups_manage_requests
|
|
121
|
-
},
|
|
122
|
-
[notificationIds.GROUP_REQUEST]: {
|
|
123
|
-
category: notificationCategories.GROUP,
|
|
124
|
-
target: "group",
|
|
125
|
-
path: "manage",
|
|
126
|
-
title: "Group Update",
|
|
127
|
-
type: ["push", "drawer"],
|
|
128
|
-
buttons: [],
|
|
129
|
-
android_channel_id: notificationChannels.groups_manage_requests
|
|
130
|
-
},
|
|
131
|
-
[notificationIds.GROUP_REQUEST_RESPONSE]: {
|
|
132
|
-
category: notificationCategories.GROUP,
|
|
133
|
-
target: "group",
|
|
134
|
-
path: "manage",
|
|
135
|
-
title: "Group Update",
|
|
136
|
-
type: ["push", "drawer"],
|
|
137
|
-
buttons: [],
|
|
138
|
-
android_channel_id: notificationChannels.groups_manage_requests
|
|
139
|
-
},
|
|
140
|
-
[notificationIds.GROUP_NAME]: {
|
|
141
|
-
category: notificationCategories.GROUP,
|
|
142
|
-
target: "group",
|
|
143
|
-
path: "manage",
|
|
144
|
-
title: "Group Update",
|
|
145
|
-
type: ["push", "drawer"],
|
|
146
|
-
buttons: [],
|
|
147
|
-
android_channel_id: notificationChannels.group_updates
|
|
148
|
-
},
|
|
149
|
-
[notificationIds.ADMIN_STATUS]: {
|
|
150
|
-
category: notificationCategories.GROUP,
|
|
151
|
-
target: "group",
|
|
152
|
-
path: "manage",
|
|
153
|
-
title: "Group Update",
|
|
154
|
-
type: ["drawer", "push"],
|
|
155
|
-
buttons: [],
|
|
156
|
-
android_channel_id: notificationChannels.group_updates
|
|
157
|
-
},
|
|
158
|
-
[notificationIds.NEW_MESSAGE]: {
|
|
159
|
-
category: notificationCategories.GROUP,
|
|
160
|
-
target: "group",
|
|
161
|
-
path: "board",
|
|
162
|
-
title: "Group Update",
|
|
163
|
-
type: ["push", "drawer"],
|
|
164
|
-
buttons: [],
|
|
165
|
-
android_channel_id: notificationChannels.group_updates
|
|
166
|
-
},
|
|
167
|
-
[notificationIds.NEW_COMMENT]: {
|
|
168
|
-
category: notificationCategories.GROUP,
|
|
169
|
-
target: "group",
|
|
170
|
-
path: "board",
|
|
171
|
-
title: "Group Update",
|
|
172
|
-
type: ["drawer", "push"],
|
|
173
|
-
buttons: [],
|
|
174
|
-
android_channel_id: notificationChannels.group_updates
|
|
175
|
-
},
|
|
176
|
-
[notificationIds.ACTIVITY_INVITATION]: {
|
|
177
|
-
category: notificationCategories.ACTIVITY,
|
|
178
|
-
target: "match",
|
|
179
|
-
title: "You've been invited to a game! 📩",
|
|
180
|
-
type: ["push", "drawer"],
|
|
181
|
-
buttons: [],
|
|
182
|
-
android_channel_id: notificationChannels.activity_player_in_out
|
|
183
|
-
},
|
|
184
|
-
[notificationIds.ACTIVITY_INVITATION_RESPONSE]: {
|
|
185
|
-
category: notificationCategories.ACTIVITY,
|
|
186
|
-
target: "match",
|
|
187
|
-
path: "manage",
|
|
188
|
-
title: "Activity Update",
|
|
189
|
-
type: ["push", "drawer"],
|
|
190
|
-
buttons: [],
|
|
191
|
-
android_channel_id: notificationChannels.activity_player_in_out
|
|
192
|
-
},
|
|
193
|
-
[notificationIds.ACTIVITY_REQUEST]: {
|
|
194
|
-
category: notificationCategories.ACTIVITY,
|
|
195
|
-
target: "match",
|
|
196
|
-
title: "Activity Update",
|
|
197
|
-
type: ["push", "drawer"],
|
|
198
|
-
buttons: [],
|
|
199
|
-
android_channel_id: notificationChannels.activity_player_in_out
|
|
200
|
-
},
|
|
201
|
-
[notificationIds.ACTIVITY_REQUEST_RESPONSE]: {
|
|
202
|
-
category: notificationCategories.ACTIVITY,
|
|
203
|
-
target: "match",
|
|
204
|
-
title: "Activity Update",
|
|
205
|
-
type: ["push", "drawer"],
|
|
206
|
-
buttons: [],
|
|
207
|
-
android_channel_id: notificationChannels.activity_player_in_out
|
|
208
|
-
},
|
|
209
|
-
[notificationIds.HOST_RETIRED]: {
|
|
210
|
-
category: notificationCategories.ACTIVITY,
|
|
211
|
-
target: "match",
|
|
212
|
-
path: "manage",
|
|
213
|
-
title: "Activity Update",
|
|
214
|
-
type: ["push", "drawer"],
|
|
215
|
-
buttons: [],
|
|
216
|
-
android_channel_id: notificationChannels.activity_player_in_out
|
|
217
|
-
},
|
|
218
|
-
[notificationIds.JOINEE_RETIRED]: {
|
|
219
|
-
category: notificationCategories.ACTIVITY,
|
|
220
|
-
target: "match",
|
|
221
|
-
title: "Activity Update",
|
|
222
|
-
type: ["push", "drawer"],
|
|
223
|
-
buttons: [],
|
|
224
|
-
android_channel_id: notificationChannels.activity_player_in_out
|
|
225
|
-
},
|
|
226
|
-
[notificationIds.EDIT_ACTIVITY]: {
|
|
227
|
-
category: notificationCategories.ACTIVITY,
|
|
228
|
-
target: "match",
|
|
229
|
-
title: "Activity Update",
|
|
230
|
-
type: ["push", "drawer"],
|
|
231
|
-
buttons: [],
|
|
232
|
-
android_channel_id: notificationChannels.activity_updates
|
|
233
|
-
},
|
|
234
|
-
[notificationIds.ACTIVITY_FULL]: {
|
|
235
|
-
category: notificationCategories.ACTIVITY,
|
|
236
|
-
target: "match",
|
|
237
|
-
path: "manage",
|
|
238
|
-
title: "Activity Update",
|
|
239
|
-
type: ["push", "drawer"],
|
|
240
|
-
buttons: [],
|
|
241
|
-
android_channel_id: notificationChannels.activity_updates
|
|
242
|
-
},
|
|
243
|
-
[notificationIds.VENUE_TAGGED]: {
|
|
244
|
-
category: notificationCategories.ACTIVITY,
|
|
245
|
-
target: "match",
|
|
246
|
-
title: "Activity Update",
|
|
247
|
-
type: ["push", "drawer"],
|
|
248
|
-
buttons: [],
|
|
249
|
-
android_channel_id: notificationChannels.activity_updates
|
|
250
|
-
},
|
|
251
|
-
[notificationIds.VENUE_BOOKED]: {
|
|
252
|
-
category: notificationCategories.ACTIVITY,
|
|
253
|
-
target: "match",
|
|
254
|
-
title: "Activity Update",
|
|
255
|
-
type: ["push", "drawer"],
|
|
256
|
-
buttons: [],
|
|
257
|
-
android_channel_id: notificationChannels.activity_updates
|
|
258
|
-
},
|
|
259
|
-
[notificationIds.BOOKING_CANCELLED]: {
|
|
260
|
-
category: notificationCategories.ACTIVITY,
|
|
261
|
-
target: "match",
|
|
262
|
-
title: "Activity Update",
|
|
263
|
-
type: ["push", "drawer"],
|
|
264
|
-
buttons: [],
|
|
265
|
-
android_channel_id: notificationChannels.activity_updates
|
|
266
|
-
},
|
|
267
|
-
[notificationIds.COHOST_ADDED]: {
|
|
268
|
-
category: notificationCategories.ACTIVITY,
|
|
269
|
-
target: "match",
|
|
270
|
-
title: "Activity Update",
|
|
271
|
-
type: ["push", "drawer"],
|
|
272
|
-
buttons: [],
|
|
273
|
-
android_channel_id: notificationChannels.activity_updates
|
|
274
|
-
},
|
|
275
|
-
[notificationIds.COHOST_DELETED]: {
|
|
276
|
-
category: notificationCategories.ACTIVITY,
|
|
277
|
-
target: "match",
|
|
278
|
-
title: "Activity Update",
|
|
279
|
-
type: ["push", "drawer"],
|
|
280
|
-
buttons: [],
|
|
281
|
-
android_channel_id: notificationChannels.activity_updates
|
|
282
|
-
},
|
|
283
|
-
[notificationIds.ACTIVITY_QUERY]: {
|
|
284
|
-
category: notificationCategories.ACTIVITY,
|
|
285
|
-
target: "match",
|
|
286
|
-
title: "Activity Update",
|
|
287
|
-
type: ["push", "drawer"],
|
|
288
|
-
buttons: [],
|
|
289
|
-
android_channel_id: notificationChannels.activity_query
|
|
290
|
-
},
|
|
291
|
-
[notificationIds.ACTIVITY_CANCEL]: {
|
|
292
|
-
category: notificationCategories.ACTIVITY,
|
|
293
|
-
target: "match",
|
|
294
|
-
title: "Activity Update",
|
|
295
|
-
type: ["push", "drawer"],
|
|
296
|
-
buttons: [],
|
|
297
|
-
android_channel_id: notificationChannels.activity_updates
|
|
298
|
-
},
|
|
299
|
-
[notificationIds.ACTIVITY_HOSTED]: {
|
|
300
|
-
category: notificationCategories.PLAYPAL_ACTIVITY,
|
|
301
|
-
target: "match",
|
|
302
|
-
title: "Activity Update",
|
|
303
|
-
type: ["push", "drawer"],
|
|
304
|
-
buttons: [],
|
|
305
|
-
android_channel_id: notificationChannels.activity_suggestions
|
|
306
|
-
},
|
|
307
|
-
[notificationIds.ACTIVITY_REQUEST_MANAGE]: {
|
|
308
|
-
category: notificationCategories.ACTIVITY,
|
|
309
|
-
target: "match",
|
|
310
|
-
path: "manage",
|
|
311
|
-
title: "Activity Update",
|
|
312
|
-
type: ["push", "drawer"],
|
|
313
|
-
buttons: [],
|
|
314
|
-
android_channel_id: notificationChannels.activity_player_in_out
|
|
315
|
-
},
|
|
316
|
-
[notificationIds.ACTIVITY_JOINED]: {
|
|
317
|
-
category: notificationCategories.ACTIVITY,
|
|
318
|
-
target: "match",
|
|
319
|
-
title: "Activity Update",
|
|
320
|
-
type: ["push", "drawer"],
|
|
321
|
-
buttons: [],
|
|
322
|
-
android_channel_id: notificationChannels.activity_player_in_out
|
|
323
|
-
},
|
|
324
|
-
[notificationIds.MATCH_RATING]: {
|
|
325
|
-
category: notificationCategories.ACTIVITY,
|
|
326
|
-
target: "match",
|
|
327
|
-
path: "gamebook",
|
|
328
|
-
title: "Rate Activity",
|
|
329
|
-
type: ["push", "drawer"],
|
|
330
|
-
buttons: [],
|
|
331
|
-
android_channel_id: notificationChannels.activity_post_game
|
|
332
|
-
},
|
|
333
|
-
[notificationIds.BOOKING_RECEIPT]: {
|
|
334
|
-
category: notificationCategories.ACTIVITY,
|
|
335
|
-
target: "booking",
|
|
336
|
-
title: "Booking Update",
|
|
337
|
-
type: ["push", "drawer"],
|
|
338
|
-
buttons: [],
|
|
339
|
-
android_channel_id: ''
|
|
340
|
-
},
|
|
341
|
-
[notificationIds.LOUNGE_QUESTION_SUGGEST]: {
|
|
342
|
-
category: "lounge",
|
|
343
|
-
target: "lounge/question",
|
|
344
|
-
title: "Community Update",
|
|
345
|
-
type: ["push"],
|
|
346
|
-
buttons: [],
|
|
347
|
-
android_channel_id: ''
|
|
348
|
-
},
|
|
349
|
-
[notificationIds.LOUNGE_ANSWER]: {
|
|
350
|
-
category: "lounge",
|
|
351
|
-
target: "lounge/answer",
|
|
352
|
-
title: "Community Update",
|
|
353
|
-
type: ["push", "drawer"],
|
|
354
|
-
buttons: [],
|
|
355
|
-
android_channel_id: ''
|
|
356
|
-
},
|
|
357
|
-
[notificationIds.LOUNGE_COMMENT]: {
|
|
358
|
-
category: "lounge",
|
|
359
|
-
target: "lounge/answer",
|
|
360
|
-
title: "Community Update",
|
|
361
|
-
type: ["push", "drawer"],
|
|
362
|
-
buttons: [],
|
|
363
|
-
android_channel_id: ''
|
|
364
|
-
},
|
|
365
|
-
[notificationIds.LOUNGE_QUESTION_APPROVED]: {
|
|
366
|
-
category: "lounge",
|
|
367
|
-
target: "lounge/question",
|
|
368
|
-
title: "Community Update",
|
|
369
|
-
type: ["push", "drawer"],
|
|
370
|
-
buttons: [],
|
|
371
|
-
android_channel_id: ''
|
|
372
|
-
},
|
|
373
|
-
[notificationIds.SPLIT_MARK_PAID]: {
|
|
374
|
-
category: notificationCategories.ACTIVITY,
|
|
375
|
-
target: "activity/logs",
|
|
376
|
-
title: "Expense Update",
|
|
377
|
-
type: ["push", "drawer"],
|
|
378
|
-
buttons: [],
|
|
379
|
-
android_channel_id: notificationChannels.expenses
|
|
380
|
-
},
|
|
381
|
-
[notificationIds.SPLIT_REVERT_SETTLEMENT]: {
|
|
382
|
-
category: notificationCategories.ACTIVITY,
|
|
383
|
-
target: "activity/logs",
|
|
384
|
-
title: "Expense Update",
|
|
385
|
-
type: ["push", "drawer"],
|
|
386
|
-
buttons: [],
|
|
387
|
-
android_channel_id: notificationChannels.expenses
|
|
388
|
-
},
|
|
389
|
-
[notificationIds.SPLIT_EXPENSE_COMMENT]: {
|
|
390
|
-
category: notificationCategories.ACTIVITY,
|
|
391
|
-
target: "activity/expenses/comments",
|
|
392
|
-
title: "Expense Update",
|
|
393
|
-
type: ["push", "drawer"],
|
|
394
|
-
buttons: [],
|
|
395
|
-
android_channel_id: notificationChannels.expenses
|
|
396
|
-
},
|
|
397
|
-
[notificationIds.SPLIT_EXPENSE_ADDED]: {
|
|
398
|
-
category: notificationCategories.ACTIVITY,
|
|
399
|
-
target: "activity/expenses",
|
|
400
|
-
title: "Expense Update",
|
|
401
|
-
type: ["push", "drawer"],
|
|
402
|
-
buttons: [],
|
|
403
|
-
android_channel_id: notificationChannels.expenses
|
|
404
|
-
},
|
|
405
|
-
[notificationIds.SPLIT_EXPENSE_EDITED]: {
|
|
406
|
-
category: notificationCategories.ACTIVITY,
|
|
407
|
-
target: "activity/expenses",
|
|
408
|
-
title: "Expense Update",
|
|
409
|
-
type: ["push", "drawer"],
|
|
410
|
-
buttons: [],
|
|
411
|
-
android_channel_id: notificationChannels.expenses
|
|
412
|
-
},
|
|
413
|
-
[notificationIds.SPLIT_EXPENSE_DELETED]: {
|
|
414
|
-
category: notificationCategories.ACTIVITY,
|
|
415
|
-
target: "activity/logs",
|
|
416
|
-
title: "Expense Update",
|
|
417
|
-
type: ["push", "drawer"],
|
|
418
|
-
buttons: [],
|
|
419
|
-
android_channel_id: notificationChannels.expenses
|
|
420
|
-
},
|
|
421
|
-
[notificationIds.HOST_ACTIVITY_PAYOUT]: {
|
|
422
|
-
category: notificationCategories.ACTIVITY,
|
|
423
|
-
target: "passbook/0",
|
|
424
|
-
title: "Activity Update",
|
|
425
|
-
type: ["push", "drawer"],
|
|
426
|
-
buttons: [],
|
|
427
|
-
android_channel_id: ''
|
|
428
|
-
},
|
|
429
|
-
[notificationIds.KARMA_CASHBACK]: {
|
|
430
|
-
category: notificationCategories.ACTIVITY,
|
|
431
|
-
target: "passbook/1",
|
|
432
|
-
title: "Karma Update",
|
|
433
|
-
type: ["push", "drawer"],
|
|
434
|
-
android_channel_id: notificationChannels.karma,
|
|
435
|
-
buttons: []
|
|
436
|
-
},
|
|
437
|
-
[notificationIds.ACTIVITY_QUERY_ANSWERED]: {
|
|
438
|
-
category: notificationCategories.ACTIVITY,
|
|
439
|
-
target: "match",
|
|
440
|
-
title: "Activity Update",
|
|
441
|
-
type: ["push", "drawer"],
|
|
442
|
-
buttons: [],
|
|
443
|
-
android_channel_id: notificationChannels.activity_query
|
|
444
|
-
},
|
|
445
|
-
[notificationIds.ACTIVITY_REMINDER]: {
|
|
446
|
-
category: notificationCategories.ACTIVITY,
|
|
447
|
-
target: "match",
|
|
448
|
-
title: "Activity Reminder",
|
|
449
|
-
type: ["push"],
|
|
450
|
-
buttons: [],
|
|
451
|
-
android_channel_id: notificationChannels.activity_reminders
|
|
452
|
-
},
|
|
453
|
-
[notificationIds.MESSAGE_REQUEST]: {
|
|
454
|
-
category: notificationCategories.ACTIVITY,
|
|
455
|
-
target: "playomessages",
|
|
456
|
-
title: "New message request 💭",
|
|
457
|
-
type: ["push", "drawer"],
|
|
458
|
-
buttons: [],
|
|
459
|
-
android_channel_id: ''
|
|
460
|
-
},
|
|
461
|
-
[notificationIds.USER_GOALS]: {
|
|
462
|
-
category: notificationCategories.ACTIVITY,
|
|
463
|
-
target: "goalDetail",
|
|
464
|
-
title: "your goals", // get content
|
|
465
|
-
type: ["push", "drawer"],
|
|
466
|
-
buttons: [],
|
|
467
|
-
android_channel_id: ''
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
// https://playo.co/${target}/${contentId}${queryUrl} //-> contentId - unique identifier id
|
|
472
|
-
|
|
473
|
-
const notificationButtons = {
|
|
474
|
-
[notificationIds.ACTIVITY_NOTIFY_PUSH]: []
|
|
475
|
-
};
|
|
476
|
-
|
|
1
|
+
|
|
2
|
+
//\-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- Private -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\//
|
|
3
|
+
// These categories correspond to notification preferences of the user
|
|
4
|
+
const notificationCategories = {
|
|
5
|
+
GROUP: 'group', // group updates
|
|
6
|
+
ACTIVITY: 'activity', // activity updates
|
|
7
|
+
KARMA: 'karma', //na
|
|
8
|
+
SPLIT_PAYMENTS: 'split_payments', //na
|
|
9
|
+
OFFERS: 'offers',
|
|
10
|
+
PLAYPAL_ACTIVITY: 'playpal-activity', // activity_suggestion_from_playpals
|
|
11
|
+
// MESSAGE: 'playomessages' //na
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// Android notification channels will be bound to categories
|
|
15
|
+
const notificationChannels = {
|
|
16
|
+
'karma': '8a9c67b9-1cdc-46a2-bb90-6f00f0e848eb', // done - 1 notification tagged
|
|
17
|
+
'activity_query': '99863ba1-88ba-44f6-b8b3-6df51d97ae03', // done - 2 notifications tagged
|
|
18
|
+
'activity_player_in_out': '5e6c5f64-1413-46ed-829d-763a3b7cab22',
|
|
19
|
+
'activity_updates': '14d7a740-2da3-4bb5-888f-80ed487d6567',// done - 8 notifications tagged
|
|
20
|
+
'activity_post_game': '23131b6a-2cf0-4a34-bc78-dd6f8676e319', // done - 1 notification tagged
|
|
21
|
+
'activity_suggestions': '3ab98c37-b93c-4d39-ab55-bb2cc6279cb8', // done - 1 notifications tagged
|
|
22
|
+
'expenses': '1eb30f33-2b3b-40ce-8798-fce55c1275e2', // done - 6 notifications tagged
|
|
23
|
+
'groups_manage_requests': '83c024d1-2cb7-47fa-989d-1d8ef343a51c', // done - 6 notifications tagged
|
|
24
|
+
'group_updates': '9e023a20-deab-4bc4-bd33-08a8d9316322', // done - 3 notifications tagged
|
|
25
|
+
'activity_reminders': '53c55399-a73c-4800-b824-3c750ac57b98'
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// ------------------------------------------ Exported (public) -----------------------------------------//
|
|
29
|
+
|
|
30
|
+
const notificationIds = {
|
|
31
|
+
ACTIVITY_NOTIFY_PUSH: 'activity-notify-push', // > DEPRECATED
|
|
32
|
+
ACTIVITY_NOTIFY_DRAWER: 'activity-notify-drawer', // > DEPRECATED
|
|
33
|
+
ACTIVITY_NOTIFY: 'activity-notify',
|
|
34
|
+
GROUP_INVITATION: 'group-invitation',
|
|
35
|
+
GROUP_INVITATION_RESPONSE: 'group-invitation-response',
|
|
36
|
+
GROUP_INVITATION_RESPONSE_PUSH: 'group-invitation-response-push', // > DEPRECATED
|
|
37
|
+
GROUP_INVITATION_RESPONSE_DRAWER: 'group-invitation-response-drawer', // > DEPRECATED
|
|
38
|
+
GROUP_REQUEST_PUSH: 'group-request-push', // > DEPRECATED
|
|
39
|
+
GROUP_REQUEST_DRAWER: 'group-request-drawer', // > DEPRECATED
|
|
40
|
+
GROUP_REQUEST: 'group-request',
|
|
41
|
+
GROUP_REQUEST_RESPONSE: 'group-request-response',
|
|
42
|
+
GROUP_NAME: 'group-name',
|
|
43
|
+
GROUP_NAME_PUSH: 'group-name-push', // > DEPRECATED
|
|
44
|
+
GROUP_NAME_DRAWER: 'group-name-drawer', // > DEPRECATED
|
|
45
|
+
ADMIN_STATUS: 'admin-status',
|
|
46
|
+
ADMIN_STATUS_PUSH: 'admin-status-push', // > DEPRECATED
|
|
47
|
+
ADMIN_STATUS_DRAWER: 'admin-status-drawer',// > DEPRECATED
|
|
48
|
+
NEW_MESSAGE_PUSH: 'new-message-push', // > DEPRECATED
|
|
49
|
+
NEW_MESSAGE_DRAWER: 'new-message-drawer', // > DEPRECATED
|
|
50
|
+
NEW_MESSAGE: 'new-message',
|
|
51
|
+
NEW_COMMENT_PUSH: 'new-comment-push', // > DEPRECATED
|
|
52
|
+
NEW_COMMENT_DRAWER: 'new-comment-drawer', // > DEPRECATED
|
|
53
|
+
NEW_COMMENT: 'new-comment',
|
|
54
|
+
ACTIVITY_INVITATION: 'activity-invitation',
|
|
55
|
+
ACTIVITY_INVITATION_RESPONSE: 'activity-invitation-response',
|
|
56
|
+
ACTIVITY_REQUEST: 'activity-request', // deprecated - use ACTIVITY_REQUEST_MANAGE
|
|
57
|
+
ACTIVITY_REQUEST_RESPONSE: 'activity-request-response',
|
|
58
|
+
HOST_RETIRED: 'host-retired',
|
|
59
|
+
JOINEE_RETIRED: 'joinee-retired',
|
|
60
|
+
EDIT_ACTIVITY: 'edit-activity',
|
|
61
|
+
ACTIVITY_FULL: 'activity-full',
|
|
62
|
+
VENUE_TAGGED: 'venue-tagged',
|
|
63
|
+
VENUE_BOOKED: 'venue-booked',
|
|
64
|
+
BOOKING_CANCELLED: 'booking-cancelled',
|
|
65
|
+
COHOST_ADDED: 'cohost-added',
|
|
66
|
+
COHOST_DELETED: 'cohost-deleted',
|
|
67
|
+
ACTIVITY_QUERY: 'activity-query',
|
|
68
|
+
ACTIVITY_CANCEL: 'activity-cancel',
|
|
69
|
+
ACTIVITY_HOSTED: 'activity-hosted',
|
|
70
|
+
ACTIVITY_REQUEST_MANAGE: 'activity-request-manage',
|
|
71
|
+
ACTIVITY_JOINED: 'activity-joined',
|
|
72
|
+
MATCH_RATING: 'match-rating',
|
|
73
|
+
BOOKING_RECEIPT: 'booking-receipt',
|
|
74
|
+
LOUNGE_QUESTION_SUGGEST: 'lounge-question-suggest',
|
|
75
|
+
LOUNGE_ANSWER: 'lounge-answer',
|
|
76
|
+
LOUNGE_COMMENT: 'lounge-comment',
|
|
77
|
+
LOUNGE_QUESTION_APPROVED: 'lounge-question-approved',
|
|
78
|
+
SPLIT_MARK_PAID: 'split-mark-paid',
|
|
79
|
+
SPLIT_REVERT_SETTLEMENT: 'split-revert-settlement',
|
|
80
|
+
SPLIT_EXPENSE_COMMENT: 'split-expense-comment',
|
|
81
|
+
SPLIT_EXPENSE_ADDED: 'split-expense-added',
|
|
82
|
+
SPLIT_EXPENSE_EDITED: 'split-expense-edited',
|
|
83
|
+
SPLIT_EXPENSE_DELETED: 'split-expense-deleted',
|
|
84
|
+
HOST_ACTIVITY_PAYOUT: 'host-activity-payout',
|
|
85
|
+
KARMA_CASHBACK: 'karma-cashback',
|
|
86
|
+
ACTIVITY_QUERY_ANSWERED: 'activity-query-answered',
|
|
87
|
+
ACTIVITY_REMINDER: 'activity-reminder',
|
|
88
|
+
MESSAGE_REQUEST: 'message-request',
|
|
89
|
+
USER_GOALS: 'user_goals'
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// TODO - Check targets against current value
|
|
93
|
+
|
|
94
|
+
const config = {
|
|
95
|
+
[notificationIds.ACTIVITY_NOTIFY]: {
|
|
96
|
+
category: notificationCategories.GROUP,
|
|
97
|
+
target: "group",
|
|
98
|
+
path: "timeline",
|
|
99
|
+
title: "Group Update",
|
|
100
|
+
type: ["drawer", "push"],
|
|
101
|
+
buttons: [],
|
|
102
|
+
android_channel_id: notificationChannels.activity_suggestions
|
|
103
|
+
},
|
|
104
|
+
[notificationIds.GROUP_INVITATION]: {
|
|
105
|
+
category: notificationCategories.GROUP,
|
|
106
|
+
target: "group",
|
|
107
|
+
path: "manage",
|
|
108
|
+
title: "Group Invitation",
|
|
109
|
+
type: ["push", "drawer"],
|
|
110
|
+
buttons: [],
|
|
111
|
+
android_channel_id: notificationChannels.groups_manage_requests
|
|
112
|
+
},
|
|
113
|
+
[notificationIds.GROUP_INVITATION_RESPONSE]: {
|
|
114
|
+
category: notificationCategories.GROUP,
|
|
115
|
+
target: "group",
|
|
116
|
+
path: "manage",
|
|
117
|
+
title: "Group Update",
|
|
118
|
+
type: ["push", "drawer"],
|
|
119
|
+
buttons: [],
|
|
120
|
+
android_channel_id: notificationChannels.groups_manage_requests
|
|
121
|
+
},
|
|
122
|
+
[notificationIds.GROUP_REQUEST]: {
|
|
123
|
+
category: notificationCategories.GROUP,
|
|
124
|
+
target: "group",
|
|
125
|
+
path: "manage",
|
|
126
|
+
title: "Group Update",
|
|
127
|
+
type: ["push", "drawer"],
|
|
128
|
+
buttons: [],
|
|
129
|
+
android_channel_id: notificationChannels.groups_manage_requests
|
|
130
|
+
},
|
|
131
|
+
[notificationIds.GROUP_REQUEST_RESPONSE]: {
|
|
132
|
+
category: notificationCategories.GROUP,
|
|
133
|
+
target: "group",
|
|
134
|
+
path: "manage",
|
|
135
|
+
title: "Group Update",
|
|
136
|
+
type: ["push", "drawer"],
|
|
137
|
+
buttons: [],
|
|
138
|
+
android_channel_id: notificationChannels.groups_manage_requests
|
|
139
|
+
},
|
|
140
|
+
[notificationIds.GROUP_NAME]: {
|
|
141
|
+
category: notificationCategories.GROUP,
|
|
142
|
+
target: "group",
|
|
143
|
+
path: "manage",
|
|
144
|
+
title: "Group Update",
|
|
145
|
+
type: ["push", "drawer"],
|
|
146
|
+
buttons: [],
|
|
147
|
+
android_channel_id: notificationChannels.group_updates
|
|
148
|
+
},
|
|
149
|
+
[notificationIds.ADMIN_STATUS]: {
|
|
150
|
+
category: notificationCategories.GROUP,
|
|
151
|
+
target: "group",
|
|
152
|
+
path: "manage",
|
|
153
|
+
title: "Group Update",
|
|
154
|
+
type: ["drawer", "push"],
|
|
155
|
+
buttons: [],
|
|
156
|
+
android_channel_id: notificationChannels.group_updates
|
|
157
|
+
},
|
|
158
|
+
[notificationIds.NEW_MESSAGE]: {
|
|
159
|
+
category: notificationCategories.GROUP,
|
|
160
|
+
target: "group",
|
|
161
|
+
path: "board",
|
|
162
|
+
title: "Group Update",
|
|
163
|
+
type: ["push", "drawer"],
|
|
164
|
+
buttons: [],
|
|
165
|
+
android_channel_id: notificationChannels.group_updates
|
|
166
|
+
},
|
|
167
|
+
[notificationIds.NEW_COMMENT]: {
|
|
168
|
+
category: notificationCategories.GROUP,
|
|
169
|
+
target: "group",
|
|
170
|
+
path: "board",
|
|
171
|
+
title: "Group Update",
|
|
172
|
+
type: ["drawer", "push"],
|
|
173
|
+
buttons: [],
|
|
174
|
+
android_channel_id: notificationChannels.group_updates
|
|
175
|
+
},
|
|
176
|
+
[notificationIds.ACTIVITY_INVITATION]: {
|
|
177
|
+
category: notificationCategories.ACTIVITY,
|
|
178
|
+
target: "match",
|
|
179
|
+
title: "You've been invited to a game! 📩",
|
|
180
|
+
type: ["push", "drawer"],
|
|
181
|
+
buttons: [],
|
|
182
|
+
android_channel_id: notificationChannels.activity_player_in_out
|
|
183
|
+
},
|
|
184
|
+
[notificationIds.ACTIVITY_INVITATION_RESPONSE]: {
|
|
185
|
+
category: notificationCategories.ACTIVITY,
|
|
186
|
+
target: "match",
|
|
187
|
+
path: "manage",
|
|
188
|
+
title: "Activity Update",
|
|
189
|
+
type: ["push", "drawer"],
|
|
190
|
+
buttons: [],
|
|
191
|
+
android_channel_id: notificationChannels.activity_player_in_out
|
|
192
|
+
},
|
|
193
|
+
[notificationIds.ACTIVITY_REQUEST]: {
|
|
194
|
+
category: notificationCategories.ACTIVITY,
|
|
195
|
+
target: "match",
|
|
196
|
+
title: "Activity Update",
|
|
197
|
+
type: ["push", "drawer"],
|
|
198
|
+
buttons: [],
|
|
199
|
+
android_channel_id: notificationChannels.activity_player_in_out
|
|
200
|
+
},
|
|
201
|
+
[notificationIds.ACTIVITY_REQUEST_RESPONSE]: {
|
|
202
|
+
category: notificationCategories.ACTIVITY,
|
|
203
|
+
target: "match",
|
|
204
|
+
title: "Activity Update",
|
|
205
|
+
type: ["push", "drawer"],
|
|
206
|
+
buttons: [],
|
|
207
|
+
android_channel_id: notificationChannels.activity_player_in_out
|
|
208
|
+
},
|
|
209
|
+
[notificationIds.HOST_RETIRED]: {
|
|
210
|
+
category: notificationCategories.ACTIVITY,
|
|
211
|
+
target: "match",
|
|
212
|
+
path: "manage",
|
|
213
|
+
title: "Activity Update",
|
|
214
|
+
type: ["push", "drawer"],
|
|
215
|
+
buttons: [],
|
|
216
|
+
android_channel_id: notificationChannels.activity_player_in_out
|
|
217
|
+
},
|
|
218
|
+
[notificationIds.JOINEE_RETIRED]: {
|
|
219
|
+
category: notificationCategories.ACTIVITY,
|
|
220
|
+
target: "match",
|
|
221
|
+
title: "Activity Update",
|
|
222
|
+
type: ["push", "drawer"],
|
|
223
|
+
buttons: [],
|
|
224
|
+
android_channel_id: notificationChannels.activity_player_in_out
|
|
225
|
+
},
|
|
226
|
+
[notificationIds.EDIT_ACTIVITY]: {
|
|
227
|
+
category: notificationCategories.ACTIVITY,
|
|
228
|
+
target: "match",
|
|
229
|
+
title: "Activity Update",
|
|
230
|
+
type: ["push", "drawer"],
|
|
231
|
+
buttons: [],
|
|
232
|
+
android_channel_id: notificationChannels.activity_updates
|
|
233
|
+
},
|
|
234
|
+
[notificationIds.ACTIVITY_FULL]: {
|
|
235
|
+
category: notificationCategories.ACTIVITY,
|
|
236
|
+
target: "match",
|
|
237
|
+
path: "manage",
|
|
238
|
+
title: "Activity Update",
|
|
239
|
+
type: ["push", "drawer"],
|
|
240
|
+
buttons: [],
|
|
241
|
+
android_channel_id: notificationChannels.activity_updates
|
|
242
|
+
},
|
|
243
|
+
[notificationIds.VENUE_TAGGED]: {
|
|
244
|
+
category: notificationCategories.ACTIVITY,
|
|
245
|
+
target: "match",
|
|
246
|
+
title: "Activity Update",
|
|
247
|
+
type: ["push", "drawer"],
|
|
248
|
+
buttons: [],
|
|
249
|
+
android_channel_id: notificationChannels.activity_updates
|
|
250
|
+
},
|
|
251
|
+
[notificationIds.VENUE_BOOKED]: {
|
|
252
|
+
category: notificationCategories.ACTIVITY,
|
|
253
|
+
target: "match",
|
|
254
|
+
title: "Activity Update",
|
|
255
|
+
type: ["push", "drawer"],
|
|
256
|
+
buttons: [],
|
|
257
|
+
android_channel_id: notificationChannels.activity_updates
|
|
258
|
+
},
|
|
259
|
+
[notificationIds.BOOKING_CANCELLED]: {
|
|
260
|
+
category: notificationCategories.ACTIVITY,
|
|
261
|
+
target: "match",
|
|
262
|
+
title: "Activity Update",
|
|
263
|
+
type: ["push", "drawer"],
|
|
264
|
+
buttons: [],
|
|
265
|
+
android_channel_id: notificationChannels.activity_updates
|
|
266
|
+
},
|
|
267
|
+
[notificationIds.COHOST_ADDED]: {
|
|
268
|
+
category: notificationCategories.ACTIVITY,
|
|
269
|
+
target: "match",
|
|
270
|
+
title: "Activity Update",
|
|
271
|
+
type: ["push", "drawer"],
|
|
272
|
+
buttons: [],
|
|
273
|
+
android_channel_id: notificationChannels.activity_updates
|
|
274
|
+
},
|
|
275
|
+
[notificationIds.COHOST_DELETED]: {
|
|
276
|
+
category: notificationCategories.ACTIVITY,
|
|
277
|
+
target: "match",
|
|
278
|
+
title: "Activity Update",
|
|
279
|
+
type: ["push", "drawer"],
|
|
280
|
+
buttons: [],
|
|
281
|
+
android_channel_id: notificationChannels.activity_updates
|
|
282
|
+
},
|
|
283
|
+
[notificationIds.ACTIVITY_QUERY]: {
|
|
284
|
+
category: notificationCategories.ACTIVITY,
|
|
285
|
+
target: "match",
|
|
286
|
+
title: "Activity Update",
|
|
287
|
+
type: ["push", "drawer"],
|
|
288
|
+
buttons: [],
|
|
289
|
+
android_channel_id: notificationChannels.activity_query
|
|
290
|
+
},
|
|
291
|
+
[notificationIds.ACTIVITY_CANCEL]: {
|
|
292
|
+
category: notificationCategories.ACTIVITY,
|
|
293
|
+
target: "match",
|
|
294
|
+
title: "Activity Update",
|
|
295
|
+
type: ["push", "drawer"],
|
|
296
|
+
buttons: [],
|
|
297
|
+
android_channel_id: notificationChannels.activity_updates
|
|
298
|
+
},
|
|
299
|
+
[notificationIds.ACTIVITY_HOSTED]: {
|
|
300
|
+
category: notificationCategories.PLAYPAL_ACTIVITY,
|
|
301
|
+
target: "match",
|
|
302
|
+
title: "Activity Update",
|
|
303
|
+
type: ["push", "drawer"],
|
|
304
|
+
buttons: [],
|
|
305
|
+
android_channel_id: notificationChannels.activity_suggestions
|
|
306
|
+
},
|
|
307
|
+
[notificationIds.ACTIVITY_REQUEST_MANAGE]: {
|
|
308
|
+
category: notificationCategories.ACTIVITY,
|
|
309
|
+
target: "match",
|
|
310
|
+
path: "manage",
|
|
311
|
+
title: "Activity Update",
|
|
312
|
+
type: ["push", "drawer"],
|
|
313
|
+
buttons: [],
|
|
314
|
+
android_channel_id: notificationChannels.activity_player_in_out
|
|
315
|
+
},
|
|
316
|
+
[notificationIds.ACTIVITY_JOINED]: {
|
|
317
|
+
category: notificationCategories.ACTIVITY,
|
|
318
|
+
target: "match",
|
|
319
|
+
title: "Activity Update",
|
|
320
|
+
type: ["push", "drawer"],
|
|
321
|
+
buttons: [],
|
|
322
|
+
android_channel_id: notificationChannels.activity_player_in_out
|
|
323
|
+
},
|
|
324
|
+
[notificationIds.MATCH_RATING]: {
|
|
325
|
+
category: notificationCategories.ACTIVITY,
|
|
326
|
+
target: "match",
|
|
327
|
+
path: "gamebook",
|
|
328
|
+
title: "Rate Activity",
|
|
329
|
+
type: ["push", "drawer"],
|
|
330
|
+
buttons: [],
|
|
331
|
+
android_channel_id: notificationChannels.activity_post_game
|
|
332
|
+
},
|
|
333
|
+
[notificationIds.BOOKING_RECEIPT]: {
|
|
334
|
+
category: notificationCategories.ACTIVITY,
|
|
335
|
+
target: "booking",
|
|
336
|
+
title: "Booking Update",
|
|
337
|
+
type: ["push", "drawer"],
|
|
338
|
+
buttons: [],
|
|
339
|
+
android_channel_id: ''
|
|
340
|
+
},
|
|
341
|
+
[notificationIds.LOUNGE_QUESTION_SUGGEST]: {
|
|
342
|
+
category: "lounge",
|
|
343
|
+
target: "lounge/question",
|
|
344
|
+
title: "Community Update",
|
|
345
|
+
type: ["push"],
|
|
346
|
+
buttons: [],
|
|
347
|
+
android_channel_id: ''
|
|
348
|
+
},
|
|
349
|
+
[notificationIds.LOUNGE_ANSWER]: {
|
|
350
|
+
category: "lounge",
|
|
351
|
+
target: "lounge/answer",
|
|
352
|
+
title: "Community Update",
|
|
353
|
+
type: ["push", "drawer"],
|
|
354
|
+
buttons: [],
|
|
355
|
+
android_channel_id: ''
|
|
356
|
+
},
|
|
357
|
+
[notificationIds.LOUNGE_COMMENT]: {
|
|
358
|
+
category: "lounge",
|
|
359
|
+
target: "lounge/answer",
|
|
360
|
+
title: "Community Update",
|
|
361
|
+
type: ["push", "drawer"],
|
|
362
|
+
buttons: [],
|
|
363
|
+
android_channel_id: ''
|
|
364
|
+
},
|
|
365
|
+
[notificationIds.LOUNGE_QUESTION_APPROVED]: {
|
|
366
|
+
category: "lounge",
|
|
367
|
+
target: "lounge/question",
|
|
368
|
+
title: "Community Update",
|
|
369
|
+
type: ["push", "drawer"],
|
|
370
|
+
buttons: [],
|
|
371
|
+
android_channel_id: ''
|
|
372
|
+
},
|
|
373
|
+
[notificationIds.SPLIT_MARK_PAID]: {
|
|
374
|
+
category: notificationCategories.ACTIVITY,
|
|
375
|
+
target: "activity/logs",
|
|
376
|
+
title: "Expense Update",
|
|
377
|
+
type: ["push", "drawer"],
|
|
378
|
+
buttons: [],
|
|
379
|
+
android_channel_id: notificationChannels.expenses
|
|
380
|
+
},
|
|
381
|
+
[notificationIds.SPLIT_REVERT_SETTLEMENT]: {
|
|
382
|
+
category: notificationCategories.ACTIVITY,
|
|
383
|
+
target: "activity/logs",
|
|
384
|
+
title: "Expense Update",
|
|
385
|
+
type: ["push", "drawer"],
|
|
386
|
+
buttons: [],
|
|
387
|
+
android_channel_id: notificationChannels.expenses
|
|
388
|
+
},
|
|
389
|
+
[notificationIds.SPLIT_EXPENSE_COMMENT]: {
|
|
390
|
+
category: notificationCategories.ACTIVITY,
|
|
391
|
+
target: "activity/expenses/comments",
|
|
392
|
+
title: "Expense Update",
|
|
393
|
+
type: ["push", "drawer"],
|
|
394
|
+
buttons: [],
|
|
395
|
+
android_channel_id: notificationChannels.expenses
|
|
396
|
+
},
|
|
397
|
+
[notificationIds.SPLIT_EXPENSE_ADDED]: {
|
|
398
|
+
category: notificationCategories.ACTIVITY,
|
|
399
|
+
target: "activity/expenses",
|
|
400
|
+
title: "Expense Update",
|
|
401
|
+
type: ["push", "drawer"],
|
|
402
|
+
buttons: [],
|
|
403
|
+
android_channel_id: notificationChannels.expenses
|
|
404
|
+
},
|
|
405
|
+
[notificationIds.SPLIT_EXPENSE_EDITED]: {
|
|
406
|
+
category: notificationCategories.ACTIVITY,
|
|
407
|
+
target: "activity/expenses",
|
|
408
|
+
title: "Expense Update",
|
|
409
|
+
type: ["push", "drawer"],
|
|
410
|
+
buttons: [],
|
|
411
|
+
android_channel_id: notificationChannels.expenses
|
|
412
|
+
},
|
|
413
|
+
[notificationIds.SPLIT_EXPENSE_DELETED]: {
|
|
414
|
+
category: notificationCategories.ACTIVITY,
|
|
415
|
+
target: "activity/logs",
|
|
416
|
+
title: "Expense Update",
|
|
417
|
+
type: ["push", "drawer"],
|
|
418
|
+
buttons: [],
|
|
419
|
+
android_channel_id: notificationChannels.expenses
|
|
420
|
+
},
|
|
421
|
+
[notificationIds.HOST_ACTIVITY_PAYOUT]: {
|
|
422
|
+
category: notificationCategories.ACTIVITY,
|
|
423
|
+
target: "passbook/0",
|
|
424
|
+
title: "Activity Update",
|
|
425
|
+
type: ["push", "drawer"],
|
|
426
|
+
buttons: [],
|
|
427
|
+
android_channel_id: ''
|
|
428
|
+
},
|
|
429
|
+
[notificationIds.KARMA_CASHBACK]: {
|
|
430
|
+
category: notificationCategories.ACTIVITY,
|
|
431
|
+
target: "passbook/1",
|
|
432
|
+
title: "Karma Update",
|
|
433
|
+
type: ["push", "drawer"],
|
|
434
|
+
android_channel_id: notificationChannels.karma,
|
|
435
|
+
buttons: []
|
|
436
|
+
},
|
|
437
|
+
[notificationIds.ACTIVITY_QUERY_ANSWERED]: {
|
|
438
|
+
category: notificationCategories.ACTIVITY,
|
|
439
|
+
target: "match",
|
|
440
|
+
title: "Activity Update",
|
|
441
|
+
type: ["push", "drawer"],
|
|
442
|
+
buttons: [],
|
|
443
|
+
android_channel_id: notificationChannels.activity_query
|
|
444
|
+
},
|
|
445
|
+
[notificationIds.ACTIVITY_REMINDER]: {
|
|
446
|
+
category: notificationCategories.ACTIVITY,
|
|
447
|
+
target: "match",
|
|
448
|
+
title: "Activity Reminder",
|
|
449
|
+
type: ["push"],
|
|
450
|
+
buttons: [],
|
|
451
|
+
android_channel_id: notificationChannels.activity_reminders
|
|
452
|
+
},
|
|
453
|
+
[notificationIds.MESSAGE_REQUEST]: {
|
|
454
|
+
category: notificationCategories.ACTIVITY,
|
|
455
|
+
target: "playomessages",
|
|
456
|
+
title: "New message request 💭",
|
|
457
|
+
type: ["push", "drawer"],
|
|
458
|
+
buttons: [],
|
|
459
|
+
android_channel_id: ''
|
|
460
|
+
},
|
|
461
|
+
[notificationIds.USER_GOALS]: {
|
|
462
|
+
category: notificationCategories.ACTIVITY,
|
|
463
|
+
target: "goalDetail",
|
|
464
|
+
title: "your goals", // get content
|
|
465
|
+
type: ["push", "drawer"],
|
|
466
|
+
buttons: [],
|
|
467
|
+
android_channel_id: ''
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
// https://playo.co/${target}/${contentId}${queryUrl} //-> contentId - unique identifier id
|
|
472
|
+
|
|
473
|
+
const notificationButtons = {
|
|
474
|
+
[notificationIds.ACTIVITY_NOTIFY_PUSH]: []
|
|
475
|
+
};
|
|
476
|
+
|
|
477
477
|
module.exports = { config, notificationIds };
|