@salesforce/lds-adapters-industries-timeline 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.
Files changed (45) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/industries-timeline.js +2552 -0
  3. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getDataGraphMetadata.d.ts +27 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getDataModelObjects.d.ts +28 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getEngagementEvents.d.ts +29 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getTimelineData.d.ts +33 -0
  8. package/dist/es/es2018/types/src/generated/adapters/getTimelineMetadata.d.ts +27 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +5 -0
  10. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +11 -0
  11. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineCustDataPfrmDataGraphMetadata.d.ts +15 -0
  12. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineCustDataPfrmDataModelObjects.d.ts +16 -0
  13. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineMetadataConfigurations.d.ts +15 -0
  14. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineTimelineDefinitionsCustDataPfrmEventsByTimelineConfigFullNameAndTimelineObjRecordId.d.ts +19 -0
  15. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineTimelineDefinitionsEventsByTimelineConfigFullNameAndTimelineObjRecordId.d.ts +23 -0
  16. package/dist/es/es2018/types/src/generated/types/CdpMetadataOutputRepresentation.d.ts +30 -0
  17. package/dist/es/es2018/types/src/generated/types/DGObjectOutputRepresentation.d.ts +55 -0
  18. package/dist/es/es2018/types/src/generated/types/DataGraphMetadataRepresentation.d.ts +30 -0
  19. package/dist/es/es2018/types/src/generated/types/DataGraphOutputRepresentation.d.ts +53 -0
  20. package/dist/es/es2018/types/src/generated/types/DmoFieldsOutputRepresentation.d.ts +34 -0
  21. package/dist/es/es2018/types/src/generated/types/DmoOutputRepresentation.d.ts +45 -0
  22. package/dist/es/es2018/types/src/generated/types/DmoRelationshipsOutputRepresentation.d.ts +30 -0
  23. package/dist/es/es2018/types/src/generated/types/EngagementEventTimelineDataRepresentation.d.ts +41 -0
  24. package/dist/es/es2018/types/src/generated/types/EngagementEventsRelatedListFieldsRepresentation.d.ts +34 -0
  25. package/dist/es/es2018/types/src/generated/types/EngagementEventsRelatedListRecordsRepresentation.d.ts +29 -0
  26. package/dist/es/es2018/types/src/generated/types/PathToDmoRepresentation.d.ts +30 -0
  27. package/dist/es/es2018/types/src/generated/types/RelationshipTypeOutputRepresentation.d.ts +31 -0
  28. package/dist/es/es2018/types/src/generated/types/TimelineDataCloudEventRepresentation.d.ts +48 -0
  29. package/dist/es/es2018/types/src/generated/types/TimelineDataGetResultRepresentation.d.ts +44 -0
  30. package/dist/es/es2018/types/src/generated/types/TimelineElementRepresentation.d.ts +34 -0
  31. package/dist/es/es2018/types/src/generated/types/TimelineEngagementRelatedListEventsRepresentation.d.ts +36 -0
  32. package/dist/es/es2018/types/src/generated/types/TimelineEntityRepresentation.d.ts +43 -0
  33. package/dist/es/es2018/types/src/generated/types/TimelineErrorRepresentation.d.ts +31 -0
  34. package/dist/es/es2018/types/src/generated/types/TimelineEventFieldRepresentation.d.ts +31 -0
  35. package/dist/es/es2018/types/src/generated/types/TimelineEventRepresentation.d.ts +44 -0
  36. package/dist/es/es2018/types/src/generated/types/TimelineEventTypeMetadataRepresentation.d.ts +60 -0
  37. package/dist/es/es2018/types/src/generated/types/TimelineEventTypeRepresentation.d.ts +31 -0
  38. package/dist/es/es2018/types/src/generated/types/TimelineMetadataDefinitionRepresentation.d.ts +41 -0
  39. package/dist/es/es2018/types/src/generated/types/TimelineMetadataResultRepresentation.d.ts +37 -0
  40. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  41. package/package.json +71 -0
  42. package/sfdc/index.d.ts +1 -0
  43. package/sfdc/index.js +2634 -0
  44. package/src/raml/api.raml +611 -0
  45. package/src/raml/luvio.raml +164 -0
