@salesforce/lds-adapters-industries-omnianalytics 0.1.0-dev1
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/LICENSE.txt +82 -0
- package/dist/es/es2018/industries-omnianalytics.js +1870 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/fetchOmniAnalyticsLogs.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/adapters/fetchOmniAnalyticsMetadata.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/storeOmniAnalyticsLogs.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +6 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectOmniAnalyticsAnalyticsMetadata.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectOmniAnalyticsGetAnalyticsLogs.d.ts +22 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectOmniAnalyticsAnalyticsLogs.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsLogCreateRepresentation.d.ts +47 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsLogDetailRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsLogInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsLogsRepresentation.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsMetadataRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsSettingRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsTrackingComponentRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsTrackingExternalDefRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsTrackingExternalEventDefRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/OmniAnalyticsTrackingGroupRepresentation.d.ts +55 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +69 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +1927 -0
- package/src/raml/api.raml +377 -0
- package/src/raml/luvio.raml +35 -0
|
@@ -0,0 +1,1870 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from '@luvio/engine';
|
|
8
|
+
|
|
9
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
+
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
11
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
|
+
/**
|
|
13
|
+
* Validates an adapter config is well-formed.
|
|
14
|
+
* @param config The config to validate.
|
|
15
|
+
* @param adapter The adapter validation configuration.
|
|
16
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
17
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
18
|
+
*/
|
|
19
|
+
function validateConfig(config, adapter, oneOf) {
|
|
20
|
+
const { displayName } = adapter;
|
|
21
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
22
|
+
if (config === undefined ||
|
|
23
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
24
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
27
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
28
|
+
}
|
|
29
|
+
if (unsupported !== undefined &&
|
|
30
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
31
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
const supported = required.concat(optional);
|
|
34
|
+
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
35
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function untrustedIsObject(untrusted) {
|
|
39
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
40
|
+
}
|
|
41
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
42
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
43
|
+
}
|
|
44
|
+
const snapshotRefreshOptions = {
|
|
45
|
+
overrides: {
|
|
46
|
+
headers: {
|
|
47
|
+
'Cache-Control': 'no-cache',
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
52
|
+
return {
|
|
53
|
+
name,
|
|
54
|
+
required,
|
|
55
|
+
resourceType,
|
|
56
|
+
typeCheckShape,
|
|
57
|
+
isArrayShape,
|
|
58
|
+
coerceFn,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
62
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
63
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
64
|
+
return {
|
|
65
|
+
displayName,
|
|
66
|
+
parameters: {
|
|
67
|
+
required,
|
|
68
|
+
optional,
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const keyPrefix = 'omnianalytics';
|
|
73
|
+
|
|
74
|
+
const { isArray: ArrayIsArray } = Array;
|
|
75
|
+
function equalsArray(a, b, equalsItem) {
|
|
76
|
+
const aLength = a.length;
|
|
77
|
+
const bLength = b.length;
|
|
78
|
+
if (aLength !== bLength) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
for (let i = 0; i < aLength; i++) {
|
|
82
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
function createLink(ref) {
|
|
89
|
+
return {
|
|
90
|
+
__ref: serializeStructuredKey(ref),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const TTL$2 = 10000;
|
|
95
|
+
const VERSION$8 = "3d2e52fd8e2f4a4244b68292d0af7634";
|
|
96
|
+
function validate$8(obj, path = 'OmniAnalyticsLogCreateRepresentation') {
|
|
97
|
+
const v_error = (() => {
|
|
98
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
99
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
100
|
+
}
|
|
101
|
+
if (obj.eventPublishStatus !== undefined) {
|
|
102
|
+
const obj_eventPublishStatus = obj.eventPublishStatus;
|
|
103
|
+
const path_eventPublishStatus = path + '.eventPublishStatus';
|
|
104
|
+
if (typeof obj_eventPublishStatus !== 'string') {
|
|
105
|
+
return new TypeError('Expected "string" but received "' + typeof obj_eventPublishStatus + '" (at "' + path_eventPublishStatus + '")');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (obj.externalStatusMesg !== undefined) {
|
|
109
|
+
const obj_externalStatusMesg = obj.externalStatusMesg;
|
|
110
|
+
const path_externalStatusMesg = path + '.externalStatusMesg';
|
|
111
|
+
if (typeof obj_externalStatusMesg !== 'string') {
|
|
112
|
+
return new TypeError('Expected "string" but received "' + typeof obj_externalStatusMesg + '" (at "' + path_externalStatusMesg + '")');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (obj.internalEventId !== undefined) {
|
|
116
|
+
const obj_internalEventId = obj.internalEventId;
|
|
117
|
+
const path_internalEventId = path + '.internalEventId';
|
|
118
|
+
if (typeof obj_internalEventId !== 'string') {
|
|
119
|
+
return new TypeError('Expected "string" but received "' + typeof obj_internalEventId + '" (at "' + path_internalEventId + '")');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const obj_responseId = obj.responseId;
|
|
123
|
+
const path_responseId = path + '.responseId';
|
|
124
|
+
if (typeof obj_responseId !== 'string') {
|
|
125
|
+
return new TypeError('Expected "string" but received "' + typeof obj_responseId + '" (at "' + path_responseId + '")');
|
|
126
|
+
}
|
|
127
|
+
})();
|
|
128
|
+
return v_error === undefined ? null : v_error;
|
|
129
|
+
}
|
|
130
|
+
const RepresentationType$2 = 'OmniAnalyticsLogCreateRepresentation';
|
|
131
|
+
function keyBuilder$4(luvio, config) {
|
|
132
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.responseId;
|
|
133
|
+
}
|
|
134
|
+
function keyBuilderFromType(luvio, object) {
|
|
135
|
+
const keyParams = {
|
|
136
|
+
responseId: object.responseId
|
|
137
|
+
};
|
|
138
|
+
return keyBuilder$4(luvio, keyParams);
|
|
139
|
+
}
|
|
140
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
141
|
+
return input;
|
|
142
|
+
}
|
|
143
|
+
const select$b = function OmniAnalyticsLogCreateRepresentationSelect() {
|
|
144
|
+
return {
|
|
145
|
+
kind: 'Fragment',
|
|
146
|
+
version: VERSION$8,
|
|
147
|
+
private: [],
|
|
148
|
+
selections: [
|
|
149
|
+
{
|
|
150
|
+
name: 'eventPublishStatus',
|
|
151
|
+
kind: 'Scalar',
|
|
152
|
+
required: false
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'externalStatusMesg',
|
|
156
|
+
kind: 'Scalar',
|
|
157
|
+
required: false
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'internalEventId',
|
|
161
|
+
kind: 'Scalar',
|
|
162
|
+
required: false
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'responseId',
|
|
166
|
+
kind: 'Scalar'
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
function equals$8(existing, incoming) {
|
|
172
|
+
const existing_eventPublishStatus = existing.eventPublishStatus;
|
|
173
|
+
const incoming_eventPublishStatus = incoming.eventPublishStatus;
|
|
174
|
+
// if at least one of these optionals is defined
|
|
175
|
+
if (existing_eventPublishStatus !== undefined || incoming_eventPublishStatus !== undefined) {
|
|
176
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
177
|
+
// not equal
|
|
178
|
+
if (existing_eventPublishStatus === undefined || incoming_eventPublishStatus === undefined) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
if (!(existing_eventPublishStatus === incoming_eventPublishStatus)) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const existing_externalStatusMesg = existing.externalStatusMesg;
|
|
186
|
+
const incoming_externalStatusMesg = incoming.externalStatusMesg;
|
|
187
|
+
// if at least one of these optionals is defined
|
|
188
|
+
if (existing_externalStatusMesg !== undefined || incoming_externalStatusMesg !== undefined) {
|
|
189
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
190
|
+
// not equal
|
|
191
|
+
if (existing_externalStatusMesg === undefined || incoming_externalStatusMesg === undefined) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
if (!(existing_externalStatusMesg === incoming_externalStatusMesg)) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const existing_internalEventId = existing.internalEventId;
|
|
199
|
+
const incoming_internalEventId = incoming.internalEventId;
|
|
200
|
+
// if at least one of these optionals is defined
|
|
201
|
+
if (existing_internalEventId !== undefined || incoming_internalEventId !== undefined) {
|
|
202
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
203
|
+
// not equal
|
|
204
|
+
if (existing_internalEventId === undefined || incoming_internalEventId === undefined) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
if (!(existing_internalEventId === incoming_internalEventId)) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const existing_responseId = existing.responseId;
|
|
212
|
+
const incoming_responseId = incoming.responseId;
|
|
213
|
+
if (!(existing_responseId === incoming_responseId)) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
const ingest$2 = function OmniAnalyticsLogCreateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
219
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
220
|
+
const validateError = validate$8(input);
|
|
221
|
+
if (validateError !== null) {
|
|
222
|
+
throw validateError;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
const key = keyBuilderFromType(luvio, input);
|
|
226
|
+
const ttlToUse = TTL$2;
|
|
227
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "omnianalytics", VERSION$8, RepresentationType$2, equals$8);
|
|
228
|
+
return createLink(key);
|
|
229
|
+
};
|
|
230
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
231
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
232
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
233
|
+
rootKeySet.set(rootKey, {
|
|
234
|
+
namespace: keyPrefix,
|
|
235
|
+
representationName: RepresentationType$2,
|
|
236
|
+
mergeable: false
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function select$a(luvio, params) {
|
|
241
|
+
return select$b();
|
|
242
|
+
}
|
|
243
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
244
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
245
|
+
}
|
|
246
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
247
|
+
const { body } = response;
|
|
248
|
+
const key = keyBuilderFromType(luvio, body);
|
|
249
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
250
|
+
const snapshot = luvio.storeLookup({
|
|
251
|
+
recordId: key,
|
|
252
|
+
node: select$a(),
|
|
253
|
+
variables: {},
|
|
254
|
+
});
|
|
255
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
256
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
257
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
deepFreeze(snapshot.data);
|
|
261
|
+
return snapshot;
|
|
262
|
+
}
|
|
263
|
+
function createResourceRequest$2(config) {
|
|
264
|
+
const headers = {};
|
|
265
|
+
return {
|
|
266
|
+
baseUri: '/services/data/v66.0',
|
|
267
|
+
basePath: '/connect/omni-analytics/analytics-logs',
|
|
268
|
+
method: 'post',
|
|
269
|
+
body: config.body,
|
|
270
|
+
urlParams: {},
|
|
271
|
+
queryParams: {},
|
|
272
|
+
headers,
|
|
273
|
+
priority: 'normal',
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const adapterName$2 = 'storeOmniAnalyticsLogs';
|
|
278
|
+
const storeOmniAnalyticsLogs_ConfigPropertyMetadata = [
|
|
279
|
+
generateParamConfigMetadata('analyticsLog', true, 2 /* Body */, 0 /* String */),
|
|
280
|
+
generateParamConfigMetadata('analyticsLogDate', true, 2 /* Body */, 0 /* String */),
|
|
281
|
+
generateParamConfigMetadata('analyticsLogOwnerId', true, 2 /* Body */, 0 /* String */),
|
|
282
|
+
generateParamConfigMetadata('componentId', true, 2 /* Body */, 0 /* String */),
|
|
283
|
+
generateParamConfigMetadata('eventType', true, 2 /* Body */, 0 /* String */),
|
|
284
|
+
];
|
|
285
|
+
const storeOmniAnalyticsLogs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, storeOmniAnalyticsLogs_ConfigPropertyMetadata);
|
|
286
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(storeOmniAnalyticsLogs_ConfigPropertyMetadata);
|
|
287
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
288
|
+
const config = {};
|
|
289
|
+
typeCheckConfig$3(untrustedConfig, config, storeOmniAnalyticsLogs_ConfigPropertyMetadata);
|
|
290
|
+
return config;
|
|
291
|
+
}
|
|
292
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
293
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
294
|
+
return null;
|
|
295
|
+
}
|
|
296
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
297
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
298
|
+
}
|
|
299
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
300
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
301
|
+
return null;
|
|
302
|
+
}
|
|
303
|
+
return config;
|
|
304
|
+
}
|
|
305
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
306
|
+
const resourceParams = createResourceParams$2(config);
|
|
307
|
+
const request = createResourceRequest$2(resourceParams);
|
|
308
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
309
|
+
.then((response) => {
|
|
310
|
+
return luvio.handleSuccessResponse(() => {
|
|
311
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
312
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
313
|
+
}, () => {
|
|
314
|
+
const cache = new StoreKeyMap();
|
|
315
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
316
|
+
return cache;
|
|
317
|
+
});
|
|
318
|
+
}, (response) => {
|
|
319
|
+
deepFreeze(response);
|
|
320
|
+
throw response;
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
const storeOmniAnalyticsLogsAdapterFactory = (luvio) => {
|
|
324
|
+
return function storeOmniAnalyticsLogs(untrustedConfig) {
|
|
325
|
+
const config = validateAdapterConfig$2(untrustedConfig, storeOmniAnalyticsLogs_ConfigPropertyNames);
|
|
326
|
+
// Invalid or incomplete config
|
|
327
|
+
if (config === null) {
|
|
328
|
+
throw new Error('Invalid config for "storeOmniAnalyticsLogs"');
|
|
329
|
+
}
|
|
330
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
const VERSION$7 = "0a621a407c2ed4e5cfb104db53f4a29c";
|
|
335
|
+
function validate$7(obj, path = 'OmniAnalyticsSettingRepresentation') {
|
|
336
|
+
const v_error = (() => {
|
|
337
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
338
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
339
|
+
}
|
|
340
|
+
const obj_name = obj.name;
|
|
341
|
+
const path_name = path + '.name';
|
|
342
|
+
if (typeof obj_name !== 'string') {
|
|
343
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
344
|
+
}
|
|
345
|
+
if (obj.value !== undefined) {
|
|
346
|
+
const obj_value = obj.value;
|
|
347
|
+
const path_value = path + '.value';
|
|
348
|
+
if (typeof obj_value !== 'string') {
|
|
349
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
})();
|
|
353
|
+
return v_error === undefined ? null : v_error;
|
|
354
|
+
}
|
|
355
|
+
const select$9 = function OmniAnalyticsSettingRepresentationSelect() {
|
|
356
|
+
return {
|
|
357
|
+
kind: 'Fragment',
|
|
358
|
+
version: VERSION$7,
|
|
359
|
+
private: [],
|
|
360
|
+
selections: [
|
|
361
|
+
{
|
|
362
|
+
name: 'name',
|
|
363
|
+
kind: 'Scalar'
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
name: 'value',
|
|
367
|
+
kind: 'Scalar',
|
|
368
|
+
required: false
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
function equals$7(existing, incoming) {
|
|
374
|
+
const existing_name = existing.name;
|
|
375
|
+
const incoming_name = incoming.name;
|
|
376
|
+
if (!(existing_name === incoming_name)) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
const existing_value = existing.value;
|
|
380
|
+
const incoming_value = incoming.value;
|
|
381
|
+
// if at least one of these optionals is defined
|
|
382
|
+
if (existing_value !== undefined || incoming_value !== undefined) {
|
|
383
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
384
|
+
// not equal
|
|
385
|
+
if (existing_value === undefined || incoming_value === undefined) {
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
if (!(existing_value === incoming_value)) {
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
return true;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const VERSION$6 = "123d2efc846c30a861e29585f92e2b69";
|
|
396
|
+
function validate$6(obj, path = 'OmniAnalyticsTrackingComponentRepresentation') {
|
|
397
|
+
const v_error = (() => {
|
|
398
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
399
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
400
|
+
}
|
|
401
|
+
const obj_componentIdentifier = obj.componentIdentifier;
|
|
402
|
+
const path_componentIdentifier = path + '.componentIdentifier';
|
|
403
|
+
if (typeof obj_componentIdentifier !== 'string') {
|
|
404
|
+
return new TypeError('Expected "string" but received "' + typeof obj_componentIdentifier + '" (at "' + path_componentIdentifier + '")');
|
|
405
|
+
}
|
|
406
|
+
if (obj.componentType !== undefined) {
|
|
407
|
+
const obj_componentType = obj.componentType;
|
|
408
|
+
const path_componentType = path + '.componentType';
|
|
409
|
+
if (typeof obj_componentType !== 'string') {
|
|
410
|
+
return new TypeError('Expected "string" but received "' + typeof obj_componentType + '" (at "' + path_componentType + '")');
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
const obj_componentVersion = obj.componentVersion;
|
|
414
|
+
const path_componentVersion = path + '.componentVersion';
|
|
415
|
+
if (typeof obj_componentVersion !== 'string') {
|
|
416
|
+
return new TypeError('Expected "string" but received "' + typeof obj_componentVersion + '" (at "' + path_componentVersion + '")');
|
|
417
|
+
}
|
|
418
|
+
const obj_identifier = obj.identifier;
|
|
419
|
+
const path_identifier = path + '.identifier';
|
|
420
|
+
if (typeof obj_identifier !== 'string') {
|
|
421
|
+
return new TypeError('Expected "string" but received "' + typeof obj_identifier + '" (at "' + path_identifier + '")');
|
|
422
|
+
}
|
|
423
|
+
const obj_name = obj.name;
|
|
424
|
+
const path_name = path + '.name';
|
|
425
|
+
if (typeof obj_name !== 'string') {
|
|
426
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
427
|
+
}
|
|
428
|
+
if (obj.omniTrackingCompGroupId !== undefined) {
|
|
429
|
+
const obj_omniTrackingCompGroupId = obj.omniTrackingCompGroupId;
|
|
430
|
+
const path_omniTrackingCompGroupId = path + '.omniTrackingCompGroupId';
|
|
431
|
+
if (typeof obj_omniTrackingCompGroupId !== 'string') {
|
|
432
|
+
return new TypeError('Expected "string" but received "' + typeof obj_omniTrackingCompGroupId + '" (at "' + path_omniTrackingCompGroupId + '")');
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if (obj.omniTrackingComponentDefKey !== undefined) {
|
|
436
|
+
const obj_omniTrackingComponentDefKey = obj.omniTrackingComponentDefKey;
|
|
437
|
+
const path_omniTrackingComponentDefKey = path + '.omniTrackingComponentDefKey';
|
|
438
|
+
if (typeof obj_omniTrackingComponentDefKey !== 'string') {
|
|
439
|
+
return new TypeError('Expected "string" but received "' + typeof obj_omniTrackingComponentDefKey + '" (at "' + path_omniTrackingComponentDefKey + '")');
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
})();
|
|
443
|
+
return v_error === undefined ? null : v_error;
|
|
444
|
+
}
|
|
445
|
+
const select$8 = function OmniAnalyticsTrackingComponentRepresentationSelect() {
|
|
446
|
+
return {
|
|
447
|
+
kind: 'Fragment',
|
|
448
|
+
version: VERSION$6,
|
|
449
|
+
private: [],
|
|
450
|
+
selections: [
|
|
451
|
+
{
|
|
452
|
+
name: 'componentIdentifier',
|
|
453
|
+
kind: 'Scalar'
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: 'componentType',
|
|
457
|
+
kind: 'Scalar',
|
|
458
|
+
required: false
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
name: 'componentVersion',
|
|
462
|
+
kind: 'Scalar'
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
name: 'identifier',
|
|
466
|
+
kind: 'Scalar'
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
name: 'name',
|
|
470
|
+
kind: 'Scalar'
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
name: 'omniTrackingCompGroupId',
|
|
474
|
+
kind: 'Scalar',
|
|
475
|
+
required: false
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
name: 'omniTrackingComponentDefKey',
|
|
479
|
+
kind: 'Scalar',
|
|
480
|
+
required: false
|
|
481
|
+
}
|
|
482
|
+
]
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
function equals$6(existing, incoming) {
|
|
486
|
+
const existing_componentIdentifier = existing.componentIdentifier;
|
|
487
|
+
const incoming_componentIdentifier = incoming.componentIdentifier;
|
|
488
|
+
if (!(existing_componentIdentifier === incoming_componentIdentifier)) {
|
|
489
|
+
return false;
|
|
490
|
+
}
|
|
491
|
+
const existing_componentType = existing.componentType;
|
|
492
|
+
const incoming_componentType = incoming.componentType;
|
|
493
|
+
// if at least one of these optionals is defined
|
|
494
|
+
if (existing_componentType !== undefined || incoming_componentType !== undefined) {
|
|
495
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
496
|
+
// not equal
|
|
497
|
+
if (existing_componentType === undefined || incoming_componentType === undefined) {
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
if (!(existing_componentType === incoming_componentType)) {
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
const existing_componentVersion = existing.componentVersion;
|
|
505
|
+
const incoming_componentVersion = incoming.componentVersion;
|
|
506
|
+
if (!(existing_componentVersion === incoming_componentVersion)) {
|
|
507
|
+
return false;
|
|
508
|
+
}
|
|
509
|
+
const existing_identifier = existing.identifier;
|
|
510
|
+
const incoming_identifier = incoming.identifier;
|
|
511
|
+
if (!(existing_identifier === incoming_identifier)) {
|
|
512
|
+
return false;
|
|
513
|
+
}
|
|
514
|
+
const existing_name = existing.name;
|
|
515
|
+
const incoming_name = incoming.name;
|
|
516
|
+
if (!(existing_name === incoming_name)) {
|
|
517
|
+
return false;
|
|
518
|
+
}
|
|
519
|
+
const existing_omniTrackingCompGroupId = existing.omniTrackingCompGroupId;
|
|
520
|
+
const incoming_omniTrackingCompGroupId = incoming.omniTrackingCompGroupId;
|
|
521
|
+
// if at least one of these optionals is defined
|
|
522
|
+
if (existing_omniTrackingCompGroupId !== undefined || incoming_omniTrackingCompGroupId !== undefined) {
|
|
523
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
524
|
+
// not equal
|
|
525
|
+
if (existing_omniTrackingCompGroupId === undefined || incoming_omniTrackingCompGroupId === undefined) {
|
|
526
|
+
return false;
|
|
527
|
+
}
|
|
528
|
+
if (!(existing_omniTrackingCompGroupId === incoming_omniTrackingCompGroupId)) {
|
|
529
|
+
return false;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
const existing_omniTrackingComponentDefKey = existing.omniTrackingComponentDefKey;
|
|
533
|
+
const incoming_omniTrackingComponentDefKey = incoming.omniTrackingComponentDefKey;
|
|
534
|
+
// if at least one of these optionals is defined
|
|
535
|
+
if (existing_omniTrackingComponentDefKey !== undefined || incoming_omniTrackingComponentDefKey !== undefined) {
|
|
536
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
537
|
+
// not equal
|
|
538
|
+
if (existing_omniTrackingComponentDefKey === undefined || incoming_omniTrackingComponentDefKey === undefined) {
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
541
|
+
if (!(existing_omniTrackingComponentDefKey === incoming_omniTrackingComponentDefKey)) {
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
return true;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
const VERSION$5 = "c51c45397ac9228be417844ecc8f870f";
|
|
549
|
+
function validate$5(obj, path = 'OmniAnalyticsTrackingExternalDefRepresentation') {
|
|
550
|
+
const v_error = (() => {
|
|
551
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
552
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
553
|
+
}
|
|
554
|
+
const obj_description = obj.description;
|
|
555
|
+
const path_description = path + '.description';
|
|
556
|
+
if (typeof obj_description !== 'string') {
|
|
557
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
558
|
+
}
|
|
559
|
+
const obj_identifier = obj.identifier;
|
|
560
|
+
const path_identifier = path + '.identifier';
|
|
561
|
+
if (typeof obj_identifier !== 'string') {
|
|
562
|
+
return new TypeError('Expected "string" but received "' + typeof obj_identifier + '" (at "' + path_identifier + '")');
|
|
563
|
+
}
|
|
564
|
+
if (obj.isActive !== undefined) {
|
|
565
|
+
const obj_isActive = obj.isActive;
|
|
566
|
+
const path_isActive = path + '.isActive';
|
|
567
|
+
if (typeof obj_isActive !== 'string') {
|
|
568
|
+
return new TypeError('Expected "string" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
const obj_name = obj.name;
|
|
572
|
+
const path_name = path + '.name';
|
|
573
|
+
if (typeof obj_name !== 'string') {
|
|
574
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
575
|
+
}
|
|
576
|
+
const obj_omniExtTrackingDefKey = obj.omniExtTrackingDefKey;
|
|
577
|
+
const path_omniExtTrackingDefKey = path + '.omniExtTrackingDefKey';
|
|
578
|
+
if (typeof obj_omniExtTrackingDefKey !== 'string') {
|
|
579
|
+
return new TypeError('Expected "string" but received "' + typeof obj_omniExtTrackingDefKey + '" (at "' + path_omniExtTrackingDefKey + '")');
|
|
580
|
+
}
|
|
581
|
+
if (obj.trackingFrameworkInformation !== undefined) {
|
|
582
|
+
const obj_trackingFrameworkInformation = obj.trackingFrameworkInformation;
|
|
583
|
+
const path_trackingFrameworkInformation = path + '.trackingFrameworkInformation';
|
|
584
|
+
if (typeof obj_trackingFrameworkInformation !== 'string') {
|
|
585
|
+
return new TypeError('Expected "string" but received "' + typeof obj_trackingFrameworkInformation + '" (at "' + path_trackingFrameworkInformation + '")');
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
if (obj.trackingServiceProvider !== undefined) {
|
|
589
|
+
const obj_trackingServiceProvider = obj.trackingServiceProvider;
|
|
590
|
+
const path_trackingServiceProvider = path + '.trackingServiceProvider';
|
|
591
|
+
if (typeof obj_trackingServiceProvider !== 'string') {
|
|
592
|
+
return new TypeError('Expected "string" but received "' + typeof obj_trackingServiceProvider + '" (at "' + path_trackingServiceProvider + '")');
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
})();
|
|
596
|
+
return v_error === undefined ? null : v_error;
|
|
597
|
+
}
|
|
598
|
+
const select$7 = function OmniAnalyticsTrackingExternalDefRepresentationSelect() {
|
|
599
|
+
return {
|
|
600
|
+
kind: 'Fragment',
|
|
601
|
+
version: VERSION$5,
|
|
602
|
+
private: [],
|
|
603
|
+
selections: [
|
|
604
|
+
{
|
|
605
|
+
name: 'description',
|
|
606
|
+
kind: 'Scalar'
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
name: 'identifier',
|
|
610
|
+
kind: 'Scalar'
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
name: 'isActive',
|
|
614
|
+
kind: 'Scalar',
|
|
615
|
+
required: false
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: 'name',
|
|
619
|
+
kind: 'Scalar'
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
name: 'omniExtTrackingDefKey',
|
|
623
|
+
kind: 'Scalar'
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
name: 'trackingFrameworkInformation',
|
|
627
|
+
kind: 'Scalar',
|
|
628
|
+
required: false
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
name: 'trackingServiceProvider',
|
|
632
|
+
kind: 'Scalar',
|
|
633
|
+
required: false
|
|
634
|
+
}
|
|
635
|
+
]
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
function equals$5(existing, incoming) {
|
|
639
|
+
const existing_description = existing.description;
|
|
640
|
+
const incoming_description = incoming.description;
|
|
641
|
+
if (!(existing_description === incoming_description)) {
|
|
642
|
+
return false;
|
|
643
|
+
}
|
|
644
|
+
const existing_identifier = existing.identifier;
|
|
645
|
+
const incoming_identifier = incoming.identifier;
|
|
646
|
+
if (!(existing_identifier === incoming_identifier)) {
|
|
647
|
+
return false;
|
|
648
|
+
}
|
|
649
|
+
const existing_isActive = existing.isActive;
|
|
650
|
+
const incoming_isActive = incoming.isActive;
|
|
651
|
+
// if at least one of these optionals is defined
|
|
652
|
+
if (existing_isActive !== undefined || incoming_isActive !== undefined) {
|
|
653
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
654
|
+
// not equal
|
|
655
|
+
if (existing_isActive === undefined || incoming_isActive === undefined) {
|
|
656
|
+
return false;
|
|
657
|
+
}
|
|
658
|
+
if (!(existing_isActive === incoming_isActive)) {
|
|
659
|
+
return false;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
const existing_name = existing.name;
|
|
663
|
+
const incoming_name = incoming.name;
|
|
664
|
+
if (!(existing_name === incoming_name)) {
|
|
665
|
+
return false;
|
|
666
|
+
}
|
|
667
|
+
const existing_omniExtTrackingDefKey = existing.omniExtTrackingDefKey;
|
|
668
|
+
const incoming_omniExtTrackingDefKey = incoming.omniExtTrackingDefKey;
|
|
669
|
+
if (!(existing_omniExtTrackingDefKey === incoming_omniExtTrackingDefKey)) {
|
|
670
|
+
return false;
|
|
671
|
+
}
|
|
672
|
+
const existing_trackingFrameworkInformation = existing.trackingFrameworkInformation;
|
|
673
|
+
const incoming_trackingFrameworkInformation = incoming.trackingFrameworkInformation;
|
|
674
|
+
// if at least one of these optionals is defined
|
|
675
|
+
if (existing_trackingFrameworkInformation !== undefined || incoming_trackingFrameworkInformation !== undefined) {
|
|
676
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
677
|
+
// not equal
|
|
678
|
+
if (existing_trackingFrameworkInformation === undefined || incoming_trackingFrameworkInformation === undefined) {
|
|
679
|
+
return false;
|
|
680
|
+
}
|
|
681
|
+
if (!(existing_trackingFrameworkInformation === incoming_trackingFrameworkInformation)) {
|
|
682
|
+
return false;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
const existing_trackingServiceProvider = existing.trackingServiceProvider;
|
|
686
|
+
const incoming_trackingServiceProvider = incoming.trackingServiceProvider;
|
|
687
|
+
// if at least one of these optionals is defined
|
|
688
|
+
if (existing_trackingServiceProvider !== undefined || incoming_trackingServiceProvider !== undefined) {
|
|
689
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
690
|
+
// not equal
|
|
691
|
+
if (existing_trackingServiceProvider === undefined || incoming_trackingServiceProvider === undefined) {
|
|
692
|
+
return false;
|
|
693
|
+
}
|
|
694
|
+
if (!(existing_trackingServiceProvider === incoming_trackingServiceProvider)) {
|
|
695
|
+
return false;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
return true;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
const VERSION$4 = "1c4d8ed71bfcb107dd8015a6c5a862fb";
|
|
702
|
+
function validate$4(obj, path = 'OmniAnalyticsTrackingExternalEventDefRepresentation') {
|
|
703
|
+
const v_error = (() => {
|
|
704
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
705
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
706
|
+
}
|
|
707
|
+
if (obj.componentType !== undefined) {
|
|
708
|
+
const obj_componentType = obj.componentType;
|
|
709
|
+
const path_componentType = path + '.componentType';
|
|
710
|
+
if (typeof obj_componentType !== 'string') {
|
|
711
|
+
return new TypeError('Expected "string" but received "' + typeof obj_componentType + '" (at "' + path_componentType + '")');
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
const obj_description = obj.description;
|
|
715
|
+
const path_description = path + '.description';
|
|
716
|
+
if (typeof obj_description !== 'string') {
|
|
717
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
718
|
+
}
|
|
719
|
+
const obj_identifier = obj.identifier;
|
|
720
|
+
const path_identifier = path + '.identifier';
|
|
721
|
+
if (typeof obj_identifier !== 'string') {
|
|
722
|
+
return new TypeError('Expected "string" but received "' + typeof obj_identifier + '" (at "' + path_identifier + '")');
|
|
723
|
+
}
|
|
724
|
+
const obj_inclusionRule = obj.inclusionRule;
|
|
725
|
+
const path_inclusionRule = path + '.inclusionRule';
|
|
726
|
+
if (typeof obj_inclusionRule !== 'string') {
|
|
727
|
+
return new TypeError('Expected "string" but received "' + typeof obj_inclusionRule + '" (at "' + path_inclusionRule + '")');
|
|
728
|
+
}
|
|
729
|
+
const obj_name = obj.name;
|
|
730
|
+
const path_name = path + '.name';
|
|
731
|
+
if (typeof obj_name !== 'string') {
|
|
732
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
733
|
+
}
|
|
734
|
+
if (obj.omniExtTrackingDefId !== undefined) {
|
|
735
|
+
const obj_omniExtTrackingDefId = obj.omniExtTrackingDefId;
|
|
736
|
+
const path_omniExtTrackingDefId = path + '.omniExtTrackingDefId';
|
|
737
|
+
if (typeof obj_omniExtTrackingDefId !== 'string') {
|
|
738
|
+
return new TypeError('Expected "string" but received "' + typeof obj_omniExtTrackingDefId + '" (at "' + path_omniExtTrackingDefId + '")');
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
if (obj.omniExtTrackingEventDefKey !== undefined) {
|
|
742
|
+
const obj_omniExtTrackingEventDefKey = obj.omniExtTrackingEventDefKey;
|
|
743
|
+
const path_omniExtTrackingEventDefKey = path + '.omniExtTrackingEventDefKey';
|
|
744
|
+
if (typeof obj_omniExtTrackingEventDefKey !== 'string') {
|
|
745
|
+
return new TypeError('Expected "string" but received "' + typeof obj_omniExtTrackingEventDefKey + '" (at "' + path_omniExtTrackingEventDefKey + '")');
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
if (obj.payloadTemplate !== undefined) {
|
|
749
|
+
const obj_payloadTemplate = obj.payloadTemplate;
|
|
750
|
+
const path_payloadTemplate = path + '.payloadTemplate';
|
|
751
|
+
if (typeof obj_payloadTemplate !== 'string') {
|
|
752
|
+
return new TypeError('Expected "string" but received "' + typeof obj_payloadTemplate + '" (at "' + path_payloadTemplate + '")');
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
})();
|
|
756
|
+
return v_error === undefined ? null : v_error;
|
|
757
|
+
}
|
|
758
|
+
const select$6 = function OmniAnalyticsTrackingExternalEventDefRepresentationSelect() {
|
|
759
|
+
return {
|
|
760
|
+
kind: 'Fragment',
|
|
761
|
+
version: VERSION$4,
|
|
762
|
+
private: [],
|
|
763
|
+
selections: [
|
|
764
|
+
{
|
|
765
|
+
name: 'componentType',
|
|
766
|
+
kind: 'Scalar',
|
|
767
|
+
required: false
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
name: 'description',
|
|
771
|
+
kind: 'Scalar'
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
name: 'identifier',
|
|
775
|
+
kind: 'Scalar'
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
name: 'inclusionRule',
|
|
779
|
+
kind: 'Scalar'
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
name: 'name',
|
|
783
|
+
kind: 'Scalar'
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
name: 'omniExtTrackingDefId',
|
|
787
|
+
kind: 'Scalar',
|
|
788
|
+
required: false
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
name: 'omniExtTrackingEventDefKey',
|
|
792
|
+
kind: 'Scalar',
|
|
793
|
+
required: false
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
name: 'payloadTemplate',
|
|
797
|
+
kind: 'Scalar',
|
|
798
|
+
required: false
|
|
799
|
+
}
|
|
800
|
+
]
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
function equals$4(existing, incoming) {
|
|
804
|
+
const existing_componentType = existing.componentType;
|
|
805
|
+
const incoming_componentType = incoming.componentType;
|
|
806
|
+
// if at least one of these optionals is defined
|
|
807
|
+
if (existing_componentType !== undefined || incoming_componentType !== undefined) {
|
|
808
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
809
|
+
// not equal
|
|
810
|
+
if (existing_componentType === undefined || incoming_componentType === undefined) {
|
|
811
|
+
return false;
|
|
812
|
+
}
|
|
813
|
+
if (!(existing_componentType === incoming_componentType)) {
|
|
814
|
+
return false;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
const existing_description = existing.description;
|
|
818
|
+
const incoming_description = incoming.description;
|
|
819
|
+
if (!(existing_description === incoming_description)) {
|
|
820
|
+
return false;
|
|
821
|
+
}
|
|
822
|
+
const existing_identifier = existing.identifier;
|
|
823
|
+
const incoming_identifier = incoming.identifier;
|
|
824
|
+
if (!(existing_identifier === incoming_identifier)) {
|
|
825
|
+
return false;
|
|
826
|
+
}
|
|
827
|
+
const existing_inclusionRule = existing.inclusionRule;
|
|
828
|
+
const incoming_inclusionRule = incoming.inclusionRule;
|
|
829
|
+
if (!(existing_inclusionRule === incoming_inclusionRule)) {
|
|
830
|
+
return false;
|
|
831
|
+
}
|
|
832
|
+
const existing_name = existing.name;
|
|
833
|
+
const incoming_name = incoming.name;
|
|
834
|
+
if (!(existing_name === incoming_name)) {
|
|
835
|
+
return false;
|
|
836
|
+
}
|
|
837
|
+
const existing_omniExtTrackingDefId = existing.omniExtTrackingDefId;
|
|
838
|
+
const incoming_omniExtTrackingDefId = incoming.omniExtTrackingDefId;
|
|
839
|
+
// if at least one of these optionals is defined
|
|
840
|
+
if (existing_omniExtTrackingDefId !== undefined || incoming_omniExtTrackingDefId !== undefined) {
|
|
841
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
842
|
+
// not equal
|
|
843
|
+
if (existing_omniExtTrackingDefId === undefined || incoming_omniExtTrackingDefId === undefined) {
|
|
844
|
+
return false;
|
|
845
|
+
}
|
|
846
|
+
if (!(existing_omniExtTrackingDefId === incoming_omniExtTrackingDefId)) {
|
|
847
|
+
return false;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
const existing_omniExtTrackingEventDefKey = existing.omniExtTrackingEventDefKey;
|
|
851
|
+
const incoming_omniExtTrackingEventDefKey = incoming.omniExtTrackingEventDefKey;
|
|
852
|
+
// if at least one of these optionals is defined
|
|
853
|
+
if (existing_omniExtTrackingEventDefKey !== undefined || incoming_omniExtTrackingEventDefKey !== undefined) {
|
|
854
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
855
|
+
// not equal
|
|
856
|
+
if (existing_omniExtTrackingEventDefKey === undefined || incoming_omniExtTrackingEventDefKey === undefined) {
|
|
857
|
+
return false;
|
|
858
|
+
}
|
|
859
|
+
if (!(existing_omniExtTrackingEventDefKey === incoming_omniExtTrackingEventDefKey)) {
|
|
860
|
+
return false;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
const existing_payloadTemplate = existing.payloadTemplate;
|
|
864
|
+
const incoming_payloadTemplate = incoming.payloadTemplate;
|
|
865
|
+
// if at least one of these optionals is defined
|
|
866
|
+
if (existing_payloadTemplate !== undefined || incoming_payloadTemplate !== undefined) {
|
|
867
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
868
|
+
// not equal
|
|
869
|
+
if (existing_payloadTemplate === undefined || incoming_payloadTemplate === undefined) {
|
|
870
|
+
return false;
|
|
871
|
+
}
|
|
872
|
+
if (!(existing_payloadTemplate === incoming_payloadTemplate)) {
|
|
873
|
+
return false;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
return true;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
const VERSION$3 = "0ea01ba368d55ea9d81e0fcd069dbdeb";
|
|
880
|
+
function validate$3(obj, path = 'OmniAnalyticsTrackingGroupRepresentation') {
|
|
881
|
+
const v_error = (() => {
|
|
882
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
883
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
884
|
+
}
|
|
885
|
+
if (obj.description !== undefined) {
|
|
886
|
+
const obj_description = obj.description;
|
|
887
|
+
const path_description = path + '.description';
|
|
888
|
+
if (typeof obj_description !== 'string') {
|
|
889
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
if (obj.endDate !== undefined) {
|
|
893
|
+
const obj_endDate = obj.endDate;
|
|
894
|
+
const path_endDate = path + '.endDate';
|
|
895
|
+
if (typeof obj_endDate !== 'string') {
|
|
896
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
const obj_groupType = obj.groupType;
|
|
900
|
+
const path_groupType = path + '.groupType';
|
|
901
|
+
if (typeof obj_groupType !== 'string') {
|
|
902
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupType + '" (at "' + path_groupType + '")');
|
|
903
|
+
}
|
|
904
|
+
const obj_identifier = obj.identifier;
|
|
905
|
+
const path_identifier = path + '.identifier';
|
|
906
|
+
if (typeof obj_identifier !== 'string') {
|
|
907
|
+
return new TypeError('Expected "string" but received "' + typeof obj_identifier + '" (at "' + path_identifier + '")');
|
|
908
|
+
}
|
|
909
|
+
const obj_isActive = obj.isActive;
|
|
910
|
+
const path_isActive = path + '.isActive';
|
|
911
|
+
if (typeof obj_isActive !== 'string') {
|
|
912
|
+
return new TypeError('Expected "string" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
913
|
+
}
|
|
914
|
+
if (obj.maxAgeInDays !== undefined) {
|
|
915
|
+
const obj_maxAgeInDays = obj.maxAgeInDays;
|
|
916
|
+
const path_maxAgeInDays = path + '.maxAgeInDays';
|
|
917
|
+
if (typeof obj_maxAgeInDays !== 'string') {
|
|
918
|
+
return new TypeError('Expected "string" but received "' + typeof obj_maxAgeInDays + '" (at "' + path_maxAgeInDays + '")');
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
const obj_name = obj.name;
|
|
922
|
+
const path_name = path + '.name';
|
|
923
|
+
if (typeof obj_name !== 'string') {
|
|
924
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
925
|
+
}
|
|
926
|
+
if (obj.omniExtTrackingDefId !== undefined) {
|
|
927
|
+
const obj_omniExtTrackingDefId = obj.omniExtTrackingDefId;
|
|
928
|
+
const path_omniExtTrackingDefId = path + '.omniExtTrackingDefId';
|
|
929
|
+
if (typeof obj_omniExtTrackingDefId !== 'string') {
|
|
930
|
+
return new TypeError('Expected "string" but received "' + typeof obj_omniExtTrackingDefId + '" (at "' + path_omniExtTrackingDefId + '")');
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
const obj_omniTrackingGroupKey = obj.omniTrackingGroupKey;
|
|
934
|
+
const path_omniTrackingGroupKey = path + '.omniTrackingGroupKey';
|
|
935
|
+
if (typeof obj_omniTrackingGroupKey !== 'string') {
|
|
936
|
+
return new TypeError('Expected "string" but received "' + typeof obj_omniTrackingGroupKey + '" (at "' + path_omniTrackingGroupKey + '")');
|
|
937
|
+
}
|
|
938
|
+
if (obj.startDate !== undefined) {
|
|
939
|
+
const obj_startDate = obj.startDate;
|
|
940
|
+
const path_startDate = path + '.startDate';
|
|
941
|
+
if (typeof obj_startDate !== 'string') {
|
|
942
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
})();
|
|
946
|
+
return v_error === undefined ? null : v_error;
|
|
947
|
+
}
|
|
948
|
+
const select$5 = function OmniAnalyticsTrackingGroupRepresentationSelect() {
|
|
949
|
+
return {
|
|
950
|
+
kind: 'Fragment',
|
|
951
|
+
version: VERSION$3,
|
|
952
|
+
private: [],
|
|
953
|
+
selections: [
|
|
954
|
+
{
|
|
955
|
+
name: 'description',
|
|
956
|
+
kind: 'Scalar',
|
|
957
|
+
required: false
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
name: 'endDate',
|
|
961
|
+
kind: 'Scalar',
|
|
962
|
+
required: false
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
name: 'groupType',
|
|
966
|
+
kind: 'Scalar'
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
name: 'identifier',
|
|
970
|
+
kind: 'Scalar'
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
name: 'isActive',
|
|
974
|
+
kind: 'Scalar'
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
name: 'maxAgeInDays',
|
|
978
|
+
kind: 'Scalar',
|
|
979
|
+
required: false
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
name: 'name',
|
|
983
|
+
kind: 'Scalar'
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
name: 'omniExtTrackingDefId',
|
|
987
|
+
kind: 'Scalar',
|
|
988
|
+
required: false
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
name: 'omniTrackingGroupKey',
|
|
992
|
+
kind: 'Scalar'
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
name: 'startDate',
|
|
996
|
+
kind: 'Scalar',
|
|
997
|
+
required: false
|
|
998
|
+
}
|
|
999
|
+
]
|
|
1000
|
+
};
|
|
1001
|
+
};
|
|
1002
|
+
function equals$3(existing, incoming) {
|
|
1003
|
+
const existing_description = existing.description;
|
|
1004
|
+
const incoming_description = incoming.description;
|
|
1005
|
+
// if at least one of these optionals is defined
|
|
1006
|
+
if (existing_description !== undefined || incoming_description !== undefined) {
|
|
1007
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1008
|
+
// not equal
|
|
1009
|
+
if (existing_description === undefined || incoming_description === undefined) {
|
|
1010
|
+
return false;
|
|
1011
|
+
}
|
|
1012
|
+
if (!(existing_description === incoming_description)) {
|
|
1013
|
+
return false;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
const existing_endDate = existing.endDate;
|
|
1017
|
+
const incoming_endDate = incoming.endDate;
|
|
1018
|
+
// if at least one of these optionals is defined
|
|
1019
|
+
if (existing_endDate !== undefined || incoming_endDate !== undefined) {
|
|
1020
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1021
|
+
// not equal
|
|
1022
|
+
if (existing_endDate === undefined || incoming_endDate === undefined) {
|
|
1023
|
+
return false;
|
|
1024
|
+
}
|
|
1025
|
+
if (!(existing_endDate === incoming_endDate)) {
|
|
1026
|
+
return false;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
const existing_groupType = existing.groupType;
|
|
1030
|
+
const incoming_groupType = incoming.groupType;
|
|
1031
|
+
if (!(existing_groupType === incoming_groupType)) {
|
|
1032
|
+
return false;
|
|
1033
|
+
}
|
|
1034
|
+
const existing_identifier = existing.identifier;
|
|
1035
|
+
const incoming_identifier = incoming.identifier;
|
|
1036
|
+
if (!(existing_identifier === incoming_identifier)) {
|
|
1037
|
+
return false;
|
|
1038
|
+
}
|
|
1039
|
+
const existing_isActive = existing.isActive;
|
|
1040
|
+
const incoming_isActive = incoming.isActive;
|
|
1041
|
+
if (!(existing_isActive === incoming_isActive)) {
|
|
1042
|
+
return false;
|
|
1043
|
+
}
|
|
1044
|
+
const existing_maxAgeInDays = existing.maxAgeInDays;
|
|
1045
|
+
const incoming_maxAgeInDays = incoming.maxAgeInDays;
|
|
1046
|
+
// if at least one of these optionals is defined
|
|
1047
|
+
if (existing_maxAgeInDays !== undefined || incoming_maxAgeInDays !== undefined) {
|
|
1048
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1049
|
+
// not equal
|
|
1050
|
+
if (existing_maxAgeInDays === undefined || incoming_maxAgeInDays === undefined) {
|
|
1051
|
+
return false;
|
|
1052
|
+
}
|
|
1053
|
+
if (!(existing_maxAgeInDays === incoming_maxAgeInDays)) {
|
|
1054
|
+
return false;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
const existing_name = existing.name;
|
|
1058
|
+
const incoming_name = incoming.name;
|
|
1059
|
+
if (!(existing_name === incoming_name)) {
|
|
1060
|
+
return false;
|
|
1061
|
+
}
|
|
1062
|
+
const existing_omniExtTrackingDefId = existing.omniExtTrackingDefId;
|
|
1063
|
+
const incoming_omniExtTrackingDefId = incoming.omniExtTrackingDefId;
|
|
1064
|
+
// if at least one of these optionals is defined
|
|
1065
|
+
if (existing_omniExtTrackingDefId !== undefined || incoming_omniExtTrackingDefId !== undefined) {
|
|
1066
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1067
|
+
// not equal
|
|
1068
|
+
if (existing_omniExtTrackingDefId === undefined || incoming_omniExtTrackingDefId === undefined) {
|
|
1069
|
+
return false;
|
|
1070
|
+
}
|
|
1071
|
+
if (!(existing_omniExtTrackingDefId === incoming_omniExtTrackingDefId)) {
|
|
1072
|
+
return false;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
const existing_omniTrackingGroupKey = existing.omniTrackingGroupKey;
|
|
1076
|
+
const incoming_omniTrackingGroupKey = incoming.omniTrackingGroupKey;
|
|
1077
|
+
if (!(existing_omniTrackingGroupKey === incoming_omniTrackingGroupKey)) {
|
|
1078
|
+
return false;
|
|
1079
|
+
}
|
|
1080
|
+
const existing_startDate = existing.startDate;
|
|
1081
|
+
const incoming_startDate = incoming.startDate;
|
|
1082
|
+
// if at least one of these optionals is defined
|
|
1083
|
+
if (existing_startDate !== undefined || incoming_startDate !== undefined) {
|
|
1084
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1085
|
+
// not equal
|
|
1086
|
+
if (existing_startDate === undefined || incoming_startDate === undefined) {
|
|
1087
|
+
return false;
|
|
1088
|
+
}
|
|
1089
|
+
if (!(existing_startDate === incoming_startDate)) {
|
|
1090
|
+
return false;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
return true;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
const TTL$1 = 60000;
|
|
1097
|
+
const VERSION$2 = "36cccddb5d7c08dae651feb75fa8c461";
|
|
1098
|
+
function validate$2(obj, path = 'OmniAnalyticsMetadataRepresentation') {
|
|
1099
|
+
const v_error = (() => {
|
|
1100
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1101
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1102
|
+
}
|
|
1103
|
+
if (obj.omniAnalyticsSettings !== undefined) {
|
|
1104
|
+
const obj_omniAnalyticsSettings = obj.omniAnalyticsSettings;
|
|
1105
|
+
const path_omniAnalyticsSettings = path + '.omniAnalyticsSettings';
|
|
1106
|
+
if (!ArrayIsArray(obj_omniAnalyticsSettings)) {
|
|
1107
|
+
return new TypeError('Expected "array" but received "' + typeof obj_omniAnalyticsSettings + '" (at "' + path_omniAnalyticsSettings + '")');
|
|
1108
|
+
}
|
|
1109
|
+
for (let i = 0; i < obj_omniAnalyticsSettings.length; i++) {
|
|
1110
|
+
const obj_omniAnalyticsSettings_item = obj_omniAnalyticsSettings[i];
|
|
1111
|
+
const path_omniAnalyticsSettings_item = path_omniAnalyticsSettings + '[' + i + ']';
|
|
1112
|
+
const referencepath_omniAnalyticsSettings_itemValidationError = validate$7(obj_omniAnalyticsSettings_item, path_omniAnalyticsSettings_item);
|
|
1113
|
+
if (referencepath_omniAnalyticsSettings_itemValidationError !== null) {
|
|
1114
|
+
let message = 'Object doesn\'t match OmniAnalyticsSettingRepresentation (at "' + path_omniAnalyticsSettings_item + '")\n';
|
|
1115
|
+
message += referencepath_omniAnalyticsSettings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1116
|
+
return new TypeError(message);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
if (obj.trackingComponents !== undefined) {
|
|
1121
|
+
const obj_trackingComponents = obj.trackingComponents;
|
|
1122
|
+
const path_trackingComponents = path + '.trackingComponents';
|
|
1123
|
+
if (!ArrayIsArray(obj_trackingComponents)) {
|
|
1124
|
+
return new TypeError('Expected "array" but received "' + typeof obj_trackingComponents + '" (at "' + path_trackingComponents + '")');
|
|
1125
|
+
}
|
|
1126
|
+
for (let i = 0; i < obj_trackingComponents.length; i++) {
|
|
1127
|
+
const obj_trackingComponents_item = obj_trackingComponents[i];
|
|
1128
|
+
const path_trackingComponents_item = path_trackingComponents + '[' + i + ']';
|
|
1129
|
+
const referencepath_trackingComponents_itemValidationError = validate$6(obj_trackingComponents_item, path_trackingComponents_item);
|
|
1130
|
+
if (referencepath_trackingComponents_itemValidationError !== null) {
|
|
1131
|
+
let message = 'Object doesn\'t match OmniAnalyticsTrackingComponentRepresentation (at "' + path_trackingComponents_item + '")\n';
|
|
1132
|
+
message += referencepath_trackingComponents_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1133
|
+
return new TypeError(message);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
if (obj.trackingExternalDefintions !== undefined) {
|
|
1138
|
+
const obj_trackingExternalDefintions = obj.trackingExternalDefintions;
|
|
1139
|
+
const path_trackingExternalDefintions = path + '.trackingExternalDefintions';
|
|
1140
|
+
if (!ArrayIsArray(obj_trackingExternalDefintions)) {
|
|
1141
|
+
return new TypeError('Expected "array" but received "' + typeof obj_trackingExternalDefintions + '" (at "' + path_trackingExternalDefintions + '")');
|
|
1142
|
+
}
|
|
1143
|
+
for (let i = 0; i < obj_trackingExternalDefintions.length; i++) {
|
|
1144
|
+
const obj_trackingExternalDefintions_item = obj_trackingExternalDefintions[i];
|
|
1145
|
+
const path_trackingExternalDefintions_item = path_trackingExternalDefintions + '[' + i + ']';
|
|
1146
|
+
const referencepath_trackingExternalDefintions_itemValidationError = validate$5(obj_trackingExternalDefintions_item, path_trackingExternalDefintions_item);
|
|
1147
|
+
if (referencepath_trackingExternalDefintions_itemValidationError !== null) {
|
|
1148
|
+
let message = 'Object doesn\'t match OmniAnalyticsTrackingExternalDefRepresentation (at "' + path_trackingExternalDefintions_item + '")\n';
|
|
1149
|
+
message += referencepath_trackingExternalDefintions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1150
|
+
return new TypeError(message);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
if (obj.trackingExternalEventDefintions !== undefined) {
|
|
1155
|
+
const obj_trackingExternalEventDefintions = obj.trackingExternalEventDefintions;
|
|
1156
|
+
const path_trackingExternalEventDefintions = path + '.trackingExternalEventDefintions';
|
|
1157
|
+
if (!ArrayIsArray(obj_trackingExternalEventDefintions)) {
|
|
1158
|
+
return new TypeError('Expected "array" but received "' + typeof obj_trackingExternalEventDefintions + '" (at "' + path_trackingExternalEventDefintions + '")');
|
|
1159
|
+
}
|
|
1160
|
+
for (let i = 0; i < obj_trackingExternalEventDefintions.length; i++) {
|
|
1161
|
+
const obj_trackingExternalEventDefintions_item = obj_trackingExternalEventDefintions[i];
|
|
1162
|
+
const path_trackingExternalEventDefintions_item = path_trackingExternalEventDefintions + '[' + i + ']';
|
|
1163
|
+
const referencepath_trackingExternalEventDefintions_itemValidationError = validate$4(obj_trackingExternalEventDefintions_item, path_trackingExternalEventDefintions_item);
|
|
1164
|
+
if (referencepath_trackingExternalEventDefintions_itemValidationError !== null) {
|
|
1165
|
+
let message = 'Object doesn\'t match OmniAnalyticsTrackingExternalEventDefRepresentation (at "' + path_trackingExternalEventDefintions_item + '")\n';
|
|
1166
|
+
message += referencepath_trackingExternalEventDefintions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1167
|
+
return new TypeError(message);
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
if (obj.trackingGroups !== undefined) {
|
|
1172
|
+
const obj_trackingGroups = obj.trackingGroups;
|
|
1173
|
+
const path_trackingGroups = path + '.trackingGroups';
|
|
1174
|
+
if (!ArrayIsArray(obj_trackingGroups)) {
|
|
1175
|
+
return new TypeError('Expected "array" but received "' + typeof obj_trackingGroups + '" (at "' + path_trackingGroups + '")');
|
|
1176
|
+
}
|
|
1177
|
+
for (let i = 0; i < obj_trackingGroups.length; i++) {
|
|
1178
|
+
const obj_trackingGroups_item = obj_trackingGroups[i];
|
|
1179
|
+
const path_trackingGroups_item = path_trackingGroups + '[' + i + ']';
|
|
1180
|
+
const referencepath_trackingGroups_itemValidationError = validate$3(obj_trackingGroups_item, path_trackingGroups_item);
|
|
1181
|
+
if (referencepath_trackingGroups_itemValidationError !== null) {
|
|
1182
|
+
let message = 'Object doesn\'t match OmniAnalyticsTrackingGroupRepresentation (at "' + path_trackingGroups_item + '")\n';
|
|
1183
|
+
message += referencepath_trackingGroups_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1184
|
+
return new TypeError(message);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
})();
|
|
1189
|
+
return v_error === undefined ? null : v_error;
|
|
1190
|
+
}
|
|
1191
|
+
const RepresentationType$1 = 'OmniAnalyticsMetadataRepresentation';
|
|
1192
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1193
|
+
return input;
|
|
1194
|
+
}
|
|
1195
|
+
const select$4 = function OmniAnalyticsMetadataRepresentationSelect() {
|
|
1196
|
+
const { selections: OmniAnalyticsSettingRepresentation__selections, opaque: OmniAnalyticsSettingRepresentation__opaque, } = select$9();
|
|
1197
|
+
const { selections: OmniAnalyticsTrackingComponentRepresentation__selections, opaque: OmniAnalyticsTrackingComponentRepresentation__opaque, } = select$8();
|
|
1198
|
+
const { selections: OmniAnalyticsTrackingExternalDefRepresentation__selections, opaque: OmniAnalyticsTrackingExternalDefRepresentation__opaque, } = select$7();
|
|
1199
|
+
const { selections: OmniAnalyticsTrackingExternalEventDefRepresentation__selections, opaque: OmniAnalyticsTrackingExternalEventDefRepresentation__opaque, } = select$6();
|
|
1200
|
+
const { selections: OmniAnalyticsTrackingGroupRepresentation__selections, opaque: OmniAnalyticsTrackingGroupRepresentation__opaque, } = select$5();
|
|
1201
|
+
return {
|
|
1202
|
+
kind: 'Fragment',
|
|
1203
|
+
version: VERSION$2,
|
|
1204
|
+
private: [],
|
|
1205
|
+
selections: [
|
|
1206
|
+
{
|
|
1207
|
+
name: 'omniAnalyticsSettings',
|
|
1208
|
+
kind: 'Object',
|
|
1209
|
+
plural: true,
|
|
1210
|
+
selections: OmniAnalyticsSettingRepresentation__selections,
|
|
1211
|
+
required: false
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
name: 'trackingComponents',
|
|
1215
|
+
kind: 'Object',
|
|
1216
|
+
plural: true,
|
|
1217
|
+
selections: OmniAnalyticsTrackingComponentRepresentation__selections,
|
|
1218
|
+
required: false
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
name: 'trackingExternalDefintions',
|
|
1222
|
+
kind: 'Object',
|
|
1223
|
+
plural: true,
|
|
1224
|
+
selections: OmniAnalyticsTrackingExternalDefRepresentation__selections,
|
|
1225
|
+
required: false
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
name: 'trackingExternalEventDefintions',
|
|
1229
|
+
kind: 'Object',
|
|
1230
|
+
plural: true,
|
|
1231
|
+
selections: OmniAnalyticsTrackingExternalEventDefRepresentation__selections,
|
|
1232
|
+
required: false
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
name: 'trackingGroups',
|
|
1236
|
+
kind: 'Object',
|
|
1237
|
+
plural: true,
|
|
1238
|
+
selections: OmniAnalyticsTrackingGroupRepresentation__selections,
|
|
1239
|
+
required: false
|
|
1240
|
+
}
|
|
1241
|
+
]
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
function equals$2(existing, incoming) {
|
|
1245
|
+
const existing_omniAnalyticsSettings = existing.omniAnalyticsSettings;
|
|
1246
|
+
const incoming_omniAnalyticsSettings = incoming.omniAnalyticsSettings;
|
|
1247
|
+
// if at least one of these optionals is defined
|
|
1248
|
+
if (existing_omniAnalyticsSettings !== undefined || incoming_omniAnalyticsSettings !== undefined) {
|
|
1249
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1250
|
+
// not equal
|
|
1251
|
+
if (existing_omniAnalyticsSettings === undefined || incoming_omniAnalyticsSettings === undefined) {
|
|
1252
|
+
return false;
|
|
1253
|
+
}
|
|
1254
|
+
const equals_omniAnalyticsSettings_items = equalsArray(existing_omniAnalyticsSettings, incoming_omniAnalyticsSettings, (existing_omniAnalyticsSettings_item, incoming_omniAnalyticsSettings_item) => {
|
|
1255
|
+
if (!(equals$7(existing_omniAnalyticsSettings_item, incoming_omniAnalyticsSettings_item))) {
|
|
1256
|
+
return false;
|
|
1257
|
+
}
|
|
1258
|
+
});
|
|
1259
|
+
if (equals_omniAnalyticsSettings_items === false) {
|
|
1260
|
+
return false;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
const existing_trackingComponents = existing.trackingComponents;
|
|
1264
|
+
const incoming_trackingComponents = incoming.trackingComponents;
|
|
1265
|
+
// if at least one of these optionals is defined
|
|
1266
|
+
if (existing_trackingComponents !== undefined || incoming_trackingComponents !== undefined) {
|
|
1267
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1268
|
+
// not equal
|
|
1269
|
+
if (existing_trackingComponents === undefined || incoming_trackingComponents === undefined) {
|
|
1270
|
+
return false;
|
|
1271
|
+
}
|
|
1272
|
+
const equals_trackingComponents_items = equalsArray(existing_trackingComponents, incoming_trackingComponents, (existing_trackingComponents_item, incoming_trackingComponents_item) => {
|
|
1273
|
+
if (!(equals$6(existing_trackingComponents_item, incoming_trackingComponents_item))) {
|
|
1274
|
+
return false;
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
if (equals_trackingComponents_items === false) {
|
|
1278
|
+
return false;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
const existing_trackingExternalDefintions = existing.trackingExternalDefintions;
|
|
1282
|
+
const incoming_trackingExternalDefintions = incoming.trackingExternalDefintions;
|
|
1283
|
+
// if at least one of these optionals is defined
|
|
1284
|
+
if (existing_trackingExternalDefintions !== undefined || incoming_trackingExternalDefintions !== undefined) {
|
|
1285
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1286
|
+
// not equal
|
|
1287
|
+
if (existing_trackingExternalDefintions === undefined || incoming_trackingExternalDefintions === undefined) {
|
|
1288
|
+
return false;
|
|
1289
|
+
}
|
|
1290
|
+
const equals_trackingExternalDefintions_items = equalsArray(existing_trackingExternalDefintions, incoming_trackingExternalDefintions, (existing_trackingExternalDefintions_item, incoming_trackingExternalDefintions_item) => {
|
|
1291
|
+
if (!(equals$5(existing_trackingExternalDefintions_item, incoming_trackingExternalDefintions_item))) {
|
|
1292
|
+
return false;
|
|
1293
|
+
}
|
|
1294
|
+
});
|
|
1295
|
+
if (equals_trackingExternalDefintions_items === false) {
|
|
1296
|
+
return false;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
const existing_trackingExternalEventDefintions = existing.trackingExternalEventDefintions;
|
|
1300
|
+
const incoming_trackingExternalEventDefintions = incoming.trackingExternalEventDefintions;
|
|
1301
|
+
// if at least one of these optionals is defined
|
|
1302
|
+
if (existing_trackingExternalEventDefintions !== undefined || incoming_trackingExternalEventDefintions !== undefined) {
|
|
1303
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1304
|
+
// not equal
|
|
1305
|
+
if (existing_trackingExternalEventDefintions === undefined || incoming_trackingExternalEventDefintions === undefined) {
|
|
1306
|
+
return false;
|
|
1307
|
+
}
|
|
1308
|
+
const equals_trackingExternalEventDefintions_items = equalsArray(existing_trackingExternalEventDefintions, incoming_trackingExternalEventDefintions, (existing_trackingExternalEventDefintions_item, incoming_trackingExternalEventDefintions_item) => {
|
|
1309
|
+
if (!(equals$4(existing_trackingExternalEventDefintions_item, incoming_trackingExternalEventDefintions_item))) {
|
|
1310
|
+
return false;
|
|
1311
|
+
}
|
|
1312
|
+
});
|
|
1313
|
+
if (equals_trackingExternalEventDefintions_items === false) {
|
|
1314
|
+
return false;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
const existing_trackingGroups = existing.trackingGroups;
|
|
1318
|
+
const incoming_trackingGroups = incoming.trackingGroups;
|
|
1319
|
+
// if at least one of these optionals is defined
|
|
1320
|
+
if (existing_trackingGroups !== undefined || incoming_trackingGroups !== undefined) {
|
|
1321
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1322
|
+
// not equal
|
|
1323
|
+
if (existing_trackingGroups === undefined || incoming_trackingGroups === undefined) {
|
|
1324
|
+
return false;
|
|
1325
|
+
}
|
|
1326
|
+
const equals_trackingGroups_items = equalsArray(existing_trackingGroups, incoming_trackingGroups, (existing_trackingGroups_item, incoming_trackingGroups_item) => {
|
|
1327
|
+
if (!(equals$3(existing_trackingGroups_item, incoming_trackingGroups_item))) {
|
|
1328
|
+
return false;
|
|
1329
|
+
}
|
|
1330
|
+
});
|
|
1331
|
+
if (equals_trackingGroups_items === false) {
|
|
1332
|
+
return false;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
return true;
|
|
1336
|
+
}
|
|
1337
|
+
const ingest$1 = function OmniAnalyticsMetadataRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1338
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1339
|
+
const validateError = validate$2(input);
|
|
1340
|
+
if (validateError !== null) {
|
|
1341
|
+
throw validateError;
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
const key = path.fullPath;
|
|
1345
|
+
const ttlToUse = TTL$1;
|
|
1346
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "omnianalytics", VERSION$2, RepresentationType$1, equals$2);
|
|
1347
|
+
return createLink(key);
|
|
1348
|
+
};
|
|
1349
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1350
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1351
|
+
const rootKey = fullPathFactory();
|
|
1352
|
+
rootKeySet.set(rootKey, {
|
|
1353
|
+
namespace: keyPrefix,
|
|
1354
|
+
representationName: RepresentationType$1,
|
|
1355
|
+
mergeable: false
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
function select$3(luvio, params) {
|
|
1360
|
+
return select$4();
|
|
1361
|
+
}
|
|
1362
|
+
function keyBuilder$3(luvio, params) {
|
|
1363
|
+
return keyPrefix + '::OmniAnalyticsMetadataRepresentation:(' + 'externalTrackingDefName:' + params.queryParams.externalTrackingDefName + ',' + 'fetchSettings:' + params.queryParams.fetchSettings + ',' + 'groupName:' + params.queryParams.groupName + ',' + 'isActive:' + params.queryParams.isActive + ')';
|
|
1364
|
+
}
|
|
1365
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1366
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
1367
|
+
}
|
|
1368
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1369
|
+
const { body } = response;
|
|
1370
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
1371
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1372
|
+
const snapshot = luvio.storeLookup({
|
|
1373
|
+
recordId: key,
|
|
1374
|
+
node: select$3(),
|
|
1375
|
+
variables: {},
|
|
1376
|
+
}, snapshotRefresh);
|
|
1377
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1378
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1379
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
deepFreeze(snapshot.data);
|
|
1383
|
+
return snapshot;
|
|
1384
|
+
}
|
|
1385
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1386
|
+
const key = keyBuilder$3(luvio, params);
|
|
1387
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1388
|
+
const storeMetadataParams = {
|
|
1389
|
+
ttl: TTL$1,
|
|
1390
|
+
namespace: keyPrefix,
|
|
1391
|
+
version: VERSION$2,
|
|
1392
|
+
representationName: RepresentationType$1
|
|
1393
|
+
};
|
|
1394
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1395
|
+
return errorSnapshot;
|
|
1396
|
+
}
|
|
1397
|
+
function createResourceRequest$1(config) {
|
|
1398
|
+
const headers = {};
|
|
1399
|
+
return {
|
|
1400
|
+
baseUri: '/services/data/v66.0',
|
|
1401
|
+
basePath: '/connect/omni-analytics/analytics-metadata',
|
|
1402
|
+
method: 'get',
|
|
1403
|
+
body: null,
|
|
1404
|
+
urlParams: {},
|
|
1405
|
+
queryParams: config.queryParams,
|
|
1406
|
+
headers,
|
|
1407
|
+
priority: 'normal',
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
const adapterName$1 = 'fetchOmniAnalyticsMetadata';
|
|
1412
|
+
const fetchOmniAnalyticsMetadata_ConfigPropertyMetadata = [
|
|
1413
|
+
generateParamConfigMetadata('externalTrackingDefName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1414
|
+
generateParamConfigMetadata('fetchSettings', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1415
|
+
generateParamConfigMetadata('groupName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1416
|
+
generateParamConfigMetadata('isActive', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1417
|
+
];
|
|
1418
|
+
const fetchOmniAnalyticsMetadata_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, fetchOmniAnalyticsMetadata_ConfigPropertyMetadata);
|
|
1419
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(fetchOmniAnalyticsMetadata_ConfigPropertyMetadata);
|
|
1420
|
+
function keyBuilder$2(luvio, config) {
|
|
1421
|
+
const resourceParams = createResourceParams$1(config);
|
|
1422
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
1423
|
+
}
|
|
1424
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1425
|
+
const config = {};
|
|
1426
|
+
typeCheckConfig$3(untrustedConfig, config, fetchOmniAnalyticsMetadata_ConfigPropertyMetadata);
|
|
1427
|
+
return config;
|
|
1428
|
+
}
|
|
1429
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1430
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1431
|
+
return null;
|
|
1432
|
+
}
|
|
1433
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1434
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1435
|
+
}
|
|
1436
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1437
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1438
|
+
return null;
|
|
1439
|
+
}
|
|
1440
|
+
return config;
|
|
1441
|
+
}
|
|
1442
|
+
function adapterFragment$1(luvio, config) {
|
|
1443
|
+
createResourceParams$1(config);
|
|
1444
|
+
return select$3();
|
|
1445
|
+
}
|
|
1446
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1447
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1448
|
+
config,
|
|
1449
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1450
|
+
});
|
|
1451
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1452
|
+
}
|
|
1453
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1454
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1455
|
+
config,
|
|
1456
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1457
|
+
});
|
|
1458
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1459
|
+
}
|
|
1460
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1461
|
+
const resourceParams = createResourceParams$1(config);
|
|
1462
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1463
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1464
|
+
.then((response) => {
|
|
1465
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1466
|
+
const cache = new StoreKeyMap();
|
|
1467
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1468
|
+
return cache;
|
|
1469
|
+
});
|
|
1470
|
+
}, (response) => {
|
|
1471
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1474
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1475
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1476
|
+
}
|
|
1477
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1478
|
+
const { luvio, config } = context;
|
|
1479
|
+
const selector = {
|
|
1480
|
+
recordId: keyBuilder$2(luvio, config),
|
|
1481
|
+
node: adapterFragment$1(luvio, config),
|
|
1482
|
+
variables: {},
|
|
1483
|
+
};
|
|
1484
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1485
|
+
config,
|
|
1486
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1487
|
+
});
|
|
1488
|
+
return cacheSnapshot;
|
|
1489
|
+
}
|
|
1490
|
+
const fetchOmniAnalyticsMetadataAdapterFactory = (luvio) => function omnianalytics__fetchOmniAnalyticsMetadata(untrustedConfig, requestContext) {
|
|
1491
|
+
const config = validateAdapterConfig$1(untrustedConfig, fetchOmniAnalyticsMetadata_ConfigPropertyNames);
|
|
1492
|
+
// Invalid or incomplete config
|
|
1493
|
+
if (config === null) {
|
|
1494
|
+
return null;
|
|
1495
|
+
}
|
|
1496
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1497
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1498
|
+
};
|
|
1499
|
+
|
|
1500
|
+
const VERSION$1 = "71b26da062a33b1206d5b4a578dba540";
|
|
1501
|
+
function validate$1(obj, path = 'OmniAnalyticsLogDetailRepresentation') {
|
|
1502
|
+
const v_error = (() => {
|
|
1503
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1504
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1505
|
+
}
|
|
1506
|
+
const obj_applicationLogDate = obj.applicationLogDate;
|
|
1507
|
+
const path_applicationLogDate = path + '.applicationLogDate';
|
|
1508
|
+
if (typeof obj_applicationLogDate !== 'string') {
|
|
1509
|
+
return new TypeError('Expected "string" but received "' + typeof obj_applicationLogDate + '" (at "' + path_applicationLogDate + '")');
|
|
1510
|
+
}
|
|
1511
|
+
const obj_applicationName = obj.applicationName;
|
|
1512
|
+
const path_applicationName = path + '.applicationName';
|
|
1513
|
+
if (typeof obj_applicationName !== 'string') {
|
|
1514
|
+
return new TypeError('Expected "string" but received "' + typeof obj_applicationName + '" (at "' + path_applicationName + '")');
|
|
1515
|
+
}
|
|
1516
|
+
const obj_componentId = obj.componentId;
|
|
1517
|
+
const path_componentId = path + '.componentId';
|
|
1518
|
+
if (typeof obj_componentId !== 'string') {
|
|
1519
|
+
return new TypeError('Expected "string" but received "' + typeof obj_componentId + '" (at "' + path_componentId + '")');
|
|
1520
|
+
}
|
|
1521
|
+
const obj_componentType = obj.componentType;
|
|
1522
|
+
const path_componentType = path + '.componentType';
|
|
1523
|
+
if (typeof obj_componentType !== 'string') {
|
|
1524
|
+
return new TypeError('Expected "string" but received "' + typeof obj_componentType + '" (at "' + path_componentType + '")');
|
|
1525
|
+
}
|
|
1526
|
+
const obj_eventType = obj.eventType;
|
|
1527
|
+
const path_eventType = path + '.eventType';
|
|
1528
|
+
if (typeof obj_eventType !== 'string') {
|
|
1529
|
+
return new TypeError('Expected "string" but received "' + typeof obj_eventType + '" (at "' + path_eventType + '")');
|
|
1530
|
+
}
|
|
1531
|
+
const obj_name = obj.name;
|
|
1532
|
+
const path_name = path + '.name';
|
|
1533
|
+
if (typeof obj_name !== 'string') {
|
|
1534
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1535
|
+
}
|
|
1536
|
+
const obj_omniAnalyticsLog = obj.omniAnalyticsLog;
|
|
1537
|
+
const path_omniAnalyticsLog = path + '.omniAnalyticsLog';
|
|
1538
|
+
if (typeof obj_omniAnalyticsLog !== 'string') {
|
|
1539
|
+
return new TypeError('Expected "string" but received "' + typeof obj_omniAnalyticsLog + '" (at "' + path_omniAnalyticsLog + '")');
|
|
1540
|
+
}
|
|
1541
|
+
})();
|
|
1542
|
+
return v_error === undefined ? null : v_error;
|
|
1543
|
+
}
|
|
1544
|
+
const select$2 = function OmniAnalyticsLogDetailRepresentationSelect() {
|
|
1545
|
+
return {
|
|
1546
|
+
kind: 'Fragment',
|
|
1547
|
+
version: VERSION$1,
|
|
1548
|
+
private: [],
|
|
1549
|
+
selections: [
|
|
1550
|
+
{
|
|
1551
|
+
name: 'applicationLogDate',
|
|
1552
|
+
kind: 'Scalar'
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
name: 'applicationName',
|
|
1556
|
+
kind: 'Scalar'
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
name: 'componentId',
|
|
1560
|
+
kind: 'Scalar'
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
name: 'componentType',
|
|
1564
|
+
kind: 'Scalar'
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
name: 'eventType',
|
|
1568
|
+
kind: 'Scalar'
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
name: 'name',
|
|
1572
|
+
kind: 'Scalar'
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
name: 'omniAnalyticsLog',
|
|
1576
|
+
kind: 'Scalar'
|
|
1577
|
+
}
|
|
1578
|
+
]
|
|
1579
|
+
};
|
|
1580
|
+
};
|
|
1581
|
+
function equals$1(existing, incoming) {
|
|
1582
|
+
const existing_applicationLogDate = existing.applicationLogDate;
|
|
1583
|
+
const incoming_applicationLogDate = incoming.applicationLogDate;
|
|
1584
|
+
if (!(existing_applicationLogDate === incoming_applicationLogDate)) {
|
|
1585
|
+
return false;
|
|
1586
|
+
}
|
|
1587
|
+
const existing_applicationName = existing.applicationName;
|
|
1588
|
+
const incoming_applicationName = incoming.applicationName;
|
|
1589
|
+
if (!(existing_applicationName === incoming_applicationName)) {
|
|
1590
|
+
return false;
|
|
1591
|
+
}
|
|
1592
|
+
const existing_componentId = existing.componentId;
|
|
1593
|
+
const incoming_componentId = incoming.componentId;
|
|
1594
|
+
if (!(existing_componentId === incoming_componentId)) {
|
|
1595
|
+
return false;
|
|
1596
|
+
}
|
|
1597
|
+
const existing_componentType = existing.componentType;
|
|
1598
|
+
const incoming_componentType = incoming.componentType;
|
|
1599
|
+
if (!(existing_componentType === incoming_componentType)) {
|
|
1600
|
+
return false;
|
|
1601
|
+
}
|
|
1602
|
+
const existing_eventType = existing.eventType;
|
|
1603
|
+
const incoming_eventType = incoming.eventType;
|
|
1604
|
+
if (!(existing_eventType === incoming_eventType)) {
|
|
1605
|
+
return false;
|
|
1606
|
+
}
|
|
1607
|
+
const existing_name = existing.name;
|
|
1608
|
+
const incoming_name = incoming.name;
|
|
1609
|
+
if (!(existing_name === incoming_name)) {
|
|
1610
|
+
return false;
|
|
1611
|
+
}
|
|
1612
|
+
const existing_omniAnalyticsLog = existing.omniAnalyticsLog;
|
|
1613
|
+
const incoming_omniAnalyticsLog = incoming.omniAnalyticsLog;
|
|
1614
|
+
if (!(existing_omniAnalyticsLog === incoming_omniAnalyticsLog)) {
|
|
1615
|
+
return false;
|
|
1616
|
+
}
|
|
1617
|
+
return true;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
const TTL = 10000;
|
|
1621
|
+
const VERSION = "4c7a5f813fcd05ae649158a68a2194f4";
|
|
1622
|
+
function validate(obj, path = 'OmniAnalyticsLogsRepresentation') {
|
|
1623
|
+
const v_error = (() => {
|
|
1624
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1625
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1626
|
+
}
|
|
1627
|
+
const obj_actionLogs = obj.actionLogs;
|
|
1628
|
+
const path_actionLogs = path + '.actionLogs';
|
|
1629
|
+
if (!ArrayIsArray(obj_actionLogs)) {
|
|
1630
|
+
return new TypeError('Expected "array" but received "' + typeof obj_actionLogs + '" (at "' + path_actionLogs + '")');
|
|
1631
|
+
}
|
|
1632
|
+
for (let i = 0; i < obj_actionLogs.length; i++) {
|
|
1633
|
+
const obj_actionLogs_item = obj_actionLogs[i];
|
|
1634
|
+
const path_actionLogs_item = path_actionLogs + '[' + i + ']';
|
|
1635
|
+
const referencepath_actionLogs_itemValidationError = validate$1(obj_actionLogs_item, path_actionLogs_item);
|
|
1636
|
+
if (referencepath_actionLogs_itemValidationError !== null) {
|
|
1637
|
+
let message = 'Object doesn\'t match OmniAnalyticsLogDetailRepresentation (at "' + path_actionLogs_item + '")\n';
|
|
1638
|
+
message += referencepath_actionLogs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1639
|
+
return new TypeError(message);
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
if (obj.queryMore !== undefined) {
|
|
1643
|
+
const obj_queryMore = obj.queryMore;
|
|
1644
|
+
const path_queryMore = path + '.queryMore';
|
|
1645
|
+
if (typeof obj_queryMore !== 'string') {
|
|
1646
|
+
return new TypeError('Expected "string" but received "' + typeof obj_queryMore + '" (at "' + path_queryMore + '")');
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
})();
|
|
1650
|
+
return v_error === undefined ? null : v_error;
|
|
1651
|
+
}
|
|
1652
|
+
const RepresentationType = 'OmniAnalyticsLogsRepresentation';
|
|
1653
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1654
|
+
return input;
|
|
1655
|
+
}
|
|
1656
|
+
const select$1 = function OmniAnalyticsLogsRepresentationSelect() {
|
|
1657
|
+
const { selections: OmniAnalyticsLogDetailRepresentation__selections, opaque: OmniAnalyticsLogDetailRepresentation__opaque, } = select$2();
|
|
1658
|
+
return {
|
|
1659
|
+
kind: 'Fragment',
|
|
1660
|
+
version: VERSION,
|
|
1661
|
+
private: [],
|
|
1662
|
+
selections: [
|
|
1663
|
+
{
|
|
1664
|
+
name: 'actionLogs',
|
|
1665
|
+
kind: 'Object',
|
|
1666
|
+
plural: true,
|
|
1667
|
+
selections: OmniAnalyticsLogDetailRepresentation__selections
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
name: 'queryMore',
|
|
1671
|
+
kind: 'Scalar',
|
|
1672
|
+
required: false
|
|
1673
|
+
}
|
|
1674
|
+
]
|
|
1675
|
+
};
|
|
1676
|
+
};
|
|
1677
|
+
function equals(existing, incoming) {
|
|
1678
|
+
const existing_queryMore = existing.queryMore;
|
|
1679
|
+
const incoming_queryMore = incoming.queryMore;
|
|
1680
|
+
// if at least one of these optionals is defined
|
|
1681
|
+
if (existing_queryMore !== undefined || incoming_queryMore !== undefined) {
|
|
1682
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1683
|
+
// not equal
|
|
1684
|
+
if (existing_queryMore === undefined || incoming_queryMore === undefined) {
|
|
1685
|
+
return false;
|
|
1686
|
+
}
|
|
1687
|
+
if (!(existing_queryMore === incoming_queryMore)) {
|
|
1688
|
+
return false;
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
const existing_actionLogs = existing.actionLogs;
|
|
1692
|
+
const incoming_actionLogs = incoming.actionLogs;
|
|
1693
|
+
const equals_actionLogs_items = equalsArray(existing_actionLogs, incoming_actionLogs, (existing_actionLogs_item, incoming_actionLogs_item) => {
|
|
1694
|
+
if (!(equals$1(existing_actionLogs_item, incoming_actionLogs_item))) {
|
|
1695
|
+
return false;
|
|
1696
|
+
}
|
|
1697
|
+
});
|
|
1698
|
+
if (equals_actionLogs_items === false) {
|
|
1699
|
+
return false;
|
|
1700
|
+
}
|
|
1701
|
+
return true;
|
|
1702
|
+
}
|
|
1703
|
+
const ingest = function OmniAnalyticsLogsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1704
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1705
|
+
const validateError = validate(input);
|
|
1706
|
+
if (validateError !== null) {
|
|
1707
|
+
throw validateError;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
const key = path.fullPath;
|
|
1711
|
+
const ttlToUse = TTL;
|
|
1712
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "omnianalytics", VERSION, RepresentationType, equals);
|
|
1713
|
+
return createLink(key);
|
|
1714
|
+
};
|
|
1715
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1716
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1717
|
+
const rootKey = fullPathFactory();
|
|
1718
|
+
rootKeySet.set(rootKey, {
|
|
1719
|
+
namespace: keyPrefix,
|
|
1720
|
+
representationName: RepresentationType,
|
|
1721
|
+
mergeable: false
|
|
1722
|
+
});
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
function select(luvio, params) {
|
|
1726
|
+
return select$1();
|
|
1727
|
+
}
|
|
1728
|
+
function keyBuilder$1(luvio, params) {
|
|
1729
|
+
return keyPrefix + '::OmniAnalyticsLogsRepresentation:(' + 'applicationName:' + params.queryParams.applicationName + ',' + 'componentId:' + params.queryParams.componentId + ',' + 'componentType:' + params.queryParams.componentType + ',' + 'createdAfter:' + params.queryParams.createdAfter + ',' + 'createdBefore:' + params.queryParams.createdBefore + ',' + 'eventType:' + params.queryParams.eventType + ',' + 'pagesize:' + params.queryParams.pagesize + ',' + 'queryMore:' + params.queryParams.queryMore + ')';
|
|
1730
|
+
}
|
|
1731
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1732
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
1733
|
+
}
|
|
1734
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1735
|
+
const { body } = response;
|
|
1736
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
1737
|
+
luvio.storeIngest(key, ingest, body);
|
|
1738
|
+
const snapshot = luvio.storeLookup({
|
|
1739
|
+
recordId: key,
|
|
1740
|
+
node: select(),
|
|
1741
|
+
variables: {},
|
|
1742
|
+
}, snapshotRefresh);
|
|
1743
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1744
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1745
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
deepFreeze(snapshot.data);
|
|
1749
|
+
return snapshot;
|
|
1750
|
+
}
|
|
1751
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1752
|
+
const key = keyBuilder$1(luvio, params);
|
|
1753
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1754
|
+
const storeMetadataParams = {
|
|
1755
|
+
ttl: TTL,
|
|
1756
|
+
namespace: keyPrefix,
|
|
1757
|
+
version: VERSION,
|
|
1758
|
+
representationName: RepresentationType
|
|
1759
|
+
};
|
|
1760
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1761
|
+
return errorSnapshot;
|
|
1762
|
+
}
|
|
1763
|
+
function createResourceRequest(config) {
|
|
1764
|
+
const headers = {};
|
|
1765
|
+
return {
|
|
1766
|
+
baseUri: '/services/data/v66.0',
|
|
1767
|
+
basePath: '/connect/omni-analytics/get-analytics-logs',
|
|
1768
|
+
method: 'get',
|
|
1769
|
+
body: null,
|
|
1770
|
+
urlParams: {},
|
|
1771
|
+
queryParams: config.queryParams,
|
|
1772
|
+
headers,
|
|
1773
|
+
priority: 'normal',
|
|
1774
|
+
};
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
const adapterName = 'fetchOmniAnalyticsLogs';
|
|
1778
|
+
const fetchOmniAnalyticsLogs_ConfigPropertyMetadata = [
|
|
1779
|
+
generateParamConfigMetadata('applicationName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1780
|
+
generateParamConfigMetadata('componentId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1781
|
+
generateParamConfigMetadata('componentType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1782
|
+
generateParamConfigMetadata('createdAfter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1783
|
+
generateParamConfigMetadata('createdBefore', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1784
|
+
generateParamConfigMetadata('eventType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1785
|
+
generateParamConfigMetadata('pagesize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1786
|
+
generateParamConfigMetadata('queryMore', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1787
|
+
];
|
|
1788
|
+
const fetchOmniAnalyticsLogs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, fetchOmniAnalyticsLogs_ConfigPropertyMetadata);
|
|
1789
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(fetchOmniAnalyticsLogs_ConfigPropertyMetadata);
|
|
1790
|
+
function keyBuilder(luvio, config) {
|
|
1791
|
+
const resourceParams = createResourceParams(config);
|
|
1792
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
1793
|
+
}
|
|
1794
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1795
|
+
const config = {};
|
|
1796
|
+
typeCheckConfig$3(untrustedConfig, config, fetchOmniAnalyticsLogs_ConfigPropertyMetadata);
|
|
1797
|
+
return config;
|
|
1798
|
+
}
|
|
1799
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1800
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1801
|
+
return null;
|
|
1802
|
+
}
|
|
1803
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1804
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1805
|
+
}
|
|
1806
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1807
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1808
|
+
return null;
|
|
1809
|
+
}
|
|
1810
|
+
return config;
|
|
1811
|
+
}
|
|
1812
|
+
function adapterFragment(luvio, config) {
|
|
1813
|
+
createResourceParams(config);
|
|
1814
|
+
return select();
|
|
1815
|
+
}
|
|
1816
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1817
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1818
|
+
config,
|
|
1819
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1820
|
+
});
|
|
1821
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1822
|
+
}
|
|
1823
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1824
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1825
|
+
config,
|
|
1826
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1827
|
+
});
|
|
1828
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1829
|
+
}
|
|
1830
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1831
|
+
const resourceParams = createResourceParams(config);
|
|
1832
|
+
const request = createResourceRequest(resourceParams);
|
|
1833
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1834
|
+
.then((response) => {
|
|
1835
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1836
|
+
const cache = new StoreKeyMap();
|
|
1837
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1838
|
+
return cache;
|
|
1839
|
+
});
|
|
1840
|
+
}, (response) => {
|
|
1841
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1842
|
+
});
|
|
1843
|
+
}
|
|
1844
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1845
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1846
|
+
}
|
|
1847
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1848
|
+
const { luvio, config } = context;
|
|
1849
|
+
const selector = {
|
|
1850
|
+
recordId: keyBuilder(luvio, config),
|
|
1851
|
+
node: adapterFragment(luvio, config),
|
|
1852
|
+
variables: {},
|
|
1853
|
+
};
|
|
1854
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1855
|
+
config,
|
|
1856
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1857
|
+
});
|
|
1858
|
+
return cacheSnapshot;
|
|
1859
|
+
}
|
|
1860
|
+
const fetchOmniAnalyticsLogsAdapterFactory = (luvio) => function omnianalytics__fetchOmniAnalyticsLogs(untrustedConfig, requestContext) {
|
|
1861
|
+
const config = validateAdapterConfig(untrustedConfig, fetchOmniAnalyticsLogs_ConfigPropertyNames);
|
|
1862
|
+
// Invalid or incomplete config
|
|
1863
|
+
if (config === null) {
|
|
1864
|
+
return null;
|
|
1865
|
+
}
|
|
1866
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1867
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1868
|
+
};
|
|
1869
|
+
|
|
1870
|
+
export { fetchOmniAnalyticsLogsAdapterFactory, fetchOmniAnalyticsMetadataAdapterFactory, storeOmniAnalyticsLogsAdapterFactory };
|