1.0.16 • Published 3 years ago

@apa_malaghe/utility v1.0.16

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

malaghe_utility

ascii_malaghe_utility.png


⚠️ WARNING ⚠️

This project is based on microservices architecture and no longer maintained. I've stopped using the workflow that made it relevant to me.


Links:

npm utility package --> https://www.npmjs.com/package/@apa_malaghe/utility

github: malaghe_utility --> https://github.com/apakhbari/malaghe-k8s-utility

github: malaghe --> https://github.com/apakhbari/malaghe-k8s


Errors:

  • bad-request --> 400 + message

  • request-validation --> 400 + 'Invalid request parameters'

  • not-authorized --> 401 + 'Not authorized'

  • not-found --> 404 + 'Route not found'

  • database-connection --> 500 + 'Error connecting to db'


OrderStatus:

  • Created

  • Cancelled

  • Completed


ServiceStatus:

  • Troubleshooting

  • Transferring

  • Repairing

  • Received


UsersRoles:

  • User --> 0

  • Admin --> 1993

  • Operator --> 3

  • Technician --> 5

  • Transporter --> 7


UsersGender:

  • Woman --> زن

  • Man --> مرد


Events:

  • MagAssigned = 'mag:assigned'

    id: Types.ObjectId, version: number, title:string, storeId: Types.ObjectId

  • MagUpdated = 'mag:updated'

    id: Types.ObjectId, version: number, slug: string, storeId?: Types.ObjectId

  • MagDeleted = 'mag:deleted'

    id: Types.ObjectId, version: number, storeId?: Types.ObjectId


MiddleWares:

  • current-user

    UserPayload {id: string, email: string, mobile: number, fiName: string, laName: string, role: UserRoles}

  • err-handler

    400 + 'Unhandled error'

  • require-auth

  • require-access

  • validate-request


Developed by APA, 2022

ascii_apa.png

1.0.16

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago