@salesforce/lds-adapters-cdp-engmt-config 1.354.0-dev2 → 1.354.0-dev20
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/dist/es/es2018/cdp-engmt-config.js +10 -10
- package/dist/es/es2018/types/src/generated/adapters/createEngagementSignalCompoundMetric.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -2
- package/package.json +3 -3
- package/sfdc/index.js +211 -211
- package/src/raml/luvio.raml +1 -1
- package/dist/es/es2018/types/src/generated/adapters/createCompoundMetric.d.ts +0 -20
|
@@ -1680,8 +1680,8 @@ function createResourceRequest$4(config) {
|
|
|
1680
1680
|
};
|
|
1681
1681
|
}
|
|
1682
1682
|
|
|
1683
|
-
const adapterName$4 = '
|
|
1684
|
-
const
|
|
1683
|
+
const adapterName$4 = 'createEngagementSignalCompoundMetric';
|
|
1684
|
+
const createEngagementSignalCompoundMetric_ConfigPropertyMetadata = [
|
|
1685
1685
|
generateParamConfigMetadata('denominatorMetric', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1686
1686
|
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
1687
1687
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
@@ -1689,11 +1689,11 @@ const createCompoundMetric_ConfigPropertyMetadata = [
|
|
|
1689
1689
|
generateParamConfigMetadata('numeratorMetric', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1690
1690
|
generateParamConfigMetadata('operator', true, 2 /* Body */, 0 /* String */),
|
|
1691
1691
|
];
|
|
1692
|
-
const
|
|
1693
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$a(
|
|
1692
|
+
const createEngagementSignalCompoundMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createEngagementSignalCompoundMetric_ConfigPropertyMetadata);
|
|
1693
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$a(createEngagementSignalCompoundMetric_ConfigPropertyMetadata);
|
|
1694
1694
|
function typeCheckConfig$4(untrustedConfig) {
|
|
1695
1695
|
const config = {};
|
|
1696
|
-
typeCheckConfig$a(untrustedConfig, config,
|
|
1696
|
+
typeCheckConfig$a(untrustedConfig, config, createEngagementSignalCompoundMetric_ConfigPropertyMetadata);
|
|
1697
1697
|
const untrustedConfig_denominatorMetric = untrustedConfig.denominatorMetric;
|
|
1698
1698
|
config.denominatorMetric = untrustedConfig_denominatorMetric;
|
|
1699
1699
|
const untrustedConfig_numeratorMetric = untrustedConfig.numeratorMetric;
|
|
@@ -1731,12 +1731,12 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
1731
1731
|
throw response;
|
|
1732
1732
|
});
|
|
1733
1733
|
}
|
|
1734
|
-
const
|
|
1735
|
-
return function
|
|
1736
|
-
const config = validateAdapterConfig$4(untrustedConfig,
|
|
1734
|
+
const createEngagementSignalCompoundMetricAdapterFactory = (luvio) => {
|
|
1735
|
+
return function createEngagementSignalCompoundMetric(untrustedConfig) {
|
|
1736
|
+
const config = validateAdapterConfig$4(untrustedConfig, createEngagementSignalCompoundMetric_ConfigPropertyNames);
|
|
1737
1737
|
// Invalid or incomplete config
|
|
1738
1738
|
if (config === null) {
|
|
1739
|
-
throw new Error('Invalid config for "
|
|
1739
|
+
throw new Error('Invalid config for "createEngagementSignalCompoundMetric"');
|
|
1740
1740
|
}
|
|
1741
1741
|
return buildNetworkSnapshot$4(luvio, config);
|
|
1742
1742
|
};
|
|
@@ -2192,4 +2192,4 @@ const getCompoundMetricAdapterFactory = (luvio) => function engmtConfig__getComp
|
|
|
2192
2192
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2193
2193
|
};
|
|
2194
2194
|
|
|
2195
|
-
export {
|
|
2195
|
+
export { createEngagementSignalAdapterFactory, createEngagementSignalCompoundMetricAdapterFactory, createEngagementSignalMetricAdapterFactory, deleteCompoundMetricAdapterFactory, deleteEngagementSignalAdapterFactory, deleteEngagementSignalMetricAdapterFactory, getCompoundMetricAdapterFactory, getEngagementSignalAdapterFactory, getEngagementSignalMetricAdapterFactory, getEngagementSignalsAdapterFactory };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { ResourceRequestConfig as resources_postPersonalizationCompoundMetrics_ResourceRequestConfig } from '../resources/postPersonalizationCompoundMetrics';
|
|
4
|
+
import { EngagementSignalCompoundMetricRepresentation as types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation } from '../types/EngagementSignalCompoundMetricRepresentation';
|
|
5
|
+
export declare const adapterName = "createEngagementSignalCompoundMetric";
|
|
6
|
+
export declare const createEngagementSignalCompoundMetric_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
+
export declare const createEngagementSignalCompoundMetric_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
+
export interface CreateEngagementSignalCompoundMetricConfig {
|
|
9
|
+
denominatorMetric: unknown;
|
|
10
|
+
description: string;
|
|
11
|
+
label: string;
|
|
12
|
+
name: string;
|
|
13
|
+
numeratorMetric: unknown;
|
|
14
|
+
operator: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const createResourceParams: (config: CreateEngagementSignalCompoundMetricConfig) => resources_postPersonalizationCompoundMetrics_ResourceRequestConfig;
|
|
17
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<CreateEngagementSignalCompoundMetricConfig>): adapter$45$utils_Untrusted<CreateEngagementSignalCompoundMetricConfig>;
|
|
18
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): CreateEngagementSignalCompoundMetricConfig | null;
|
|
19
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: CreateEngagementSignalCompoundMetricConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation, any>>;
|
|
20
|
+
export declare const createEngagementSignalCompoundMetricAdapterFactory: $64$luvio_engine_AdapterFactory<CreateEngagementSignalCompoundMetricConfig, types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation>;
|
|
@@ -3,7 +3,7 @@ export { createEngagementSignalAdapterFactory } from '../adapters/createEngageme
|
|
|
3
3
|
export { deleteEngagementSignalAdapterFactory } from '../adapters/deleteEngagementSignal';
|
|
4
4
|
export { getEngagementSignalAdapterFactory } from '../adapters/getEngagementSignal';
|
|
5
5
|
export { createEngagementSignalMetricAdapterFactory } from '../adapters/createEngagementSignalMetric';
|
|
6
|
-
export {
|
|
6
|
+
export { createEngagementSignalCompoundMetricAdapterFactory } from '../adapters/createEngagementSignalCompoundMetric';
|
|
7
7
|
export { deleteEngagementSignalMetricAdapterFactory } from '../adapters/deleteEngagementSignalMetric';
|
|
8
8
|
export { getEngagementSignalMetricAdapterFactory } from '../adapters/getEngagementSignalMetric';
|
|
9
9
|
export { deleteCompoundMetricAdapterFactory } from '../adapters/deleteCompoundMetric';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare let createCompoundMetric: any;
|
|
2
1
|
declare let createEngagementSignal: any;
|
|
2
|
+
declare let createEngagementSignalCompoundMetric: any;
|
|
3
3
|
declare let createEngagementSignalMetric: any;
|
|
4
4
|
declare let deleteCompoundMetric: any;
|
|
5
5
|
declare let deleteEngagementSignal: any;
|
|
@@ -15,4 +15,4 @@ declare let getCompoundMetric_imperative: any;
|
|
|
15
15
|
declare let getEngagementSignal_imperative: any;
|
|
16
16
|
declare let getEngagementSignalMetric_imperative: any;
|
|
17
17
|
declare let getEngagementSignals_imperative: any;
|
|
18
|
-
export {
|
|
18
|
+
export { createEngagementSignal, createEngagementSignalCompoundMetric, createEngagementSignalMetric, deleteCompoundMetric, deleteEngagementSignal, deleteEngagementSignalMetric, getCompoundMetric, getCompoundMetricNotifyChange, getEngagementSignal, getEngagementSignalMetric, getEngagementSignalMetricNotifyChange, getEngagementSignalNotifyChange, getEngagementSignals, getCompoundMetric_imperative, getEngagementSignal_imperative, getEngagementSignalMetric_imperative, getEngagementSignals_imperative, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-cdp-engmt-config",
|
|
3
|
-
"version": "1.354.0-
|
|
3
|
+
"version": "1.354.0-dev20",
|
|
4
4
|
"description": "Engagement Signal Connect API Wire Adapter",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/cdp-engmt-config.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"test:unit:debug": "node --inspect-brk ../../node_modules/jest/bin/jest.js --config ./jest.config.js --runInBand"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@salesforce/lds-bindings": "^1.354.0-
|
|
46
|
+
"@salesforce/lds-bindings": "^1.354.0-dev20"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@salesforce/lds-compiler-plugins": "^1.354.0-
|
|
49
|
+
"@salesforce/lds-compiler-plugins": "^1.354.0-dev20"
|
|
50
50
|
},
|
|
51
51
|
"nx": {
|
|
52
52
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -102,8 +102,71 @@ function createLink(ref) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
const VERSION$5 = "
|
|
106
|
-
function validate$5(obj, path = '
|
|
105
|
+
const VERSION$5 = "8f73e1515e2fe09097e6618181bf923a";
|
|
106
|
+
function validate$5(obj, path = 'EngagementSignalFilterGroupRepresentation') {
|
|
107
|
+
const v_error = (() => {
|
|
108
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
109
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
110
|
+
}
|
|
111
|
+
const obj_conjunctiveOperator = obj.conjunctiveOperator;
|
|
112
|
+
const path_conjunctiveOperator = path + '.conjunctiveOperator';
|
|
113
|
+
if (typeof obj_conjunctiveOperator !== 'string') {
|
|
114
|
+
return new TypeError('Expected "string" but received "' + typeof obj_conjunctiveOperator + '" (at "' + path_conjunctiveOperator + '")');
|
|
115
|
+
}
|
|
116
|
+
const obj_filters = obj.filters;
|
|
117
|
+
const path_filters = path + '.filters';
|
|
118
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
119
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
120
|
+
}
|
|
121
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
122
|
+
const obj_filters_item = obj_filters[i];
|
|
123
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
124
|
+
if (obj_filters_item === undefined) {
|
|
125
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_filters_item + '" (at "' + path_filters_item + '")');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
})();
|
|
129
|
+
return v_error === undefined ? null : v_error;
|
|
130
|
+
}
|
|
131
|
+
const select$c = function EngagementSignalFilterGroupRepresentationSelect() {
|
|
132
|
+
return {
|
|
133
|
+
kind: 'Fragment',
|
|
134
|
+
version: VERSION$5,
|
|
135
|
+
private: [],
|
|
136
|
+
selections: [
|
|
137
|
+
{
|
|
138
|
+
name: 'conjunctiveOperator',
|
|
139
|
+
kind: 'Scalar'
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'filters',
|
|
143
|
+
kind: 'Object',
|
|
144
|
+
// any
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
function equals$5(existing, incoming) {
|
|
150
|
+
const existing_conjunctiveOperator = existing.conjunctiveOperator;
|
|
151
|
+
const incoming_conjunctiveOperator = incoming.conjunctiveOperator;
|
|
152
|
+
if (!(existing_conjunctiveOperator === incoming_conjunctiveOperator)) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
const existing_filters = existing.filters;
|
|
156
|
+
const incoming_filters = incoming.filters;
|
|
157
|
+
const equals_filters_items = equalsArray(existing_filters, incoming_filters, (existing_filters_item, incoming_filters_item) => {
|
|
158
|
+
if (JSONStringify(incoming_filters_item) !== JSONStringify(existing_filters_item)) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
if (equals_filters_items === false) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const VERSION$4 = "0005de97d1fcbbc963014cd633384ca4";
|
|
169
|
+
function validate$4(obj, path = 'EngagementSignalMetricFieldRepresentation') {
|
|
107
170
|
const v_error = (() => {
|
|
108
171
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
109
172
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -121,10 +184,10 @@ function validate$5(obj, path = 'EngagementSignalMetricFieldRepresentation') {
|
|
|
121
184
|
})();
|
|
122
185
|
return v_error === undefined ? null : v_error;
|
|
123
186
|
}
|
|
124
|
-
const select$
|
|
187
|
+
const select$b = function EngagementSignalMetricFieldRepresentationSelect() {
|
|
125
188
|
return {
|
|
126
189
|
kind: 'Fragment',
|
|
127
|
-
version: VERSION$
|
|
190
|
+
version: VERSION$4,
|
|
128
191
|
private: [],
|
|
129
192
|
selections: [
|
|
130
193
|
{
|
|
@@ -138,7 +201,7 @@ const select$c = function EngagementSignalMetricFieldRepresentationSelect() {
|
|
|
138
201
|
]
|
|
139
202
|
};
|
|
140
203
|
};
|
|
141
|
-
function equals$
|
|
204
|
+
function equals$4(existing, incoming) {
|
|
142
205
|
const existing_engagementSignalMetricName = existing.engagementSignalMetricName;
|
|
143
206
|
const incoming_engagementSignalMetricName = incoming.engagementSignalMetricName;
|
|
144
207
|
if (!(existing_engagementSignalMetricName === incoming_engagementSignalMetricName)) {
|
|
@@ -153,15 +216,15 @@ function equals$5(existing, incoming) {
|
|
|
153
216
|
}
|
|
154
217
|
|
|
155
218
|
const TTL$3 = 6000;
|
|
156
|
-
const VERSION$
|
|
157
|
-
function validate$
|
|
219
|
+
const VERSION$3 = "d1b71af9a537281a97d72bbef89beb62";
|
|
220
|
+
function validate$3(obj, path = 'EngagementSignalCompoundMetricRepresentation') {
|
|
158
221
|
const v_error = (() => {
|
|
159
222
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
160
223
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
161
224
|
}
|
|
162
225
|
const obj_denominatorMetric = obj.denominatorMetric;
|
|
163
226
|
const path_denominatorMetric = path + '.denominatorMetric';
|
|
164
|
-
const referencepath_denominatorMetricValidationError = validate$
|
|
227
|
+
const referencepath_denominatorMetricValidationError = validate$4(obj_denominatorMetric, path_denominatorMetric);
|
|
165
228
|
if (referencepath_denominatorMetricValidationError !== null) {
|
|
166
229
|
let message = 'Object doesn\'t match EngagementSignalMetricFieldRepresentation (at "' + path_denominatorMetric + '")\n';
|
|
167
230
|
message += referencepath_denominatorMetricValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -189,7 +252,7 @@ function validate$4(obj, path = 'EngagementSignalCompoundMetricRepresentation')
|
|
|
189
252
|
}
|
|
190
253
|
const obj_numeratorMetric = obj.numeratorMetric;
|
|
191
254
|
const path_numeratorMetric = path + '.numeratorMetric';
|
|
192
|
-
const referencepath_numeratorMetricValidationError = validate$
|
|
255
|
+
const referencepath_numeratorMetricValidationError = validate$4(obj_numeratorMetric, path_numeratorMetric);
|
|
193
256
|
if (referencepath_numeratorMetricValidationError !== null) {
|
|
194
257
|
let message = 'Object doesn\'t match EngagementSignalMetricFieldRepresentation (at "' + path_numeratorMetric + '")\n';
|
|
195
258
|
message += referencepath_numeratorMetricValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -216,11 +279,11 @@ function keyBuilderFromType$2(luvio, object) {
|
|
|
216
279
|
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
217
280
|
return input;
|
|
218
281
|
}
|
|
219
|
-
const select$
|
|
220
|
-
const { selections: EngagementSignalMetricFieldRepresentation__selections, opaque: EngagementSignalMetricFieldRepresentation__opaque, } = select$
|
|
282
|
+
const select$a = function EngagementSignalCompoundMetricRepresentationSelect() {
|
|
283
|
+
const { selections: EngagementSignalMetricFieldRepresentation__selections, opaque: EngagementSignalMetricFieldRepresentation__opaque, } = select$b();
|
|
221
284
|
return {
|
|
222
285
|
kind: 'Fragment',
|
|
223
|
-
version: VERSION$
|
|
286
|
+
version: VERSION$3,
|
|
224
287
|
private: [],
|
|
225
288
|
selections: [
|
|
226
289
|
{
|
|
@@ -256,7 +319,7 @@ const select$b = function EngagementSignalCompoundMetricRepresentationSelect() {
|
|
|
256
319
|
]
|
|
257
320
|
};
|
|
258
321
|
};
|
|
259
|
-
function equals$
|
|
322
|
+
function equals$3(existing, incoming) {
|
|
260
323
|
const existing_description = existing.description;
|
|
261
324
|
const incoming_description = incoming.description;
|
|
262
325
|
if (!(existing_description === incoming_description)) {
|
|
@@ -284,26 +347,26 @@ function equals$4(existing, incoming) {
|
|
|
284
347
|
}
|
|
285
348
|
const existing_denominatorMetric = existing.denominatorMetric;
|
|
286
349
|
const incoming_denominatorMetric = incoming.denominatorMetric;
|
|
287
|
-
if (!(equals$
|
|
350
|
+
if (!(equals$4(existing_denominatorMetric, incoming_denominatorMetric))) {
|
|
288
351
|
return false;
|
|
289
352
|
}
|
|
290
353
|
const existing_numeratorMetric = existing.numeratorMetric;
|
|
291
354
|
const incoming_numeratorMetric = incoming.numeratorMetric;
|
|
292
|
-
if (!(equals$
|
|
355
|
+
if (!(equals$4(existing_numeratorMetric, incoming_numeratorMetric))) {
|
|
293
356
|
return false;
|
|
294
357
|
}
|
|
295
358
|
return true;
|
|
296
359
|
}
|
|
297
360
|
const ingest$3 = function EngagementSignalCompoundMetricRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
298
361
|
if (process.env.NODE_ENV !== 'production') {
|
|
299
|
-
const validateError = validate$
|
|
362
|
+
const validateError = validate$3(input);
|
|
300
363
|
if (validateError !== null) {
|
|
301
364
|
throw validateError;
|
|
302
365
|
}
|
|
303
366
|
}
|
|
304
367
|
const key = keyBuilderFromType$2(luvio, input);
|
|
305
368
|
const ttlToUse = TTL$3;
|
|
306
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "engmt-config", VERSION$
|
|
369
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "engmt-config", VERSION$3, RepresentationType$3, equals$3);
|
|
307
370
|
return createLink(key);
|
|
308
371
|
};
|
|
309
372
|
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -316,168 +379,6 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
316
379
|
});
|
|
317
380
|
}
|
|
318
381
|
|
|
319
|
-
function select$a(luvio, params) {
|
|
320
|
-
return select$b();
|
|
321
|
-
}
|
|
322
|
-
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
323
|
-
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
324
|
-
}
|
|
325
|
-
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
326
|
-
const { body } = response;
|
|
327
|
-
const key = keyBuilderFromType$2(luvio, body);
|
|
328
|
-
luvio.storeIngest(key, ingest$3, body);
|
|
329
|
-
const snapshot = luvio.storeLookup({
|
|
330
|
-
recordId: key,
|
|
331
|
-
node: select$a(),
|
|
332
|
-
variables: {},
|
|
333
|
-
});
|
|
334
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
335
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
336
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
deepFreeze(snapshot.data);
|
|
340
|
-
return snapshot;
|
|
341
|
-
}
|
|
342
|
-
function createResourceRequest$9(config) {
|
|
343
|
-
const headers = {};
|
|
344
|
-
return {
|
|
345
|
-
baseUri: '/services/data/v64.0',
|
|
346
|
-
basePath: '/personalization/compound-metrics',
|
|
347
|
-
method: 'post',
|
|
348
|
-
body: config.body,
|
|
349
|
-
urlParams: {},
|
|
350
|
-
queryParams: {},
|
|
351
|
-
headers,
|
|
352
|
-
priority: 'normal',
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
const adapterName$9 = 'createCompoundMetric';
|
|
357
|
-
const createCompoundMetric_ConfigPropertyMetadata = [
|
|
358
|
-
generateParamConfigMetadata('denominatorMetric', true, 2 /* Body */, 4 /* Unsupported */),
|
|
359
|
-
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
360
|
-
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
361
|
-
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
362
|
-
generateParamConfigMetadata('numeratorMetric', true, 2 /* Body */, 4 /* Unsupported */),
|
|
363
|
-
generateParamConfigMetadata('operator', true, 2 /* Body */, 0 /* String */),
|
|
364
|
-
];
|
|
365
|
-
const createCompoundMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, createCompoundMetric_ConfigPropertyMetadata);
|
|
366
|
-
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$a(createCompoundMetric_ConfigPropertyMetadata);
|
|
367
|
-
function typeCheckConfig$9(untrustedConfig) {
|
|
368
|
-
const config = {};
|
|
369
|
-
typeCheckConfig$a(untrustedConfig, config, createCompoundMetric_ConfigPropertyMetadata);
|
|
370
|
-
const untrustedConfig_denominatorMetric = untrustedConfig.denominatorMetric;
|
|
371
|
-
config.denominatorMetric = untrustedConfig_denominatorMetric;
|
|
372
|
-
const untrustedConfig_numeratorMetric = untrustedConfig.numeratorMetric;
|
|
373
|
-
config.numeratorMetric = untrustedConfig_numeratorMetric;
|
|
374
|
-
return config;
|
|
375
|
-
}
|
|
376
|
-
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
377
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
378
|
-
return null;
|
|
379
|
-
}
|
|
380
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
381
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
382
|
-
}
|
|
383
|
-
const config = typeCheckConfig$9(untrustedConfig);
|
|
384
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
385
|
-
return null;
|
|
386
|
-
}
|
|
387
|
-
return config;
|
|
388
|
-
}
|
|
389
|
-
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
390
|
-
const resourceParams = createResourceParams$9(config);
|
|
391
|
-
const request = createResourceRequest$9(resourceParams);
|
|
392
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
393
|
-
.then((response) => {
|
|
394
|
-
return luvio.handleSuccessResponse(() => {
|
|
395
|
-
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
396
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
397
|
-
}, () => {
|
|
398
|
-
const cache = new StoreKeyMap();
|
|
399
|
-
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
400
|
-
return cache;
|
|
401
|
-
});
|
|
402
|
-
}, (response) => {
|
|
403
|
-
deepFreeze(response);
|
|
404
|
-
throw response;
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
const createCompoundMetricAdapterFactory = (luvio) => {
|
|
408
|
-
return function createCompoundMetric(untrustedConfig) {
|
|
409
|
-
const config = validateAdapterConfig$9(untrustedConfig, createCompoundMetric_ConfigPropertyNames);
|
|
410
|
-
// Invalid or incomplete config
|
|
411
|
-
if (config === null) {
|
|
412
|
-
throw new Error('Invalid config for "createCompoundMetric"');
|
|
413
|
-
}
|
|
414
|
-
return buildNetworkSnapshot$9(luvio, config);
|
|
415
|
-
};
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
const VERSION$3 = "8f73e1515e2fe09097e6618181bf923a";
|
|
419
|
-
function validate$3(obj, path = 'EngagementSignalFilterGroupRepresentation') {
|
|
420
|
-
const v_error = (() => {
|
|
421
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
422
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
423
|
-
}
|
|
424
|
-
const obj_conjunctiveOperator = obj.conjunctiveOperator;
|
|
425
|
-
const path_conjunctiveOperator = path + '.conjunctiveOperator';
|
|
426
|
-
if (typeof obj_conjunctiveOperator !== 'string') {
|
|
427
|
-
return new TypeError('Expected "string" but received "' + typeof obj_conjunctiveOperator + '" (at "' + path_conjunctiveOperator + '")');
|
|
428
|
-
}
|
|
429
|
-
const obj_filters = obj.filters;
|
|
430
|
-
const path_filters = path + '.filters';
|
|
431
|
-
if (!ArrayIsArray(obj_filters)) {
|
|
432
|
-
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
433
|
-
}
|
|
434
|
-
for (let i = 0; i < obj_filters.length; i++) {
|
|
435
|
-
const obj_filters_item = obj_filters[i];
|
|
436
|
-
const path_filters_item = path_filters + '[' + i + ']';
|
|
437
|
-
if (obj_filters_item === undefined) {
|
|
438
|
-
return new TypeError('Expected "defined" but received "' + typeof obj_filters_item + '" (at "' + path_filters_item + '")');
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
})();
|
|
442
|
-
return v_error === undefined ? null : v_error;
|
|
443
|
-
}
|
|
444
|
-
const select$9 = function EngagementSignalFilterGroupRepresentationSelect() {
|
|
445
|
-
return {
|
|
446
|
-
kind: 'Fragment',
|
|
447
|
-
version: VERSION$3,
|
|
448
|
-
private: [],
|
|
449
|
-
selections: [
|
|
450
|
-
{
|
|
451
|
-
name: 'conjunctiveOperator',
|
|
452
|
-
kind: 'Scalar'
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
name: 'filters',
|
|
456
|
-
kind: 'Object',
|
|
457
|
-
// any
|
|
458
|
-
}
|
|
459
|
-
]
|
|
460
|
-
};
|
|
461
|
-
};
|
|
462
|
-
function equals$3(existing, incoming) {
|
|
463
|
-
const existing_conjunctiveOperator = existing.conjunctiveOperator;
|
|
464
|
-
const incoming_conjunctiveOperator = incoming.conjunctiveOperator;
|
|
465
|
-
if (!(existing_conjunctiveOperator === incoming_conjunctiveOperator)) {
|
|
466
|
-
return false;
|
|
467
|
-
}
|
|
468
|
-
const existing_filters = existing.filters;
|
|
469
|
-
const incoming_filters = incoming.filters;
|
|
470
|
-
const equals_filters_items = equalsArray(existing_filters, incoming_filters, (existing_filters_item, incoming_filters_item) => {
|
|
471
|
-
if (JSONStringify(incoming_filters_item) !== JSONStringify(existing_filters_item)) {
|
|
472
|
-
return false;
|
|
473
|
-
}
|
|
474
|
-
});
|
|
475
|
-
if (equals_filters_items === false) {
|
|
476
|
-
return false;
|
|
477
|
-
}
|
|
478
|
-
return true;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
382
|
const TTL$2 = 6000;
|
|
482
383
|
const VERSION$2 = "3c26e95c8929ac6685f9de88dab642ed";
|
|
483
384
|
function validate$2(obj, path = 'EngagementSignalMetricRepresentation') {
|
|
@@ -521,7 +422,7 @@ function keyBuilderFromType$1(luvio, object) {
|
|
|
521
422
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
522
423
|
return input;
|
|
523
424
|
}
|
|
524
|
-
const select$
|
|
425
|
+
const select$9 = function EngagementSignalMetricRepresentationSelect() {
|
|
525
426
|
return {
|
|
526
427
|
kind: 'Fragment',
|
|
527
428
|
version: VERSION$2,
|
|
@@ -648,7 +549,7 @@ function validate$1(obj, path = 'EngagementSignalRepresentation') {
|
|
|
648
549
|
for (let i = 0; i < obj_filterGroups.length; i++) {
|
|
649
550
|
const obj_filterGroups_item = obj_filterGroups[i];
|
|
650
551
|
const path_filterGroups_item = path_filterGroups + '[' + i + ']';
|
|
651
|
-
const referencepath_filterGroups_itemValidationError = validate$
|
|
552
|
+
const referencepath_filterGroups_itemValidationError = validate$5(obj_filterGroups_item, path_filterGroups_item);
|
|
652
553
|
if (referencepath_filterGroups_itemValidationError !== null) {
|
|
653
554
|
let message = 'Object doesn\'t match EngagementSignalFilterGroupRepresentation (at "' + path_filterGroups_item + '")\n';
|
|
654
555
|
message += referencepath_filterGroups_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -757,8 +658,8 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
|
757
658
|
}
|
|
758
659
|
return input;
|
|
759
660
|
}
|
|
760
|
-
const select$
|
|
761
|
-
const { selections: EngagementSignalFilterGroupRepresentation__selections, opaque: EngagementSignalFilterGroupRepresentation__opaque, } = select$
|
|
661
|
+
const select$8 = function EngagementSignalRepresentationSelect() {
|
|
662
|
+
const { selections: EngagementSignalFilterGroupRepresentation__selections, opaque: EngagementSignalFilterGroupRepresentation__opaque, } = select$c();
|
|
762
663
|
return {
|
|
763
664
|
kind: 'Fragment',
|
|
764
665
|
version: VERSION$1,
|
|
@@ -774,7 +675,7 @@ const select$7 = function EngagementSignalRepresentationSelect() {
|
|
|
774
675
|
kind: 'Link',
|
|
775
676
|
plural: true,
|
|
776
677
|
required: false,
|
|
777
|
-
fragment: select$
|
|
678
|
+
fragment: select$a()
|
|
778
679
|
},
|
|
779
680
|
{
|
|
780
681
|
name: 'dataSpaceName',
|
|
@@ -805,7 +706,7 @@ const select$7 = function EngagementSignalRepresentationSelect() {
|
|
|
805
706
|
kind: 'Link',
|
|
806
707
|
plural: true,
|
|
807
708
|
required: false,
|
|
808
|
-
fragment: select$
|
|
709
|
+
fragment: select$9()
|
|
809
710
|
},
|
|
810
711
|
{
|
|
811
712
|
name: 'name',
|
|
@@ -918,7 +819,7 @@ function equals$1(existing, incoming) {
|
|
|
918
819
|
return false;
|
|
919
820
|
}
|
|
920
821
|
const equals_filterGroups_items = equalsArray(existing_filterGroups, incoming_filterGroups, (existing_filterGroups_item, incoming_filterGroups_item) => {
|
|
921
|
-
if (!(equals$
|
|
822
|
+
if (!(equals$5(existing_filterGroups_item, incoming_filterGroups_item))) {
|
|
922
823
|
return false;
|
|
923
824
|
}
|
|
924
825
|
});
|
|
@@ -995,19 +896,19 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
995
896
|
}
|
|
996
897
|
}
|
|
997
898
|
|
|
998
|
-
function select$
|
|
999
|
-
return select$
|
|
899
|
+
function select$7(luvio, params) {
|
|
900
|
+
return select$8();
|
|
1000
901
|
}
|
|
1001
|
-
function getResponseCacheKeys$
|
|
902
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
1002
903
|
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
1003
904
|
}
|
|
1004
|
-
function ingestSuccess$
|
|
905
|
+
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
1005
906
|
const { body } = response;
|
|
1006
907
|
const key = keyBuilderFromType(luvio, body);
|
|
1007
908
|
luvio.storeIngest(key, ingest$1, body);
|
|
1008
909
|
const snapshot = luvio.storeLookup({
|
|
1009
910
|
recordId: key,
|
|
1010
|
-
node: select$
|
|
911
|
+
node: select$7(),
|
|
1011
912
|
variables: {},
|
|
1012
913
|
});
|
|
1013
914
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1018,7 +919,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
|
|
|
1018
919
|
deepFreeze(snapshot.data);
|
|
1019
920
|
return snapshot;
|
|
1020
921
|
}
|
|
1021
|
-
function createResourceRequest$
|
|
922
|
+
function createResourceRequest$9(config) {
|
|
1022
923
|
const headers = {};
|
|
1023
924
|
return {
|
|
1024
925
|
baseUri: '/services/data/v64.0',
|
|
@@ -1032,7 +933,7 @@ function createResourceRequest$8(config) {
|
|
|
1032
933
|
};
|
|
1033
934
|
}
|
|
1034
935
|
|
|
1035
|
-
const adapterName$
|
|
936
|
+
const adapterName$9 = 'createEngagementSignal';
|
|
1036
937
|
const createEngagementSignal_ConfigPropertyMetadata = [
|
|
1037
938
|
generateParamConfigMetadata('catalogIdField', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1038
939
|
generateParamConfigMetadata('compoundMetrics', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
@@ -1048,9 +949,9 @@ const createEngagementSignal_ConfigPropertyMetadata = [
|
|
|
1048
949
|
generateParamConfigMetadata('uniqueIdentifier', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1049
950
|
generateParamConfigMetadata('userIdField', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1050
951
|
];
|
|
1051
|
-
const createEngagementSignal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1052
|
-
const createResourceParams$
|
|
1053
|
-
function typeCheckConfig$
|
|
952
|
+
const createEngagementSignal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, createEngagementSignal_ConfigPropertyMetadata);
|
|
953
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$a(createEngagementSignal_ConfigPropertyMetadata);
|
|
954
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
1054
955
|
const config = {};
|
|
1055
956
|
typeCheckConfig$a(untrustedConfig, config, createEngagementSignal_ConfigPropertyMetadata);
|
|
1056
957
|
const untrustedConfig_catalogIdField = untrustedConfig.catalogIdField;
|
|
@@ -1099,6 +1000,105 @@ function typeCheckConfig$8(untrustedConfig) {
|
|
|
1099
1000
|
config.userIdField = untrustedConfig_userIdField;
|
|
1100
1001
|
return config;
|
|
1101
1002
|
}
|
|
1003
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
1004
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1005
|
+
return null;
|
|
1006
|
+
}
|
|
1007
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1008
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1009
|
+
}
|
|
1010
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
1011
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1012
|
+
return null;
|
|
1013
|
+
}
|
|
1014
|
+
return config;
|
|
1015
|
+
}
|
|
1016
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
1017
|
+
const resourceParams = createResourceParams$9(config);
|
|
1018
|
+
const request = createResourceRequest$9(resourceParams);
|
|
1019
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1020
|
+
.then((response) => {
|
|
1021
|
+
return luvio.handleSuccessResponse(() => {
|
|
1022
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
1023
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1024
|
+
}, () => {
|
|
1025
|
+
const cache = new StoreKeyMap();
|
|
1026
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
1027
|
+
return cache;
|
|
1028
|
+
});
|
|
1029
|
+
}, (response) => {
|
|
1030
|
+
deepFreeze(response);
|
|
1031
|
+
throw response;
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
const createEngagementSignalAdapterFactory = (luvio) => {
|
|
1035
|
+
return function createEngagementSignal(untrustedConfig) {
|
|
1036
|
+
const config = validateAdapterConfig$9(untrustedConfig, createEngagementSignal_ConfigPropertyNames);
|
|
1037
|
+
// Invalid or incomplete config
|
|
1038
|
+
if (config === null) {
|
|
1039
|
+
throw new Error('Invalid config for "createEngagementSignal"');
|
|
1040
|
+
}
|
|
1041
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
1042
|
+
};
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
function select$6(luvio, params) {
|
|
1046
|
+
return select$a();
|
|
1047
|
+
}
|
|
1048
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1049
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
1050
|
+
}
|
|
1051
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
1052
|
+
const { body } = response;
|
|
1053
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
1054
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1055
|
+
const snapshot = luvio.storeLookup({
|
|
1056
|
+
recordId: key,
|
|
1057
|
+
node: select$6(),
|
|
1058
|
+
variables: {},
|
|
1059
|
+
});
|
|
1060
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1061
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1062
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
deepFreeze(snapshot.data);
|
|
1066
|
+
return snapshot;
|
|
1067
|
+
}
|
|
1068
|
+
function createResourceRequest$8(config) {
|
|
1069
|
+
const headers = {};
|
|
1070
|
+
return {
|
|
1071
|
+
baseUri: '/services/data/v64.0',
|
|
1072
|
+
basePath: '/personalization/compound-metrics',
|
|
1073
|
+
method: 'post',
|
|
1074
|
+
body: config.body,
|
|
1075
|
+
urlParams: {},
|
|
1076
|
+
queryParams: {},
|
|
1077
|
+
headers,
|
|
1078
|
+
priority: 'normal',
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
const adapterName$8 = 'createEngagementSignalCompoundMetric';
|
|
1083
|
+
const createEngagementSignalCompoundMetric_ConfigPropertyMetadata = [
|
|
1084
|
+
generateParamConfigMetadata('denominatorMetric', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1085
|
+
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
1086
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1087
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
1088
|
+
generateParamConfigMetadata('numeratorMetric', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1089
|
+
generateParamConfigMetadata('operator', true, 2 /* Body */, 0 /* String */),
|
|
1090
|
+
];
|
|
1091
|
+
const createEngagementSignalCompoundMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, createEngagementSignalCompoundMetric_ConfigPropertyMetadata);
|
|
1092
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$a(createEngagementSignalCompoundMetric_ConfigPropertyMetadata);
|
|
1093
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1094
|
+
const config = {};
|
|
1095
|
+
typeCheckConfig$a(untrustedConfig, config, createEngagementSignalCompoundMetric_ConfigPropertyMetadata);
|
|
1096
|
+
const untrustedConfig_denominatorMetric = untrustedConfig.denominatorMetric;
|
|
1097
|
+
config.denominatorMetric = untrustedConfig_denominatorMetric;
|
|
1098
|
+
const untrustedConfig_numeratorMetric = untrustedConfig.numeratorMetric;
|
|
1099
|
+
config.numeratorMetric = untrustedConfig_numeratorMetric;
|
|
1100
|
+
return config;
|
|
1101
|
+
}
|
|
1102
1102
|
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
1103
1103
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1104
1104
|
return null;
|
|
@@ -1130,19 +1130,19 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
1130
1130
|
throw response;
|
|
1131
1131
|
});
|
|
1132
1132
|
}
|
|
1133
|
-
const
|
|
1134
|
-
return function
|
|
1135
|
-
const config = validateAdapterConfig$8(untrustedConfig,
|
|
1133
|
+
const createEngagementSignalCompoundMetricAdapterFactory = (luvio) => {
|
|
1134
|
+
return function createEngagementSignalCompoundMetric(untrustedConfig) {
|
|
1135
|
+
const config = validateAdapterConfig$8(untrustedConfig, createEngagementSignalCompoundMetric_ConfigPropertyNames);
|
|
1136
1136
|
// Invalid or incomplete config
|
|
1137
1137
|
if (config === null) {
|
|
1138
|
-
throw new Error('Invalid config for "
|
|
1138
|
+
throw new Error('Invalid config for "createEngagementSignalCompoundMetric"');
|
|
1139
1139
|
}
|
|
1140
1140
|
return buildNetworkSnapshot$8(luvio, config);
|
|
1141
1141
|
};
|
|
1142
1142
|
};
|
|
1143
1143
|
|
|
1144
1144
|
function select$5(luvio, params) {
|
|
1145
|
-
return select$
|
|
1145
|
+
return select$9();
|
|
1146
1146
|
}
|
|
1147
1147
|
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
1148
1148
|
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
@@ -1492,7 +1492,7 @@ const deleteEngagementSignalMetricAdapterFactory = (luvio) => {
|
|
|
1492
1492
|
};
|
|
1493
1493
|
|
|
1494
1494
|
function select$4(luvio, params) {
|
|
1495
|
-
return select$
|
|
1495
|
+
return select$a();
|
|
1496
1496
|
}
|
|
1497
1497
|
function keyBuilder$7(luvio, params) {
|
|
1498
1498
|
return keyBuilder$d(luvio, {
|
|
@@ -1525,7 +1525,7 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
|
1525
1525
|
const storeMetadataParams = {
|
|
1526
1526
|
ttl: TTL$3,
|
|
1527
1527
|
namespace: keyPrefix,
|
|
1528
|
-
version: VERSION$
|
|
1528
|
+
version: VERSION$3,
|
|
1529
1529
|
representationName: RepresentationType$3
|
|
1530
1530
|
};
|
|
1531
1531
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
@@ -1661,7 +1661,7 @@ const notifyChangeFactory$2 = (luvio, options) => {
|
|
|
1661
1661
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
1662
1662
|
ttl: TTL$3,
|
|
1663
1663
|
namespace: keyPrefix,
|
|
1664
|
-
version: VERSION$
|
|
1664
|
+
version: VERSION$3,
|
|
1665
1665
|
representationName: RepresentationType$3
|
|
1666
1666
|
});
|
|
1667
1667
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
@@ -1673,7 +1673,7 @@ const notifyChangeFactory$2 = (luvio, options) => {
|
|
|
1673
1673
|
};
|
|
1674
1674
|
|
|
1675
1675
|
function select$3(luvio, params) {
|
|
1676
|
-
return select$
|
|
1676
|
+
return select$8();
|
|
1677
1677
|
}
|
|
1678
1678
|
function keyBuilder$5(luvio, params) {
|
|
1679
1679
|
return keyBuilder$b(luvio, {
|
|
@@ -1854,7 +1854,7 @@ const notifyChangeFactory$1 = (luvio, options) => {
|
|
|
1854
1854
|
};
|
|
1855
1855
|
|
|
1856
1856
|
function select$2(luvio, params) {
|
|
1857
|
-
return select$
|
|
1857
|
+
return select$9();
|
|
1858
1858
|
}
|
|
1859
1859
|
function keyBuilder$3(luvio, params) {
|
|
1860
1860
|
return keyBuilder$c(luvio, {
|
|
@@ -2325,8 +2325,8 @@ const getEngagementSignalsAdapterFactory = (luvio) => function engmtConfig__getE
|
|
|
2325
2325
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2326
2326
|
};
|
|
2327
2327
|
|
|
2328
|
-
let createCompoundMetric;
|
|
2329
2328
|
let createEngagementSignal;
|
|
2329
|
+
let createEngagementSignalCompoundMetric;
|
|
2330
2330
|
let createEngagementSignalMetric;
|
|
2331
2331
|
let deleteCompoundMetric;
|
|
2332
2332
|
let deleteEngagementSignal;
|
|
@@ -2375,8 +2375,8 @@ function bindExportsTo(luvio) {
|
|
|
2375
2375
|
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
2376
2376
|
}
|
|
2377
2377
|
return {
|
|
2378
|
-
createCompoundMetric: unwrapSnapshotData(createCompoundMetricAdapterFactory),
|
|
2379
2378
|
createEngagementSignal: unwrapSnapshotData(createEngagementSignalAdapterFactory),
|
|
2379
|
+
createEngagementSignalCompoundMetric: unwrapSnapshotData(createEngagementSignalCompoundMetricAdapterFactory),
|
|
2380
2380
|
createEngagementSignalMetric: unwrapSnapshotData(createEngagementSignalMetricAdapterFactory),
|
|
2381
2381
|
deleteCompoundMetric: createLDSAdapter(luvio, adapterName$6, deleteCompoundMetricAdapterFactory),
|
|
2382
2382
|
deleteEngagementSignal: createLDSAdapter(luvio, adapterName$5, deleteEngagementSignalAdapterFactory),
|
|
@@ -2398,8 +2398,8 @@ function bindExportsTo(luvio) {
|
|
|
2398
2398
|
}
|
|
2399
2399
|
withDefaultLuvio((luvio) => {
|
|
2400
2400
|
({
|
|
2401
|
-
createCompoundMetric,
|
|
2402
2401
|
createEngagementSignal,
|
|
2402
|
+
createEngagementSignalCompoundMetric,
|
|
2403
2403
|
createEngagementSignalMetric,
|
|
2404
2404
|
deleteCompoundMetric,
|
|
2405
2405
|
deleteEngagementSignal,
|
|
@@ -2418,5 +2418,5 @@ withDefaultLuvio((luvio) => {
|
|
|
2418
2418
|
} = bindExportsTo(luvio));
|
|
2419
2419
|
});
|
|
2420
2420
|
|
|
2421
|
-
export {
|
|
2422
|
-
// version: 1.354.0-
|
|
2421
|
+
export { createEngagementSignal, createEngagementSignalCompoundMetric, createEngagementSignalMetric, deleteCompoundMetric, deleteEngagementSignal, deleteEngagementSignalMetric, getCompoundMetric, getCompoundMetricNotifyChange, getCompoundMetric_imperative, getEngagementSignal, getEngagementSignalMetric, getEngagementSignalMetricNotifyChange, getEngagementSignalMetric_imperative, getEngagementSignalNotifyChange, getEngagementSignal_imperative, getEngagementSignals, getEngagementSignals_imperative };
|
|
2422
|
+
// version: 1.354.0-dev20-c23c23e6bf
|
package/src/raml/luvio.raml
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
-
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
-
import { ResourceRequestConfig as resources_postPersonalizationCompoundMetrics_ResourceRequestConfig } from '../resources/postPersonalizationCompoundMetrics';
|
|
4
|
-
import { EngagementSignalCompoundMetricRepresentation as types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation } from '../types/EngagementSignalCompoundMetricRepresentation';
|
|
5
|
-
export declare const adapterName = "createCompoundMetric";
|
|
6
|
-
export declare const createCompoundMetric_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
-
export declare const createCompoundMetric_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
-
export interface CreateCompoundMetricConfig {
|
|
9
|
-
denominatorMetric: unknown;
|
|
10
|
-
description: string;
|
|
11
|
-
label: string;
|
|
12
|
-
name: string;
|
|
13
|
-
numeratorMetric: unknown;
|
|
14
|
-
operator: string;
|
|
15
|
-
}
|
|
16
|
-
export declare const createResourceParams: (config: CreateCompoundMetricConfig) => resources_postPersonalizationCompoundMetrics_ResourceRequestConfig;
|
|
17
|
-
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<CreateCompoundMetricConfig>): adapter$45$utils_Untrusted<CreateCompoundMetricConfig>;
|
|
18
|
-
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): CreateCompoundMetricConfig | null;
|
|
19
|
-
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: CreateCompoundMetricConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation, any>>;
|
|
20
|
-
export declare const createCompoundMetricAdapterFactory: $64$luvio_engine_AdapterFactory<CreateCompoundMetricConfig, types_EngagementSignalCompoundMetricRepresentation_EngagementSignalCompoundMetricRepresentation>;
|