package/sfdc/index.js ADDED
@@ -0,0 +1,2634 @@
1
+ /**
2
+ * Copyright (c) 2022, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ /*
8
+ * ATTENTION!
9
+ * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
10
+ * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
11
+ * Any changes made to this file in p4 will be automatically overwritten.
12
+ * *******************************************************************************************
13
+ */
14
+ /* proxy-compat-disable */
15
+ import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
+ import { withDefaultLuvio } from 'force/ldsEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$5, typeCheckConfig as typeCheckConfig$5, StoreKeyMap, createResourceParams as createResourceParams$5 } from 'force/luvioEngine';
18
+
19
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
+ const { keys: ObjectKeys, create: ObjectCreate } = Object;
21
+ const { isArray: ArrayIsArray$1 } = Array;
22
+ /**
23
+ * Validates an adapter config is well-formed.
24
+ * @param config The config to validate.
25
+ * @param adapter The adapter validation configuration.
26
+ * @param oneOf The keys the config must contain at least one of.
27
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
28
+ */
29
+ function validateConfig(config, adapter, oneOf) {
30
+ const { displayName } = adapter;
31
+ const { required, optional, unsupported } = adapter.parameters;
32
+ if (config === undefined ||
33
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
34
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
35
+ }
36
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
37
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
38
+ }
39
+ if (unsupported !== undefined &&
40
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
41
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
42
+ }
43
+ const supported = required.concat(optional);
44
+ if (ObjectKeys(config).some(key => !supported.includes(key))) {
45
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
46
+ }
47
+ }
48
+ function untrustedIsObject(untrusted) {
49
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
50
+ }
51
+ function areRequiredParametersPresent(config, configPropertyNames) {
52
+ return configPropertyNames.parameters.required.every(req => req in config);
53
+ }
54
+ const snapshotRefreshOptions = {
55
+ overrides: {
56
+ headers: {
57
+ 'Cache-Control': 'no-cache',
58
+ },
59
+ }
60
+ };
61
+ function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
62
+ return {
63
+ name,
64
+ required,
65
+ resourceType,
66
+ typeCheckShape,
67
+ isArrayShape,
68
+ coerceFn,
69
+ };
70
+ }
71
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
72
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
73
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
74
+ return {
75
+ displayName,
76
+ parameters: {
77
+ required,
78
+ optional,
79
+ }
80
+ };
81
+ }
82
+ const keyPrefix = 'Timeline';
83
+
84
+ const { isArray: ArrayIsArray } = Array;
85
+ const { stringify: JSONStringify } = JSON;
86
+ function createLink(ref) {
87
+ return {
88
+ __ref: serializeStructuredKey(ref),
89
+ };
90
+ }
91
+
92
+ function validate$n(obj, path = 'DGObjectOutputRepresentation') {
93
+ const v_error = (() => {
94
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
95
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
96
+ }
97
+ const obj_category = obj.category;
98
+ const path_category = path + '.category';
99
+ if (typeof obj_category !== 'string') {
100
+ return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
101
+ }
102
+ const obj_developerName = obj.developerName;
103
+ const path_developerName = path + '.developerName';
104
+ if (typeof obj_developerName !== 'string') {
105
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
106
+ }
107
+ const obj_displayName = obj.displayName;
108
+ const path_displayName = path + '.displayName';
109
+ if (typeof obj_displayName !== 'string') {
110
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
111
+ }
112
+ const obj_fields = obj.fields;
113
+ const path_fields = path + '.fields';
114
+ if (!ArrayIsArray(obj_fields)) {
115
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
116
+ }
117
+ for (let i = 0; i < obj_fields.length; i++) {
118
+ const obj_fields_item = obj_fields[i];
119
+ const path_fields_item = path_fields + '[' + i + ']';
120
+ if (obj_fields_item === undefined) {
121
+ return new TypeError('Expected "defined" but received "' + typeof obj_fields_item + '" (at "' + path_fields_item + '")');
122
+ }
123
+ }
124
+ if (obj.filterCriteria !== undefined) {
125
+ const obj_filterCriteria = obj.filterCriteria;
126
+ const path_filterCriteria = path + '.filterCriteria';
127
+ if (typeof obj_filterCriteria !== 'string') {
128
+ return new TypeError('Expected "string" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
129
+ }
130
+ }
131
+ const obj_memberDmoName = obj.memberDmoName;
132
+ const path_memberDmoName = path + '.memberDmoName';
133
+ if (typeof obj_memberDmoName !== 'string') {
134
+ return new TypeError('Expected "string" but received "' + typeof obj_memberDmoName + '" (at "' + path_memberDmoName + '")');
135
+ }
136
+ const obj_paths = obj.paths;
137
+ const path_paths = path + '.paths';
138
+ if (!ArrayIsArray(obj_paths)) {
139
+ return new TypeError('Expected "array" but received "' + typeof obj_paths + '" (at "' + path_paths + '")');
140
+ }
141
+ for (let i = 0; i < obj_paths.length; i++) {
142
+ const obj_paths_item = obj_paths[i];
143
+ const path_paths_item = path_paths + '[' + i + ']';
144
+ if (obj_paths_item === undefined) {
145
+ return new TypeError('Expected "defined" but received "' + typeof obj_paths_item + '" (at "' + path_paths_item + '")');
146
+ }
147
+ }
148
+ const obj_recencyCriteria = obj.recencyCriteria;
149
+ const path_recencyCriteria = path + '.recencyCriteria';
150
+ if (!ArrayIsArray(obj_recencyCriteria)) {
151
+ return new TypeError('Expected "array" but received "' + typeof obj_recencyCriteria + '" (at "' + path_recencyCriteria + '")');
152
+ }
153
+ for (let i = 0; i < obj_recencyCriteria.length; i++) {
154
+ const obj_recencyCriteria_item = obj_recencyCriteria[i];
155
+ const path_recencyCriteria_item = path_recencyCriteria + '[' + i + ']';
156
+ if (obj_recencyCriteria_item === undefined) {
157
+ return new TypeError('Expected "defined" but received "' + typeof obj_recencyCriteria_item + '" (at "' + path_recencyCriteria_item + '")');
158
+ }
159
+ }
160
+ const obj_relatedObjects = obj.relatedObjects;
161
+ const path_relatedObjects = path + '.relatedObjects';
162
+ if (!ArrayIsArray(obj_relatedObjects)) {
163
+ return new TypeError('Expected "array" but received "' + typeof obj_relatedObjects + '" (at "' + path_relatedObjects + '")');
164
+ }
165
+ for (let i = 0; i < obj_relatedObjects.length; i++) {
166
+ const obj_relatedObjects_item = obj_relatedObjects[i];
167
+ const path_relatedObjects_item = path_relatedObjects + '[' + i + ']';
168
+ const referencepath_relatedObjects_itemValidationError = validate$n(obj_relatedObjects_item, path_relatedObjects_item);
169
+ if (referencepath_relatedObjects_itemValidationError !== null) {
170
+ let message = 'Object doesn\'t match DGObjectOutputRepresentation (at "' + path_relatedObjects_item + '")\n';
171
+ message += referencepath_relatedObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
172
+ return new TypeError(message);
173
+ }
174
+ }
175
+ const obj_type = obj.type;
176
+ const path_type = path + '.type';
177
+ if (typeof obj_type !== 'string') {
178
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
179
+ }
180
+ })();
181
+ return v_error === undefined ? null : v_error;
182
+ }
183
+
184
+ function validate$m(obj, path = 'DataGraphOutputRepresentation') {
185
+ const v_error = (() => {
186
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
187
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
188
+ }
189
+ const obj_dataspaceName = obj.dataspaceName;
190
+ const path_dataspaceName = path + '.dataspaceName';
191
+ if (typeof obj_dataspaceName !== 'string') {
192
+ return new TypeError('Expected "string" but received "' + typeof obj_dataspaceName + '" (at "' + path_dataspaceName + '")');
193
+ }
194
+ if (obj.description !== undefined) {
195
+ const obj_description = obj.description;
196
+ const path_description = path + '.description';
197
+ if (typeof obj_description !== 'string') {
198
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
199
+ }
200
+ }
201
+ const obj_developerName = obj.developerName;
202
+ const path_developerName = path + '.developerName';
203
+ if (typeof obj_developerName !== 'string') {
204
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
205
+ }
206
+ const obj_dgObject = obj.dgObject;
207
+ const path_dgObject = path + '.dgObject';
208
+ const referencepath_dgObjectValidationError = validate$n(obj_dgObject, path_dgObject);
209
+ if (referencepath_dgObjectValidationError !== null) {
210
+ let message = 'Object doesn\'t match DGObjectOutputRepresentation (at "' + path_dgObject + '")\n';
211
+ message += referencepath_dgObjectValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
212
+ return new TypeError(message);
213
+ }
214
+ const obj_displayName = obj.displayName;
215
+ const path_displayName = path + '.displayName';
216
+ if (typeof obj_displayName !== 'string') {
217
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
218
+ }
219
+ const obj_idDmoName = obj.idDmoName;
220
+ const path_idDmoName = path + '.idDmoName';
221
+ if (typeof obj_idDmoName !== 'string') {
222
+ return new TypeError('Expected "string" but received "' + typeof obj_idDmoName + '" (at "' + path_idDmoName + '")');
223
+ }
224
+ const obj_primaryObjectName = obj.primaryObjectName;
225
+ const path_primaryObjectName = path + '.primaryObjectName';
226
+ if (typeof obj_primaryObjectName !== 'string') {
227
+ return new TypeError('Expected "string" but received "' + typeof obj_primaryObjectName + '" (at "' + path_primaryObjectName + '")');
228
+ }
229
+ const obj_valuesDmoName = obj.valuesDmoName;
230
+ const path_valuesDmoName = path + '.valuesDmoName';
231
+ if (typeof obj_valuesDmoName !== 'string') {
232
+ return new TypeError('Expected "string" but received "' + typeof obj_valuesDmoName + '" (at "' + path_valuesDmoName + '")');
233
+ }
234
+ const obj_version = obj.version;
235
+ const path_version = path + '.version';
236
+ if (typeof obj_version !== 'string') {
237
+ return new TypeError('Expected "string" but received "' + typeof obj_version + '" (at "' + path_version + '")');
238
+ }
239
+ })();
240
+ return v_error === undefined ? null : v_error;
241
+ }
242
+
243
+ const TTL$4 = 300000;
244
+ const VERSION$4 = "44b2bb1d9b3f3da028d27540301a3b52";
245
+ function validate$l(obj, path = 'DataGraphMetadataRepresentation') {
246
+ const v_error = (() => {
247
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
248
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
249
+ }
250
+ const obj_dataGraphMetadata = obj.dataGraphMetadata;
251
+ const path_dataGraphMetadata = path + '.dataGraphMetadata';
252
+ if (!ArrayIsArray(obj_dataGraphMetadata)) {
253
+ return new TypeError('Expected "array" but received "' + typeof obj_dataGraphMetadata + '" (at "' + path_dataGraphMetadata + '")');
254
+ }
255
+ for (let i = 0; i < obj_dataGraphMetadata.length; i++) {
256
+ const obj_dataGraphMetadata_item = obj_dataGraphMetadata[i];
257
+ const path_dataGraphMetadata_item = path_dataGraphMetadata + '[' + i + ']';
258
+ const referencepath_dataGraphMetadata_itemValidationError = validate$m(obj_dataGraphMetadata_item, path_dataGraphMetadata_item);
259
+ if (referencepath_dataGraphMetadata_itemValidationError !== null) {
260
+ let message = 'Object doesn\'t match DataGraphOutputRepresentation (at "' + path_dataGraphMetadata_item + '")\n';
261
+ message += referencepath_dataGraphMetadata_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
262
+ return new TypeError(message);
263
+ }
264
+ }
265
+ })();
266
+ return v_error === undefined ? null : v_error;
267
+ }
268
+ const RepresentationType$4 = 'DataGraphMetadataRepresentation';
269
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
270
+ return input;
271
+ }
272
+ const select$9 = function DataGraphMetadataRepresentationSelect() {
273
+ return {
274
+ kind: 'Fragment',
275
+ version: VERSION$4,
276
+ private: [],
277
+ opaque: true
278
+ };
279
+ };
280
+ function equals$4(existing, incoming) {
281
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
282
+ return false;
283
+ }
284
+ return true;
285
+ }
286
+ const ingest$4 = function DataGraphMetadataRepresentationIngest(input, path, luvio, store, timestamp) {
287
+ if (process.env.NODE_ENV !== 'production') {
288
+ const validateError = validate$l(input);
289
+ if (validateError !== null) {
290
+ throw validateError;
291
+ }
292
+ }
293
+ const key = path.fullPath;
294
+ const ttlToUse = TTL$4;
295
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "Timeline", VERSION$4, RepresentationType$4, equals$4);
296
+ return createLink(key);
297
+ };
298
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
299
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
300
+ const rootKey = fullPathFactory();
301
+ rootKeySet.set(rootKey, {
302
+ namespace: keyPrefix,
303
+ representationName: RepresentationType$4,
304
+ mergeable: false
305
+ });
306
+ }
307
+
308
+ function select$8(luvio, params) {
309
+ return select$9();
310
+ }
311
+ function keyBuilder$9(luvio, params) {
312
+ return keyPrefix + '::DataGraphMetadataRepresentation:(' + 'dataSpaceApiName:' + params.queryParams.dataSpaceApiName + ')';
313
+ }
314
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
315
+ getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
316
+ }
317
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
318
+ const { body } = response;
319
+ const key = keyBuilder$9(luvio, resourceParams);
320
+ luvio.storeIngest(key, ingest$4, body);
321
+ const snapshot = luvio.storeLookup({
322
+ recordId: key,
323
+ node: select$8(),
324
+ variables: {},
325
+ }, snapshotRefresh);
326
+ if (process.env.NODE_ENV !== 'production') {
327
+ if (snapshot.state !== 'Fulfilled') {
328
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
329
+ }
330
+ }
331
+ deepFreeze(snapshot.data);
332
+ return snapshot;
333
+ }
334
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
335
+ const key = keyBuilder$9(luvio, params);
336
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
337
+ const storeMetadataParams = {
338
+ ttl: TTL$4,
339
+ namespace: keyPrefix,
340
+ version: VERSION$4,
341
+ representationName: RepresentationType$4
342
+ };
343
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
344
+ return errorSnapshot;
345
+ }
346
+ function createResourceRequest$4(config) {
347
+ const headers = {};
348
+ return {
349
+ baseUri: '/services/data/v66.0',
350
+ basePath: '/connect/timeline/cust-data-pfrm/data-graph-metadata',
351
+ method: 'get',
352
+ body: null,
353
+ urlParams: {},
354
+ queryParams: config.queryParams,
355
+ headers,
356
+ priority: 'normal',
357
+ };
358
+ }
359
+
360
+ const adapterName$4 = 'getDataGraphMetadata';
361
+ const getDataGraphMetadata_ConfigPropertyMetadata = [
362
+ generateParamConfigMetadata('dataSpaceApiName', false, 1 /* QueryParameter */, 0 /* String */),
363
+ ];
364
+ const getDataGraphMetadata_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getDataGraphMetadata_ConfigPropertyMetadata);
365
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(getDataGraphMetadata_ConfigPropertyMetadata);
366
+ function keyBuilder$8(luvio, config) {
367
+ const resourceParams = createResourceParams$4(config);
368
+ return keyBuilder$9(luvio, resourceParams);
369
+ }
370
+ function typeCheckConfig$4(untrustedConfig) {
371
+ const config = {};
372
+ typeCheckConfig$5(untrustedConfig, config, getDataGraphMetadata_ConfigPropertyMetadata);
373
+ return config;
374
+ }
375
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
376
+ if (!untrustedIsObject(untrustedConfig)) {
377
+ return null;
378
+ }
379
+ if (process.env.NODE_ENV !== 'production') {
380
+ validateConfig(untrustedConfig, configPropertyNames);
381
+ }
382
+ const config = typeCheckConfig$4(untrustedConfig);
383
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
384
+ return null;
385
+ }
386
+ return config;
387
+ }
388
+ function adapterFragment$4(luvio, config) {
389
+ createResourceParams$4(config);
390
+ return select$8();
391
+ }
392
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
393
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
394
+ config,
395
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
396
+ });
397
+ return luvio.storeBroadcast().then(() => snapshot);
398
+ }
399
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
400
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
401
+ config,
402
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
403
+ });
404
+ return luvio.storeBroadcast().then(() => snapshot);
405
+ }
406
+ function buildNetworkSnapshot$4(luvio, config, options) {
407
+ const resourceParams = createResourceParams$4(config);
408
+ const request = createResourceRequest$4(resourceParams);
409
+ return luvio.dispatchResourceRequest(request, options)
410
+ .then((response) => {
411
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
412
+ const cache = new StoreKeyMap();
413
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
414
+ return cache;
415
+ });
416
+ }, (response) => {
417
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
418
+ });
419
+ }
420
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
421
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
422
+ }
423
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
424
+ const { luvio, config } = context;
425
+ const selector = {
426
+ recordId: keyBuilder$8(luvio, config),
427
+ node: adapterFragment$4(luvio, config),
428
+ variables: {},
429
+ };
430
+ const cacheSnapshot = storeLookup(selector, {
431
+ config,
432
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
433
+ });
434
+ return cacheSnapshot;
435
+ }
436
+ const getDataGraphMetadataAdapterFactory = (luvio) => function Timeline__getDataGraphMetadata(untrustedConfig, requestContext) {
437
+ const config = validateAdapterConfig$4(untrustedConfig, getDataGraphMetadata_ConfigPropertyNames);
438
+ // Invalid or incomplete config
439
+ if (config === null) {
440
+ return null;
441
+ }
442
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
443
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
444
+ };
445
+
446
+ function validate$k(obj, path = 'DmoFieldsOutputRepresentation') {
447
+ const v_error = (() => {
448
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
449
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
450
+ }
451
+ const obj_displayName = obj.displayName;
452
+ const path_displayName = path + '.displayName';
453
+ if (typeof obj_displayName !== 'string') {
454
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
455
+ }
456
+ const obj_name = obj.name;
457
+ const path_name = path + '.name';
458
+ if (typeof obj_name !== 'string') {
459
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
460
+ }
461
+ const obj_type = obj.type;
462
+ const path_type = path + '.type';
463
+ if (typeof obj_type !== 'string') {
464
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
465
+ }
466
+ })();
467
+ return v_error === undefined ? null : v_error;
468
+ }
469
+
470
+ function validate$j(obj, path = 'RelationshipTypeOutputRepresentation') {
471
+ const v_error = (() => {
472
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
473
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
474
+ }
475
+ const obj_attribute = obj.attribute;
476
+ const path_attribute = path + '.attribute';
477
+ if (typeof obj_attribute !== 'string') {
478
+ return new TypeError('Expected "string" but received "' + typeof obj_attribute + '" (at "' + path_attribute + '")');
479
+ }
480
+ const obj_name = obj.name;
481
+ const path_name = path + '.name';
482
+ if (typeof obj_name !== 'string') {
483
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
484
+ }
485
+ })();
486
+ return v_error === undefined ? null : v_error;
487
+ }
488
+
489
+ function validate$i(obj, path = 'DmoRelationshipsOutputRepresentation') {
490
+ const v_error = (() => {
491
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
492
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
493
+ }
494
+ const obj_fromEntity = obj.fromEntity;
495
+ const path_fromEntity = path + '.fromEntity';
496
+ const referencepath_fromEntityValidationError = validate$j(obj_fromEntity, path_fromEntity);
497
+ if (referencepath_fromEntityValidationError !== null) {
498
+ let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_fromEntity + '")\n';
499
+ message += referencepath_fromEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
500
+ return new TypeError(message);
501
+ }
502
+ const obj_toEntity = obj.toEntity;
503
+ const path_toEntity = path + '.toEntity';
504
+ const referencepath_toEntityValidationError = validate$j(obj_toEntity, path_toEntity);
505
+ if (referencepath_toEntityValidationError !== null) {
506
+ let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_toEntity + '")\n';
507
+ message += referencepath_toEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
508
+ return new TypeError(message);
509
+ }
510
+ })();
511
+ return v_error === undefined ? null : v_error;
512
+ }
513
+
514
+ function validate$h(obj, path = 'DmoOutputRepresentation') {
515
+ const v_error = (() => {
516
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
517
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
518
+ }
519
+ const obj_category = obj.category;
520
+ const path_category = path + '.category';
521
+ if (typeof obj_category !== 'string') {
522
+ return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
523
+ }
524
+ const obj_displayName = obj.displayName;
525
+ const path_displayName = path + '.displayName';
526
+ if (typeof obj_displayName !== 'string') {
527
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
528
+ }
529
+ const obj_fields = obj.fields;
530
+ const path_fields = path + '.fields';
531
+ if (!ArrayIsArray(obj_fields)) {
532
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
533
+ }
534
+ for (let i = 0; i < obj_fields.length; i++) {
535
+ const obj_fields_item = obj_fields[i];
536
+ const path_fields_item = path_fields + '[' + i + ']';
537
+ const referencepath_fields_itemValidationError = validate$k(obj_fields_item, path_fields_item);
538
+ if (referencepath_fields_itemValidationError !== null) {
539
+ let message = 'Object doesn\'t match DmoFieldsOutputRepresentation (at "' + path_fields_item + '")\n';
540
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
541
+ return new TypeError(message);
542
+ }
543
+ }
544
+ const obj_name = obj.name;
545
+ const path_name = path + '.name';
546
+ if (typeof obj_name !== 'string') {
547
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
548
+ }
549
+ const obj_referenceModelEntityDeveloperName = obj.referenceModelEntityDeveloperName;
550
+ const path_referenceModelEntityDeveloperName = path + '.referenceModelEntityDeveloperName';
551
+ if (typeof obj_referenceModelEntityDeveloperName !== 'string') {
552
+ return new TypeError('Expected "string" but received "' + typeof obj_referenceModelEntityDeveloperName + '" (at "' + path_referenceModelEntityDeveloperName + '")');
553
+ }
554
+ const obj_relationships = obj.relationships;
555
+ const path_relationships = path + '.relationships';
556
+ if (!ArrayIsArray(obj_relationships)) {
557
+ return new TypeError('Expected "array" but received "' + typeof obj_relationships + '" (at "' + path_relationships + '")');
558
+ }
559
+ for (let i = 0; i < obj_relationships.length; i++) {
560
+ const obj_relationships_item = obj_relationships[i];
561
+ const path_relationships_item = path_relationships + '[' + i + ']';
562
+ const referencepath_relationships_itemValidationError = validate$i(obj_relationships_item, path_relationships_item);
563
+ if (referencepath_relationships_itemValidationError !== null) {
564
+ let message = 'Object doesn\'t match DmoRelationshipsOutputRepresentation (at "' + path_relationships_item + '")\n';
565
+ message += referencepath_relationships_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
566
+ return new TypeError(message);
567
+ }
568
+ }
569
+ })();
570
+ return v_error === undefined ? null : v_error;
571
+ }
572
+
573
+ const TTL$3 = 600000;
574
+ const VERSION$3 = "84ccc17f91013e292e7b01a291dd0322";
575
+ function validate$g(obj, path = 'CdpMetadataOutputRepresentation') {
576
+ const v_error = (() => {
577
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
578
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
579
+ }
580
+ const obj_dmos = obj.dmos;
581
+ const path_dmos = path + '.dmos';
582
+ if (!ArrayIsArray(obj_dmos)) {
583
+ return new TypeError('Expected "array" but received "' + typeof obj_dmos + '" (at "' + path_dmos + '")');
584
+ }
585
+ for (let i = 0; i < obj_dmos.length; i++) {
586
+ const obj_dmos_item = obj_dmos[i];
587
+ const path_dmos_item = path_dmos + '[' + i + ']';
588
+ const referencepath_dmos_itemValidationError = validate$h(obj_dmos_item, path_dmos_item);
589
+ if (referencepath_dmos_itemValidationError !== null) {
590
+ let message = 'Object doesn\'t match DmoOutputRepresentation (at "' + path_dmos_item + '")\n';
591
+ message += referencepath_dmos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
592
+ return new TypeError(message);
593
+ }
594
+ }
595
+ })();
596
+ return v_error === undefined ? null : v_error;
597
+ }
598
+ const RepresentationType$3 = 'CdpMetadataOutputRepresentation';
599
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
600
+ return input;
601
+ }
602
+ const select$7 = function CdpMetadataOutputRepresentationSelect() {
603
+ return {
604
+ kind: 'Fragment',
605
+ version: VERSION$3,
606
+ private: [],
607
+ opaque: true
608
+ };
609
+ };
610
+ function equals$3(existing, incoming) {
611
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
612
+ return false;
613
+ }
614
+ return true;
615
+ }
616
+ const ingest$3 = function CdpMetadataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
617
+ if (process.env.NODE_ENV !== 'production') {
618
+ const validateError = validate$g(input);
619
+ if (validateError !== null) {
620
+ throw validateError;
621
+ }
622
+ }
623
+ const key = path.fullPath;
624
+ const ttlToUse = TTL$3;
625
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "Timeline", VERSION$3, RepresentationType$3, equals$3);
626
+ return createLink(key);
627
+ };
628
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
629
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
630
+ const rootKey = fullPathFactory();
631
+ rootKeySet.set(rootKey, {
632
+ namespace: keyPrefix,
633
+ representationName: RepresentationType$3,
634
+ mergeable: false
635
+ });
636
+ }
637
+
638
+ function select$6(luvio, params) {
639
+ return select$7();
640
+ }
641
+ function keyBuilder$7(luvio, params) {
642
+ return keyPrefix + '::CdpMetadataOutputRepresentation:(' + 'dataSpaceApiName:' + params.queryParams.dataSpaceApiName + ',' + 'objectCategory:' + params.queryParams.objectCategory + ')';
643
+ }
644
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
645
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
646
+ }
647
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
648
+ const { body } = response;
649
+ const key = keyBuilder$7(luvio, resourceParams);
650
+ luvio.storeIngest(key, ingest$3, body);
651
+ const snapshot = luvio.storeLookup({
652
+ recordId: key,
653
+ node: select$6(),
654
+ variables: {},
655
+ }, snapshotRefresh);
656
+ if (process.env.NODE_ENV !== 'production') {
657
+ if (snapshot.state !== 'Fulfilled') {
658
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
659
+ }
660
+ }
661
+ deepFreeze(snapshot.data);
662
+ return snapshot;
663
+ }
664
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
665
+ const key = keyBuilder$7(luvio, params);
666
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
667
+ const storeMetadataParams = {
668
+ ttl: TTL$3,
669
+ namespace: keyPrefix,
670
+ version: VERSION$3,
671
+ representationName: RepresentationType$3
672
+ };
673
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
674
+ return errorSnapshot;
675
+ }
676
+ function createResourceRequest$3(config) {
677
+ const headers = {};
678
+ return {
679
+ baseUri: '/services/data/v66.0',
680
+ basePath: '/connect/timeline/cust-data-pfrm/data-model-objects',
681
+ method: 'get',
682
+ body: null,
683
+ urlParams: {},
684
+ queryParams: config.queryParams,
685
+ headers,
686
+ priority: 'normal',
687
+ };
688
+ }
689
+
690
+ const adapterName$3 = 'getDataModelObjects';
691
+ const getDataModelObjects_ConfigPropertyMetadata = [
692
+ generateParamConfigMetadata('dataSpaceApiName', false, 1 /* QueryParameter */, 0 /* String */),
693
+ generateParamConfigMetadata('objectCategory', false, 1 /* QueryParameter */, 0 /* String */),
694
+ ];
695
+ const getDataModelObjects_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getDataModelObjects_ConfigPropertyMetadata);
696
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getDataModelObjects_ConfigPropertyMetadata);
697
+ function keyBuilder$6(luvio, config) {
698
+ const resourceParams = createResourceParams$3(config);
699
+ return keyBuilder$7(luvio, resourceParams);
700
+ }
701
+ function typeCheckConfig$3(untrustedConfig) {
702
+ const config = {};
703
+ typeCheckConfig$5(untrustedConfig, config, getDataModelObjects_ConfigPropertyMetadata);
704
+ return config;
705
+ }
706
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
707
+ if (!untrustedIsObject(untrustedConfig)) {
708
+ return null;
709
+ }
710
+ if (process.env.NODE_ENV !== 'production') {
711
+ validateConfig(untrustedConfig, configPropertyNames);
712
+ }
713
+ const config = typeCheckConfig$3(untrustedConfig);
714
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
715
+ return null;
716
+ }
717
+ return config;
718
+ }
719
+ function adapterFragment$3(luvio, config) {
720
+ createResourceParams$3(config);
721
+ return select$6();
722
+ }
723
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
724
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
725
+ config,
726
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
727
+ });
728
+ return luvio.storeBroadcast().then(() => snapshot);
729
+ }
730
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
731
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
732
+ config,
733
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
734
+ });
735
+ return luvio.storeBroadcast().then(() => snapshot);
736
+ }
737
+ function buildNetworkSnapshot$3(luvio, config, options) {
738
+ const resourceParams = createResourceParams$3(config);
739
+ const request = createResourceRequest$3(resourceParams);
740
+ return luvio.dispatchResourceRequest(request, options)
741
+ .then((response) => {
742
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
743
+ const cache = new StoreKeyMap();
744
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
745
+ return cache;
746
+ });
747
+ }, (response) => {
748
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
749
+ });
750
+ }
751
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
752
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
753
+ }
754
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
755
+ const { luvio, config } = context;
756
+ const selector = {
757
+ recordId: keyBuilder$6(luvio, config),
758
+ node: adapterFragment$3(luvio, config),
759
+ variables: {},
760
+ };
761
+ const cacheSnapshot = storeLookup(selector, {
762
+ config,
763
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
764
+ });
765
+ return cacheSnapshot;
766
+ }
767
+ const getDataModelObjectsAdapterFactory = (luvio) => function Timeline__getDataModelObjects(untrustedConfig, requestContext) {
768
+ const config = validateAdapterConfig$3(untrustedConfig, getDataModelObjects_ConfigPropertyNames);
769
+ // Invalid or incomplete config
770
+ if (config === null) {
771
+ return null;
772
+ }
773
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
774
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
775
+ };
776
+
777
+ function validate$f(obj, path = 'TimelineErrorRepresentation') {
778
+ const v_error = (() => {
779
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
780
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
781
+ }
782
+ const obj_code = obj.code;
783
+ const path_code = path + '.code';
784
+ let obj_code_union0 = null;
785
+ const obj_code_union0_error = (() => {
786
+ if (typeof obj_code !== 'string') {
787
+ return new TypeError('Expected "string" but received "' + typeof obj_code + '" (at "' + path_code + '")');
788
+ }
789
+ })();
790
+ if (obj_code_union0_error != null) {
791
+ obj_code_union0 = obj_code_union0_error.message;
792
+ }
793
+ let obj_code_union1 = null;
794
+ const obj_code_union1_error = (() => {
795
+ if (obj_code !== null) {
796
+ return new TypeError('Expected "null" but received "' + typeof obj_code + '" (at "' + path_code + '")');
797
+ }
798
+ })();
799
+ if (obj_code_union1_error != null) {
800
+ obj_code_union1 = obj_code_union1_error.message;
801
+ }
802
+ if (obj_code_union0 && obj_code_union1) {
803
+ let message = 'Object doesn\'t match union (at "' + path_code + '")';
804
+ message += '\n' + obj_code_union0.split('\n').map((line) => '\t' + line).join('\n');
805
+ message += '\n' + obj_code_union1.split('\n').map((line) => '\t' + line).join('\n');
806
+ return new TypeError(message);
807
+ }
808
+ const obj_message = obj.message;
809
+ const path_message = path + '.message';
810
+ let obj_message_union0 = null;
811
+ const obj_message_union0_error = (() => {
812
+ if (typeof obj_message !== 'string') {
813
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
814
+ }
815
+ })();
816
+ if (obj_message_union0_error != null) {
817
+ obj_message_union0 = obj_message_union0_error.message;
818
+ }
819
+ let obj_message_union1 = null;
820
+ const obj_message_union1_error = (() => {
821
+ if (obj_message !== null) {
822
+ return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
823
+ }
824
+ })();
825
+ if (obj_message_union1_error != null) {
826
+ obj_message_union1 = obj_message_union1_error.message;
827
+ }
828
+ if (obj_message_union0 && obj_message_union1) {
829
+ let message = 'Object doesn\'t match union (at "' + path_message + '")';
830
+ message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
831
+ message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
832
+ return new TypeError(message);
833
+ }
834
+ })();
835
+ return v_error === undefined ? null : v_error;
836
+ }
837
+
838
+ function validate$e(obj, path = 'TimelineEventTypeRepresentation') {
839
+ const v_error = (() => {
840
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
841
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
842
+ }
843
+ const obj_eventApiName = obj.eventApiName;
844
+ const path_eventApiName = path + '.eventApiName';
845
+ let obj_eventApiName_union0 = null;
846
+ const obj_eventApiName_union0_error = (() => {
847
+ if (typeof obj_eventApiName !== 'string') {
848
+ return new TypeError('Expected "string" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
849
+ }
850
+ })();
851
+ if (obj_eventApiName_union0_error != null) {
852
+ obj_eventApiName_union0 = obj_eventApiName_union0_error.message;
853
+ }
854
+ let obj_eventApiName_union1 = null;
855
+ const obj_eventApiName_union1_error = (() => {
856
+ if (obj_eventApiName !== null) {
857
+ return new TypeError('Expected "null" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
858
+ }
859
+ })();
860
+ if (obj_eventApiName_union1_error != null) {
861
+ obj_eventApiName_union1 = obj_eventApiName_union1_error.message;
862
+ }
863
+ if (obj_eventApiName_union0 && obj_eventApiName_union1) {
864
+ let message = 'Object doesn\'t match union (at "' + path_eventApiName + '")';
865
+ message += '\n' + obj_eventApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
866
+ message += '\n' + obj_eventApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
867
+ return new TypeError(message);
868
+ }
869
+ const obj_offset = obj.offset;
870
+ const path_offset = path + '.offset';
871
+ let obj_offset_union0 = null;
872
+ const obj_offset_union0_error = (() => {
873
+ if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
874
+ return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
875
+ }
876
+ })();
877
+ if (obj_offset_union0_error != null) {
878
+ obj_offset_union0 = obj_offset_union0_error.message;
879
+ }
880
+ let obj_offset_union1 = null;
881
+ const obj_offset_union1_error = (() => {
882
+ if (obj_offset !== null) {
883
+ return new TypeError('Expected "null" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
884
+ }
885
+ })();
886
+ if (obj_offset_union1_error != null) {
887
+ obj_offset_union1 = obj_offset_union1_error.message;
888
+ }
889
+ if (obj_offset_union0 && obj_offset_union1) {
890
+ let message = 'Object doesn\'t match union (at "' + path_offset + '")';
891
+ message += '\n' + obj_offset_union0.split('\n').map((line) => '\t' + line).join('\n');
892
+ message += '\n' + obj_offset_union1.split('\n').map((line) => '\t' + line).join('\n');
893
+ return new TypeError(message);
894
+ }
895
+ })();
896
+ return v_error === undefined ? null : v_error;
897
+ }
898
+
899
+ function validate$d(obj, path = 'TimelineEventFieldRepresentation') {
900
+ const v_error = (() => {
901
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
902
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
903
+ }
904
+ const obj_name = obj.name;
905
+ const path_name = path + '.name';
906
+ let obj_name_union0 = null;
907
+ const obj_name_union0_error = (() => {
908
+ if (typeof obj_name !== 'string') {
909
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
910
+ }
911
+ })();
912
+ if (obj_name_union0_error != null) {
913
+ obj_name_union0 = obj_name_union0_error.message;
914
+ }
915
+ let obj_name_union1 = null;
916
+ const obj_name_union1_error = (() => {
917
+ if (obj_name !== null) {
918
+ return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
919
+ }
920
+ })();
921
+ if (obj_name_union1_error != null) {
922
+ obj_name_union1 = obj_name_union1_error.message;
923
+ }
924
+ if (obj_name_union0 && obj_name_union1) {
925
+ let message = 'Object doesn\'t match union (at "' + path_name + '")';
926
+ message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
927
+ message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
928
+ return new TypeError(message);
929
+ }
930
+ const obj_value = obj.value;
931
+ const path_value = path + '.value';
932
+ let obj_value_union0 = null;
933
+ const obj_value_union0_error = (() => {
934
+ if (typeof obj_value !== 'string') {
935
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
936
+ }
937
+ })();
938
+ if (obj_value_union0_error != null) {
939
+ obj_value_union0 = obj_value_union0_error.message;
940
+ }
941
+ let obj_value_union1 = null;
942
+ const obj_value_union1_error = (() => {
943
+ if (obj_value !== null) {
944
+ return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
945
+ }
946
+ })();
947
+ if (obj_value_union1_error != null) {
948
+ obj_value_union1 = obj_value_union1_error.message;
949
+ }
950
+ if (obj_value_union0 && obj_value_union1) {
951
+ let message = 'Object doesn\'t match union (at "' + path_value + '")';
952
+ message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
953
+ message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
954
+ return new TypeError(message);
955
+ }
956
+ })();
957
+ return v_error === undefined ? null : v_error;
958
+ }
959
+
960
+ function validate$c(obj, path = 'PathToDmoRepresentation') {
961
+ const v_error = (() => {
962
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
963
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
964
+ }
965
+ const obj_dmoName = obj.dmoName;
966
+ const path_dmoName = path + '.dmoName';
967
+ if (typeof obj_dmoName !== 'string') {
968
+ return new TypeError('Expected "string" but received "' + typeof obj_dmoName + '" (at "' + path_dmoName + '")');
969
+ }
970
+ if (obj.pathToDmoRepresentation !== undefined) {
971
+ const obj_pathToDmoRepresentation = obj.pathToDmoRepresentation;
972
+ const path_pathToDmoRepresentation = path + '.pathToDmoRepresentation';
973
+ const referencepath_pathToDmoRepresentationValidationError = validate$c(obj_pathToDmoRepresentation, path_pathToDmoRepresentation);
974
+ if (referencepath_pathToDmoRepresentationValidationError !== null) {
975
+ let message = 'Object doesn\'t match PathToDmoRepresentation (at "' + path_pathToDmoRepresentation + '")\n';
976
+ message += referencepath_pathToDmoRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
977
+ return new TypeError(message);
978
+ }
979
+ }
980
+ })();
981
+ return v_error === undefined ? null : v_error;
982
+ }
983
+
984
+ function validate$b(obj, path = 'EngagementEventsRelatedListFieldsRepresentation') {
985
+ const v_error = (() => {
986
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
987
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
988
+ }
989
+ const obj_label = obj.label;
990
+ const path_label = path + '.label';
991
+ if (typeof obj_label !== 'string') {
992
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
993
+ }
994
+ const obj_type = obj.type;
995
+ const path_type = path + '.type';
996
+ if (typeof obj_type !== 'string') {
997
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
998
+ }
999
+ const obj_value = obj.value;
1000
+ const path_value = path + '.value';
1001
+ if (typeof obj_value !== 'string') {
1002
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
1003
+ }
1004
+ })();
1005
+ return v_error === undefined ? null : v_error;
1006
+ }
1007
+
1008
+ function validate$a(obj, path = 'EngagementEventsRelatedListRecordsRepresentation') {
1009
+ const v_error = (() => {
1010
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1011
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1012
+ }
1013
+ const obj_fields = obj.fields;
1014
+ const path_fields = path + '.fields';
1015
+ if (!ArrayIsArray(obj_fields)) {
1016
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
1017
+ }
1018
+ for (let i = 0; i < obj_fields.length; i++) {
1019
+ const obj_fields_item = obj_fields[i];
1020
+ const path_fields_item = path_fields + '[' + i + ']';
1021
+ const referencepath_fields_itemValidationError = validate$b(obj_fields_item, path_fields_item);
1022
+ if (referencepath_fields_itemValidationError !== null) {
1023
+ let message = 'Object doesn\'t match EngagementEventsRelatedListFieldsRepresentation (at "' + path_fields_item + '")\n';
1024
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1025
+ return new TypeError(message);
1026
+ }
1027
+ }
1028
+ })();
1029
+ return v_error === undefined ? null : v_error;
1030
+ }
1031
+
1032
+ function validate$9(obj, path = 'TimelineEngagementRelatedListEventsRepresentation') {
1033
+ const v_error = (() => {
1034
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1035
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1036
+ }
1037
+ const obj_nameOfDmo = obj.nameOfDmo;
1038
+ const path_nameOfDmo = path + '.nameOfDmo';
1039
+ if (typeof obj_nameOfDmo !== 'string') {
1040
+ return new TypeError('Expected "string" but received "' + typeof obj_nameOfDmo + '" (at "' + path_nameOfDmo + '")');
1041
+ }
1042
+ const obj_pathToDmo = obj.pathToDmo;
1043
+ const path_pathToDmo = path + '.pathToDmo';
1044
+ const referencepath_pathToDmoValidationError = validate$c(obj_pathToDmo, path_pathToDmo);
1045
+ if (referencepath_pathToDmoValidationError !== null) {
1046
+ let message = 'Object doesn\'t match PathToDmoRepresentation (at "' + path_pathToDmo + '")\n';
1047
+ message += referencepath_pathToDmoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1048
+ return new TypeError(message);
1049
+ }
1050
+ const obj_records = obj.records;
1051
+ const path_records = path + '.records';
1052
+ if (!ArrayIsArray(obj_records)) {
1053
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1054
+ }
1055
+ for (let i = 0; i < obj_records.length; i++) {
1056
+ const obj_records_item = obj_records[i];
1057
+ const path_records_item = path_records + '[' + i + ']';
1058
+ const referencepath_records_itemValidationError = validate$a(obj_records_item, path_records_item);
1059
+ if (referencepath_records_itemValidationError !== null) {
1060
+ let message = 'Object doesn\'t match EngagementEventsRelatedListRecordsRepresentation (at "' + path_records_item + '")\n';
1061
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1062
+ return new TypeError(message);
1063
+ }
1064
+ }
1065
+ })();
1066
+ return v_error === undefined ? null : v_error;
1067
+ }
1068
+
1069
+ function validate$8(obj, path = 'TimelineDataCloudEventRepresentation') {
1070
+ const v_error = (() => {
1071
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1072
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1073
+ }
1074
+ if (obj.description !== undefined) {
1075
+ const obj_description = obj.description;
1076
+ const path_description = path + '.description';
1077
+ if (typeof obj_description !== 'string') {
1078
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1079
+ }
1080
+ }
1081
+ const obj_eventDateTime = obj.eventDateTime;
1082
+ const path_eventDateTime = path + '.eventDateTime';
1083
+ if (typeof obj_eventDateTime !== 'string') {
1084
+ return new TypeError('Expected "string" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
1085
+ }
1086
+ const obj_fields = obj.fields;
1087
+ const path_fields = path + '.fields';
1088
+ if (!ArrayIsArray(obj_fields)) {
1089
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
1090
+ }
1091
+ for (let i = 0; i < obj_fields.length; i++) {
1092
+ const obj_fields_item = obj_fields[i];
1093
+ const path_fields_item = path_fields + '[' + i + ']';
1094
+ const referencepath_fields_itemValidationError = validate$d(obj_fields_item, path_fields_item);
1095
+ if (referencepath_fields_itemValidationError !== null) {
1096
+ let message = 'Object doesn\'t match TimelineEventFieldRepresentation (at "' + path_fields_item + '")\n';
1097
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1098
+ return new TypeError(message);
1099
+ }
1100
+ }
1101
+ if (obj.id !== undefined) {
1102
+ const obj_id = obj.id;
1103
+ const path_id = path + '.id';
1104
+ if (typeof obj_id !== 'string') {
1105
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1106
+ }
1107
+ }
1108
+ if (obj.relatedListEvents !== undefined) {
1109
+ const obj_relatedListEvents = obj.relatedListEvents;
1110
+ const path_relatedListEvents = path + '.relatedListEvents';
1111
+ if (!ArrayIsArray(obj_relatedListEvents)) {
1112
+ return new TypeError('Expected "array" but received "' + typeof obj_relatedListEvents + '" (at "' + path_relatedListEvents + '")');
1113
+ }
1114
+ for (let i = 0; i < obj_relatedListEvents.length; i++) {
1115
+ const obj_relatedListEvents_item = obj_relatedListEvents[i];
1116
+ const path_relatedListEvents_item = path_relatedListEvents + '[' + i + ']';
1117
+ const referencepath_relatedListEvents_itemValidationError = validate$9(obj_relatedListEvents_item, path_relatedListEvents_item);
1118
+ if (referencepath_relatedListEvents_itemValidationError !== null) {
1119
+ let message = 'Object doesn\'t match TimelineEngagementRelatedListEventsRepresentation (at "' + path_relatedListEvents_item + '")\n';
1120
+ message += referencepath_relatedListEvents_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1121
+ return new TypeError(message);
1122
+ }
1123
+ }
1124
+ }
1125
+ const obj_title = obj.title;
1126
+ const path_title = path + '.title';
1127
+ if (typeof obj_title !== 'string') {
1128
+ return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
1129
+ }
1130
+ const obj_type = obj.type;
1131
+ const path_type = path + '.type';
1132
+ if (typeof obj_type !== 'string') {
1133
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
1134
+ }
1135
+ })();
1136
+ return v_error === undefined ? null : v_error;
1137
+ }
1138
+
1139
+ const TTL$2 = 600000;
1140
+ const VERSION$2 = "31ad4122bb5e1ca42f04395b0e0212cf";
1141
+ function validate$7(obj, path = 'EngagementEventTimelineDataRepresentation') {
1142
+ const v_error = (() => {
1143
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1144
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1145
+ }
1146
+ const obj_errors = obj.errors;
1147
+ const path_errors = path + '.errors';
1148
+ if (!ArrayIsArray(obj_errors)) {
1149
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1150
+ }
1151
+ for (let i = 0; i < obj_errors.length; i++) {
1152
+ const obj_errors_item = obj_errors[i];
1153
+ const path_errors_item = path_errors + '[' + i + ']';
1154
+ const referencepath_errors_itemValidationError = validate$f(obj_errors_item, path_errors_item);
1155
+ if (referencepath_errors_itemValidationError !== null) {
1156
+ let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
1157
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1158
+ return new TypeError(message);
1159
+ }
1160
+ }
1161
+ const obj_eventTypes = obj.eventTypes;
1162
+ const path_eventTypes = path + '.eventTypes';
1163
+ if (!ArrayIsArray(obj_eventTypes)) {
1164
+ return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
1165
+ }
1166
+ for (let i = 0; i < obj_eventTypes.length; i++) {
1167
+ const obj_eventTypes_item = obj_eventTypes[i];
1168
+ const path_eventTypes_item = path_eventTypes + '[' + i + ']';
1169
+ const referencepath_eventTypes_itemValidationError = validate$e(obj_eventTypes_item, path_eventTypes_item);
1170
+ if (referencepath_eventTypes_itemValidationError !== null) {
1171
+ let message = 'Object doesn\'t match TimelineEventTypeRepresentation (at "' + path_eventTypes_item + '")\n';
1172
+ message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1173
+ return new TypeError(message);
1174
+ }
1175
+ }
1176
+ const obj_events = obj.events;
1177
+ const path_events = path + '.events';
1178
+ if (!ArrayIsArray(obj_events)) {
1179
+ return new TypeError('Expected "array" but received "' + typeof obj_events + '" (at "' + path_events + '")');
1180
+ }
1181
+ for (let i = 0; i < obj_events.length; i++) {
1182
+ const obj_events_item = obj_events[i];
1183
+ const path_events_item = path_events + '[' + i + ']';
1184
+ const referencepath_events_itemValidationError = validate$8(obj_events_item, path_events_item);
1185
+ if (referencepath_events_itemValidationError !== null) {
1186
+ let message = 'Object doesn\'t match TimelineDataCloudEventRepresentation (at "' + path_events_item + '")\n';
1187
+ message += referencepath_events_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1188
+ return new TypeError(message);
1189
+ }
1190
+ }
1191
+ const obj_isSuccess = obj.isSuccess;
1192
+ const path_isSuccess = path + '.isSuccess';
1193
+ if (typeof obj_isSuccess !== 'boolean') {
1194
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1195
+ }
1196
+ })();
1197
+ return v_error === undefined ? null : v_error;
1198
+ }
1199
+ const RepresentationType$2 = 'EngagementEventTimelineDataRepresentation';
1200
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1201
+ return input;
1202
+ }
1203
+ const select$5 = function EngagementEventTimelineDataRepresentationSelect() {
1204
+ return {
1205
+ kind: 'Fragment',
1206
+ version: VERSION$2,
1207
+ private: [],
1208
+ opaque: true
1209
+ };
1210
+ };
1211
+ function equals$2(existing, incoming) {
1212
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1213
+ return false;
1214
+ }
1215
+ return true;
1216
+ }
1217
+ const ingest$2 = function EngagementEventTimelineDataRepresentationIngest(input, path, luvio, store, timestamp) {
1218
+ if (process.env.NODE_ENV !== 'production') {
1219
+ const validateError = validate$7(input);
1220
+ if (validateError !== null) {
1221
+ throw validateError;
1222
+ }
1223
+ }
1224
+ const key = path.fullPath;
1225
+ const ttlToUse = TTL$2;
1226
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "Timeline", VERSION$2, RepresentationType$2, equals$2);
1227
+ return createLink(key);
1228
+ };
1229
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1230
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1231
+ const rootKey = fullPathFactory();
1232
+ rootKeySet.set(rootKey, {
1233
+ namespace: keyPrefix,
1234
+ representationName: RepresentationType$2,
1235
+ mergeable: false
1236
+ });
1237
+ }
1238
+
1239
+ function select$4(luvio, params) {
1240
+ return select$5();
1241
+ }
1242
+ function keyBuilder$5(luvio, params) {
1243
+ return keyPrefix + '::EngagementEventTimelineDataRepresentation:(' + 'dataCloudEventSource:' + params.queryParams.dataCloudEventSource + ',' + 'timelineConfigFullName:' + params.urlParams.timelineConfigFullName + ',' + 'timelineObjRecordId:' + params.urlParams.timelineObjRecordId + ')';
1244
+ }
1245
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1246
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
1247
+ }
1248
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1249
+ const { body } = response;
1250
+ const key = keyBuilder$5(luvio, resourceParams);
1251
+ luvio.storeIngest(key, ingest$2, body);
1252
+ const snapshot = luvio.storeLookup({
1253
+ recordId: key,
1254
+ node: select$4(),
1255
+ variables: {},
1256
+ }, snapshotRefresh);
1257
+ if (process.env.NODE_ENV !== 'production') {
1258
+ if (snapshot.state !== 'Fulfilled') {
1259
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1260
+ }
1261
+ }
1262
+ deepFreeze(snapshot.data);
1263
+ return snapshot;
1264
+ }
1265
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
1266
+ const key = keyBuilder$5(luvio, params);
1267
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1268
+ const storeMetadataParams = {
1269
+ ttl: TTL$2,
1270
+ namespace: keyPrefix,
1271
+ version: VERSION$2,
1272
+ representationName: RepresentationType$2
1273
+ };
1274
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1275
+ return errorSnapshot;
1276
+ }
1277
+ function createResourceRequest$2(config) {
1278
+ const headers = {};
1279
+ return {
1280
+ baseUri: '/services/data/v66.0',
1281
+ basePath: '/connect/timeline/' + config.urlParams.timelineObjRecordId + '/timeline-definitions/' + config.urlParams.timelineConfigFullName + '/cust-data-pfrm/events',
1282
+ method: 'get',
1283
+ body: null,
1284
+ urlParams: config.urlParams,
1285
+ queryParams: config.queryParams,
1286
+ headers,
1287
+ priority: 'normal',
1288
+ };
1289
+ }
1290
+
1291
+ const adapterName$2 = 'getEngagementEvents';
1292
+ const getEngagementEvents_ConfigPropertyMetadata = [
1293
+ generateParamConfigMetadata('timelineConfigFullName', true, 0 /* UrlParameter */, 0 /* String */),
1294
+ generateParamConfigMetadata('timelineObjRecordId', true, 0 /* UrlParameter */, 0 /* String */),
1295
+ generateParamConfigMetadata('dataCloudEventSource', false, 1 /* QueryParameter */, 0 /* String */),
1296
+ ];
1297
+ const getEngagementEvents_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getEngagementEvents_ConfigPropertyMetadata);
1298
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getEngagementEvents_ConfigPropertyMetadata);
1299
+ function keyBuilder$4(luvio, config) {
1300
+ const resourceParams = createResourceParams$2(config);
1301
+ return keyBuilder$5(luvio, resourceParams);
1302
+ }
1303
+ function typeCheckConfig$2(untrustedConfig) {
1304
+ const config = {};
1305
+ typeCheckConfig$5(untrustedConfig, config, getEngagementEvents_ConfigPropertyMetadata);
1306
+ return config;
1307
+ }
1308
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1309
+ if (!untrustedIsObject(untrustedConfig)) {
1310
+ return null;
1311
+ }
1312
+ if (process.env.NODE_ENV !== 'production') {
1313
+ validateConfig(untrustedConfig, configPropertyNames);
1314
+ }
1315
+ const config = typeCheckConfig$2(untrustedConfig);
1316
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1317
+ return null;
1318
+ }
1319
+ return config;
1320
+ }
1321
+ function adapterFragment$2(luvio, config) {
1322
+ createResourceParams$2(config);
1323
+ return select$4();
1324
+ }
1325
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1326
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1327
+ config,
1328
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1329
+ });
1330
+ return luvio.storeBroadcast().then(() => snapshot);
1331
+ }
1332
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1333
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1334
+ config,
1335
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1336
+ });
1337
+ return luvio.storeBroadcast().then(() => snapshot);
1338
+ }
1339
+ function buildNetworkSnapshot$2(luvio, config, options) {
1340
+ const resourceParams = createResourceParams$2(config);
1341
+ const request = createResourceRequest$2(resourceParams);
1342
+ return luvio.dispatchResourceRequest(request, options)
1343
+ .then((response) => {
1344
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1345
+ const cache = new StoreKeyMap();
1346
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1347
+ return cache;
1348
+ });
1349
+ }, (response) => {
1350
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1351
+ });
1352
+ }
1353
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1354
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1355
+ }
1356
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1357
+ const { luvio, config } = context;
1358
+ const selector = {
1359
+ recordId: keyBuilder$4(luvio, config),
1360
+ node: adapterFragment$2(luvio, config),
1361
+ variables: {},
1362
+ };
1363
+ const cacheSnapshot = storeLookup(selector, {
1364
+ config,
1365
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1366
+ });
1367
+ return cacheSnapshot;
1368
+ }
1369
+ const getEngagementEventsAdapterFactory = (luvio) => function Timeline__getEngagementEvents(untrustedConfig, requestContext) {
1370
+ const config = validateAdapterConfig$2(untrustedConfig, getEngagementEvents_ConfigPropertyNames);
1371
+ // Invalid or incomplete config
1372
+ if (config === null) {
1373
+ return null;
1374
+ }
1375
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1376
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1377
+ };
1378
+
1379
+ function validate$6(obj, path = 'TimelineEventRepresentation') {
1380
+ const v_error = (() => {
1381
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1382
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1383
+ }
1384
+ const obj_description = obj.description;
1385
+ const path_description = path + '.description';
1386
+ let obj_description_union0 = null;
1387
+ const obj_description_union0_error = (() => {
1388
+ if (typeof obj_description !== 'string') {
1389
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1390
+ }
1391
+ })();
1392
+ if (obj_description_union0_error != null) {
1393
+ obj_description_union0 = obj_description_union0_error.message;
1394
+ }
1395
+ let obj_description_union1 = null;
1396
+ const obj_description_union1_error = (() => {
1397
+ if (obj_description !== null) {
1398
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1399
+ }
1400
+ })();
1401
+ if (obj_description_union1_error != null) {
1402
+ obj_description_union1 = obj_description_union1_error.message;
1403
+ }
1404
+ if (obj_description_union0 && obj_description_union1) {
1405
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
1406
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
1407
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
1408
+ return new TypeError(message);
1409
+ }
1410
+ const obj_eventDateTime = obj.eventDateTime;
1411
+ const path_eventDateTime = path + '.eventDateTime';
1412
+ let obj_eventDateTime_union0 = null;
1413
+ const obj_eventDateTime_union0_error = (() => {
1414
+ if (typeof obj_eventDateTime !== 'string') {
1415
+ return new TypeError('Expected "string" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
1416
+ }
1417
+ })();
1418
+ if (obj_eventDateTime_union0_error != null) {
1419
+ obj_eventDateTime_union0 = obj_eventDateTime_union0_error.message;
1420
+ }
1421
+ let obj_eventDateTime_union1 = null;
1422
+ const obj_eventDateTime_union1_error = (() => {
1423
+ if (obj_eventDateTime !== null) {
1424
+ return new TypeError('Expected "null" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
1425
+ }
1426
+ })();
1427
+ if (obj_eventDateTime_union1_error != null) {
1428
+ obj_eventDateTime_union1 = obj_eventDateTime_union1_error.message;
1429
+ }
1430
+ if (obj_eventDateTime_union0 && obj_eventDateTime_union1) {
1431
+ let message = 'Object doesn\'t match union (at "' + path_eventDateTime + '")';
1432
+ message += '\n' + obj_eventDateTime_union0.split('\n').map((line) => '\t' + line).join('\n');
1433
+ message += '\n' + obj_eventDateTime_union1.split('\n').map((line) => '\t' + line).join('\n');
1434
+ return new TypeError(message);
1435
+ }
1436
+ if (obj.fields !== undefined) {
1437
+ const obj_fields = obj.fields;
1438
+ const path_fields = path + '.fields';
1439
+ if (!ArrayIsArray(obj_fields)) {
1440
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
1441
+ }
1442
+ for (let i = 0; i < obj_fields.length; i++) {
1443
+ const obj_fields_item = obj_fields[i];
1444
+ const path_fields_item = path_fields + '[' + i + ']';
1445
+ const referencepath_fields_itemValidationError = validate$d(obj_fields_item, path_fields_item);
1446
+ if (referencepath_fields_itemValidationError !== null) {
1447
+ let message = 'Object doesn\'t match TimelineEventFieldRepresentation (at "' + path_fields_item + '")\n';
1448
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1449
+ return new TypeError(message);
1450
+ }
1451
+ }
1452
+ }
1453
+ const obj_id = obj.id;
1454
+ const path_id = path + '.id';
1455
+ let obj_id_union0 = null;
1456
+ const obj_id_union0_error = (() => {
1457
+ if (typeof obj_id !== 'string') {
1458
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1459
+ }
1460
+ })();
1461
+ if (obj_id_union0_error != null) {
1462
+ obj_id_union0 = obj_id_union0_error.message;
1463
+ }
1464
+ let obj_id_union1 = null;
1465
+ const obj_id_union1_error = (() => {
1466
+ if (obj_id !== null) {
1467
+ return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1468
+ }
1469
+ })();
1470
+ if (obj_id_union1_error != null) {
1471
+ obj_id_union1 = obj_id_union1_error.message;
1472
+ }
1473
+ if (obj_id_union0 && obj_id_union1) {
1474
+ let message = 'Object doesn\'t match union (at "' + path_id + '")';
1475
+ message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
1476
+ message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
1477
+ return new TypeError(message);
1478
+ }
1479
+ const obj_title = obj.title;
1480
+ const path_title = path + '.title';
1481
+ let obj_title_union0 = null;
1482
+ const obj_title_union0_error = (() => {
1483
+ if (typeof obj_title !== 'string') {
1484
+ return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
1485
+ }
1486
+ })();
1487
+ if (obj_title_union0_error != null) {
1488
+ obj_title_union0 = obj_title_union0_error.message;
1489
+ }
1490
+ let obj_title_union1 = null;
1491
+ const obj_title_union1_error = (() => {
1492
+ if (obj_title !== null) {
1493
+ return new TypeError('Expected "null" but received "' + typeof obj_title + '" (at "' + path_title + '")');
1494
+ }
1495
+ })();
1496
+ if (obj_title_union1_error != null) {
1497
+ obj_title_union1 = obj_title_union1_error.message;
1498
+ }
1499
+ if (obj_title_union0 && obj_title_union1) {
1500
+ let message = 'Object doesn\'t match union (at "' + path_title + '")';
1501
+ message += '\n' + obj_title_union0.split('\n').map((line) => '\t' + line).join('\n');
1502
+ message += '\n' + obj_title_union1.split('\n').map((line) => '\t' + line).join('\n');
1503
+ return new TypeError(message);
1504
+ }
1505
+ const obj_type = obj.type;
1506
+ const path_type = path + '.type';
1507
+ let obj_type_union0 = null;
1508
+ const obj_type_union0_error = (() => {
1509
+ if (typeof obj_type !== 'string') {
1510
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
1511
+ }
1512
+ })();
1513
+ if (obj_type_union0_error != null) {
1514
+ obj_type_union0 = obj_type_union0_error.message;
1515
+ }
1516
+ let obj_type_union1 = null;
1517
+ const obj_type_union1_error = (() => {
1518
+ if (obj_type !== null) {
1519
+ return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
1520
+ }
1521
+ })();
1522
+ if (obj_type_union1_error != null) {
1523
+ obj_type_union1 = obj_type_union1_error.message;
1524
+ }
1525
+ if (obj_type_union0 && obj_type_union1) {
1526
+ let message = 'Object doesn\'t match union (at "' + path_type + '")';
1527
+ message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
1528
+ message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
1529
+ return new TypeError(message);
1530
+ }
1531
+ })();
1532
+ return v_error === undefined ? null : v_error;
1533
+ }
1534
+
1535
+ const TTL$1 = 500;
1536
+ const VERSION$1 = "fdc9f6f24a05bf6064b5dd39db6e4e4d";
1537
+ function validate$5(obj, path = 'TimelineDataGetResultRepresentation') {
1538
+ const v_error = (() => {
1539
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1540
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1541
+ }
1542
+ if (obj.errors !== undefined) {
1543
+ const obj_errors = obj.errors;
1544
+ const path_errors = path + '.errors';
1545
+ if (!ArrayIsArray(obj_errors)) {
1546
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1547
+ }
1548
+ for (let i = 0; i < obj_errors.length; i++) {
1549
+ const obj_errors_item = obj_errors[i];
1550
+ const path_errors_item = path_errors + '[' + i + ']';
1551
+ const referencepath_errors_itemValidationError = validate$f(obj_errors_item, path_errors_item);
1552
+ if (referencepath_errors_itemValidationError !== null) {
1553
+ let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
1554
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1555
+ return new TypeError(message);
1556
+ }
1557
+ }
1558
+ }
1559
+ if (obj.eventTypes !== undefined) {
1560
+ const obj_eventTypes = obj.eventTypes;
1561
+ const path_eventTypes = path + '.eventTypes';
1562
+ if (!ArrayIsArray(obj_eventTypes)) {
1563
+ return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
1564
+ }
1565
+ for (let i = 0; i < obj_eventTypes.length; i++) {
1566
+ const obj_eventTypes_item = obj_eventTypes[i];
1567
+ const path_eventTypes_item = path_eventTypes + '[' + i + ']';
1568
+ const referencepath_eventTypes_itemValidationError = validate$e(obj_eventTypes_item, path_eventTypes_item);
1569
+ if (referencepath_eventTypes_itemValidationError !== null) {
1570
+ let message = 'Object doesn\'t match TimelineEventTypeRepresentation (at "' + path_eventTypes_item + '")\n';
1571
+ message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1572
+ return new TypeError(message);
1573
+ }
1574
+ }
1575
+ }
1576
+ if (obj.events !== undefined) {
1577
+ const obj_events = obj.events;
1578
+ const path_events = path + '.events';
1579
+ if (!ArrayIsArray(obj_events)) {
1580
+ return new TypeError('Expected "array" but received "' + typeof obj_events + '" (at "' + path_events + '")');
1581
+ }
1582
+ for (let i = 0; i < obj_events.length; i++) {
1583
+ const obj_events_item = obj_events[i];
1584
+ const path_events_item = path_events + '[' + i + ']';
1585
+ const referencepath_events_itemValidationError = validate$6(obj_events_item, path_events_item);
1586
+ if (referencepath_events_itemValidationError !== null) {
1587
+ let message = 'Object doesn\'t match TimelineEventRepresentation (at "' + path_events_item + '")\n';
1588
+ message += referencepath_events_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1589
+ return new TypeError(message);
1590
+ }
1591
+ }
1592
+ }
1593
+ if (obj.hasMoreData !== undefined) {
1594
+ const obj_hasMoreData = obj.hasMoreData;
1595
+ const path_hasMoreData = path + '.hasMoreData';
1596
+ if (typeof obj_hasMoreData !== 'boolean') {
1597
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreData + '" (at "' + path_hasMoreData + '")');
1598
+ }
1599
+ }
1600
+ if (obj.isSuccess !== undefined) {
1601
+ const obj_isSuccess = obj.isSuccess;
1602
+ const path_isSuccess = path + '.isSuccess';
1603
+ if (typeof obj_isSuccess !== 'boolean') {
1604
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1605
+ }
1606
+ }
1607
+ })();
1608
+ return v_error === undefined ? null : v_error;
1609
+ }
1610
+ const RepresentationType$1 = 'TimelineDataGetResultRepresentation';
1611
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1612
+ return input;
1613
+ }
1614
+ const select$3 = function TimelineDataGetResultRepresentationSelect() {
1615
+ return {
1616
+ kind: 'Fragment',
1617
+ version: VERSION$1,
1618
+ private: [],
1619
+ opaque: true
1620
+ };
1621
+ };
1622
+ function equals$1(existing, incoming) {
1623
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1624
+ return false;
1625
+ }
1626
+ return true;
1627
+ }
1628
+ const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
1629
+ if (process.env.NODE_ENV !== 'production') {
1630
+ const validateError = validate$5(input);
1631
+ if (validateError !== null) {
1632
+ throw validateError;
1633
+ }
1634
+ }
1635
+ const key = path.fullPath;
1636
+ const ttlToUse = TTL$1;
1637
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "Timeline", VERSION$1, RepresentationType$1, equals$1);
1638
+ return createLink(key);
1639
+ };
1640
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1641
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1642
+ const rootKey = fullPathFactory();
1643
+ rootKeySet.set(rootKey, {
1644
+ namespace: keyPrefix,
1645
+ representationName: RepresentationType$1,
1646
+ mergeable: false
1647
+ });
1648
+ }
1649
+
1650
+ function select$2(luvio, params) {
1651
+ return select$3();
1652
+ }
1653
+ function keyBuilder$3(luvio, params) {
1654
+ return keyPrefix + '::TimelineDataGetResultRepresentation:(' + 'direction:' + params.queryParams.direction + ',' + 'endDate:' + params.queryParams.endDate + ',' + 'eventTypeOffsets:' + params.queryParams.eventTypeOffsets + ',' + 'eventTypes:' + params.queryParams.eventTypes + ',' + 'startDate:' + params.queryParams.startDate + ',' + 'timelineConfigFullName:' + params.urlParams.timelineConfigFullName + ',' + 'timelineObjRecordId:' + params.urlParams.timelineObjRecordId + ')';
1655
+ }
1656
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1657
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1658
+ }
1659
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1660
+ const { body } = response;
1661
+ const key = keyBuilder$3(luvio, resourceParams);
1662
+ luvio.storeIngest(key, ingest$1, body);
1663
+ const snapshot = luvio.storeLookup({
1664
+ recordId: key,
1665
+ node: select$2(),
1666
+ variables: {},
1667
+ }, snapshotRefresh);
1668
+ if (process.env.NODE_ENV !== 'production') {
1669
+ if (snapshot.state !== 'Fulfilled') {
1670
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1671
+ }
1672
+ }
1673
+ deepFreeze(snapshot.data);
1674
+ return snapshot;
1675
+ }
1676
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1677
+ const key = keyBuilder$3(luvio, params);
1678
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1679
+ const storeMetadataParams = {
1680
+ ttl: TTL$1,
1681
+ namespace: keyPrefix,
1682
+ version: VERSION$1,
1683
+ representationName: RepresentationType$1
1684
+ };
1685
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1686
+ return errorSnapshot;
1687
+ }
1688
+ function createResourceRequest$1(config) {
1689
+ const headers = {};
1690
+ return {
1691
+ baseUri: '/services/data/v66.0',
1692
+ basePath: '/connect/timeline/' + config.urlParams.timelineObjRecordId + '/timeline-definitions/' + config.urlParams.timelineConfigFullName + '/events',
1693
+ method: 'get',
1694
+ body: null,
1695
+ urlParams: config.urlParams,
1696
+ queryParams: config.queryParams,
1697
+ headers,
1698
+ priority: 'normal',
1699
+ };
1700
+ }
1701
+
1702
+ const adapterName$1 = 'getTimelineData';
1703
+ const getTimelineData_ConfigPropertyMetadata = [
1704
+ generateParamConfigMetadata('timelineConfigFullName', true, 0 /* UrlParameter */, 0 /* String */),
1705
+ generateParamConfigMetadata('timelineObjRecordId', true, 0 /* UrlParameter */, 0 /* String */),
1706
+ generateParamConfigMetadata('direction', false, 1 /* QueryParameter */, 0 /* String */),
1707
+ generateParamConfigMetadata('endDate', false, 1 /* QueryParameter */, 0 /* String */),
1708
+ generateParamConfigMetadata('eventTypeOffsets', false, 1 /* QueryParameter */, 0 /* String */),
1709
+ generateParamConfigMetadata('eventTypes', false, 1 /* QueryParameter */, 0 /* String */),
1710
+ generateParamConfigMetadata('startDate', false, 1 /* QueryParameter */, 0 /* String */),
1711
+ ];
1712
+ const getTimelineData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTimelineData_ConfigPropertyMetadata);
1713
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getTimelineData_ConfigPropertyMetadata);
1714
+ function keyBuilder$2(luvio, config) {
1715
+ const resourceParams = createResourceParams$1(config);
1716
+ return keyBuilder$3(luvio, resourceParams);
1717
+ }
1718
+ function typeCheckConfig$1(untrustedConfig) {
1719
+ const config = {};
1720
+ typeCheckConfig$5(untrustedConfig, config, getTimelineData_ConfigPropertyMetadata);
1721
+ return config;
1722
+ }
1723
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1724
+ if (!untrustedIsObject(untrustedConfig)) {
1725
+ return null;
1726
+ }
1727
+ if (process.env.NODE_ENV !== 'production') {
1728
+ validateConfig(untrustedConfig, configPropertyNames);
1729
+ }
1730
+ const config = typeCheckConfig$1(untrustedConfig);
1731
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1732
+ return null;
1733
+ }
1734
+ return config;
1735
+ }
1736
+ function adapterFragment$1(luvio, config) {
1737
+ createResourceParams$1(config);
1738
+ return select$2();
1739
+ }
1740
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1741
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1742
+ config,
1743
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1744
+ });
1745
+ return luvio.storeBroadcast().then(() => snapshot);
1746
+ }
1747
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1748
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1749
+ config,
1750
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1751
+ });
1752
+ return luvio.storeBroadcast().then(() => snapshot);
1753
+ }
1754
+ function buildNetworkSnapshot$1(luvio, config, options) {
1755
+ const resourceParams = createResourceParams$1(config);
1756
+ const request = createResourceRequest$1(resourceParams);
1757
+ return luvio.dispatchResourceRequest(request, options)
1758
+ .then((response) => {
1759
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1760
+ const cache = new StoreKeyMap();
1761
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1762
+ return cache;
1763
+ });
1764
+ }, (response) => {
1765
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1766
+ });
1767
+ }
1768
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1769
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1770
+ }
1771
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1772
+ const { luvio, config } = context;
1773
+ const selector = {
1774
+ recordId: keyBuilder$2(luvio, config),
1775
+ node: adapterFragment$1(luvio, config),
1776
+ variables: {},
1777
+ };
1778
+ const cacheSnapshot = storeLookup(selector, {
1779
+ config,
1780
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1781
+ });
1782
+ return cacheSnapshot;
1783
+ }
1784
+ const getTimelineDataAdapterFactory = (luvio) => function Timeline__getTimelineData(untrustedConfig, requestContext) {
1785
+ const config = validateAdapterConfig$1(untrustedConfig, getTimelineData_ConfigPropertyNames);
1786
+ // Invalid or incomplete config
1787
+ if (config === null) {
1788
+ return null;
1789
+ }
1790
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1791
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1792
+ };
1793
+
1794
+ function validate$4(obj, path = 'TimelineEntityRepresentation') {
1795
+ const v_error = (() => {
1796
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1797
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1798
+ }
1799
+ const obj_ageField = obj.ageField;
1800
+ const path_ageField = path + '.ageField';
1801
+ let obj_ageField_union0 = null;
1802
+ const obj_ageField_union0_error = (() => {
1803
+ if (typeof obj_ageField !== 'string') {
1804
+ return new TypeError('Expected "string" but received "' + typeof obj_ageField + '" (at "' + path_ageField + '")');
1805
+ }
1806
+ })();
1807
+ if (obj_ageField_union0_error != null) {
1808
+ obj_ageField_union0 = obj_ageField_union0_error.message;
1809
+ }
1810
+ let obj_ageField_union1 = null;
1811
+ const obj_ageField_union1_error = (() => {
1812
+ if (obj_ageField !== null) {
1813
+ return new TypeError('Expected "null" but received "' + typeof obj_ageField + '" (at "' + path_ageField + '")');
1814
+ }
1815
+ })();
1816
+ if (obj_ageField_union1_error != null) {
1817
+ obj_ageField_union1 = obj_ageField_union1_error.message;
1818
+ }
1819
+ if (obj_ageField_union0 && obj_ageField_union1) {
1820
+ let message = 'Object doesn\'t match union (at "' + path_ageField + '")';
1821
+ message += '\n' + obj_ageField_union0.split('\n').map((line) => '\t' + line).join('\n');
1822
+ message += '\n' + obj_ageField_union1.split('\n').map((line) => '\t' + line).join('\n');
1823
+ return new TypeError(message);
1824
+ }
1825
+ const obj_entityLabel = obj.entityLabel;
1826
+ const path_entityLabel = path + '.entityLabel';
1827
+ let obj_entityLabel_union0 = null;
1828
+ const obj_entityLabel_union0_error = (() => {
1829
+ if (typeof obj_entityLabel !== 'string') {
1830
+ return new TypeError('Expected "string" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
1831
+ }
1832
+ })();
1833
+ if (obj_entityLabel_union0_error != null) {
1834
+ obj_entityLabel_union0 = obj_entityLabel_union0_error.message;
1835
+ }
1836
+ let obj_entityLabel_union1 = null;
1837
+ const obj_entityLabel_union1_error = (() => {
1838
+ if (obj_entityLabel !== null) {
1839
+ return new TypeError('Expected "null" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
1840
+ }
1841
+ })();
1842
+ if (obj_entityLabel_union1_error != null) {
1843
+ obj_entityLabel_union1 = obj_entityLabel_union1_error.message;
1844
+ }
1845
+ if (obj_entityLabel_union0 && obj_entityLabel_union1) {
1846
+ let message = 'Object doesn\'t match union (at "' + path_entityLabel + '")';
1847
+ message += '\n' + obj_entityLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
1848
+ message += '\n' + obj_entityLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
1849
+ return new TypeError(message);
1850
+ }
1851
+ const obj_entityName = obj.entityName;
1852
+ const path_entityName = path + '.entityName';
1853
+ let obj_entityName_union0 = null;
1854
+ const obj_entityName_union0_error = (() => {
1855
+ if (typeof obj_entityName !== 'string') {
1856
+ return new TypeError('Expected "string" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
1857
+ }
1858
+ })();
1859
+ if (obj_entityName_union0_error != null) {
1860
+ obj_entityName_union0 = obj_entityName_union0_error.message;
1861
+ }
1862
+ let obj_entityName_union1 = null;
1863
+ const obj_entityName_union1_error = (() => {
1864
+ if (obj_entityName !== null) {
1865
+ return new TypeError('Expected "null" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
1866
+ }
1867
+ })();
1868
+ if (obj_entityName_union1_error != null) {
1869
+ obj_entityName_union1 = obj_entityName_union1_error.message;
1870
+ }
1871
+ if (obj_entityName_union0 && obj_entityName_union1) {
1872
+ let message = 'Object doesn\'t match union (at "' + path_entityName + '")';
1873
+ message += '\n' + obj_entityName_union0.split('\n').map((line) => '\t' + line).join('\n');
1874
+ message += '\n' + obj_entityName_union1.split('\n').map((line) => '\t' + line).join('\n');
1875
+ return new TypeError(message);
1876
+ }
1877
+ const obj_icon = obj.icon;
1878
+ const path_icon = path + '.icon';
1879
+ let obj_icon_union0 = null;
1880
+ const obj_icon_union0_error = (() => {
1881
+ if (typeof obj_icon !== 'string') {
1882
+ return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
1883
+ }
1884
+ })();
1885
+ if (obj_icon_union0_error != null) {
1886
+ obj_icon_union0 = obj_icon_union0_error.message;
1887
+ }
1888
+ let obj_icon_union1 = null;
1889
+ const obj_icon_union1_error = (() => {
1890
+ if (obj_icon !== null) {
1891
+ return new TypeError('Expected "null" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
1892
+ }
1893
+ })();
1894
+ if (obj_icon_union1_error != null) {
1895
+ obj_icon_union1 = obj_icon_union1_error.message;
1896
+ }
1897
+ if (obj_icon_union0 && obj_icon_union1) {
1898
+ let message = 'Object doesn\'t match union (at "' + path_icon + '")';
1899
+ message += '\n' + obj_icon_union0.split('\n').map((line) => '\t' + line).join('\n');
1900
+ message += '\n' + obj_icon_union1.split('\n').map((line) => '\t' + line).join('\n');
1901
+ return new TypeError(message);
1902
+ }
1903
+ if (obj.isAgeFieldSelected !== undefined) {
1904
+ const obj_isAgeFieldSelected = obj.isAgeFieldSelected;
1905
+ const path_isAgeFieldSelected = path + '.isAgeFieldSelected';
1906
+ if (typeof obj_isAgeFieldSelected !== 'boolean') {
1907
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isAgeFieldSelected + '" (at "' + path_isAgeFieldSelected + '")');
1908
+ }
1909
+ }
1910
+ const obj_source = obj.source;
1911
+ const path_source = path + '.source';
1912
+ let obj_source_union0 = null;
1913
+ const obj_source_union0_error = (() => {
1914
+ if (typeof obj_source !== 'string') {
1915
+ return new TypeError('Expected "string" but received "' + typeof obj_source + '" (at "' + path_source + '")');
1916
+ }
1917
+ })();
1918
+ if (obj_source_union0_error != null) {
1919
+ obj_source_union0 = obj_source_union0_error.message;
1920
+ }
1921
+ let obj_source_union1 = null;
1922
+ const obj_source_union1_error = (() => {
1923
+ if (obj_source !== null) {
1924
+ return new TypeError('Expected "null" but received "' + typeof obj_source + '" (at "' + path_source + '")');
1925
+ }
1926
+ })();
1927
+ if (obj_source_union1_error != null) {
1928
+ obj_source_union1 = obj_source_union1_error.message;
1929
+ }
1930
+ if (obj_source_union0 && obj_source_union1) {
1931
+ let message = 'Object doesn\'t match union (at "' + path_source + '")';
1932
+ message += '\n' + obj_source_union0.split('\n').map((line) => '\t' + line).join('\n');
1933
+ message += '\n' + obj_source_union1.split('\n').map((line) => '\t' + line).join('\n');
1934
+ return new TypeError(message);
1935
+ }
1936
+ })();
1937
+ return v_error === undefined ? null : v_error;
1938
+ }
1939
+
1940
+ function validate$3(obj, path = 'TimelineElementRepresentation') {
1941
+ const v_error = (() => {
1942
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1943
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1944
+ }
1945
+ const obj_apiName = obj.apiName;
1946
+ const path_apiName = path + '.apiName';
1947
+ let obj_apiName_union0 = null;
1948
+ const obj_apiName_union0_error = (() => {
1949
+ if (typeof obj_apiName !== 'string') {
1950
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
1951
+ }
1952
+ })();
1953
+ if (obj_apiName_union0_error != null) {
1954
+ obj_apiName_union0 = obj_apiName_union0_error.message;
1955
+ }
1956
+ let obj_apiName_union1 = null;
1957
+ const obj_apiName_union1_error = (() => {
1958
+ if (obj_apiName !== null) {
1959
+ return new TypeError('Expected "null" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
1960
+ }
1961
+ })();
1962
+ if (obj_apiName_union1_error != null) {
1963
+ obj_apiName_union1 = obj_apiName_union1_error.message;
1964
+ }
1965
+ if (obj_apiName_union0 && obj_apiName_union1) {
1966
+ let message = 'Object doesn\'t match union (at "' + path_apiName + '")';
1967
+ message += '\n' + obj_apiName_union0.split('\n').map((line) => '\t' + line).join('\n');
1968
+ message += '\n' + obj_apiName_union1.split('\n').map((line) => '\t' + line).join('\n');
1969
+ return new TypeError(message);
1970
+ }
1971
+ const obj_dataType = obj.dataType;
1972
+ const path_dataType = path + '.dataType';
1973
+ let obj_dataType_union0 = null;
1974
+ const obj_dataType_union0_error = (() => {
1975
+ if (typeof obj_dataType !== 'string') {
1976
+ return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
1977
+ }
1978
+ })();
1979
+ if (obj_dataType_union0_error != null) {
1980
+ obj_dataType_union0 = obj_dataType_union0_error.message;
1981
+ }
1982
+ let obj_dataType_union1 = null;
1983
+ const obj_dataType_union1_error = (() => {
1984
+ if (obj_dataType !== null) {
1985
+ return new TypeError('Expected "null" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
1986
+ }
1987
+ })();
1988
+ if (obj_dataType_union1_error != null) {
1989
+ obj_dataType_union1 = obj_dataType_union1_error.message;
1990
+ }
1991
+ if (obj_dataType_union0 && obj_dataType_union1) {
1992
+ let message = 'Object doesn\'t match union (at "' + path_dataType + '")';
1993
+ message += '\n' + obj_dataType_union0.split('\n').map((line) => '\t' + line).join('\n');
1994
+ message += '\n' + obj_dataType_union1.split('\n').map((line) => '\t' + line).join('\n');
1995
+ return new TypeError(message);
1996
+ }
1997
+ const obj_label = obj.label;
1998
+ const path_label = path + '.label';
1999
+ let obj_label_union0 = null;
2000
+ const obj_label_union0_error = (() => {
2001
+ if (typeof obj_label !== 'string') {
2002
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
2003
+ }
2004
+ })();
2005
+ if (obj_label_union0_error != null) {
2006
+ obj_label_union0 = obj_label_union0_error.message;
2007
+ }
2008
+ let obj_label_union1 = null;
2009
+ const obj_label_union1_error = (() => {
2010
+ if (obj_label !== null) {
2011
+ return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
2012
+ }
2013
+ })();
2014
+ if (obj_label_union1_error != null) {
2015
+ obj_label_union1 = obj_label_union1_error.message;
2016
+ }
2017
+ if (obj_label_union0 && obj_label_union1) {
2018
+ let message = 'Object doesn\'t match union (at "' + path_label + '")';
2019
+ message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
2020
+ message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
2021
+ return new TypeError(message);
2022
+ }
2023
+ })();
2024
+ return v_error === undefined ? null : v_error;
2025
+ }
2026
+
2027
+ function validate$2(obj, path = 'TimelineEventTypeMetadataRepresentation') {
2028
+ const v_error = (() => {
2029
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2030
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2031
+ }
2032
+ if (obj.additionalEventData !== undefined) {
2033
+ const obj_additionalEventData = obj.additionalEventData;
2034
+ const path_additionalEventData = path + '.additionalEventData';
2035
+ if (obj_additionalEventData === undefined) {
2036
+ return new TypeError('Expected "defined" but received "' + typeof obj_additionalEventData + '" (at "' + path_additionalEventData + '")');
2037
+ }
2038
+ }
2039
+ if (obj.allowNew !== undefined) {
2040
+ const obj_allowNew = obj.allowNew;
2041
+ const path_allowNew = path + '.allowNew';
2042
+ if (typeof obj_allowNew !== 'boolean') {
2043
+ return new TypeError('Expected "boolean" but received "' + typeof obj_allowNew + '" (at "' + path_allowNew + '")');
2044
+ }
2045
+ }
2046
+ if (obj.anchorReferenceField !== undefined) {
2047
+ const obj_anchorReferenceField = obj.anchorReferenceField;
2048
+ const path_anchorReferenceField = path + '.anchorReferenceField';
2049
+ const referencepath_anchorReferenceFieldValidationError = validate$3(obj_anchorReferenceField, path_anchorReferenceField);
2050
+ if (referencepath_anchorReferenceFieldValidationError !== null) {
2051
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_anchorReferenceField + '")\n';
2052
+ message += referencepath_anchorReferenceFieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2053
+ return new TypeError(message);
2054
+ }
2055
+ }
2056
+ const obj_entityApiName = obj.entityApiName;
2057
+ const path_entityApiName = path + '.entityApiName';
2058
+ let obj_entityApiName_union0 = null;
2059
+ const obj_entityApiName_union0_error = (() => {
2060
+ if (typeof obj_entityApiName !== 'string') {
2061
+ return new TypeError('Expected "string" but received "' + typeof obj_entityApiName + '" (at "' + path_entityApiName + '")');
2062
+ }
2063
+ })();
2064
+ if (obj_entityApiName_union0_error != null) {
2065
+ obj_entityApiName_union0 = obj_entityApiName_union0_error.message;
2066
+ }
2067
+ let obj_entityApiName_union1 = null;
2068
+ const obj_entityApiName_union1_error = (() => {
2069
+ if (obj_entityApiName !== null) {
2070
+ return new TypeError('Expected "null" but received "' + typeof obj_entityApiName + '" (at "' + path_entityApiName + '")');
2071
+ }
2072
+ })();
2073
+ if (obj_entityApiName_union1_error != null) {
2074
+ obj_entityApiName_union1 = obj_entityApiName_union1_error.message;
2075
+ }
2076
+ if (obj_entityApiName_union0 && obj_entityApiName_union1) {
2077
+ let message = 'Object doesn\'t match union (at "' + path_entityApiName + '")';
2078
+ message += '\n' + obj_entityApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
2079
+ message += '\n' + obj_entityApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
2080
+ return new TypeError(message);
2081
+ }
2082
+ const obj_entityLabel = obj.entityLabel;
2083
+ const path_entityLabel = path + '.entityLabel';
2084
+ let obj_entityLabel_union0 = null;
2085
+ const obj_entityLabel_union0_error = (() => {
2086
+ if (typeof obj_entityLabel !== 'string') {
2087
+ return new TypeError('Expected "string" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
2088
+ }
2089
+ })();
2090
+ if (obj_entityLabel_union0_error != null) {
2091
+ obj_entityLabel_union0 = obj_entityLabel_union0_error.message;
2092
+ }
2093
+ let obj_entityLabel_union1 = null;
2094
+ const obj_entityLabel_union1_error = (() => {
2095
+ if (obj_entityLabel !== null) {
2096
+ return new TypeError('Expected "null" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
2097
+ }
2098
+ })();
2099
+ if (obj_entityLabel_union1_error != null) {
2100
+ obj_entityLabel_union1 = obj_entityLabel_union1_error.message;
2101
+ }
2102
+ if (obj_entityLabel_union0 && obj_entityLabel_union1) {
2103
+ let message = 'Object doesn\'t match union (at "' + path_entityLabel + '")';
2104
+ message += '\n' + obj_entityLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
2105
+ message += '\n' + obj_entityLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
2106
+ return new TypeError(message);
2107
+ }
2108
+ if (obj.fieldsToDisplay !== undefined) {
2109
+ const obj_fieldsToDisplay = obj.fieldsToDisplay;
2110
+ const path_fieldsToDisplay = path + '.fieldsToDisplay';
2111
+ if (!ArrayIsArray(obj_fieldsToDisplay)) {
2112
+ return new TypeError('Expected "array" but received "' + typeof obj_fieldsToDisplay + '" (at "' + path_fieldsToDisplay + '")');
2113
+ }
2114
+ for (let i = 0; i < obj_fieldsToDisplay.length; i++) {
2115
+ const obj_fieldsToDisplay_item = obj_fieldsToDisplay[i];
2116
+ const path_fieldsToDisplay_item = path_fieldsToDisplay + '[' + i + ']';
2117
+ const referencepath_fieldsToDisplay_itemValidationError = validate$3(obj_fieldsToDisplay_item, path_fieldsToDisplay_item);
2118
+ if (referencepath_fieldsToDisplay_itemValidationError !== null) {
2119
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_fieldsToDisplay_item + '")\n';
2120
+ message += referencepath_fieldsToDisplay_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2121
+ return new TypeError(message);
2122
+ }
2123
+ }
2124
+ }
2125
+ if (obj.isCreatable !== undefined) {
2126
+ const obj_isCreatable = obj.isCreatable;
2127
+ const path_isCreatable = path + '.isCreatable';
2128
+ if (typeof obj_isCreatable !== 'boolean') {
2129
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isCreatable + '" (at "' + path_isCreatable + '")');
2130
+ }
2131
+ }
2132
+ if (obj.relatedlistsToDisplay !== undefined) {
2133
+ const obj_relatedlistsToDisplay = obj.relatedlistsToDisplay;
2134
+ const path_relatedlistsToDisplay = path + '.relatedlistsToDisplay';
2135
+ if (!ArrayIsArray(obj_relatedlistsToDisplay)) {
2136
+ return new TypeError('Expected "array" but received "' + typeof obj_relatedlistsToDisplay + '" (at "' + path_relatedlistsToDisplay + '")');
2137
+ }
2138
+ for (let i = 0; i < obj_relatedlistsToDisplay.length; i++) {
2139
+ const obj_relatedlistsToDisplay_item = obj_relatedlistsToDisplay[i];
2140
+ const path_relatedlistsToDisplay_item = path_relatedlistsToDisplay + '[' + i + ']';
2141
+ const referencepath_relatedlistsToDisplay_itemValidationError = validate$3(obj_relatedlistsToDisplay_item, path_relatedlistsToDisplay_item);
2142
+ if (referencepath_relatedlistsToDisplay_itemValidationError !== null) {
2143
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_relatedlistsToDisplay_item + '")\n';
2144
+ message += referencepath_relatedlistsToDisplay_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2145
+ return new TypeError(message);
2146
+ }
2147
+ }
2148
+ }
2149
+ const obj_relationType = obj.relationType;
2150
+ const path_relationType = path + '.relationType';
2151
+ let obj_relationType_union0 = null;
2152
+ const obj_relationType_union0_error = (() => {
2153
+ if (typeof obj_relationType !== 'string') {
2154
+ return new TypeError('Expected "string" but received "' + typeof obj_relationType + '" (at "' + path_relationType + '")');
2155
+ }
2156
+ })();
2157
+ if (obj_relationType_union0_error != null) {
2158
+ obj_relationType_union0 = obj_relationType_union0_error.message;
2159
+ }
2160
+ let obj_relationType_union1 = null;
2161
+ const obj_relationType_union1_error = (() => {
2162
+ if (obj_relationType !== null) {
2163
+ return new TypeError('Expected "null" but received "' + typeof obj_relationType + '" (at "' + path_relationType + '")');
2164
+ }
2165
+ })();
2166
+ if (obj_relationType_union1_error != null) {
2167
+ obj_relationType_union1 = obj_relationType_union1_error.message;
2168
+ }
2169
+ if (obj_relationType_union0 && obj_relationType_union1) {
2170
+ let message = 'Object doesn\'t match union (at "' + path_relationType + '")';
2171
+ message += '\n' + obj_relationType_union0.split('\n').map((line) => '\t' + line).join('\n');
2172
+ message += '\n' + obj_relationType_union1.split('\n').map((line) => '\t' + line).join('\n');
2173
+ return new TypeError(message);
2174
+ }
2175
+ if (obj.sortField !== undefined) {
2176
+ const obj_sortField = obj.sortField;
2177
+ const path_sortField = path + '.sortField';
2178
+ const referencepath_sortFieldValidationError = validate$3(obj_sortField, path_sortField);
2179
+ if (referencepath_sortFieldValidationError !== null) {
2180
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_sortField + '")\n';
2181
+ message += referencepath_sortFieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2182
+ return new TypeError(message);
2183
+ }
2184
+ }
2185
+ if (obj.subTitle !== undefined) {
2186
+ const obj_subTitle = obj.subTitle;
2187
+ const path_subTitle = path + '.subTitle';
2188
+ const referencepath_subTitleValidationError = validate$3(obj_subTitle, path_subTitle);
2189
+ if (referencepath_subTitleValidationError !== null) {
2190
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_subTitle + '")\n';
2191
+ message += referencepath_subTitleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2192
+ return new TypeError(message);
2193
+ }
2194
+ }
2195
+ if (obj.summaryField !== undefined) {
2196
+ const obj_summaryField = obj.summaryField;
2197
+ const path_summaryField = path + '.summaryField';
2198
+ const referencepath_summaryFieldValidationError = validate$3(obj_summaryField, path_summaryField);
2199
+ if (referencepath_summaryFieldValidationError !== null) {
2200
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_summaryField + '")\n';
2201
+ message += referencepath_summaryFieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2202
+ return new TypeError(message);
2203
+ }
2204
+ }
2205
+ if (obj.title !== undefined) {
2206
+ const obj_title = obj.title;
2207
+ const path_title = path + '.title';
2208
+ const referencepath_titleValidationError = validate$3(obj_title, path_title);
2209
+ if (referencepath_titleValidationError !== null) {
2210
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_title + '")\n';
2211
+ message += referencepath_titleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2212
+ return new TypeError(message);
2213
+ }
2214
+ }
2215
+ })();
2216
+ return v_error === undefined ? null : v_error;
2217
+ }
2218
+
2219
+ function validate$1(obj, path = 'TimelineMetadataDefinitionRepresentation') {
2220
+ const v_error = (() => {
2221
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2222
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2223
+ }
2224
+ if (obj.anchorObject !== undefined) {
2225
+ const obj_anchorObject = obj.anchorObject;
2226
+ const path_anchorObject = path + '.anchorObject';
2227
+ const referencepath_anchorObjectValidationError = validate$4(obj_anchorObject, path_anchorObject);
2228
+ if (referencepath_anchorObjectValidationError !== null) {
2229
+ let message = 'Object doesn\'t match TimelineEntityRepresentation (at "' + path_anchorObject + '")\n';
2230
+ message += referencepath_anchorObjectValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2231
+ return new TypeError(message);
2232
+ }
2233
+ }
2234
+ if (obj.eventTypes !== undefined) {
2235
+ const obj_eventTypes = obj.eventTypes;
2236
+ const path_eventTypes = path + '.eventTypes';
2237
+ if (!ArrayIsArray(obj_eventTypes)) {
2238
+ return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
2239
+ }
2240
+ for (let i = 0; i < obj_eventTypes.length; i++) {
2241
+ const obj_eventTypes_item = obj_eventTypes[i];
2242
+ const path_eventTypes_item = path_eventTypes + '[' + i + ']';
2243
+ const referencepath_eventTypes_itemValidationError = validate$2(obj_eventTypes_item, path_eventTypes_item);
2244
+ if (referencepath_eventTypes_itemValidationError !== null) {
2245
+ let message = 'Object doesn\'t match TimelineEventTypeMetadataRepresentation (at "' + path_eventTypes_item + '")\n';
2246
+ message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2247
+ return new TypeError(message);
2248
+ }
2249
+ }
2250
+ }
2251
+ const obj_fullName = obj.fullName;
2252
+ const path_fullName = path + '.fullName';
2253
+ let obj_fullName_union0 = null;
2254
+ const obj_fullName_union0_error = (() => {
2255
+ if (typeof obj_fullName !== 'string') {
2256
+ return new TypeError('Expected "string" but received "' + typeof obj_fullName + '" (at "' + path_fullName + '")');
2257
+ }
2258
+ })();
2259
+ if (obj_fullName_union0_error != null) {
2260
+ obj_fullName_union0 = obj_fullName_union0_error.message;
2261
+ }
2262
+ let obj_fullName_union1 = null;
2263
+ const obj_fullName_union1_error = (() => {
2264
+ if (obj_fullName !== null) {
2265
+ return new TypeError('Expected "null" but received "' + typeof obj_fullName + '" (at "' + path_fullName + '")');
2266
+ }
2267
+ })();
2268
+ if (obj_fullName_union1_error != null) {
2269
+ obj_fullName_union1 = obj_fullName_union1_error.message;
2270
+ }
2271
+ if (obj_fullName_union0 && obj_fullName_union1) {
2272
+ let message = 'Object doesn\'t match union (at "' + path_fullName + '")';
2273
+ message += '\n' + obj_fullName_union0.split('\n').map((line) => '\t' + line).join('\n');
2274
+ message += '\n' + obj_fullName_union1.split('\n').map((line) => '\t' + line).join('\n');
2275
+ return new TypeError(message);
2276
+ }
2277
+ if (obj.isActive !== undefined) {
2278
+ const obj_isActive = obj.isActive;
2279
+ const path_isActive = path + '.isActive';
2280
+ if (typeof obj_isActive !== 'boolean') {
2281
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
2282
+ }
2283
+ }
2284
+ const obj_masterLabel = obj.masterLabel;
2285
+ const path_masterLabel = path + '.masterLabel';
2286
+ let obj_masterLabel_union0 = null;
2287
+ const obj_masterLabel_union0_error = (() => {
2288
+ if (typeof obj_masterLabel !== 'string') {
2289
+ return new TypeError('Expected "string" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
2290
+ }
2291
+ })();
2292
+ if (obj_masterLabel_union0_error != null) {
2293
+ obj_masterLabel_union0 = obj_masterLabel_union0_error.message;
2294
+ }
2295
+ let obj_masterLabel_union1 = null;
2296
+ const obj_masterLabel_union1_error = (() => {
2297
+ if (obj_masterLabel !== null) {
2298
+ return new TypeError('Expected "null" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
2299
+ }
2300
+ })();
2301
+ if (obj_masterLabel_union1_error != null) {
2302
+ obj_masterLabel_union1 = obj_masterLabel_union1_error.message;
2303
+ }
2304
+ if (obj_masterLabel_union0 && obj_masterLabel_union1) {
2305
+ let message = 'Object doesn\'t match union (at "' + path_masterLabel + '")';
2306
+ message += '\n' + obj_masterLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
2307
+ message += '\n' + obj_masterLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
2308
+ return new TypeError(message);
2309
+ }
2310
+ })();
2311
+ return v_error === undefined ? null : v_error;
2312
+ }
2313
+
2314
+ const TTL = 500;
2315
+ const VERSION = "73eb5de038a20239e23e31b0a0bb3cdc";
2316
+ function validate(obj, path = 'TimelineMetadataResultRepresentation') {
2317
+ const v_error = (() => {
2318
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2319
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2320
+ }
2321
+ if (obj.definitions !== undefined) {
2322
+ const obj_definitions = obj.definitions;
2323
+ const path_definitions = path + '.definitions';
2324
+ if (!ArrayIsArray(obj_definitions)) {
2325
+ return new TypeError('Expected "array" but received "' + typeof obj_definitions + '" (at "' + path_definitions + '")');
2326
+ }
2327
+ for (let i = 0; i < obj_definitions.length; i++) {
2328
+ const obj_definitions_item = obj_definitions[i];
2329
+ const path_definitions_item = path_definitions + '[' + i + ']';
2330
+ const referencepath_definitions_itemValidationError = validate$1(obj_definitions_item, path_definitions_item);
2331
+ if (referencepath_definitions_itemValidationError !== null) {
2332
+ let message = 'Object doesn\'t match TimelineMetadataDefinitionRepresentation (at "' + path_definitions_item + '")\n';
2333
+ message += referencepath_definitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2334
+ return new TypeError(message);
2335
+ }
2336
+ }
2337
+ }
2338
+ if (obj.errors !== undefined) {
2339
+ const obj_errors = obj.errors;
2340
+ const path_errors = path + '.errors';
2341
+ if (!ArrayIsArray(obj_errors)) {
2342
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
2343
+ }
2344
+ for (let i = 0; i < obj_errors.length; i++) {
2345
+ const obj_errors_item = obj_errors[i];
2346
+ const path_errors_item = path_errors + '[' + i + ']';
2347
+ const referencepath_errors_itemValidationError = validate$f(obj_errors_item, path_errors_item);
2348
+ if (referencepath_errors_itemValidationError !== null) {
2349
+ let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
2350
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2351
+ return new TypeError(message);
2352
+ }
2353
+ }
2354
+ }
2355
+ const obj_status = obj.status;
2356
+ const path_status = path + '.status';
2357
+ let obj_status_union0 = null;
2358
+ const obj_status_union0_error = (() => {
2359
+ if (typeof obj_status !== 'string') {
2360
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
2361
+ }
2362
+ })();
2363
+ if (obj_status_union0_error != null) {
2364
+ obj_status_union0 = obj_status_union0_error.message;
2365
+ }
2366
+ let obj_status_union1 = null;
2367
+ const obj_status_union1_error = (() => {
2368
+ if (obj_status !== null) {
2369
+ return new TypeError('Expected "null" but received "' + typeof obj_status + '" (at "' + path_status + '")');
2370
+ }
2371
+ })();
2372
+ if (obj_status_union1_error != null) {
2373
+ obj_status_union1 = obj_status_union1_error.message;
2374
+ }
2375
+ if (obj_status_union0 && obj_status_union1) {
2376
+ let message = 'Object doesn\'t match union (at "' + path_status + '")';
2377
+ message += '\n' + obj_status_union0.split('\n').map((line) => '\t' + line).join('\n');
2378
+ message += '\n' + obj_status_union1.split('\n').map((line) => '\t' + line).join('\n');
2379
+ return new TypeError(message);
2380
+ }
2381
+ })();
2382
+ return v_error === undefined ? null : v_error;
2383
+ }
2384
+ const RepresentationType = 'TimelineMetadataResultRepresentation';
2385
+ function normalize(input, existing, path, luvio, store, timestamp) {
2386
+ return input;
2387
+ }
2388
+ const select$1 = function TimelineMetadataResultRepresentationSelect() {
2389
+ return {
2390
+ kind: 'Fragment',
2391
+ version: VERSION,
2392
+ private: [],
2393
+ opaque: true
2394
+ };
2395
+ };
2396
+ function equals(existing, incoming) {
2397
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
2398
+ return false;
2399
+ }
2400
+ return true;
2401
+ }
2402
+ const ingest = function TimelineMetadataResultRepresentationIngest(input, path, luvio, store, timestamp) {
2403
+ if (process.env.NODE_ENV !== 'production') {
2404
+ const validateError = validate(input);
2405
+ if (validateError !== null) {
2406
+ throw validateError;
2407
+ }
2408
+ }
2409
+ const key = path.fullPath;
2410
+ const ttlToUse = TTL;
2411
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "Timeline", VERSION, RepresentationType, equals);
2412
+ return createLink(key);
2413
+ };
2414
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
2415
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2416
+ const rootKey = fullPathFactory();
2417
+ rootKeySet.set(rootKey, {
2418
+ namespace: keyPrefix,
2419
+ representationName: RepresentationType,
2420
+ mergeable: false
2421
+ });
2422
+ }
2423
+
2424
+ function select(luvio, params) {
2425
+ return select$1();
2426
+ }
2427
+ function keyBuilder$1(luvio, params) {
2428
+ return keyPrefix + '::TimelineMetadataResultRepresentation:(' + 'fullNames:' + params.queryParams.fullNames + ')';
2429
+ }
2430
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
2431
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
2432
+ }
2433
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
2434
+ const { body } = response;
2435
+ const key = keyBuilder$1(luvio, resourceParams);
2436
+ luvio.storeIngest(key, ingest, body);
2437
+ const snapshot = luvio.storeLookup({
2438
+ recordId: key,
2439
+ node: select(),
2440
+ variables: {},
2441
+ }, snapshotRefresh);
2442
+ if (process.env.NODE_ENV !== 'production') {
2443
+ if (snapshot.state !== 'Fulfilled') {
2444
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2445
+ }
2446
+ }
2447
+ deepFreeze(snapshot.data);
2448
+ return snapshot;
2449
+ }
2450
+ function ingestError(luvio, params, error, snapshotRefresh) {
2451
+ const key = keyBuilder$1(luvio, params);
2452
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2453
+ const storeMetadataParams = {
2454
+ ttl: TTL,
2455
+ namespace: keyPrefix,
2456
+ version: VERSION,
2457
+ representationName: RepresentationType
2458
+ };
2459
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2460
+ return errorSnapshot;
2461
+ }
2462
+ function createResourceRequest(config) {
2463
+ const headers = {};
2464
+ return {
2465
+ baseUri: '/services/data/v66.0',
2466
+ basePath: '/connect/timeline/metadata/configurations',
2467
+ method: 'get',
2468
+ body: null,
2469
+ urlParams: {},
2470
+ queryParams: config.queryParams,
2471
+ headers,
2472
+ priority: 'normal',
2473
+ };
2474
+ }
2475
+
2476
+ const adapterName = 'getTimelineMetadata';
2477
+ const getTimelineMetadata_ConfigPropertyMetadata = [
2478
+ generateParamConfigMetadata('fullNames', false, 1 /* QueryParameter */, 0 /* String */, true),
2479
+ ];
2480
+ const getTimelineMetadata_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTimelineMetadata_ConfigPropertyMetadata);
2481
+ const createResourceParams = /*#__PURE__*/ createResourceParams$5(getTimelineMetadata_ConfigPropertyMetadata);
2482
+ function keyBuilder(luvio, config) {
2483
+ const resourceParams = createResourceParams(config);
2484
+ return keyBuilder$1(luvio, resourceParams);
2485
+ }
2486
+ function typeCheckConfig(untrustedConfig) {
2487
+ const config = {};
2488
+ typeCheckConfig$5(untrustedConfig, config, getTimelineMetadata_ConfigPropertyMetadata);
2489
+ return config;
2490
+ }
2491
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
2492
+ if (!untrustedIsObject(untrustedConfig)) {
2493
+ return null;
2494
+ }
2495
+ if (process.env.NODE_ENV !== 'production') {
2496
+ validateConfig(untrustedConfig, configPropertyNames);
2497
+ }
2498
+ const config = typeCheckConfig(untrustedConfig);
2499
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2500
+ return null;
2501
+ }
2502
+ return config;
2503
+ }
2504
+ function adapterFragment(luvio, config) {
2505
+ createResourceParams(config);
2506
+ return select();
2507
+ }
2508
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
2509
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
2510
+ config,
2511
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2512
+ });
2513
+ return luvio.storeBroadcast().then(() => snapshot);
2514
+ }
2515
+ function onFetchResponseError(luvio, config, resourceParams, response) {
2516
+ const snapshot = ingestError(luvio, resourceParams, response, {
2517
+ config,
2518
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2519
+ });
2520
+ return luvio.storeBroadcast().then(() => snapshot);
2521
+ }
2522
+ function buildNetworkSnapshot(luvio, config, options) {
2523
+ const resourceParams = createResourceParams(config);
2524
+ const request = createResourceRequest(resourceParams);
2525
+ return luvio.dispatchResourceRequest(request, options)
2526
+ .then((response) => {
2527
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
2528
+ const cache = new StoreKeyMap();
2529
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
2530
+ return cache;
2531
+ });
2532
+ }, (response) => {
2533
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
2534
+ });
2535
+ }
2536
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2537
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2538
+ }
2539
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2540
+ const { luvio, config } = context;
2541
+ const selector = {
2542
+ recordId: keyBuilder(luvio, config),
2543
+ node: adapterFragment(luvio, config),
2544
+ variables: {},
2545
+ };
2546
+ const cacheSnapshot = storeLookup(selector, {
2547
+ config,
2548
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2549
+ });
2550
+ return cacheSnapshot;
2551
+ }
2552
+ const getTimelineMetadataAdapterFactory = (luvio) => function Timeline__getTimelineMetadata(untrustedConfig, requestContext) {
2553
+ const config = validateAdapterConfig(untrustedConfig, getTimelineMetadata_ConfigPropertyNames);
2554
+ // Invalid or incomplete config
2555
+ if (config === null) {
2556
+ return null;
2557
+ }
2558
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2559
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
2560
+ };
2561
+
2562
+ let getDataGraphMetadata;
2563
+ let getDataModelObjects;
2564
+ let getEngagementEvents;
2565
+ let getTimelineData;
2566
+ let getTimelineMetadata;
2567
+ // Imperative GET Adapters
2568
+ let getDataGraphMetadata_imperative;
2569
+ let getDataModelObjects_imperative;
2570
+ let getEngagementEvents_imperative;
2571
+ let getTimelineData_imperative;
2572
+ let getTimelineMetadata_imperative;
2573
+ // Adapter Metadata
2574
+ const getDataGraphMetadataMetadata = {
2575
+ apiFamily: 'Timeline',
2576
+ name: 'getDataGraphMetadata',
2577
+ ttl: 300000,
2578
+ };
2579
+ const getDataModelObjectsMetadata = {
2580
+ apiFamily: 'Timeline',
2581
+ name: 'getDataModelObjects',
2582
+ ttl: 600000,
2583
+ };
2584
+ const getEngagementEventsMetadata = {
2585
+ apiFamily: 'Timeline',
2586
+ name: 'getEngagementEvents',
2587
+ ttl: 600000,
2588
+ };
2589
+ const getTimelineDataMetadata = { apiFamily: 'Timeline', name: 'getTimelineData', ttl: 500 };
2590
+ const getTimelineMetadataMetadata = {
2591
+ apiFamily: 'Timeline',
2592
+ name: 'getTimelineMetadata',
2593
+ ttl: 500,
2594
+ };
2595
+ // Notify Update Available
2596
+ function bindExportsTo(luvio) {
2597
+ // LDS Adapters
2598
+ const getDataGraphMetadata_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataGraphMetadata', getDataGraphMetadataAdapterFactory), getDataGraphMetadataMetadata);
2599
+ const getDataModelObjects_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataModelObjects', getDataModelObjectsAdapterFactory), getDataModelObjectsMetadata);
2600
+ const getEngagementEvents_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getEngagementEvents', getEngagementEventsAdapterFactory), getEngagementEventsMetadata);
2601
+ const getTimelineData_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTimelineData', getTimelineDataAdapterFactory), getTimelineDataMetadata);
2602
+ const getTimelineMetadata_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTimelineMetadata', getTimelineMetadataAdapterFactory), getTimelineMetadataMetadata);
2603
+ return {
2604
+ getDataGraphMetadata: createWireAdapterConstructor(luvio, getDataGraphMetadata_ldsAdapter, getDataGraphMetadataMetadata),
2605
+ getDataModelObjects: createWireAdapterConstructor(luvio, getDataModelObjects_ldsAdapter, getDataModelObjectsMetadata),
2606
+ getEngagementEvents: createWireAdapterConstructor(luvio, getEngagementEvents_ldsAdapter, getEngagementEventsMetadata),
2607
+ getTimelineData: createWireAdapterConstructor(luvio, getTimelineData_ldsAdapter, getTimelineDataMetadata),
2608
+ getTimelineMetadata: createWireAdapterConstructor(luvio, getTimelineMetadata_ldsAdapter, getTimelineMetadataMetadata),
2609
+ // Imperative GET Adapters
2610
+ getDataGraphMetadata_imperative: createImperativeAdapter(luvio, getDataGraphMetadata_ldsAdapter, getDataGraphMetadataMetadata),
2611
+ getDataModelObjects_imperative: createImperativeAdapter(luvio, getDataModelObjects_ldsAdapter, getDataModelObjectsMetadata),
2612
+ getEngagementEvents_imperative: createImperativeAdapter(luvio, getEngagementEvents_ldsAdapter, getEngagementEventsMetadata),
2613
+ getTimelineData_imperative: createImperativeAdapter(luvio, getTimelineData_ldsAdapter, getTimelineDataMetadata),
2614
+ getTimelineMetadata_imperative: createImperativeAdapter(luvio, getTimelineMetadata_ldsAdapter, getTimelineMetadataMetadata),
2615
+ // Notify Update Availables
2616
+ };
2617
+ }
2618
+ withDefaultLuvio((luvio) => {
2619
+ ({
2620
+ getDataGraphMetadata,
2621
+ getDataModelObjects,
2622
+ getEngagementEvents,
2623
+ getTimelineData,
2624
+ getTimelineMetadata,
2625
+ getDataGraphMetadata_imperative,
2626
+ getDataModelObjects_imperative,
2627
+ getEngagementEvents_imperative,
2628
+ getTimelineData_imperative,
2629
+ getTimelineMetadata_imperative,
2630
+ } = bindExportsTo(luvio));
2631
+ });
2632
+
2633
+ export { getDataGraphMetadata, getDataGraphMetadata_imperative, getDataModelObjects, getDataModelObjects_imperative, getEngagementEvents, getEngagementEvents_imperative, getTimelineData, getTimelineData_imperative, getTimelineMetadata, getTimelineMetadata_imperative };
2634
+ // version: 0.1.0-dev1-c978a7b010