0.0.1 • Published 4 years ago

connect-activity-log v0.0.1

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
4 years ago

Connect Activity Log Microservice


Description

A Connect microservice which supports logging activities (admin, endpoint, message, user).

Prerequisites

  1. Google PubSub Service Account

Environment Variables

LOG_LEVEL=info
API_LOGGER=true

NODE_ENV=test
PORT=3000

GOOGLE_APPLICATION_PROJECT=mclinica-dev
GOOGLE_APPLICATION_CREDENTIALS=C:\Users\Downloads\credentials.json

PUBSUB_SUBSCRIBER_NAME=connect_activity_log_local

CONNECT_TOPICS='{"emailMessage": "email_message_develop", "handleEmailMessage": "handle_email_message_develop", "handleMessageQueue": "handle_message_queue_develop", "handleSmsMessage": "handle_sms_message_develop", "smsMessage": "sms_message_develop", "nexmoReply": "nexmo_reply_develop", "generateRefillMessage": "generate_refill_message_develop", "generateAppointmentMessage": "generate_appointment_message_develop", "generateFreeGoodReminderMessage": "generate_free_good_reminder_message_develop", "generateHealthMessage": "generate_health_message_develop", "activityLog": "activity_log_develop"}'

CONNECT_URLS='{"programs": "https://develop.connect.mcltech.dev/programs", "customers": "https://develop.connect.mcltech.dev/customers", "transactions": "https://develop.connect.mcltech.dev/transactions", "products": "https://develop.connect.mcltech.dev/products"}'

PubSub Topics

  • activitylog${NODE_ENV}
{
	programId: 'mclinica',
	userId: 'fc73b241-25eb-4566-89fd-31bb21d2ee0b',
	body: 'Admin created a campaign: "mycare"',
	url: 'google.com',
	metadata: {},
	message: 'this is a message',
	type: 'admin_log' || 'endpoint_log' || 'message_log' || 'user_log',
}

NOTE: For pubsub topic sample payload please refer here.