phonepe #42

Merged
allentj merged 13 commits from phonepe into dev 2025-05-21 10:10:14 +00:00
7 changed files with 27 additions and 8 deletions

View File

@ -8,6 +8,7 @@
"source": "functions",
"codebase": "default",
"timeoutSeconds": 540,
"memory": "1GiB",
"ignore": [
"node_modules",
".git",

View File

@ -13,6 +13,7 @@
"aws-sdk": "^2.1692.0",
"axios": "^1.9.0",
"cors": "^2.8.5",
"date-fns": "^4.1.0",
"firebase-admin": "^12.6.0",
"firebase-functions": "^6.0.1",
"form-data": "^4.0.1",
@ -3805,6 +3806,15 @@
"utrie": "^1.0.2"
}
},
"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/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",

View File

@ -20,6 +20,7 @@
"aws-sdk": "^2.1692.0",
"axios": "^1.9.0",
"cors": "^2.8.5",
"date-fns": "^4.1.0",
"firebase-admin": "^12.6.0",
"firebase-functions": "^6.0.1",
"form-data": "^4.0.1",

View File

@ -1,3 +1,14 @@
import { setGlobalOptions } from "firebase-functions/v2";
setGlobalOptions({
region: "#{SERVICES_RGN}#",
memory: "1GiB",
timeoutSeconds: 540,
minInstances: 0,
maxInstances: 10,
concurrency: 80
});
export * from './shared/config';
export { sendEmailMessage, sendEmailWithAttachment, sendEmailSES } from './email';
export { sendSMSMessage } from './sms';

View File

@ -5,7 +5,7 @@ import * as path from 'path';
import { format } from 'date-fns';
import { sendEmailWithAttachmentUtil } from "../../../utils/emailService";
import { jsPDF } from "jspdf";
import 'jspdf-autotable';
import autoTable from 'jspdf-autotable';
const admin = getAdmin();
const logger = getLogger();
@ -83,7 +83,7 @@ export class InvoiceService {
doc.text(`Phone: ${data.phoneNumber}`, 20, 80);
doc.text(`Email: ${data.email}`, 20, 90);
(doc as any).autoTable({
autoTable(doc,{
startY: 110,
head: [['No.', 'Description', 'HSN/SAC', 'Amount (INR)']],
body: [

View File

@ -154,7 +154,7 @@ export const phonePeWebhook = onRequest({
logger.info(`Fetching user data for userId: ${userId}`);
const userDoc = await admin.firestore()
.collection('users')
.collection('client_profiles')
.doc(userId)
.get();
if (userDoc.exists) {

View File

@ -1,11 +1,7 @@
{
"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"
"date-fns": "^4.1.0"
}
}