@go-mailer/jarvis 9.1.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  const axios = require('axios').default
2
2
  const Env = require('../env')
3
3
  const { fetchTenants } = require('./iam')
4
- const AUTOMATA_URI = Env.fetch('AUTOMATA_SERVICE_URI', true)
4
+ const API_SERVICE_URI = Env.fetch('API_SERVICE_URI', true)
5
5
  const GM_API_KEY = Env.fetch('GM_API_KEY', true)
6
6
 
7
7
  const triggerEvent = async (event_code, tenant_id, context = {}) => {
@@ -15,7 +15,7 @@ const triggerEvent = async (event_code, tenant_id, context = {}) => {
15
15
  } = tenant
16
16
 
17
17
  await axios.post(
18
- `${AUTOMATA_URI}/api/v1/events/trigger`,
18
+ `${API_SERVICE_URI}/v1/automations`,
19
19
  {
20
20
  event_code,
21
21
  contact_email,
@@ -1,7 +1,7 @@
1
1
  const axios = require('axios').default
2
2
  const Env = require('../env')
3
3
  const { fetchTenants } = require('./iam')
4
- const USERS_URI = Env.fetch('USERS_SERVICE_URI', true)
4
+ const API_SERVICE_URI = Env.fetch('API_SERVICE_URI', true)
5
5
  const GM_API_KEY = Env.fetch('GM_API_KEY', true)
6
6
 
7
7
  const updateContact = async (tenant_id, data = {}) => {
@@ -16,7 +16,7 @@ const updateContact = async (tenant_id, data = {}) => {
16
16
  } = tenant
17
17
 
18
18
  await axios.post(
19
- `${USERS_URI}/api/contacts`,
19
+ `${API_SERVICE_URI}/v1/contacts`,
20
20
  { email, name, ...data },
21
21
  { headers: { Authorization: `Bearer ${GM_API_KEY}` } }
22
22
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-mailer/jarvis",
3
- "version": "9.1.0",
3
+ "version": "10.0.0",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:go-mailer-ltd/jarvis-node.git",
6
6
  "author": "Nathan Oguntuberu <nateoguns.work@gmail.com>",