@mindful-web/marko-web-omeda-identity-x 1.40.2 → 1.44.1
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/add-integration-hooks.js +5 -0
- package/components/identify.marko.js +2 -2
- package/index.js +9 -2
- package/package.json +3 -3
- package/rapid-identify.js +1 -1
package/add-integration-hooks.js
CHANGED
|
@@ -28,6 +28,7 @@ module.exports = (params = {}) => {
|
|
|
28
28
|
omedaGraphQLClientProp,
|
|
29
29
|
idxOmedaRapidIdentifyProp,
|
|
30
30
|
omedaPromoCodeCookieName,
|
|
31
|
+
omedaPromoCodePrefix,
|
|
31
32
|
omedaPromoCodeDefault,
|
|
32
33
|
shouldAwait,
|
|
33
34
|
onLoginLinkSentFormatter,
|
|
@@ -44,6 +45,7 @@ module.exports = (params = {}) => {
|
|
|
44
45
|
idxOmedaRapidIdentifyProp: Joi.string().required(),
|
|
45
46
|
omedaGraphQLClientProp: Joi.string().required(),
|
|
46
47
|
omedaPromoCodeCookieName: Joi.string().required(),
|
|
48
|
+
omedaPromoCodePrefix: Joi.string(),
|
|
47
49
|
omedaPromoCodeDefault: Joi.string(),
|
|
48
50
|
shouldAwait: schemas.shouldAwait,
|
|
49
51
|
onLoginLinkSentFormatter: Joi.function().required(),
|
|
@@ -67,6 +69,7 @@ module.exports = (params = {}) => {
|
|
|
67
69
|
idxOmedaRapidIdentify: get(args, `req.${idxOmedaRapidIdentifyProp}`),
|
|
68
70
|
omedaGraphQLClient: get(args, `req.${omedaGraphQLClientProp}`),
|
|
69
71
|
omedaPromoCodeCookieName,
|
|
72
|
+
omedaPromoCodePrefix,
|
|
70
73
|
omedaPromoCodeDefault,
|
|
71
74
|
formatter: onLoginLinkSentFormatter,
|
|
72
75
|
...appendDataFor('onLoginLinkSent'),
|
|
@@ -86,6 +89,7 @@ module.exports = (params = {}) => {
|
|
|
86
89
|
brandKey,
|
|
87
90
|
idxOmedaRapidIdentify: get(args, `req.${idxOmedaRapidIdentifyProp}`),
|
|
88
91
|
omedaPromoCodeCookieName,
|
|
92
|
+
omedaPromoCodePrefix,
|
|
89
93
|
omedaPromoCodeDefault,
|
|
90
94
|
formatter: onAuthenticationSuccessFormatter,
|
|
91
95
|
...appendDataFor('onAuthenticationSuccess'),
|
|
@@ -104,6 +108,7 @@ module.exports = (params = {}) => {
|
|
|
104
108
|
...args,
|
|
105
109
|
idxOmedaRapidIdentify: get(args, `req.${idxOmedaRapidIdentifyProp}`),
|
|
106
110
|
omedaPromoCodeCookieName,
|
|
111
|
+
omedaPromoCodePrefix,
|
|
107
112
|
omedaPromoCodeDefault,
|
|
108
113
|
formatter: onUserProfileUpdateFormatter,
|
|
109
114
|
...appendDataFor('onUserProfileUpdate'),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-omeda-identity-x$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-omeda-identity-x$1.44.1/components/identify.marko",
|
|
6
6
|
marko_component = require("./identify.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_getCookieId = require("@mindful-web/marko-web-omeda-identity-x/utils/get-cookie-id"),
|
|
@@ -51,7 +51,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
51
51
|
}, marko_component);
|
|
52
52
|
|
|
53
53
|
marko_template.meta = {
|
|
54
|
-
id: "/@mindful-web/marko-web-omeda-identity-x$1.
|
|
54
|
+
id: "/@mindful-web/marko-web-omeda-identity-x$1.44.1/components/identify.marko",
|
|
55
55
|
component: "./identify.marko",
|
|
56
56
|
tags: [
|
|
57
57
|
"@mindful-web/marko-web-identity-x/components/identify.marko",
|
package/index.js
CHANGED
|
@@ -39,6 +39,7 @@ const schemas = require('./validation/schemas');
|
|
|
39
39
|
* @prop {string} [omedaGraphQLClientProp=$omedaGraphQLClient]
|
|
40
40
|
* @prop {string} [omedaPromoCodeCookieName=omeda_promo_code]
|
|
41
41
|
* @prop {?string} omedaPromoCodeDefault
|
|
42
|
+
* @prop {?string} omedaPromoCodePrefix
|
|
42
43
|
* @prop {string} [omedaRapidIdentifyProp=$omedaRapidIdentify]
|
|
43
44
|
* @prop {?ShouldAwaitSchema} shouldAwait
|
|
44
45
|
* @prop {?Promise<object>} onLoginLinkSentFormatter
|
|
@@ -114,6 +115,7 @@ module.exports = (app, params = {}) => {
|
|
|
114
115
|
inputId,
|
|
115
116
|
omedaGraphQLClientProp,
|
|
116
117
|
omedaPromoCodeCookieName,
|
|
118
|
+
omedaPromoCodePrefix,
|
|
117
119
|
omedaPromoCodeDefault,
|
|
118
120
|
omedaRapidIdentifyProp,
|
|
119
121
|
shouldAwait,
|
|
@@ -183,12 +185,13 @@ module.exports = (app, params = {}) => {
|
|
|
183
185
|
inputId: Joi.string().required(),
|
|
184
186
|
omedaGraphQLClientProp: Joi.string().default('$omedaGraphQLClient'),
|
|
185
187
|
omedaPromoCodeCookieName: Joi.string().default('omeda_promo_code'),
|
|
188
|
+
omedaPromoCodePrefix: Joi.string(),
|
|
186
189
|
omedaPromoCodeDefault: Joi.string(),
|
|
187
190
|
omedaRapidIdentifyProp: Joi.string().default('$omedaRapidIdentify'),
|
|
188
191
|
onLoginLinkSentFormatter: Joi.function(),
|
|
189
192
|
onAuthenticationSuccessFormatter: Joi.function(),
|
|
190
193
|
onUserProfileUpdateFormatter: Joi.function(),
|
|
191
|
-
rapidIdentProductId: Joi.number()
|
|
194
|
+
rapidIdentProductId: Joi.number(),
|
|
192
195
|
}), params);
|
|
193
196
|
|
|
194
197
|
// strip `oly_enc_id` when identity-x user is logged-in
|
|
@@ -222,6 +225,7 @@ module.exports = (app, params = {}) => {
|
|
|
222
225
|
idxOmedaRapidIdentifyProp,
|
|
223
226
|
omedaGraphQLClientProp,
|
|
224
227
|
omedaPromoCodeCookieName,
|
|
228
|
+
omedaPromoCodePrefix,
|
|
225
229
|
omedaPromoCodeDefault,
|
|
226
230
|
shouldAwait,
|
|
227
231
|
onLoginLinkSentFormatter,
|
|
@@ -232,10 +236,11 @@ module.exports = (app, params = {}) => {
|
|
|
232
236
|
// attach the identity-x rapid identification wrapper middleware
|
|
233
237
|
app.use(rapidIdentify({
|
|
234
238
|
brandKey,
|
|
235
|
-
productId: rapidIdentProductId,
|
|
239
|
+
...(rapidIdentProductId && { productId: rapidIdentProductId }),
|
|
236
240
|
prop: idxOmedaRapidIdentifyProp,
|
|
237
241
|
omedaRapidIdentifyProp,
|
|
238
242
|
omedaPromoCodeCookieName,
|
|
243
|
+
omedaPromoCodePrefix,
|
|
239
244
|
omedaPromoCodeDefault,
|
|
240
245
|
}));
|
|
241
246
|
|
|
@@ -256,6 +261,7 @@ module.exports = (app, params = {}) => {
|
|
|
256
261
|
brandKey,
|
|
257
262
|
idxOmedaRapidIdentifyProp,
|
|
258
263
|
omedaPromoCodeCookieName,
|
|
264
|
+
omedaPromoCodePrefix,
|
|
259
265
|
omedaPromoCodeDefault,
|
|
260
266
|
}));
|
|
261
267
|
};
|
|
@@ -344,6 +350,7 @@ module.exports = (app, params = {}) => {
|
|
|
344
350
|
* @prop {string} brandKey
|
|
345
351
|
* @prop {OIDXRapidIdentify} idxOmedaRapidIdentify
|
|
346
352
|
* @prop {string} omedaPromoCodeCookieName
|
|
353
|
+
* @prop {string} omedaPromoCodePrefix
|
|
347
354
|
* @prop {string} omedaPromoCodeDefault
|
|
348
355
|
*
|
|
349
356
|
* @typedef {OmedaHookFunctionArgs & OnAuthenticationSuccessFnParams} OnAuthenticationSuccessFnArgs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindful-web/marko-web-omeda-identity-x",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.1",
|
|
4
4
|
"description": "Marko Omeda+IdentityX integration tools",
|
|
5
5
|
"repository": "https://github.com/parameter1/mindful-web/tree/main/packages/marko-web-omeda-identity-x",
|
|
6
6
|
"author": "Josh Worden <josh@parameter1.com>",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@mindful-web/marko-web-identity-x": "^1.40.1",
|
|
17
|
-
"@mindful-web/marko-web-omeda": "^1.
|
|
17
|
+
"@mindful-web/marko-web-omeda": "^1.41.0",
|
|
18
18
|
"@mindful-web/object-path": "^1.11.9",
|
|
19
19
|
"@mindful-web/utils": "^1.11.9",
|
|
20
20
|
"@parameter1/joi": "^1.2.10",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "066116746de4ab4f292205f1a381097d66babc51"
|
|
33
33
|
}
|
package/rapid-identify.js
CHANGED
|
@@ -165,7 +165,7 @@ module.exports = async ({
|
|
|
165
165
|
|
|
166
166
|
const { id, encryptedCustomerId } = await omedaRapidIdentify({
|
|
167
167
|
email: appUser.email,
|
|
168
|
-
productId,
|
|
168
|
+
...(productId && { productId }),
|
|
169
169
|
...(givenName && { firstName: givenName }),
|
|
170
170
|
...(familyName && { lastName: familyName }),
|
|
171
171
|
...(organization && { companyName: organization }),
|