Compare commits

..

66 Commits

Author SHA1 Message Date
61f0d29f37 Merge branch 'qa'
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 3m30s
2025-09-11 14:32:04 +05:30
209c7c65b0 Merge branch 'dev' into qa
All checks were successful
Deploy FitLien services to QA / Deploy to QA (push) Successful in 3m37s
2025-09-11 14:25:39 +05:30
ad31bc8e80 notification-bug-fix (#114)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 4m30s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #114
Reviewed-by: Dhansh A S <dhanshas@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-09-11 08:47:46 +00:00
f0d167a671 notification-bug-fix (#113)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 4m32s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #113
Reviewed-by: Dhansh A S <dhanshas@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-09-09 09:06:58 +00:00
e762d0fb79 notification-bug-fix (#112)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m47s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #112
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-26 06:27:20 +00:00
5ca05c6490 Merge branch 'dev'
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 4m1s
2025-08-25 18:39:53 +05:30
7ec65e4ab1 Merge branch 'dev' into qa
All checks were successful
Deploy FitLien services to QA / Deploy to QA (push) Successful in 4m1s
2025-08-25 18:35:11 +05:30
b41431b151 notification-bug-fix (#111)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 1m48s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #111
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-25 09:57:03 +00:00
218ff1d02e notification-bug-fix (#110)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m58s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #110
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-25 09:50:08 +00:00
4f71ca273b Merge branch 'qa'
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 1m40s
2025-08-22 17:39:15 +05:30
4d52d1c7f8 Merged from dev
All checks were successful
Deploy FitLien services to QA / Deploy to QA (push) Successful in 1m40s
2025-08-22 17:36:45 +05:30
aee40521d3 Merge branch 'dev' into qa 2025-08-22 17:35:21 +05:30
a450e93e2b notification-bug-fix (#109)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 1m39s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #109
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-22 12:00:31 +00:00
36015d2b83 Removed npm install at root level
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 3m42s
2025-08-22 17:18:57 +05:30
51fa0825ca Removed npm install from root
Some checks failed
Deploy FitLien services to QA / Deploy to QA (push) Successful in 3m36s
Deploy FitLien services / Deploy (push) Failing after 8s
2025-08-22 17:04:54 +05:30
3e455fc83a Merge branch 'dev' into qa
Some checks failed
Deploy FitLien services to QA / Deploy to QA (push) Failing after 8s
2025-08-22 16:58:23 +05:30
0672a19a60 notification-bug-fix (#108)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 2m14s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #108
Reviewed-by: Dhansh A S <dhanshas@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-22 11:13:19 +00:00
172fa2edae notification-bug-fix (#107)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 1m53s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #107
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-20 13:38:54 +00:00
d0c00d8172 notification-bug-fix (#106)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m42s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #106
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-20 13:30:53 +00:00
f93931867c notification-bug-fix (#105)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m52s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #105
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-20 13:22:29 +00:00
70d76bab2e notification-bug-fix (#104)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 1m32s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #104
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 11:51:37 +00:00
308cb0fab6 notification-bug-fix (#103)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m42s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #103
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 11:43:38 +00:00
165cd74a17 notification-bug-fix (#102)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m29s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #102
Reviewed-by: Dhansh A S <dhanshas@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 11:18:53 +00:00
b190a371b6 notification-bug-fix (#101)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 1m34s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #101
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 10:21:00 +00:00
5543ba5e7a notification-bug-fix (#100)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m40s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #100
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 09:52:14 +00:00
5d6824a6f4 notification-bug-fix (#99)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 2m0s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #99
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 09:43:44 +00:00
abf7a04633 notification-bug-fix (#98)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m25s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #98
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 07:21:41 +00:00
835f478665 notification-bug-fix (#97)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m28s
Co-authored-by: Dhansh A S <dhanshas@cosq.net>
Reviewed-on: #97
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 07:11:25 +00:00
5f43a86036 notification-bug-fix (#96)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m24s
Reviewed-on: #96
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 07:06:26 +00:00
1e09f7a676 notification-bug-fix (#95)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m34s
Reviewed-on: #95
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 06:54:45 +00:00
5e48f695f8 notification-bug-fix (#94)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m31s
Reviewed-on: #94
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 06:51:02 +00:00
e483b7ad46 notification-bug-fix (#93)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m34s
Reviewed-on: #93
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 06:42:11 +00:00
cd59b9890d notification-bug-fix (#92)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m5s
Reviewed-on: #92
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 06:23:43 +00:00
939567f7c0 notification-bug-fix (#91)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m42s
Reviewed-on: #91
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 05:39:54 +00:00
7c494154ba notification-bug-fix (#90)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m38s
Reviewed-on: #90
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 04:59:34 +00:00
8f5956a825 notification-bug-fix (#89)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m30s
Reviewed-on: #89
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 04:49:31 +00:00
5ff7b8bb84 notification-bug-fix (#88)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m44s
Reviewed-on: #88
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-19 04:30:40 +00:00
7259e67833 REMOVED clean install from project root
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m24s
2025-08-18 19:20:36 +05:30
81c5241e95 Merge branch 'dev' of cosqnet.com:cosqnet/fitlien-services into dev
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 8s
2025-08-18 19:16:41 +05:30
209354ec6b UPDATED firebase-functions package 2025-08-18 19:16:18 +05:30
39ea6dcafb notification-bug-fix (#87)
Some checks failed
Deploy FitLien services to Dev / Deploy to Dev (push) Failing after 1m55s
Reviewed-on: #87
Reviewed-by: Allen T J <allentj@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-18 13:42:26 +00:00
f6b1545cf6 Merge branch 'dev' into qa
Some checks failed
Deploy FitLien services to QA / Deploy to QA (push) Failing after 1m33s
2025-08-18 19:05:38 +05:30
195262a6de Merge branch 'qa'
Some checks failed
Deploy FitLien services / Deploy (push) Failing after 2m8s
Deploy FitLien services to QA / Deploy to QA (push) Failing after 1m42s
2025-08-18 18:53:46 +05:30
d8ae223cce notification-bug-fix (#86)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m37s
Reviewed-on: #86
Reviewed-by: Dhansh A S <dhanshas@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-14 08:35:40 +00:00
c2914b16bb notification-bug-fix (#85)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m38s
Reviewed-on: #85
Reviewed-by: Dhansh A S <dhanshas@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-14 06:41:07 +00:00
b66f1603cc notification-bug-fix (#84)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 4m10s
Reviewed-on: #84
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-14 05:30:52 +00:00
d3c9e86c7c Merge branch 'dev'
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 4m10s
2025-08-08 18:53:15 +05:30
4cf5692386 plan-expiry-in-two-days (#83)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 4m20s
Reviewed-on: #83
Reviewed-by: Dhansh A S <dhanshas@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-08 07:55:52 +00:00
8b308fb9a6 Merge branch 'dev'
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 5m14s
2025-08-07 20:17:17 +05:30
237dd8a263 Changes Updated (#82)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m28s
Reviewed-on: #82
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-05 14:03:40 +00:00
fb23661080 expiry-using-payment (#81)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m54s
Reviewed-on: #81
Reviewed-by: Dhansh A S <dhanshas@cosq.net>
Co-authored-by: Sharon Dcruz <sharondcruz@cosq.net>
Co-committed-by: Sharon Dcruz <sharondcruz@cosq.net>
2025-08-05 13:20:00 +00:00
9d51393aa5 Merge branch 'dev'
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 3m39s
2025-07-02 21:28:42 +05:30
cc5b6d6987 Merge branch 'dev' into qa
All checks were successful
Deploy FitLien services to QA / Deploy to QA (push) Successful in 3m48s
2025-07-02 21:28:06 +05:30
ef2cd80226 Merge branch 'qa'
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 4m2s
2025-06-24 15:19:54 +05:30
f19e3b012d Merge branch 'dev' into qa
All checks were successful
Deploy FitLien services to QA / Deploy to QA (push) Successful in 3m53s
2025-06-24 15:19:20 +05:30
f2e37e88ed Merge branch 'dev'
All checks were successful
Deploy FitLien services / Deploy (push) Successful in 4m24s
2025-06-12 19:47:27 +05:30
a0134466ee Merge branch 'dev' into qa
All checks were successful
Deploy FitLien services to QA / Deploy to QA (push) Successful in 3m42s
2025-06-12 19:45:40 +05:30
ecbe9d184b Merge branch 'dev' into qa
All checks were successful
Deploy FitLien services to QA / Deploy to QA (push) Successful in 3m47s
Deploy FitLien services / Deploy (push) Successful in 4m30s
2025-05-30 12:01:13 +05:30
7a796243b0 Merge branch 'dev' into qa
All checks were successful
Deploy FitLien services to Dev / Deploy to QA (push) Successful in 4m13s
2025-05-28 10:55:32 +05:30
7db9e479ad Merge branch 'dev' into qa
All checks were successful
Deploy FitLien services to Dev / Deploy to QA (push) Successful in 4m13s
2025-05-26 23:38:30 +05:30
cf6f4625ad Removed env var FITLIENHOST 2025-04-21 12:28:07 +05:30
6434f6e3fa Merge branch 'dev' into qa 2025-04-21 12:17:34 +05:30
2147963523 Merge branch 'dev' into qa 2025-04-16 18:12:16 +05:30
18569d38d3 Merge branch 'dev' into qa 2025-04-16 04:35:58 +05:30
5bc3d6dfff Merge branch 'dev' into qa 2025-04-16 03:53:43 +05:30
e8ca80df48 Merge branch 'dev' into qa 2025-04-14 15:02:28 +05:30
10 changed files with 745 additions and 349 deletions

View File

@ -19,9 +19,6 @@ jobs:
with:
node-version: 22
- name: Clean install
run: npm clean-install
- name: Copy .env.example to .env
run: cp functions/.env.example functions/.env

View File

@ -19,9 +19,6 @@ jobs:
with:
node-version: 22
- name: Clean install
run: npm clean-install
- name: Copy .env.example to .env
run: cp functions/.env.example functions/.env

View File

@ -19,9 +19,6 @@ jobs:
with:
node-version: 22
- name: Clean install
run: npm clean-install
- name: Copy .env.example to .env
run: cp functions/.env.example functions/.env

View File

@ -57,11 +57,11 @@
]
},
{
"collectionGroup": "memberships",
"collectionGroup": "gyms",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "gymId",
"fieldPath": "userId",
"order": "ASCENDING"
},
{
@ -71,33 +71,29 @@
]
},
{
"collectionGroup": "notifications",
"collectionGroup": "gyms",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "data.clientId",
"fieldPath": "isApproved",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
"fieldPath": "createdAt",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "notifications",
"collectionGroup": "memberships",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "data.clientId",
"fieldPath": "gymId",
"order": "ASCENDING"
},
{
"fieldPath": "type",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"fieldPath": "createdAt",
"order": "DESCENDING"
}
]
@ -125,39 +121,7 @@
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "data.ownerId",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "data.ownerId",
"order": "ASCENDING"
},
{
"fieldPath": "type",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "data.trainerId",
"fieldPath": "recipientId",
"order": "ASCENDING"
},
{

View File

@ -15,7 +15,7 @@
"cors": "^2.8.5",
"date-fns": "^4.1.0",
"firebase-admin": "^12.6.0",
"firebase-functions": "^6.0.1",
"firebase-functions": "^6.4.0",
"form-data": "^4.0.1",
"functions": "file:",
"html-to-text": "^9.0.5",
@ -4897,9 +4897,10 @@
}
},
"node_modules/firebase-functions": {
"version": "6.3.2",
"resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-6.3.2.tgz",
"integrity": "sha512-FC3A1/nhqt1ZzxRnj5HZLScQaozAcFSD/vSR8khqSoFNOfxuXgwJS6ZABTB7+v+iMD5z6Mmxw6OfqITUBuI7OQ==",
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-6.4.0.tgz",
"integrity": "sha512-Q/LGhJrmJEhT0dbV60J4hCkVSeOM6/r7xJS/ccmkXzTWMjo+UPAYX9zlQmGlEjotstZ0U9GtQSJSgbB2Z+TJDg==",
"license": "MIT",
"dependencies": {
"@types/cors": "^2.8.5",
"@types/express": "^4.17.21",

View File

@ -22,7 +22,7 @@
"cors": "^2.8.5",
"date-fns": "^4.1.0",
"firebase-admin": "^12.6.0",
"firebase-functions": "^6.0.1",
"firebase-functions": "^6.4.0",
"form-data": "^4.0.1",
"functions": "file:",
"html-to-text": "^9.0.5",

View File

@ -4,12 +4,14 @@ import * as admin from "firebase-admin";
const app = getAdmin();
const logger = getLogger();
const kTrainerRole = "Trainer";
interface MembershipData {
id?: string;
userId: string;
gymId: string;
status: string;
expirationDate?: admin.firestore.Timestamp;
subscription?: {
name: string;
frequency: string;
@ -33,36 +35,83 @@ interface PaymentData {
discount?: number;
}
interface PersonalTrainerAssign {
id: string;
ownerId: string;
trainerId?: string;
clientId: string;
membershipId: string;
gymId: string;
}
export const checkExpiredMemberships = onSchedule(
{
schedule: "*/5 * * * *",
schedule: "0 8,14,20 * * *",
timeZone: "UTC",
region: "#{SERVICES_RGN}#",
},
async (event) => {
logger.info("Starting scheduled membership expiry check...");
try {
await updateDaysUntilExpiryForAllMemberships();
const expiredMemberships = await findExpiredMemberships();
const expiringMemberships = await findMembershipsExpiringIn10Days();
if (expiredMemberships.length === 0) {
logger.info("No expired memberships found.");
const expiredMembershipsWithoutExpiryDate =
await findExpiredMembershipsWithoutExpiryDate();
if (
expiredMemberships.length === 0 &&
expiringMemberships.length === 0 &&
expiredMembershipsWithoutExpiryDate.length === 0
) {
logger.info(
"No expired, expiring, or unprocessed expired memberships found."
);
return;
}
logger.info(
`Found ${expiredMemberships.length} expired memberships to process.`
`Found ${expiredMemberships.length} expired memberships, ${expiringMemberships.length} memberships expiring in 10 days, and ${expiredMembershipsWithoutExpiryDate.length} expired memberships without expiry dates to process.`
);
const results = await Promise.allSettled(
const expiredResults = await Promise.allSettled(
expiredMemberships.map((m) => processExpiredMembership(m.id, m.data))
);
const successful = results.filter((r) => r.status === "fulfilled").length;
const failed = results.filter((r) => r.status === "rejected").length;
const expiringResults = await Promise.allSettled(
expiringMemberships.map((m) => processExpiringMembership(m.id, m.data))
);
const updateResults = await Promise.allSettled(
expiredMembershipsWithoutExpiryDate.map((m) =>
updateExpiryDateForExpiredMembership(m.id, m.data)
)
);
const expiredSuccessful = expiredResults.filter(
(r) => r.status === "fulfilled"
).length;
const expiredFailed = expiredResults.filter(
(r) => r.status === "rejected"
).length;
const expiringSuccessful = expiringResults.filter(
(r) => r.status === "fulfilled"
).length;
const expiringFailed = expiringResults.filter(
(r) => r.status === "rejected"
).length;
const updateSuccessful = updateResults.filter(
(r) => r.status === "fulfilled"
).length;
const updateFailed = updateResults.filter(
(r) => r.status === "rejected"
).length;
logger.info(
`Completed processing. Success: ${successful}, Failed: ${failed}`
`Completed processing. Expired - Success: ${expiredSuccessful}, Failed: ${expiredFailed}. Expiring - Success: ${expiringSuccessful}, Failed: ${expiringFailed}. Updates - Success: ${updateSuccessful}, Failed: ${updateFailed}`
);
} catch (error) {
logger.error("Error in scheduled membership expiry check:", error);
@ -70,6 +119,83 @@ export const checkExpiredMemberships = onSchedule(
}
);
async function findExpiredMembershipsWithoutExpiryDate(): Promise<
Array<{ id: string; data: MembershipData }>
> {
try {
const snapshot = await app
.firestore()
.collection("memberships")
.where("status", "==", "EXPIRED")
.get();
const membershipsWithoutExpiryDate: Array<{
id: string;
data: MembershipData;
}> = [];
snapshot.docs.forEach((doc) => {
const data = doc.data() as MembershipData;
if (!data.expirationDate) {
membershipsWithoutExpiryDate.push({ id: doc.id, data });
}
});
return membershipsWithoutExpiryDate;
} catch (error) {
logger.error(
"Error finding expired memberships without expiry date:",
error
);
throw error;
}
}
async function updateExpiryDateForExpiredMembership(
membershipId: string,
membershipData: MembershipData
): Promise<void> {
try {
if (
!membershipData.subscription ||
!membershipData.subscription.frequency
) {
logger.warn(`Skipping membership ${membershipId} - no subscription data`);
return;
}
const payments = await getPaymentsForMembership(membershipId);
if (payments.length === 0) {
logger.warn(`No payments found for membership ${membershipId}`);
return;
}
const latestPayment = payments[0];
const expiryDate = calculateExpiryDate(
latestPayment.dateTimestamp,
membershipData.subscription.frequency
);
await app
.firestore()
.collection("memberships")
.doc(membershipId)
.update({
expirationDate: admin.firestore.Timestamp.fromDate(expiryDate),
updatedAt: admin.firestore.FieldValue.serverTimestamp(),
});
logger.info(
`Updated expiry date for expired membership ${membershipId}: ${expiryDate.toISOString()}`
);
} catch (error) {
logger.error(
`Error updating expiry date for membership ${membershipId}:`,
error
);
throw error;
}
}
async function findExpiredMemberships(): Promise<
Array<{ id: string; data: MembershipData }>
> {
@ -112,6 +238,51 @@ async function findExpiredMemberships(): Promise<
}
}
async function findMembershipsExpiringIn10Days(): Promise<
Array<{ id: string; data: MembershipData }>
> {
try {
const snapshot = await app
.firestore()
.collection("memberships")
.where("status", "==", "ACTIVE")
.get();
const expiring: Array<{ id: string; data: MembershipData }> = [];
const batchSize = 10;
const docs = snapshot.docs;
for (let i = 0; i < docs.length; i += batchSize) {
const batch = docs.slice(i, i + batchSize);
const batchResults = await Promise.allSettled(
batch.map(async (doc) => {
const data = doc.data() as MembershipData;
const isExpiringIn10Days = await checkIfMembershipExpiringIn10Days(
doc.id,
data
);
if (isExpiringIn10Days) {
return { id: doc.id, data };
}
return null;
})
);
batchResults.forEach((result) => {
if (result.status === "fulfilled" && result.value) {
expiring.push(result.value);
}
});
}
return expiring;
} catch (error) {
logger.error("Error finding memberships expiring in 10 days:", error);
throw error;
}
}
async function checkIfMembershipExpired(
membershipId: string,
data: MembershipData
@ -165,6 +336,56 @@ async function checkIfMembershipExpired(
}
}
async function checkIfMembershipExpiringIn10Days(
membershipId: string,
data: MembershipData
): Promise<boolean> {
try {
if (!data.subscription || !data.subscription.frequency) {
logger.warn(
`Skipping expiry check for membership ${membershipId} with missing subscription data.`
);
return false;
}
const payments = await getPaymentsForMembership(membershipId);
if (payments.length === 0) {
logger.warn(
`No payments found for membership ${membershipId}, cannot determine expiry`
);
return false;
}
const latestPayment = payments[0];
const startDate = latestPayment.dateTimestamp;
const expiryDate = calculateExpiryDate(
startDate,
data.subscription.frequency
);
const now = new Date();
const tenDaysFromNow = new Date();
tenDaysFromNow.setDate(now.getDate() + 10);
const isExpiringIn10Days = expiryDate > now && expiryDate <= tenDaysFromNow;
if (isExpiringIn10Days) {
logger.info(
`Membership ${membershipId} will expire on ${expiryDate.toISOString()} (within 10 days)`
);
}
return isExpiringIn10Days;
} catch (error) {
logger.error(
`Error checking 10-day expiry for membership ${membershipId}:`,
error
);
return false;
}
}
async function getPaymentsForMembership(
membershipId: string
): Promise<PaymentData[]> {
@ -257,23 +478,384 @@ function calculateRenewalDateFromPayment(
return renewalDate;
}
async function updateDaysUntilExpiryForAllMemberships(): Promise<void> {
try {
logger.info(
"Starting to update daysUntilExpiry for all active memberships..."
);
const snapshot = await app
.firestore()
.collection("memberships")
.where("status", "==", "ACTIVE")
.get();
const batchSize = 10;
const docs = snapshot.docs;
let updatedCount = 0;
for (let i = 0; i < docs.length; i += batchSize) {
const batch = docs.slice(i, i + batchSize);
const batchResults = await Promise.allSettled(
batch.map(async (doc) => {
const data = doc.data() as MembershipData;
const daysUntilExpiry = await calculateDaysUntilExpiry(doc.id, data);
if (daysUntilExpiry !== null) {
const updateData: any = {
daysUntilExpiry: daysUntilExpiry,
updatedAt: admin.firestore.FieldValue.serverTimestamp(),
};
await app
.firestore()
.collection("memberships")
.doc(doc.id)
.update(updateData);
logger.info(
`Updated membership ${doc.id} with daysUntilExpiry: ${daysUntilExpiry}`
);
return doc.id;
}
return null;
})
);
batchResults.forEach((result) => {
if (result.status === "fulfilled" && result.value) {
updatedCount++;
}
});
}
logger.info(`Updated daysUntilExpiry for ${updatedCount} memberships`);
} catch (error) {
logger.error("Error updating daysUntilExpiry for memberships:", error);
throw error;
}
}
async function calculateDaysUntilExpiry(
membershipId: string,
data: MembershipData
): Promise<number | null> {
try {
if (!data.subscription || !data.subscription.frequency) {
logger.warn(
`Skipping expiry calculation for membership ${membershipId} with missing subscription data.`
);
return null;
}
const payments = await getPaymentsForMembership(membershipId);
if (payments.length === 0) {
logger.warn(
`No payments found for membership ${membershipId}, cannot determine expiry`
);
return null;
}
const latestPayment = payments[0];
const startDate = latestPayment.dateTimestamp;
const expiryDate = calculateExpiryDate(
startDate,
data.subscription.frequency
);
const now = new Date();
const timeDiff = expiryDate.getTime() - now.getTime();
const daysUntilExpiry = Math.floor(timeDiff / (1000 * 3600 * 24));
return Math.max(0, daysUntilExpiry);
} catch (error) {
logger.error(
`Error calculating daysUntilExpiry for membership ${membershipId}:`,
error
);
return null;
}
}
async function getTrainerAssignmentsForMembership(
membershipId: string
): Promise<PersonalTrainerAssign[]> {
try {
const querySnapshot = await app
.firestore()
.collection("personal_trainer_assignments")
.where("membershipId", "==", membershipId)
.get();
return querySnapshot.docs.map((doc) => ({
id: doc.id,
...doc.data(),
})) as PersonalTrainerAssign[];
} catch (error) {
logger.error(
`Error getting trainer assignments for membership ${membershipId}:`,
error
);
return [];
}
}
async function getTrainerName(trainerId: string): Promise<string> {
try {
const doc = await app
.firestore()
.collection("trainer_profiles")
.doc(trainerId)
.get();
if (!doc.exists) {
const userDoc = await app
.firestore()
.collection("users")
.doc(trainerId)
.get();
if (userDoc.exists) {
const userData = userDoc.data();
return userData?.name || userData?.displayName || "Unknown Trainer";
}
return "Unknown Trainer";
}
const data = doc.data();
const fields = data?.fields;
if (fields) {
const firstName = fields["first-name"] || "";
const lastName = fields["last-name"] || "";
return `${firstName} ${lastName}`.trim() || "Unknown Trainer";
}
return data?.name || data?.displayName || "Unknown Trainer";
} catch (error) {
logger.error(`Error getting trainer name for ${trainerId}:`, error);
return "Unknown Trainer";
}
}
async function processExpiredMembership(
membershipId: string,
membershipData: MembershipData
): Promise<void> {
try {
const payments = await getPaymentsForMembership(membershipId);
if (payments.length > 0) {
const latestPayment = payments[0];
const expiryDate = calculateExpiryDate(
latestPayment.dateTimestamp,
membershipData.subscription?.frequency || "monthly"
);
await app
.firestore()
.collection("memberships")
.doc(membershipId)
.update({
expirationDate: admin.firestore.Timestamp.fromDate(expiryDate),
status: "EXPIRED",
updatedAt: admin.firestore.FieldValue.serverTimestamp(),
});
} else {
await app.firestore().collection("memberships").doc(membershipId).update({
status: "EXPIRED",
updatedAt: admin.firestore.FieldValue.serverTimestamp(),
});
}
logger.info(`Marked membership ${membershipId} as EXPIRED`);
await sendPlanExpiredNotification(membershipId, membershipData);
await sendTrainerNotifications(membershipId, membershipData, "expired");
} catch (error) {
logger.error(`Error processing membership ${membershipId}:`, error);
}
}
async function processExpiringMembership(
membershipId: string,
membershipData: MembershipData
): Promise<void> {
try {
logger.info(`Processing expiring membership ${membershipId}`);
const payments = await getPaymentsForMembership(membershipId);
if (payments.length > 0) {
const latestPayment = payments[0];
const expiryDate = calculateExpiryDate(
latestPayment.dateTimestamp,
membershipData.subscription?.frequency || "monthly"
);
await app
.firestore()
.collection("memberships")
.doc(membershipId)
.update({
expirationDate: admin.firestore.Timestamp.fromDate(expiryDate),
updatedAt: admin.firestore.FieldValue.serverTimestamp(),
});
}
await sendPlanExpiringNotification(membershipId, membershipData);
await sendTrainerNotifications(membershipId, membershipData, "expiring");
} catch (error) {
logger.error(
`Error processing expiring membership ${membershipId}:`,
error
);
}
}
async function getTrainerUserId(trainerId: string): Promise<string> {
try {
const trainerDoc = await app
.firestore()
.collection("trainer_profiles")
.doc(trainerId)
.get();
if (!trainerDoc.exists) {
throw new Error(`Trainer profile not found for ID: ${trainerId}`);
}
const trainerData = trainerDoc.data();
if (!trainerData?.userId) {
throw new Error(`userId not found in trainer profile: ${trainerId}`);
}
return trainerData.userId;
} catch (error) {
logger.error(`Error getting userId for trainer ${trainerId}:`, error);
return trainerId;
}
}
async function sendTrainerNotifications(
membershipId: string,
membershipData: MembershipData,
notificationType: "expired" | "expiring"
): Promise<void> {
try {
const trainerAssignments = await getTrainerAssignmentsForMembership(
membershipId
);
if (trainerAssignments.length === 0) {
logger.info(
`No trainer assignments found for membership ${membershipId}`
);
return;
}
const clientName = await getClientName(membershipId, membershipData.userId);
const gymName = await getGymName(membershipData.gymId);
let expiryDate: Date | undefined;
let formattedDate = "Unknown Date";
let daysUntilExpiry = 0;
const payments = await getPaymentsForMembership(membershipId);
if (payments.length > 0) {
const latestPayment = payments[0];
expiryDate = calculateRenewalDateFromPayment(
membershipData.subscription,
latestPayment.dateTimestamp
);
formattedDate = expiryDate.toLocaleDateString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
});
if (notificationType === "expiring") {
const now = new Date();
const timeDiff = expiryDate.getTime() - now.getTime();
daysUntilExpiry = Math.floor(timeDiff / (1000 * 3600 * 24));
}
}
for (const assignment of trainerAssignments) {
if (!assignment.trainerId) continue;
try {
const trainerName = await getTrainerName(assignment.trainerId);
const trainerUserId = await getTrainerUserId(assignment.trainerId);
const notifType =
notificationType === "expired"
? "trainer_client_plan_expired"
: "trainer_client_plan_expiring";
const existing = await app
.firestore()
.collection("notifications")
.where("type", "==", notifType)
.where("recipientId", "==", trainerUserId)
.where("data.membershipId", "==", membershipId)
.where(
"data.expiryDate",
"==",
expiryDate
? admin.firestore.Timestamp.fromDate(expiryDate)
: admin.firestore.Timestamp.fromDate(new Date())
)
.limit(1)
.get();
if (!existing.empty) {
logger.info(
`${notificationType} notification already sent to trainer ${assignment.trainerId} for membership ${membershipId}, skipping...`
);
continue;
}
const notificationData: any = {
senderId: "system",
recipientId: trainerUserId,
type: notifType,
notificationSent: false,
timestamp: admin.firestore.FieldValue.serverTimestamp(),
read: false,
readBy: [],
data: {
planName: membershipData.subscription?.name || "Unknown Plan",
clientName,
membershipId,
gymName,
assignmentId: assignment.id,
formattedExpiryDate: formattedDate,
role: kTrainerRole,
expiryDate: expiryDate
? admin.firestore.Timestamp.fromDate(expiryDate)
: admin.firestore.Timestamp.fromDate(new Date()),
},
};
if (notificationType === "expiring") {
notificationData.data.daysUntilExpiry = daysUntilExpiry;
}
await app.firestore().collection("notifications").add(notificationData);
logger.info(
`${notificationType} notification sent to trainer ${assignment.trainerId} (${trainerName}) for client ${clientName}'s membership ${membershipId}`
);
} catch (trainerError) {
logger.error(
`Error sending notification to trainer ${assignment.trainerId} for membership ${membershipId}:`,
trainerError
);
}
}
} catch (error) {
logger.error(
`Error sending trainer notifications for membership ${membershipId}:`,
error
);
}
}
async function sendPlanExpiredNotification(
membershipId: string,
@ -284,19 +866,6 @@ async function sendPlanExpiredNotification(
const gymOwnerId = await getGymOwnerId(membershipData.gymId);
const gymName = await getGymName(membershipData.gymId);
const existing = await app
.firestore()
.collection("notifications")
.where("type", "==", "plan_expired")
.where("data.membershipId", "==", membershipId)
.limit(1)
.get();
if (!existing.empty) {
logger.info(`Notification already sent for ${membershipId}, skipping...`);
return;
}
let expiryDate: Date | undefined;
let formattedDate = "Unknown Date";
@ -312,7 +881,26 @@ async function sendPlanExpiredNotification(
month: "long",
day: "numeric",
});
}
const existing = await app
.firestore()
.collection("notifications")
.where("type", "==", "plan_expired")
.where("data.membershipId", "==", membershipId)
.where(
"data.expiryDate",
"==",
expiryDate
? admin.firestore.Timestamp.fromDate(expiryDate)
: admin.firestore.Timestamp.fromDate(new Date())
)
.limit(1)
.get();
if (!existing.empty) {
logger.info(`Notification already sent for ${membershipId}, skipping...`);
return;
}
await app
@ -347,6 +935,95 @@ async function sendPlanExpiredNotification(
}
}
async function sendPlanExpiringNotification(
membershipId: string,
membershipData: MembershipData
): Promise<void> {
try {
const clientName = await getClientName(membershipId, membershipData.userId);
const gymOwnerId = await getGymOwnerId(membershipData.gymId);
const gymName = await getGymName(membershipData.gymId);
let expiryDate: Date | undefined;
let formattedDate = "Unknown Date";
let daysUntilExpiry = 10;
const payments = await getPaymentsForMembership(membershipId);
if (payments.length > 0) {
const latestPayment = payments[0];
expiryDate = calculateRenewalDateFromPayment(
membershipData.subscription,
latestPayment.dateTimestamp
);
formattedDate = expiryDate.toLocaleDateString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
});
const now = new Date();
const timeDiff = expiryDate.getTime() - now.getTime();
daysUntilExpiry = Math.floor(timeDiff / (1000 * 3600 * 24));
}
const existing = await app
.firestore()
.collection("notifications")
.where("type", "==", "plan_expiring_soon")
.where("data.membershipId", "==", membershipId)
.where(
"data.expiryDate",
"==",
expiryDate
? admin.firestore.Timestamp.fromDate(expiryDate)
: admin.firestore.Timestamp.fromDate(new Date())
)
.limit(1)
.get();
if (!existing.empty) {
logger.info(
`Expiring notification already sent for ${membershipId}, skipping...`
);
return;
}
await app
.firestore()
.collection("notifications")
.add({
senderId: "system",
recipientId: gymOwnerId,
type: "plan_expiring_soon",
notificationSent: false,
timestamp: admin.firestore.FieldValue.serverTimestamp(),
read: false,
readBy: [],
data: {
planName: membershipData.subscription?.name || "Unknown Plan",
clientName,
membershipId,
gymName,
ownerId: gymOwnerId,
formattedExpiryDate: formattedDate,
expiryDate: expiryDate
? admin.firestore.Timestamp.fromDate(expiryDate)
: admin.firestore.Timestamp.fromDate(new Date()),
daysUntilExpiry: daysUntilExpiry,
},
});
logger.info(
`Expiring notification sent for membership ${membershipId} (expires on ${formattedDate}, ${daysUntilExpiry} days remaining)`
);
} catch (error) {
logger.error(
`Error sending expiring notification for ${membershipId}:`,
error
);
}
}
async function getClientName(
membershipId: string,
clientId: string

View File

@ -82,15 +82,6 @@ async function getUserAndFCMToken(
if (notification.recipientId) {
targetUserId = notification.recipientId;
logger.info(`Using top-level recipientId: ${targetUserId}`);
} else if (notification.data?.userId) {
targetUserId = notification.data.userId;
logger.info(`Using data.userId: ${targetUserId}`);
} else if (notification.data?.clientId) {
targetUserId = notification.data.clientId;
logger.info(`Using data.clientId: ${targetUserId}`);
} else if (notification.data?.invitorId) {
targetUserId = notification.data.invitorId;
logger.info(`Using data.invitorId: ${targetUserId}`);
} else if (notification.data?.phoneNumber) {
logger.info(
`Looking up user by phone number from data: ${notification.data.phoneNumber}`
@ -181,8 +172,8 @@ function prepareNotificationMessage(
title =
notification.data?.title ||
(notification.data?.status === "accepted"
? "Trainer Request Accepted"
: "Trainer Request Update");
? "Trainer Invitation Accepted"
: "Trainer Invitation Update");
body =
notification.data?.message ||
`${
@ -240,7 +231,28 @@ function prepareNotificationMessage(
title = notification.data?.title || "Plan Expired";
body =
notification.data?.message ||
`${notification.data?.clientName}/s subscription for plan ${notification.data?.planName} has expired.`;
`${notification.data?.clientName}'s membership for ${notification.data?.planName} has expired.`;
break;
case "plan_expiring_soon":
title = notification.data?.title || "Plan Expiring Soon";
body =
notification.data?.message ||
`${notification.data?.clientName}'s membership for ${notification.data?.planName} will expire on ${notification.data?.formattedExpiryDate}.`;
break;
case "trainer_client_plan_expired":
title = notification.data?.title || "Client Plan Expired";
body =
notification.data?.message ||
`${notification.data?.clientName}'s membership for ${notification.data?.planName} has expired.`;
break;
case "trainer_client_plan_expiring":
title = notification.data?.title || "Client Plan Expiring Soon";
body =
notification.data?.message ||
`${notification.data?.clientName}'s membership for ${notification.data?.planName} will expire on ${notification.data?.formattedExpiryDate}.`;
break;
case "schedule_update":

242
package-lock.json generated
View File

@ -1,242 +0,0 @@
{
"name": "fitlien-services",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@types/busboy": "^1.5.4",
"@types/nodemailer": "^6.4.17",
"@types/pdfkit": "^0.13.9",
"busboy": "^1.6.0",
"date-fns": "^4.1.0",
"nodemailer": "^7.0.3",
"pdfkit": "^0.17.1"
}
},
"node_modules/@swc/helpers": {
"version": "0.5.17",
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz",
"integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==",
"dependencies": {
"tslib": "^2.8.0"
}
},
"node_modules/@types/busboy": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/@types/busboy/-/busboy-1.5.4.tgz",
"integrity": "sha512-kG7WrUuAKK0NoyxfQHsVE6j1m01s6kMma64E+OZenQABMQyTJop1DumUWcLwAQ2JzpefU7PDYoRDKl8uZosFjw==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/node": {
"version": "22.10.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz",
"integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==",
"dependencies": {
"undici-types": "~6.20.0"
}
},
"node_modules/@types/nodemailer": {
"version": "6.4.17",
"resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.17.tgz",
"integrity": "sha512-I9CCaIp6DTldEg7vyUTZi8+9Vo0hi1/T8gv3C89yk1rSAAzoKQ8H8ki/jBYJSFoH/BisgLP8tkZMlQ91CIquww==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/pdfkit": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/@types/pdfkit/-/pdfkit-0.13.9.tgz",
"integrity": "sha512-RDG8Yb1zT7I01FfpwK7nMSA433XWpblMqSCtA5vJlSyavWZb303HUYPCel6JTiDDFqwGLvtAnYbH8N/e0Cb89g==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/brotli": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.3.tgz",
"integrity": "sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==",
"dependencies": {
"base64-js": "^1.1.2"
}
},
"node_modules/busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
"dependencies": {
"streamsearch": "^1.1.0"
},
"engines": {
"node": ">=10.16.0"
}
},
"node_modules/clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
"node_modules/date-fns": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz",
"integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/kossnocorp"
}
},
"node_modules/dfa": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz",
"integrity": "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q=="
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"node_modules/fontkit": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/fontkit/-/fontkit-2.0.4.tgz",
"integrity": "sha512-syetQadaUEDNdxdugga9CpEYVaQIxOwk7GlwZWWZ19//qW4zE5bknOKeMBDYAASwnpaSHKJITRLMF9m1fp3s6g==",
"dependencies": {
"@swc/helpers": "^0.5.12",
"brotli": "^1.3.2",
"clone": "^2.1.2",
"dfa": "^1.2.0",
"fast-deep-equal": "^3.1.3",
"restructure": "^3.0.0",
"tiny-inflate": "^1.0.3",
"unicode-properties": "^1.4.0",
"unicode-trie": "^2.0.0"
}
},
"node_modules/jpeg-exif": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/jpeg-exif/-/jpeg-exif-1.1.4.tgz",
"integrity": "sha512-a+bKEcCjtuW5WTdgeXFzswSrdqi0jk4XlEtZlx5A94wCoBpFjfFTbo/Tra5SpNCl/YFZPvcV1dJc+TAYeg6ROQ=="
},
"node_modules/linebreak": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/linebreak/-/linebreak-1.1.0.tgz",
"integrity": "sha512-MHp03UImeVhB7XZtjd0E4n6+3xr5Dq/9xI/5FptGk5FrbDR3zagPa2DS6U8ks/3HjbKWG9Q1M2ufOzxV2qLYSQ==",
"dependencies": {
"base64-js": "0.0.8",
"unicode-trie": "^2.0.0"
}
},
"node_modules/linebreak/node_modules/base64-js": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
"integrity": "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/nodemailer": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.3.tgz",
"integrity": "sha512-Ajq6Sz1x7cIK3pN6KesGTah+1gnwMnx5gKl3piQlQQE/PwyJ4Mbc8is2psWYxK3RJTVeqsDaCv8ZzXLCDHMTZw==",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/pako": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
"integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA=="
},
"node_modules/pdfkit": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/pdfkit/-/pdfkit-0.17.1.tgz",
"integrity": "sha512-Kkf1I9no14O/uo593DYph5u3QwiMfby7JsBSErN1WqeyTgCBNJE3K4pXBn3TgkdKUIVu+buSl4bYUNC+8Up4xg==",
"dependencies": {
"crypto-js": "^4.2.0",
"fontkit": "^2.0.4",
"jpeg-exif": "^1.1.4",
"linebreak": "^1.1.0",
"png-js": "^1.0.0"
}
},
"node_modules/png-js": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/png-js/-/png-js-1.0.0.tgz",
"integrity": "sha512-k+YsbhpA9e+EFfKjTCH3VW6aoKlyNYI6NYdTfDL4CIvFnvsuO84ttonmZE7rc+v23SLTH8XX+5w/Ak9v0xGY4g=="
},
"node_modules/restructure": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/restructure/-/restructure-3.0.2.tgz",
"integrity": "sha512-gSfoiOEA0VPE6Tukkrr7I0RBdE0s7H1eFCDBk05l1KIQT1UIKNc5JZy6jdyW6eYH3aR3g5b3PuL77rq0hvwtAw=="
},
"node_modules/streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/tiny-inflate": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz",
"integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="
},
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
},
"node_modules/undici-types": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
},
"node_modules/unicode-properties": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.4.1.tgz",
"integrity": "sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==",
"dependencies": {
"base64-js": "^1.3.0",
"unicode-trie": "^2.0.0"
}
},
"node_modules/unicode-trie": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz",
"integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==",
"dependencies": {
"pako": "^0.2.5",
"tiny-inflate": "^1.0.0"
}
}
}
}

View File

@ -1,7 +0,0 @@
{
"dependencies": {
"@types/busboy": "^1.5.4",
"busboy": "^1.6.0",
"date-fns": "^4.1.0"
}
}