rejoiner 2.13.1 → 2.14.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.
- package/lib/endpoints/customer.js +2 -2
- package/lib/endpoints/index.js +15 -0
- package/lib/rejoiner.js +5 -7
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { withClient } = require('../helpers')
|
|
2
2
|
|
|
3
|
-
const preferenceTagsPath = '
|
|
4
|
-
const preferenceTagsRemovePath = '
|
|
3
|
+
const preferenceTagsPath = 'customers/preference_tags/by_email/'
|
|
4
|
+
const preferenceTagsRemovePath = 'customers/preference_tags/remove/by_email/'
|
|
5
5
|
|
|
6
6
|
const customerEndpoint = (client) => {
|
|
7
7
|
const endpoint = 'customer'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const customer = require('./customer')
|
|
2
|
+
const journeys = require('./journeys')
|
|
3
|
+
const lists = require('./lists')
|
|
4
|
+
const ping = require('./ping')
|
|
5
|
+
const segments = require('./segments')
|
|
6
|
+
const sessions = require('./sessions')
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
customer,
|
|
10
|
+
journeys,
|
|
11
|
+
lists,
|
|
12
|
+
ping,
|
|
13
|
+
segments,
|
|
14
|
+
sessions,
|
|
15
|
+
}
|
package/lib/rejoiner.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const axios = require('axios')
|
|
2
2
|
const crypto = require('crypto')
|
|
3
|
-
const fs = require('graceful-fs')
|
|
4
|
-
const path = require('path')
|
|
5
3
|
const merge = require('lodash.merge')
|
|
6
4
|
|
|
5
|
+
const endpoints = require('./endpoints')
|
|
6
|
+
|
|
7
7
|
const {
|
|
8
8
|
DEFAULT_API_VERSION,
|
|
9
9
|
REJOINER_API_KEY,
|
|
@@ -34,11 +34,9 @@ function Rejoiner2(options) {
|
|
|
34
34
|
},
|
|
35
35
|
})
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
.
|
|
39
|
-
|
|
40
|
-
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
41
|
-
const endpoint = require(path.join(__dirname, 'endpoints', file))(this)
|
|
37
|
+
Object.values(endpoints)
|
|
38
|
+
.forEach((model) => {
|
|
39
|
+
const endpoint = model(this)
|
|
42
40
|
this[endpoint.path] = endpoint
|
|
43
41
|
})
|
|
44
42
|
|
package/package.json
CHANGED