Files
MinglarBackendNestJS/serverless.yml

390 lines
9.8 KiB
YAML
Raw Normal View History

2025-11-10 15:05:01 +05:30
service: minglarDev
provider:
name: aws
runtime: nodejs20.x
region: ap-south-1
versionFunctions: false
2025-11-12 19:59:54 +05:30
apiGateway:
binaryMediaTypes:
- "*/*"
2025-11-12 19:59:54 +05:30
minimumCompressionSize: 0
2025-11-10 15:05:01 +05:30
environment:
DATABASE_URL: ${env:DATABASE_URL}
2025-11-12 16:03:57 +05:30
DB_USERNAME: ${env:DB_USERNAME}
DB_PASSWORD: ${env:DB_PASSWORD}
DB_DATABASE_NAME: ${env:DB_DATABASE_NAME}
DB_HOSTNAME: ${env:DB_HOSTNAME}
DB_PORT: ${env:DB_PORT}
2025-11-10 15:05:01 +05:30
BY_PASS_EMAIL: ${env:BY_PASS_EMAIL}
BYPASS_OTP: ${env:BYPASS_OTP}
BREVO_EMAIL_API_KEY: ${env:BREVO_EMAIL_API_KEY}
BREVO_API_BASEURL: ${env:BREVO_API_BASEURL}
BREVO_FROM_EMAIL: ${env:BREVO_FROM_EMAIL}
BREVO_SMTP_HOST: ${env:BREVO_SMTP_HOST}
BREVO_SMTP_PORT: ${env:BREVO_SMTP_PORT}
BREVO_SMTP_USER: ${env:BREVO_SMTP_USER}
BREVO_SMTP_PASS: ${env:BREVO_SMTP_PASS}
REFRESH_TOKEN_SECRET: ${env:REFRESH_TOKEN_SECRET}
JWT_SECRET: ${env:JWT_SECRET}
SALT_ROUNDS: ${env:SALT_ROUNDS}
2025-11-12 16:03:57 +05:30
NODE_ENV: ${env:NODE_ENV}
2025-11-12 19:59:54 +05:30
S3_BUCKET_NAME: ${env:S3_BUCKET_NAME}
iam:
role:
statements:
- Effect: Allow
Action:
- s3:PutObject
- s3:GetObject
- s3:DeleteObject
Resource: "arn:aws:s3:::${env:S3_BUCKET_NAME}/*"
2025-11-12 16:03:57 +05:30
2025-11-10 15:05:01 +05:30
# ------------------------------------------------------------
# ESBUILD
# ------------------------------------------------------------
custom:
esbuild:
bundle: true
minify: true
sourcemap: false
target: node20
platform: node
concurrency: 10
external:
- "@prisma/client"
- ".prisma"
exclude:
- "aws-sdk"
# ------------------------------------------------------------
# GLOBAL PACKAGE CONFIG (EMPTY PACKAGE STRATEGY)
# ------------------------------------------------------------
2025-11-10 15:05:01 +05:30
package:
individually: true
patterns:
- "!**/*" # <-- DO NOT include anything globally
2025-11-10 15:05:01 +05:30
# ------------------------------------------------------------
# FUNCTIONS (ONLY required files included)
# ------------------------------------------------------------
2025-11-10 15:05:01 +05:30
functions:
getHosts:
handler: src/modules/host/handlers/host.handler
package:
patterns:
- "src/modules/host/handlers/host.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
2025-11-10 15:05:01 +05:30
events:
- httpApi:
path: /host
method: get
2025-11-12 16:03:57 +05:30
2025-11-12 16:03:57 +05:30
verifyOtp:
handler: src/modules/host/handlers/verifyOtp.handler
package:
patterns:
- "src/modules/host/handlers/verifyOtp.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
2025-11-12 16:03:57 +05:30
events:
- httpApi:
path: /host/verify-otp
method: post
2025-11-12 16:03:57 +05:30
loginForHost:
handler: src/modules/host/handlers/loginForHost.handler
package:
patterns:
- "src/modules/host/handlers/loginForHost.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
2025-11-12 16:03:57 +05:30
events:
- httpApi:
path: /host/login
method: post
2025-11-12 16:03:57 +05:30
registrationOfHost:
handler: src/modules/host/handlers/registration.handler
package:
patterns:
- "src/modules/host/handlers/registration.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
2025-11-12 16:03:57 +05:30
events:
- httpApi:
path: /host/registration
method: post
2025-11-12 16:03:57 +05:30
createPasswordForHost:
handler: src/modules/host/handlers/createPassword.handler
package:
patterns:
- "src/modules/host/handlers/createPassword.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
2025-11-12 16:03:57 +05:30
events:
- httpApi:
path: /host/create-password
2025-11-12 19:59:54 +05:30
method: post
2025-11-12 19:59:54 +05:30
addPaymentDetailsForHost:
handler: src/modules/host/handlers/addPaymentDetails.handler
package:
patterns:
- "src/modules/host/handlers/addPaymentDetails.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
2025-11-12 19:59:54 +05:30
events:
- httpApi:
path: /host/add-payment-details
method: post
getHostById:
handler: src/modules/host/handlers/getbyidhandler.handler
package:
patterns:
- "src/modules/host/handlers/getbyidhandler.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
2025-11-14 15:04:01 +05:30
path: /host/getById
method: get
2025-11-13 15:56:13 +05:30
getStepperInfo:
2025-11-14 15:16:53 +05:30
handler: src/modules/host/handlers/getStepper.handler
2025-11-13 15:56:13 +05:30
package:
patterns:
2025-11-14 15:16:53 +05:30
- "src/modules/host/handlers/getStepper.handler.*"
- "src/common/utils/handlers/safeHandler.*"
- "src/common/database/**"
- "src/modules/host/services/**"
- "common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
2025-11-13 15:56:13 +05:30
events:
- httpApi:
path: /stepper
method: get
minglarRegistration:
handler: src/modules/minglaradmin/handlers/registration.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/registration
method: post
minglarLoginForAdmin:
handler: src/modules/minglaradmin/handlers/loginForMinglar.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/login
method: post
minglarCreatePassword:
handler: src/modules/minglaradmin/handlers/createPassword.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/create-password
method: post
2025-11-14 17:22:07 +05:30
updateMinglarProfile:
handler: src/modules/minglaradmin/handlers/updateProfile.handler
package:
patterns:
- "src/modules/host/handlers/addCompanyDetails.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
- "node_modules/@aws-sdk/**"
- "node_modules/@smithy/**"
events:
- httpApi:
path: /minglaradmin/update-profile
method: patch
prepopulateTeammate:
handler: src/modules/minglaradmin/handlers/prepopulateTeammate.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/prepopulate-Roles
method: get
inviteTeammate:
2025-11-14 17:48:40 +05:30
handler: src/modules/minglaradmin/handlers/inviteTeammate.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/invite-teammate
method: post
2025-11-17 12:17:06 +05:30
getAllHostApplication:
handler: src/modules/minglaradmin/handlers/getAllHostApplication.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/get-all-host-applications
method: get
2025-11-17 12:17:06 +05:30
getAllInvitationDetails:
handler: src/modules/minglaradmin/handlers/getAllInvitationDetails.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/get-all-invitation-details
method: get
2025-11-17 15:28:22 +05:30
getAllCoadminAndAMDetails:
handler: src/modules/minglaradmin/handlers/getAllCoadminAndAM.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/get-all-coadmin-and-am-details
method: get
2025-11-18 14:36:32 +05:30
assignAMToHost:
handler: src/modules/minglaradmin/handlers/assignAM.handler
package:
patterns:
- "src/modules/minglaradmin/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
events:
- httpApi:
path: /minglaradmin/assign-am-to-host
method: patch
2025-11-12 19:59:54 +05:30
addCompanyDetails:
handler: src/modules/host/handlers/addCompanyDetails.handler
2025-11-12 19:59:54 +05:30
package:
patterns:
- "src/modules/host/handlers/addCompanyDetails.*"
- "src/modules/host/services/**"
- "common/**"
- "src/common/**"
- "node_modules/@prisma/client/**"
- "node_modules/.prisma/**"
- "node_modules/@aws-sdk/**"
- "node_modules/@smithy/**"
2025-11-12 19:59:54 +05:30
events:
- httpApi:
path: /host/add-company-details
2025-11-17 19:05:26 +05:30
method: patch