0.1.1-0 • Published 2 years ago

lib-connector v0.1.1-0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Connector Framework

Logging

Provide standard “ENTER” log statements in the ‘Connector’ library which would be printed consistently across all connectors

Provide standard “EXIT” log statements in the ‘Connector’ library which would be printed consistently across all connectors. This log statement should print the success/failure response code.

All log statements should print the following id(s) - CorrelationId (x-corr-id), MerchantId (extracted from the site context or from x-merchant-id header), transaction Id (unique id per each request)

Implement JSOn serialization for easy consumption on DataDog

AsyncLocalStorage to achieve the things above

Exception Handling

Global try/catch to handle and log all errors sent by the connector (including the stack trace)

Define standard Error Classes (SystemError, ApplicationError etc) for developers to use

Input validation

Implement input payload validation as done in Route library

Security

Implement basic token validation (Is x-api-key present?)

ToDo

  • Implement API context
  • Implement Data context / Mongo/Redis
  • Implement Spec Validation
  • Handle headers
  • Describe interfaces
  • Authorization / token handling
  • SQS Handler
  • Notification: Failing requests / Sucessful requests
  • tests
  • Documentation
  • Publish to npm

Coding standards

https://yottadv.atlassian.net/wiki/spaces/all/pages/2138210375/Integrations+Coding+Standards

0.1.1-0

2 years ago

0.1.0

3 years ago