@salesforce/lds-adapters-industries-timeline 1.169.0 → 1.170.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/es/es2018/industries-timeline.js +895 -603
  2. package/dist/es/es2018/types/src/generated/adapters/getEngagementEvents.d.ts +27 -0
  3. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -1
  4. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
  5. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineCustDataPfrmDataModelObjects.d.ts +2 -2
  6. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineMetadataConfigurations.d.ts +2 -2
  7. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineTimelineDefinitionsCustDataPfrmEventsByTimelineConfigFullNameAndTimelineObjRecordId.d.ts +16 -0
  8. package/dist/es/es2018/types/src/generated/resources/getConnectTimelineTimelineDefinitionsEventsByTimelineConfigFullNameAndTimelineObjRecordId.d.ts +2 -2
  9. package/dist/es/es2018/types/src/generated/types/CdpMetadataOutputRepresentation.d.ts +2 -2
  10. package/dist/es/es2018/types/src/generated/types/DmoFieldsOutputRepresentation.d.ts +2 -2
  11. package/dist/es/es2018/types/src/generated/types/DmoOutputRepresentation.d.ts +2 -2
  12. package/dist/es/es2018/types/src/generated/types/DmoRelationshipsOutputRepresentation.d.ts +2 -2
  13. package/dist/es/es2018/types/src/generated/types/EngagementEventTimelineDataRepresentation.d.ts +41 -0
  14. package/dist/es/es2018/types/src/generated/types/RelationshipTypeOutputRepresentation.d.ts +2 -2
  15. package/dist/es/es2018/types/src/generated/types/TimelineDataGetResultRepresentation.d.ts +2 -2
  16. package/dist/es/es2018/types/src/generated/types/TimelineElementRepresentation.d.ts +2 -2
  17. package/dist/es/es2018/types/src/generated/types/TimelineEntityRepresentation.d.ts +2 -2
  18. package/dist/es/es2018/types/src/generated/types/TimelineErrorRepresentation.d.ts +2 -2
  19. package/dist/es/es2018/types/src/generated/types/TimelineEventFieldRepresentation.d.ts +2 -2
  20. package/dist/es/es2018/types/src/generated/types/TimelineEventRepresentation.d.ts +2 -2
  21. package/dist/es/es2018/types/src/generated/types/TimelineEventTypeMetadataRepresentation.d.ts +2 -2
  22. package/dist/es/es2018/types/src/generated/types/TimelineEventTypeRepresentation.d.ts +2 -2
  23. package/dist/es/es2018/types/src/generated/types/TimelineMetadataDefinitionRepresentation.d.ts +2 -2
  24. package/dist/es/es2018/types/src/generated/types/TimelineMetadataResultRepresentation.d.ts +2 -2
  25. package/package.json +1 -1
  26. package/sfdc/index.js +396 -96
  27. package/src/raml/api.raml +72 -32
  28. package/src/raml/luvio.raml +78 -70
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, StoreKeyMap, deepFreeze } from '@luvio/engine';
7
+ import { serializeStructuredKey, deepFreeze, StoreKeyMap } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -58,229 +58,479 @@ function createLink(ref) {
58
58
  };
59
59
  }
60
60
 
61
- function validate$e(obj, path = 'DmoFieldsOutputRepresentation') {
61
+ function validate$f(obj, path = 'TimelineErrorRepresentation') {
62
62
  const v_error = (() => {
63
63
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
64
64
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
65
65
  }
66
- const obj_displayName = obj.displayName;
67
- const path_displayName = path + '.displayName';
68
- if (typeof obj_displayName !== 'string') {
69
- return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
66
+ const obj_code = obj.code;
67
+ const path_code = path + '.code';
68
+ let obj_code_union0 = null;
69
+ const obj_code_union0_error = (() => {
70
+ if (typeof obj_code !== 'string') {
71
+ return new TypeError('Expected "string" but received "' + typeof obj_code + '" (at "' + path_code + '")');
72
+ }
73
+ })();
74
+ if (obj_code_union0_error != null) {
75
+ obj_code_union0 = obj_code_union0_error.message;
70
76
  }
71
- const obj_name = obj.name;
72
- const path_name = path + '.name';
73
- if (typeof obj_name !== 'string') {
74
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
77
+ let obj_code_union1 = null;
78
+ const obj_code_union1_error = (() => {
79
+ if (obj_code !== null) {
80
+ return new TypeError('Expected "null" but received "' + typeof obj_code + '" (at "' + path_code + '")');
81
+ }
82
+ })();
83
+ if (obj_code_union1_error != null) {
84
+ obj_code_union1 = obj_code_union1_error.message;
75
85
  }
76
- const obj_type = obj.type;
77
- const path_type = path + '.type';
78
- if (typeof obj_type !== 'string') {
79
- return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
86
+ if (obj_code_union0 && obj_code_union1) {
87
+ let message = 'Object doesn\'t match union (at "' + path_code + '")';
88
+ message += '\n' + obj_code_union0.split('\n').map((line) => '\t' + line).join('\n');
89
+ message += '\n' + obj_code_union1.split('\n').map((line) => '\t' + line).join('\n');
90
+ return new TypeError(message);
80
91
  }
81
- })();
82
- return v_error === undefined ? null : v_error;
83
- }
84
-
85
- function validate$d(obj, path = 'RelationshipTypeOutputRepresentation') {
86
- const v_error = (() => {
87
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
88
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
92
+ const obj_message = obj.message;
93
+ const path_message = path + '.message';
94
+ let obj_message_union0 = null;
95
+ const obj_message_union0_error = (() => {
96
+ if (typeof obj_message !== 'string') {
97
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
98
+ }
99
+ })();
100
+ if (obj_message_union0_error != null) {
101
+ obj_message_union0 = obj_message_union0_error.message;
89
102
  }
90
- const obj_attribute = obj.attribute;
91
- const path_attribute = path + '.attribute';
92
- if (typeof obj_attribute !== 'string') {
93
- return new TypeError('Expected "string" but received "' + typeof obj_attribute + '" (at "' + path_attribute + '")');
103
+ let obj_message_union1 = null;
104
+ const obj_message_union1_error = (() => {
105
+ if (obj_message !== null) {
106
+ return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
107
+ }
108
+ })();
109
+ if (obj_message_union1_error != null) {
110
+ obj_message_union1 = obj_message_union1_error.message;
94
111
  }
95
- const obj_name = obj.name;
96
- const path_name = path + '.name';
97
- if (typeof obj_name !== 'string') {
98
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
112
+ if (obj_message_union0 && obj_message_union1) {
113
+ let message = 'Object doesn\'t match union (at "' + path_message + '")';
114
+ message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
115
+ message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
116
+ return new TypeError(message);
99
117
  }
100
118
  })();
101
119
  return v_error === undefined ? null : v_error;
102
120
  }
103
121
 
104
- function validate$c(obj, path = 'DmoRelationshipsOutputRepresentation') {
122
+ function validate$e(obj, path = 'TimelineEventTypeRepresentation') {
105
123
  const v_error = (() => {
106
124
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
107
125
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
108
126
  }
109
- const obj_fromEntity = obj.fromEntity;
110
- const path_fromEntity = path + '.fromEntity';
111
- const referencepath_fromEntityValidationError = validate$d(obj_fromEntity, path_fromEntity);
112
- if (referencepath_fromEntityValidationError !== null) {
113
- let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_fromEntity + '")\n';
114
- message += referencepath_fromEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
127
+ const obj_eventApiName = obj.eventApiName;
128
+ const path_eventApiName = path + '.eventApiName';
129
+ let obj_eventApiName_union0 = null;
130
+ const obj_eventApiName_union0_error = (() => {
131
+ if (typeof obj_eventApiName !== 'string') {
132
+ return new TypeError('Expected "string" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
133
+ }
134
+ })();
135
+ if (obj_eventApiName_union0_error != null) {
136
+ obj_eventApiName_union0 = obj_eventApiName_union0_error.message;
137
+ }
138
+ let obj_eventApiName_union1 = null;
139
+ const obj_eventApiName_union1_error = (() => {
140
+ if (obj_eventApiName !== null) {
141
+ return new TypeError('Expected "null" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
142
+ }
143
+ })();
144
+ if (obj_eventApiName_union1_error != null) {
145
+ obj_eventApiName_union1 = obj_eventApiName_union1_error.message;
146
+ }
147
+ if (obj_eventApiName_union0 && obj_eventApiName_union1) {
148
+ let message = 'Object doesn\'t match union (at "' + path_eventApiName + '")';
149
+ message += '\n' + obj_eventApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
150
+ message += '\n' + obj_eventApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
115
151
  return new TypeError(message);
116
152
  }
117
- const obj_toEntity = obj.toEntity;
118
- const path_toEntity = path + '.toEntity';
119
- const referencepath_toEntityValidationError = validate$d(obj_toEntity, path_toEntity);
120
- if (referencepath_toEntityValidationError !== null) {
121
- let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_toEntity + '")\n';
122
- message += referencepath_toEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
153
+ const obj_offset = obj.offset;
154
+ const path_offset = path + '.offset';
155
+ let obj_offset_union0 = null;
156
+ const obj_offset_union0_error = (() => {
157
+ if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
158
+ return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
159
+ }
160
+ })();
161
+ if (obj_offset_union0_error != null) {
162
+ obj_offset_union0 = obj_offset_union0_error.message;
163
+ }
164
+ let obj_offset_union1 = null;
165
+ const obj_offset_union1_error = (() => {
166
+ if (obj_offset !== null) {
167
+ return new TypeError('Expected "null" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
168
+ }
169
+ })();
170
+ if (obj_offset_union1_error != null) {
171
+ obj_offset_union1 = obj_offset_union1_error.message;
172
+ }
173
+ if (obj_offset_union0 && obj_offset_union1) {
174
+ let message = 'Object doesn\'t match union (at "' + path_offset + '")';
175
+ message += '\n' + obj_offset_union0.split('\n').map((line) => '\t' + line).join('\n');
176
+ message += '\n' + obj_offset_union1.split('\n').map((line) => '\t' + line).join('\n');
123
177
  return new TypeError(message);
124
178
  }
125
179
  })();
126
180
  return v_error === undefined ? null : v_error;
127
181
  }
128
182
 
129
- function validate$b(obj, path = 'DmoOutputRepresentation') {
183
+ function validate$d(obj, path = 'TimelineEventFieldRepresentation') {
130
184
  const v_error = (() => {
131
185
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
132
186
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
133
187
  }
134
- const obj_category = obj.category;
135
- const path_category = path + '.category';
136
- if (typeof obj_category !== 'string') {
137
- return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
138
- }
139
- const obj_displayName = obj.displayName;
140
- const path_displayName = path + '.displayName';
141
- if (typeof obj_displayName !== 'string') {
142
- return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
143
- }
144
- const obj_fields = obj.fields;
145
- const path_fields = path + '.fields';
146
- if (!ArrayIsArray(obj_fields)) {
147
- return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
188
+ const obj_name = obj.name;
189
+ const path_name = path + '.name';
190
+ let obj_name_union0 = null;
191
+ const obj_name_union0_error = (() => {
192
+ if (typeof obj_name !== 'string') {
193
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
194
+ }
195
+ })();
196
+ if (obj_name_union0_error != null) {
197
+ obj_name_union0 = obj_name_union0_error.message;
148
198
  }
149
- for (let i = 0; i < obj_fields.length; i++) {
150
- const obj_fields_item = obj_fields[i];
151
- const path_fields_item = path_fields + '[' + i + ']';
152
- const referencepath_fields_itemValidationError = validate$e(obj_fields_item, path_fields_item);
153
- if (referencepath_fields_itemValidationError !== null) {
154
- let message = 'Object doesn\'t match DmoFieldsOutputRepresentation (at "' + path_fields_item + '")\n';
155
- message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
156
- return new TypeError(message);
199
+ let obj_name_union1 = null;
200
+ const obj_name_union1_error = (() => {
201
+ if (obj_name !== null) {
202
+ return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
157
203
  }
204
+ })();
205
+ if (obj_name_union1_error != null) {
206
+ obj_name_union1 = obj_name_union1_error.message;
158
207
  }
159
- const obj_name = obj.name;
160
- const path_name = path + '.name';
161
- if (typeof obj_name !== 'string') {
162
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
208
+ if (obj_name_union0 && obj_name_union1) {
209
+ let message = 'Object doesn\'t match union (at "' + path_name + '")';
210
+ message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
211
+ message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
212
+ return new TypeError(message);
163
213
  }
164
- const obj_relationships = obj.relationships;
165
- const path_relationships = path + '.relationships';
166
- if (!ArrayIsArray(obj_relationships)) {
167
- return new TypeError('Expected "array" but received "' + typeof obj_relationships + '" (at "' + path_relationships + '")');
214
+ const obj_value = obj.value;
215
+ const path_value = path + '.value';
216
+ let obj_value_union0 = null;
217
+ const obj_value_union0_error = (() => {
218
+ if (typeof obj_value !== 'string') {
219
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
220
+ }
221
+ })();
222
+ if (obj_value_union0_error != null) {
223
+ obj_value_union0 = obj_value_union0_error.message;
168
224
  }
169
- for (let i = 0; i < obj_relationships.length; i++) {
170
- const obj_relationships_item = obj_relationships[i];
171
- const path_relationships_item = path_relationships + '[' + i + ']';
172
- const referencepath_relationships_itemValidationError = validate$c(obj_relationships_item, path_relationships_item);
173
- if (referencepath_relationships_itemValidationError !== null) {
174
- let message = 'Object doesn\'t match DmoRelationshipsOutputRepresentation (at "' + path_relationships_item + '")\n';
175
- message += referencepath_relationships_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
176
- return new TypeError(message);
225
+ let obj_value_union1 = null;
226
+ const obj_value_union1_error = (() => {
227
+ if (obj_value !== null) {
228
+ return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
177
229
  }
230
+ })();
231
+ if (obj_value_union1_error != null) {
232
+ obj_value_union1 = obj_value_union1_error.message;
233
+ }
234
+ if (obj_value_union0 && obj_value_union1) {
235
+ let message = 'Object doesn\'t match union (at "' + path_value + '")';
236
+ message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
237
+ message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
238
+ return new TypeError(message);
178
239
  }
179
240
  })();
180
241
  return v_error === undefined ? null : v_error;
181
242
  }
182
243
 
183
- const TTL$2 = 600000;
184
- const VERSION$2 = "84ccc17f91013e292e7b01a291dd0322";
185
- function validate$a(obj, path = 'CdpMetadataOutputRepresentation') {
244
+ function validate$c(obj, path = 'TimelineEventRepresentation') {
186
245
  const v_error = (() => {
187
246
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
188
247
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
189
248
  }
190
- const obj_dmos = obj.dmos;
191
- const path_dmos = path + '.dmos';
192
- if (!ArrayIsArray(obj_dmos)) {
193
- return new TypeError('Expected "array" but received "' + typeof obj_dmos + '" (at "' + path_dmos + '")');
249
+ const obj_description = obj.description;
250
+ const path_description = path + '.description';
251
+ let obj_description_union0 = null;
252
+ const obj_description_union0_error = (() => {
253
+ if (typeof obj_description !== 'string') {
254
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
255
+ }
256
+ })();
257
+ if (obj_description_union0_error != null) {
258
+ obj_description_union0 = obj_description_union0_error.message;
194
259
  }
195
- for (let i = 0; i < obj_dmos.length; i++) {
196
- const obj_dmos_item = obj_dmos[i];
197
- const path_dmos_item = path_dmos + '[' + i + ']';
198
- const referencepath_dmos_itemValidationError = validate$b(obj_dmos_item, path_dmos_item);
199
- if (referencepath_dmos_itemValidationError !== null) {
200
- let message = 'Object doesn\'t match DmoOutputRepresentation (at "' + path_dmos_item + '")\n';
201
- message += referencepath_dmos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
202
- return new TypeError(message);
260
+ let obj_description_union1 = null;
261
+ const obj_description_union1_error = (() => {
262
+ if (obj_description !== null) {
263
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
203
264
  }
265
+ })();
266
+ if (obj_description_union1_error != null) {
267
+ obj_description_union1 = obj_description_union1_error.message;
204
268
  }
205
- })();
206
- return v_error === undefined ? null : v_error;
207
- }
208
- const RepresentationType$2 = 'CdpMetadataOutputRepresentation';
209
- function normalize$2(input, existing, path, luvio, store, timestamp) {
210
- return input;
211
- }
212
- const select$5 = function CdpMetadataOutputRepresentationSelect() {
213
- return {
214
- kind: 'Fragment',
215
- version: VERSION$2,
216
- private: [],
217
- opaque: true
218
- };
219
- };
220
- function equals$2(existing, incoming) {
221
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
222
- return false;
269
+ if (obj_description_union0 && obj_description_union1) {
270
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
271
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
272
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
273
+ return new TypeError(message);
274
+ }
275
+ const obj_eventDateTime = obj.eventDateTime;
276
+ const path_eventDateTime = path + '.eventDateTime';
277
+ let obj_eventDateTime_union0 = null;
278
+ const obj_eventDateTime_union0_error = (() => {
279
+ if (typeof obj_eventDateTime !== 'string') {
280
+ return new TypeError('Expected "string" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
281
+ }
282
+ })();
283
+ if (obj_eventDateTime_union0_error != null) {
284
+ obj_eventDateTime_union0 = obj_eventDateTime_union0_error.message;
285
+ }
286
+ let obj_eventDateTime_union1 = null;
287
+ const obj_eventDateTime_union1_error = (() => {
288
+ if (obj_eventDateTime !== null) {
289
+ return new TypeError('Expected "null" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
290
+ }
291
+ })();
292
+ if (obj_eventDateTime_union1_error != null) {
293
+ obj_eventDateTime_union1 = obj_eventDateTime_union1_error.message;
294
+ }
295
+ if (obj_eventDateTime_union0 && obj_eventDateTime_union1) {
296
+ let message = 'Object doesn\'t match union (at "' + path_eventDateTime + '")';
297
+ message += '\n' + obj_eventDateTime_union0.split('\n').map((line) => '\t' + line).join('\n');
298
+ message += '\n' + obj_eventDateTime_union1.split('\n').map((line) => '\t' + line).join('\n');
299
+ return new TypeError(message);
300
+ }
301
+ if (obj.fields !== undefined) {
302
+ const obj_fields = obj.fields;
303
+ const path_fields = path + '.fields';
304
+ if (!ArrayIsArray(obj_fields)) {
305
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
306
+ }
307
+ for (let i = 0; i < obj_fields.length; i++) {
308
+ const obj_fields_item = obj_fields[i];
309
+ const path_fields_item = path_fields + '[' + i + ']';
310
+ const referencepath_fields_itemValidationError = validate$d(obj_fields_item, path_fields_item);
311
+ if (referencepath_fields_itemValidationError !== null) {
312
+ let message = 'Object doesn\'t match TimelineEventFieldRepresentation (at "' + path_fields_item + '")\n';
313
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
314
+ return new TypeError(message);
315
+ }
316
+ }
317
+ }
318
+ const obj_id = obj.id;
319
+ const path_id = path + '.id';
320
+ let obj_id_union0 = null;
321
+ const obj_id_union0_error = (() => {
322
+ if (typeof obj_id !== 'string') {
323
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
324
+ }
325
+ })();
326
+ if (obj_id_union0_error != null) {
327
+ obj_id_union0 = obj_id_union0_error.message;
328
+ }
329
+ let obj_id_union1 = null;
330
+ const obj_id_union1_error = (() => {
331
+ if (obj_id !== null) {
332
+ return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
333
+ }
334
+ })();
335
+ if (obj_id_union1_error != null) {
336
+ obj_id_union1 = obj_id_union1_error.message;
337
+ }
338
+ if (obj_id_union0 && obj_id_union1) {
339
+ let message = 'Object doesn\'t match union (at "' + path_id + '")';
340
+ message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
341
+ message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
342
+ return new TypeError(message);
343
+ }
344
+ const obj_title = obj.title;
345
+ const path_title = path + '.title';
346
+ let obj_title_union0 = null;
347
+ const obj_title_union0_error = (() => {
348
+ if (typeof obj_title !== 'string') {
349
+ return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
350
+ }
351
+ })();
352
+ if (obj_title_union0_error != null) {
353
+ obj_title_union0 = obj_title_union0_error.message;
354
+ }
355
+ let obj_title_union1 = null;
356
+ const obj_title_union1_error = (() => {
357
+ if (obj_title !== null) {
358
+ return new TypeError('Expected "null" but received "' + typeof obj_title + '" (at "' + path_title + '")');
359
+ }
360
+ })();
361
+ if (obj_title_union1_error != null) {
362
+ obj_title_union1 = obj_title_union1_error.message;
363
+ }
364
+ if (obj_title_union0 && obj_title_union1) {
365
+ let message = 'Object doesn\'t match union (at "' + path_title + '")';
366
+ message += '\n' + obj_title_union0.split('\n').map((line) => '\t' + line).join('\n');
367
+ message += '\n' + obj_title_union1.split('\n').map((line) => '\t' + line).join('\n');
368
+ return new TypeError(message);
369
+ }
370
+ const obj_type = obj.type;
371
+ const path_type = path + '.type';
372
+ let obj_type_union0 = null;
373
+ const obj_type_union0_error = (() => {
374
+ if (typeof obj_type !== 'string') {
375
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
376
+ }
377
+ })();
378
+ if (obj_type_union0_error != null) {
379
+ obj_type_union0 = obj_type_union0_error.message;
380
+ }
381
+ let obj_type_union1 = null;
382
+ const obj_type_union1_error = (() => {
383
+ if (obj_type !== null) {
384
+ return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
385
+ }
386
+ })();
387
+ if (obj_type_union1_error != null) {
388
+ obj_type_union1 = obj_type_union1_error.message;
389
+ }
390
+ if (obj_type_union0 && obj_type_union1) {
391
+ let message = 'Object doesn\'t match union (at "' + path_type + '")';
392
+ message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
393
+ message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
394
+ return new TypeError(message);
395
+ }
396
+ })();
397
+ return v_error === undefined ? null : v_error;
398
+ }
399
+
400
+ const TTL$3 = 600000;
401
+ const VERSION$3 = "321752356b84efcf9df843ceda55f23c";
402
+ function validate$b(obj, path = 'EngagementEventTimelineDataRepresentation') {
403
+ const v_error = (() => {
404
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
405
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
406
+ }
407
+ const obj_errors = obj.errors;
408
+ const path_errors = path + '.errors';
409
+ if (!ArrayIsArray(obj_errors)) {
410
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
411
+ }
412
+ for (let i = 0; i < obj_errors.length; i++) {
413
+ const obj_errors_item = obj_errors[i];
414
+ const path_errors_item = path_errors + '[' + i + ']';
415
+ const referencepath_errors_itemValidationError = validate$f(obj_errors_item, path_errors_item);
416
+ if (referencepath_errors_itemValidationError !== null) {
417
+ let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
418
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
419
+ return new TypeError(message);
420
+ }
421
+ }
422
+ const obj_eventTypes = obj.eventTypes;
423
+ const path_eventTypes = path + '.eventTypes';
424
+ if (!ArrayIsArray(obj_eventTypes)) {
425
+ return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
426
+ }
427
+ for (let i = 0; i < obj_eventTypes.length; i++) {
428
+ const obj_eventTypes_item = obj_eventTypes[i];
429
+ const path_eventTypes_item = path_eventTypes + '[' + i + ']';
430
+ const referencepath_eventTypes_itemValidationError = validate$e(obj_eventTypes_item, path_eventTypes_item);
431
+ if (referencepath_eventTypes_itemValidationError !== null) {
432
+ let message = 'Object doesn\'t match TimelineEventTypeRepresentation (at "' + path_eventTypes_item + '")\n';
433
+ message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
434
+ return new TypeError(message);
435
+ }
436
+ }
437
+ const obj_events = obj.events;
438
+ const path_events = path + '.events';
439
+ if (!ArrayIsArray(obj_events)) {
440
+ return new TypeError('Expected "array" but received "' + typeof obj_events + '" (at "' + path_events + '")');
441
+ }
442
+ for (let i = 0; i < obj_events.length; i++) {
443
+ const obj_events_item = obj_events[i];
444
+ const path_events_item = path_events + '[' + i + ']';
445
+ const referencepath_events_itemValidationError = validate$c(obj_events_item, path_events_item);
446
+ if (referencepath_events_itemValidationError !== null) {
447
+ let message = 'Object doesn\'t match TimelineEventRepresentation (at "' + path_events_item + '")\n';
448
+ message += referencepath_events_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
449
+ return new TypeError(message);
450
+ }
451
+ }
452
+ const obj_isSuccess = obj.isSuccess;
453
+ const path_isSuccess = path + '.isSuccess';
454
+ if (typeof obj_isSuccess !== 'boolean') {
455
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
456
+ }
457
+ })();
458
+ return v_error === undefined ? null : v_error;
459
+ }
460
+ const RepresentationType$3 = 'EngagementEventTimelineDataRepresentation';
461
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
462
+ return input;
463
+ }
464
+ const select$7 = function EngagementEventTimelineDataRepresentationSelect() {
465
+ return {
466
+ kind: 'Fragment',
467
+ version: VERSION$3,
468
+ private: [],
469
+ opaque: true
470
+ };
471
+ };
472
+ function equals$3(existing, incoming) {
473
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
474
+ return false;
223
475
  }
224
476
  return true;
225
477
  }
226
- const ingest$2 = function CdpMetadataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
478
+ const ingest$3 = function EngagementEventTimelineDataRepresentationIngest(input, path, luvio, store, timestamp) {
227
479
  if (process.env.NODE_ENV !== 'production') {
228
- const validateError = validate$a(input);
480
+ const validateError = validate$b(input);
229
481
  if (validateError !== null) {
230
482
  throw validateError;
231
483
  }
232
484
  }
233
485
  const key = path.fullPath;
234
486
  const existingRecord = store.readEntry(key);
235
- const ttlToUse = TTL$2;
236
- let incomingRecord = normalize$2(input, store.readEntry(key), {
487
+ const ttlToUse = TTL$3;
488
+ let incomingRecord = normalize$3(input, store.readEntry(key), {
237
489
  fullPath: key,
238
490
  parent: path.parent,
239
491
  propertyName: path.propertyName,
240
492
  ttl: ttlToUse
241
493
  });
242
- if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
494
+ if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
243
495
  luvio.storePublish(key, incomingRecord);
244
496
  }
245
497
  {
246
498
  const storeMetadataParams = {
247
499
  ttl: ttlToUse,
248
500
  namespace: "Timeline",
249
- version: VERSION$2,
250
- representationName: RepresentationType$2,
501
+ version: VERSION$3,
502
+ representationName: RepresentationType$3,
251
503
  };
252
504
  luvio.publishStoreMetadata(key, storeMetadataParams);
253
505
  }
254
506
  return createLink(key);
255
507
  };
256
- function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
257
- const rootKeySet = new StoreKeyMap();
508
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
258
509
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
259
510
  const rootKey = fullPathFactory();
260
511
  rootKeySet.set(rootKey, {
261
512
  namespace: keyPrefix,
262
- representationName: RepresentationType$2,
513
+ representationName: RepresentationType$3,
263
514
  mergeable: false
264
515
  });
265
- return rootKeySet;
266
516
  }
267
517
 
268
- function select$4(luvio, params) {
269
- return select$5();
518
+ function select$6(luvio, params) {
519
+ return select$7();
270
520
  }
271
- function keyBuilder$5(luvio, params) {
272
- return keyPrefix + '::CdpMetadataOutputRepresentation:(' + 'objectCategory:' + params.queryParams.objectCategory + ')';
521
+ function keyBuilder$7(luvio, params) {
522
+ return keyPrefix + '::EngagementEventTimelineDataRepresentation:(' + 'timelineConfigFullName:' + params.urlParams.timelineConfigFullName + ',' + 'timelineObjRecordId:' + params.urlParams.timelineObjRecordId + ')';
273
523
  }
274
- function getResponseCacheKeys$2(luvio, resourceParams, response) {
275
- return getTypeCacheKeys$2(luvio, response, () => keyBuilder$5(luvio, resourceParams));
524
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
525
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
276
526
  }
277
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
527
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
278
528
  const { body } = response;
279
- const key = keyBuilder$5(luvio, resourceParams);
280
- luvio.storeIngest(key, ingest$2, body);
529
+ const key = keyBuilder$7(luvio, resourceParams);
530
+ luvio.storeIngest(key, ingest$3, body);
281
531
  const snapshot = luvio.storeLookup({
282
532
  recordId: key,
283
- node: select$4(),
533
+ node: select$6(),
284
534
  variables: {},
285
535
  }, snapshotRefresh);
286
536
  if (process.env.NODE_ENV !== 'production') {
@@ -291,101 +541,109 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
291
541
  deepFreeze(snapshot.data);
292
542
  return snapshot;
293
543
  }
294
- function ingestError$2(luvio, params, error, snapshotRefresh) {
295
- const key = keyBuilder$5(luvio, params);
544
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
545
+ const key = keyBuilder$7(luvio, params);
296
546
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
297
547
  const storeMetadataParams = {
298
- ttl: TTL$2,
548
+ ttl: TTL$3,
299
549
  namespace: keyPrefix,
300
- version: VERSION$2,
301
- representationName: RepresentationType$2
550
+ version: VERSION$3,
551
+ representationName: RepresentationType$3
302
552
  };
303
553
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
304
554
  return errorSnapshot;
305
555
  }
306
- function createResourceRequest$2(config) {
556
+ function createResourceRequest$3(config) {
307
557
  const headers = {};
308
558
  return {
309
559
  baseUri: '/services/data/v59.0',
310
- basePath: '/connect/timeline/cust-data-pfrm/data-model-objects',
560
+ basePath: '/connect/timeline/' + config.urlParams.timelineObjRecordId + '/timeline-definitions/' + config.urlParams.timelineConfigFullName + '/cust-data-pfrm/events',
311
561
  method: 'get',
312
562
  body: null,
313
- urlParams: {},
314
- queryParams: config.queryParams,
563
+ urlParams: config.urlParams,
564
+ queryParams: {},
315
565
  headers,
316
566
  priority: 'normal',
317
567
  };
318
568
  }
319
569
 
320
- const getDataModelObjects_ConfigPropertyNames = {
321
- displayName: 'getDataModelObjects',
570
+ const getEngagementEvents_ConfigPropertyNames = {
571
+ displayName: 'getEngagementEvents',
322
572
  parameters: {
323
- required: [],
324
- optional: ['objectCategory']
573
+ required: ['timelineConfigFullName', 'timelineObjRecordId'],
574
+ optional: []
325
575
  }
326
576
  };
327
- function createResourceParams$2(config) {
577
+ function createResourceParams$3(config) {
328
578
  const resourceParams = {
329
- queryParams: {
330
- objectCategory: config.objectCategory
579
+ urlParams: {
580
+ timelineConfigFullName: config.timelineConfigFullName, timelineObjRecordId: config.timelineObjRecordId
331
581
  }
332
582
  };
333
583
  return resourceParams;
334
584
  }
335
- function keyBuilder$4(luvio, config) {
336
- const resourceParams = createResourceParams$2(config);
337
- return keyBuilder$5(luvio, resourceParams);
585
+ function keyBuilder$6(luvio, config) {
586
+ const resourceParams = createResourceParams$3(config);
587
+ return keyBuilder$7(luvio, resourceParams);
338
588
  }
339
- function typeCheckConfig$2(untrustedConfig) {
589
+ function typeCheckConfig$3(untrustedConfig) {
340
590
  const config = {};
341
- const untrustedConfig_objectCategory = untrustedConfig.objectCategory;
342
- if (typeof untrustedConfig_objectCategory === 'string') {
343
- config.objectCategory = untrustedConfig_objectCategory;
591
+ const untrustedConfig_timelineConfigFullName = untrustedConfig.timelineConfigFullName;
592
+ if (typeof untrustedConfig_timelineConfigFullName === 'string') {
593
+ config.timelineConfigFullName = untrustedConfig_timelineConfigFullName;
594
+ }
595
+ const untrustedConfig_timelineObjRecordId = untrustedConfig.timelineObjRecordId;
596
+ if (typeof untrustedConfig_timelineObjRecordId === 'string') {
597
+ config.timelineObjRecordId = untrustedConfig_timelineObjRecordId;
344
598
  }
345
599
  return config;
346
600
  }
347
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
601
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
348
602
  if (!untrustedIsObject(untrustedConfig)) {
349
603
  return null;
350
604
  }
351
605
  if (process.env.NODE_ENV !== 'production') {
352
606
  validateConfig(untrustedConfig, configPropertyNames);
353
607
  }
354
- const config = typeCheckConfig$2(untrustedConfig);
608
+ const config = typeCheckConfig$3(untrustedConfig);
355
609
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
356
610
  return null;
357
611
  }
358
612
  return config;
359
613
  }
360
- function adapterFragment$2(luvio, config) {
361
- createResourceParams$2(config);
362
- return select$4();
614
+ function adapterFragment$3(luvio, config) {
615
+ createResourceParams$3(config);
616
+ return select$6();
363
617
  }
364
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
365
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
618
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
619
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
366
620
  config,
367
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
621
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
368
622
  });
369
623
  return luvio.storeBroadcast().then(() => snapshot);
370
624
  }
371
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
372
- const snapshot = ingestError$2(luvio, resourceParams, response, {
625
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
626
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
373
627
  config,
374
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
628
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
375
629
  });
376
630
  return luvio.storeBroadcast().then(() => snapshot);
377
631
  }
378
- function buildNetworkSnapshot$2(luvio, config, options) {
379
- const resourceParams = createResourceParams$2(config);
380
- const request = createResourceRequest$2(resourceParams);
632
+ function buildNetworkSnapshot$3(luvio, config, options) {
633
+ const resourceParams = createResourceParams$3(config);
634
+ const request = createResourceRequest$3(resourceParams);
381
635
  return luvio.dispatchResourceRequest(request, options)
382
636
  .then((response) => {
383
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
637
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
638
+ const cache = new StoreKeyMap();
639
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
640
+ return cache;
641
+ });
384
642
  }, (response) => {
385
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
643
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
386
644
  });
387
645
  }
388
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
646
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
389
647
  const { luvio, config } = context;
390
648
  const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
391
649
  const dispatchOptions = {
@@ -400,450 +658,507 @@ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext
400
658
  priority: networkPriority
401
659
  };
402
660
  }
403
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
661
+ return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
404
662
  }
405
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
663
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
406
664
  const { luvio, config } = context;
407
665
  const selector = {
408
- recordId: keyBuilder$4(luvio, config),
409
- node: adapterFragment$2(luvio, config),
666
+ recordId: keyBuilder$6(luvio, config),
667
+ node: adapterFragment$3(luvio, config),
410
668
  variables: {},
411
669
  };
412
670
  const cacheSnapshot = storeLookup(selector, {
413
671
  config,
414
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
672
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
415
673
  });
416
674
  return cacheSnapshot;
417
675
  }
418
- const getDataModelObjectsAdapterFactory = (luvio) => function Timeline__getDataModelObjects(untrustedConfig, requestContext) {
419
- const config = validateAdapterConfig$2(untrustedConfig, getDataModelObjects_ConfigPropertyNames);
676
+ const getEngagementEventsAdapterFactory = (luvio) => function Timeline__getEngagementEvents(untrustedConfig, requestContext) {
677
+ const config = validateAdapterConfig$3(untrustedConfig, getEngagementEvents_ConfigPropertyNames);
420
678
  // Invalid or incomplete config
421
679
  if (config === null) {
422
680
  return null;
423
681
  }
424
682
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
425
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
683
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
426
684
  };
427
685
 
428
- function validate$9(obj, path = 'TimelineErrorRepresentation') {
686
+ const TTL$2 = 500;
687
+ const VERSION$2 = "fdc9f6f24a05bf6064b5dd39db6e4e4d";
688
+ function validate$a(obj, path = 'TimelineDataGetResultRepresentation') {
429
689
  const v_error = (() => {
430
690
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
431
691
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
432
692
  }
433
- const obj_code = obj.code;
434
- const path_code = path + '.code';
435
- let obj_code_union0 = null;
436
- const obj_code_union0_error = (() => {
437
- if (typeof obj_code !== 'string') {
438
- return new TypeError('Expected "string" but received "' + typeof obj_code + '" (at "' + path_code + '")');
693
+ if (obj.errors !== undefined) {
694
+ const obj_errors = obj.errors;
695
+ const path_errors = path + '.errors';
696
+ if (!ArrayIsArray(obj_errors)) {
697
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
698
+ }
699
+ for (let i = 0; i < obj_errors.length; i++) {
700
+ const obj_errors_item = obj_errors[i];
701
+ const path_errors_item = path_errors + '[' + i + ']';
702
+ const referencepath_errors_itemValidationError = validate$f(obj_errors_item, path_errors_item);
703
+ if (referencepath_errors_itemValidationError !== null) {
704
+ let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
705
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
706
+ return new TypeError(message);
707
+ }
439
708
  }
440
- })();
441
- if (obj_code_union0_error != null) {
442
- obj_code_union0 = obj_code_union0_error.message;
443
709
  }
444
- let obj_code_union1 = null;
445
- const obj_code_union1_error = (() => {
446
- if (obj_code !== null) {
447
- return new TypeError('Expected "null" but received "' + typeof obj_code + '" (at "' + path_code + '")');
448
- }
449
- })();
450
- if (obj_code_union1_error != null) {
451
- obj_code_union1 = obj_code_union1_error.message;
452
- }
453
- if (obj_code_union0 && obj_code_union1) {
454
- let message = 'Object doesn\'t match union (at "' + path_code + '")';
455
- message += '\n' + obj_code_union0.split('\n').map((line) => '\t' + line).join('\n');
456
- message += '\n' + obj_code_union1.split('\n').map((line) => '\t' + line).join('\n');
457
- return new TypeError(message);
458
- }
459
- const obj_message = obj.message;
460
- const path_message = path + '.message';
461
- let obj_message_union0 = null;
462
- const obj_message_union0_error = (() => {
463
- if (typeof obj_message !== 'string') {
464
- return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
710
+ if (obj.eventTypes !== undefined) {
711
+ const obj_eventTypes = obj.eventTypes;
712
+ const path_eventTypes = path + '.eventTypes';
713
+ if (!ArrayIsArray(obj_eventTypes)) {
714
+ return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
465
715
  }
466
- })();
467
- if (obj_message_union0_error != null) {
468
- obj_message_union0 = obj_message_union0_error.message;
469
- }
470
- let obj_message_union1 = null;
471
- const obj_message_union1_error = (() => {
472
- if (obj_message !== null) {
473
- return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
716
+ for (let i = 0; i < obj_eventTypes.length; i++) {
717
+ const obj_eventTypes_item = obj_eventTypes[i];
718
+ const path_eventTypes_item = path_eventTypes + '[' + i + ']';
719
+ const referencepath_eventTypes_itemValidationError = validate$e(obj_eventTypes_item, path_eventTypes_item);
720
+ if (referencepath_eventTypes_itemValidationError !== null) {
721
+ let message = 'Object doesn\'t match TimelineEventTypeRepresentation (at "' + path_eventTypes_item + '")\n';
722
+ message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
723
+ return new TypeError(message);
724
+ }
474
725
  }
475
- })();
476
- if (obj_message_union1_error != null) {
477
- obj_message_union1 = obj_message_union1_error.message;
478
- }
479
- if (obj_message_union0 && obj_message_union1) {
480
- let message = 'Object doesn\'t match union (at "' + path_message + '")';
481
- message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
482
- message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
483
- return new TypeError(message);
484
- }
485
- })();
486
- return v_error === undefined ? null : v_error;
487
- }
488
-
489
- function validate$8(obj, path = 'TimelineEventTypeRepresentation') {
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
726
  }
494
- const obj_eventApiName = obj.eventApiName;
495
- const path_eventApiName = path + '.eventApiName';
496
- let obj_eventApiName_union0 = null;
497
- const obj_eventApiName_union0_error = (() => {
498
- if (typeof obj_eventApiName !== 'string') {
499
- return new TypeError('Expected "string" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
727
+ if (obj.events !== undefined) {
728
+ const obj_events = obj.events;
729
+ const path_events = path + '.events';
730
+ if (!ArrayIsArray(obj_events)) {
731
+ return new TypeError('Expected "array" but received "' + typeof obj_events + '" (at "' + path_events + '")');
500
732
  }
501
- })();
502
- if (obj_eventApiName_union0_error != null) {
503
- obj_eventApiName_union0 = obj_eventApiName_union0_error.message;
504
- }
505
- let obj_eventApiName_union1 = null;
506
- const obj_eventApiName_union1_error = (() => {
507
- if (obj_eventApiName !== null) {
508
- return new TypeError('Expected "null" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
733
+ for (let i = 0; i < obj_events.length; i++) {
734
+ const obj_events_item = obj_events[i];
735
+ const path_events_item = path_events + '[' + i + ']';
736
+ const referencepath_events_itemValidationError = validate$c(obj_events_item, path_events_item);
737
+ if (referencepath_events_itemValidationError !== null) {
738
+ let message = 'Object doesn\'t match TimelineEventRepresentation (at "' + path_events_item + '")\n';
739
+ message += referencepath_events_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
740
+ return new TypeError(message);
741
+ }
509
742
  }
510
- })();
511
- if (obj_eventApiName_union1_error != null) {
512
- obj_eventApiName_union1 = obj_eventApiName_union1_error.message;
513
- }
514
- if (obj_eventApiName_union0 && obj_eventApiName_union1) {
515
- let message = 'Object doesn\'t match union (at "' + path_eventApiName + '")';
516
- message += '\n' + obj_eventApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
517
- message += '\n' + obj_eventApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
518
- return new TypeError(message);
519
743
  }
520
- const obj_offset = obj.offset;
521
- const path_offset = path + '.offset';
522
- let obj_offset_union0 = null;
523
- const obj_offset_union0_error = (() => {
524
- if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
525
- return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
744
+ if (obj.hasMoreData !== undefined) {
745
+ const obj_hasMoreData = obj.hasMoreData;
746
+ const path_hasMoreData = path + '.hasMoreData';
747
+ if (typeof obj_hasMoreData !== 'boolean') {
748
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreData + '" (at "' + path_hasMoreData + '")');
526
749
  }
527
- })();
528
- if (obj_offset_union0_error != null) {
529
- obj_offset_union0 = obj_offset_union0_error.message;
530
750
  }
531
- let obj_offset_union1 = null;
532
- const obj_offset_union1_error = (() => {
533
- if (obj_offset !== null) {
534
- return new TypeError('Expected "null" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
751
+ if (obj.isSuccess !== undefined) {
752
+ const obj_isSuccess = obj.isSuccess;
753
+ const path_isSuccess = path + '.isSuccess';
754
+ if (typeof obj_isSuccess !== 'boolean') {
755
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
535
756
  }
536
- })();
537
- if (obj_offset_union1_error != null) {
538
- obj_offset_union1 = obj_offset_union1_error.message;
539
- }
540
- if (obj_offset_union0 && obj_offset_union1) {
541
- let message = 'Object doesn\'t match union (at "' + path_offset + '")';
542
- message += '\n' + obj_offset_union0.split('\n').map((line) => '\t' + line).join('\n');
543
- message += '\n' + obj_offset_union1.split('\n').map((line) => '\t' + line).join('\n');
544
- return new TypeError(message);
545
757
  }
546
758
  })();
547
759
  return v_error === undefined ? null : v_error;
548
760
  }
549
-
550
- function validate$7(obj, path = 'TimelineEventFieldRepresentation') {
551
- const v_error = (() => {
552
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
553
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
554
- }
555
- const obj_name = obj.name;
556
- const path_name = path + '.name';
557
- let obj_name_union0 = null;
558
- const obj_name_union0_error = (() => {
559
- if (typeof obj_name !== 'string') {
560
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
561
- }
562
- })();
563
- if (obj_name_union0_error != null) {
564
- obj_name_union0 = obj_name_union0_error.message;
565
- }
566
- let obj_name_union1 = null;
567
- const obj_name_union1_error = (() => {
568
- if (obj_name !== null) {
569
- return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
570
- }
571
- })();
572
- if (obj_name_union1_error != null) {
573
- obj_name_union1 = obj_name_union1_error.message;
574
- }
575
- if (obj_name_union0 && obj_name_union1) {
576
- let message = 'Object doesn\'t match union (at "' + path_name + '")';
577
- message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
578
- message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
579
- return new TypeError(message);
580
- }
581
- const obj_value = obj.value;
582
- const path_value = path + '.value';
583
- let obj_value_union0 = null;
584
- const obj_value_union0_error = (() => {
585
- if (typeof obj_value !== 'string') {
586
- return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
587
- }
588
- })();
589
- if (obj_value_union0_error != null) {
590
- obj_value_union0 = obj_value_union0_error.message;
591
- }
592
- let obj_value_union1 = null;
593
- const obj_value_union1_error = (() => {
594
- if (obj_value !== null) {
595
- return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
596
- }
597
- })();
598
- if (obj_value_union1_error != null) {
599
- obj_value_union1 = obj_value_union1_error.message;
600
- }
601
- if (obj_value_union0 && obj_value_union1) {
602
- let message = 'Object doesn\'t match union (at "' + path_value + '")';
603
- message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
604
- message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
605
- return new TypeError(message);
761
+ const RepresentationType$2 = 'TimelineDataGetResultRepresentation';
762
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
763
+ return input;
764
+ }
765
+ const select$5 = function TimelineDataGetResultRepresentationSelect() {
766
+ return {
767
+ kind: 'Fragment',
768
+ version: VERSION$2,
769
+ private: [],
770
+ opaque: true
771
+ };
772
+ };
773
+ function equals$2(existing, incoming) {
774
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
775
+ return false;
776
+ }
777
+ return true;
778
+ }
779
+ const ingest$2 = function TimelineDataGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
780
+ if (process.env.NODE_ENV !== 'production') {
781
+ const validateError = validate$a(input);
782
+ if (validateError !== null) {
783
+ throw validateError;
606
784
  }
607
- })();
608
- return v_error === undefined ? null : v_error;
785
+ }
786
+ const key = path.fullPath;
787
+ const existingRecord = store.readEntry(key);
788
+ const ttlToUse = TTL$2;
789
+ let incomingRecord = normalize$2(input, store.readEntry(key), {
790
+ fullPath: key,
791
+ parent: path.parent,
792
+ propertyName: path.propertyName,
793
+ ttl: ttlToUse
794
+ });
795
+ if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
796
+ luvio.storePublish(key, incomingRecord);
797
+ }
798
+ {
799
+ const storeMetadataParams = {
800
+ ttl: ttlToUse,
801
+ namespace: "Timeline",
802
+ version: VERSION$2,
803
+ representationName: RepresentationType$2,
804
+ };
805
+ luvio.publishStoreMetadata(key, storeMetadataParams);
806
+ }
807
+ return createLink(key);
808
+ };
809
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
810
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
811
+ const rootKey = fullPathFactory();
812
+ rootKeySet.set(rootKey, {
813
+ namespace: keyPrefix,
814
+ representationName: RepresentationType$2,
815
+ mergeable: false
816
+ });
609
817
  }
610
818
 
611
- function validate$6(obj, path = 'TimelineEventRepresentation') {
612
- const v_error = (() => {
613
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
614
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
615
- }
616
- const obj_description = obj.description;
617
- const path_description = path + '.description';
618
- let obj_description_union0 = null;
619
- const obj_description_union0_error = (() => {
620
- if (typeof obj_description !== 'string') {
621
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
622
- }
623
- })();
624
- if (obj_description_union0_error != null) {
625
- obj_description_union0 = obj_description_union0_error.message;
626
- }
627
- let obj_description_union1 = null;
628
- const obj_description_union1_error = (() => {
629
- if (obj_description !== null) {
630
- return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
631
- }
632
- })();
633
- if (obj_description_union1_error != null) {
634
- obj_description_union1 = obj_description_union1_error.message;
635
- }
636
- if (obj_description_union0 && obj_description_union1) {
637
- let message = 'Object doesn\'t match union (at "' + path_description + '")';
638
- message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
639
- message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
640
- return new TypeError(message);
641
- }
642
- const obj_eventDateTime = obj.eventDateTime;
643
- const path_eventDateTime = path + '.eventDateTime';
644
- let obj_eventDateTime_union0 = null;
645
- const obj_eventDateTime_union0_error = (() => {
646
- if (typeof obj_eventDateTime !== 'string') {
647
- return new TypeError('Expected "string" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
648
- }
649
- })();
650
- if (obj_eventDateTime_union0_error != null) {
651
- obj_eventDateTime_union0 = obj_eventDateTime_union0_error.message;
652
- }
653
- let obj_eventDateTime_union1 = null;
654
- const obj_eventDateTime_union1_error = (() => {
655
- if (obj_eventDateTime !== null) {
656
- return new TypeError('Expected "null" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
657
- }
658
- })();
659
- if (obj_eventDateTime_union1_error != null) {
660
- obj_eventDateTime_union1 = obj_eventDateTime_union1_error.message;
661
- }
662
- if (obj_eventDateTime_union0 && obj_eventDateTime_union1) {
663
- let message = 'Object doesn\'t match union (at "' + path_eventDateTime + '")';
664
- message += '\n' + obj_eventDateTime_union0.split('\n').map((line) => '\t' + line).join('\n');
665
- message += '\n' + obj_eventDateTime_union1.split('\n').map((line) => '\t' + line).join('\n');
666
- return new TypeError(message);
667
- }
668
- if (obj.fields !== undefined) {
669
- const obj_fields = obj.fields;
670
- const path_fields = path + '.fields';
671
- if (!ArrayIsArray(obj_fields)) {
672
- return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
673
- }
674
- for (let i = 0; i < obj_fields.length; i++) {
675
- const obj_fields_item = obj_fields[i];
676
- const path_fields_item = path_fields + '[' + i + ']';
677
- const referencepath_fields_itemValidationError = validate$7(obj_fields_item, path_fields_item);
678
- if (referencepath_fields_itemValidationError !== null) {
679
- let message = 'Object doesn\'t match TimelineEventFieldRepresentation (at "' + path_fields_item + '")\n';
680
- message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
681
- return new TypeError(message);
682
- }
683
- }
684
- }
685
- const obj_id = obj.id;
686
- const path_id = path + '.id';
687
- let obj_id_union0 = null;
688
- const obj_id_union0_error = (() => {
689
- if (typeof obj_id !== 'string') {
690
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
691
- }
692
- })();
693
- if (obj_id_union0_error != null) {
694
- obj_id_union0 = obj_id_union0_error.message;
695
- }
696
- let obj_id_union1 = null;
697
- const obj_id_union1_error = (() => {
698
- if (obj_id !== null) {
699
- return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
700
- }
701
- })();
702
- if (obj_id_union1_error != null) {
703
- obj_id_union1 = obj_id_union1_error.message;
819
+ function select$4(luvio, params) {
820
+ return select$5();
821
+ }
822
+ function keyBuilder$5(luvio, params) {
823
+ 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 + ')';
824
+ }
825
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
826
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
827
+ }
828
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
829
+ const { body } = response;
830
+ const key = keyBuilder$5(luvio, resourceParams);
831
+ luvio.storeIngest(key, ingest$2, body);
832
+ const snapshot = luvio.storeLookup({
833
+ recordId: key,
834
+ node: select$4(),
835
+ variables: {},
836
+ }, snapshotRefresh);
837
+ if (process.env.NODE_ENV !== 'production') {
838
+ if (snapshot.state !== 'Fulfilled') {
839
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
704
840
  }
705
- if (obj_id_union0 && obj_id_union1) {
706
- let message = 'Object doesn\'t match union (at "' + path_id + '")';
707
- message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
708
- message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
709
- return new TypeError(message);
841
+ }
842
+ deepFreeze(snapshot.data);
843
+ return snapshot;
844
+ }
845
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
846
+ const key = keyBuilder$5(luvio, params);
847
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
848
+ const storeMetadataParams = {
849
+ ttl: TTL$2,
850
+ namespace: keyPrefix,
851
+ version: VERSION$2,
852
+ representationName: RepresentationType$2
853
+ };
854
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
855
+ return errorSnapshot;
856
+ }
857
+ function createResourceRequest$2(config) {
858
+ const headers = {};
859
+ return {
860
+ baseUri: '/services/data/v59.0',
861
+ basePath: '/connect/timeline/' + config.urlParams.timelineObjRecordId + '/timeline-definitions/' + config.urlParams.timelineConfigFullName + '/events',
862
+ method: 'get',
863
+ body: null,
864
+ urlParams: config.urlParams,
865
+ queryParams: config.queryParams,
866
+ headers,
867
+ priority: 'normal',
868
+ };
869
+ }
870
+
871
+ const getTimelineData_ConfigPropertyNames = {
872
+ displayName: 'getTimelineData',
873
+ parameters: {
874
+ required: ['timelineConfigFullName', 'timelineObjRecordId'],
875
+ optional: ['direction', 'endDate', 'eventTypeOffsets', 'eventTypes', 'startDate']
876
+ }
877
+ };
878
+ function createResourceParams$2(config) {
879
+ const resourceParams = {
880
+ urlParams: {
881
+ timelineConfigFullName: config.timelineConfigFullName, timelineObjRecordId: config.timelineObjRecordId
882
+ },
883
+ queryParams: {
884
+ direction: config.direction, endDate: config.endDate, eventTypeOffsets: config.eventTypeOffsets, eventTypes: config.eventTypes, startDate: config.startDate
710
885
  }
711
- const obj_title = obj.title;
712
- const path_title = path + '.title';
713
- let obj_title_union0 = null;
714
- const obj_title_union0_error = (() => {
715
- if (typeof obj_title !== 'string') {
716
- return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
717
- }
718
- })();
719
- if (obj_title_union0_error != null) {
720
- obj_title_union0 = obj_title_union0_error.message;
886
+ };
887
+ return resourceParams;
888
+ }
889
+ function keyBuilder$4(luvio, config) {
890
+ const resourceParams = createResourceParams$2(config);
891
+ return keyBuilder$5(luvio, resourceParams);
892
+ }
893
+ function typeCheckConfig$2(untrustedConfig) {
894
+ const config = {};
895
+ const untrustedConfig_timelineConfigFullName = untrustedConfig.timelineConfigFullName;
896
+ if (typeof untrustedConfig_timelineConfigFullName === 'string') {
897
+ config.timelineConfigFullName = untrustedConfig_timelineConfigFullName;
898
+ }
899
+ const untrustedConfig_timelineObjRecordId = untrustedConfig.timelineObjRecordId;
900
+ if (typeof untrustedConfig_timelineObjRecordId === 'string') {
901
+ config.timelineObjRecordId = untrustedConfig_timelineObjRecordId;
902
+ }
903
+ const untrustedConfig_direction = untrustedConfig.direction;
904
+ if (typeof untrustedConfig_direction === 'string') {
905
+ config.direction = untrustedConfig_direction;
906
+ }
907
+ const untrustedConfig_endDate = untrustedConfig.endDate;
908
+ if (typeof untrustedConfig_endDate === 'string') {
909
+ config.endDate = untrustedConfig_endDate;
910
+ }
911
+ const untrustedConfig_eventTypeOffsets = untrustedConfig.eventTypeOffsets;
912
+ if (typeof untrustedConfig_eventTypeOffsets === 'string') {
913
+ config.eventTypeOffsets = untrustedConfig_eventTypeOffsets;
914
+ }
915
+ const untrustedConfig_eventTypes = untrustedConfig.eventTypes;
916
+ if (typeof untrustedConfig_eventTypes === 'string') {
917
+ config.eventTypes = untrustedConfig_eventTypes;
918
+ }
919
+ const untrustedConfig_startDate = untrustedConfig.startDate;
920
+ if (typeof untrustedConfig_startDate === 'string') {
921
+ config.startDate = untrustedConfig_startDate;
922
+ }
923
+ return config;
924
+ }
925
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
926
+ if (!untrustedIsObject(untrustedConfig)) {
927
+ return null;
928
+ }
929
+ if (process.env.NODE_ENV !== 'production') {
930
+ validateConfig(untrustedConfig, configPropertyNames);
931
+ }
932
+ const config = typeCheckConfig$2(untrustedConfig);
933
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
934
+ return null;
935
+ }
936
+ return config;
937
+ }
938
+ function adapterFragment$2(luvio, config) {
939
+ createResourceParams$2(config);
940
+ return select$4();
941
+ }
942
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
943
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
944
+ config,
945
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
946
+ });
947
+ return luvio.storeBroadcast().then(() => snapshot);
948
+ }
949
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
950
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
951
+ config,
952
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
953
+ });
954
+ return luvio.storeBroadcast().then(() => snapshot);
955
+ }
956
+ function buildNetworkSnapshot$2(luvio, config, options) {
957
+ const resourceParams = createResourceParams$2(config);
958
+ const request = createResourceRequest$2(resourceParams);
959
+ return luvio.dispatchResourceRequest(request, options)
960
+ .then((response) => {
961
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
962
+ const cache = new StoreKeyMap();
963
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
964
+ return cache;
965
+ });
966
+ }, (response) => {
967
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
968
+ });
969
+ }
970
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
971
+ const { luvio, config } = context;
972
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
973
+ const dispatchOptions = {
974
+ resourceRequestContext: {
975
+ requestCorrelator,
976
+ luvioRequestMethod: undefined,
977
+ },
978
+ eventObservers
979
+ };
980
+ if (networkPriority !== 'normal') {
981
+ dispatchOptions.overrides = {
982
+ priority: networkPriority
983
+ };
984
+ }
985
+ return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
986
+ }
987
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
988
+ const { luvio, config } = context;
989
+ const selector = {
990
+ recordId: keyBuilder$4(luvio, config),
991
+ node: adapterFragment$2(luvio, config),
992
+ variables: {},
993
+ };
994
+ const cacheSnapshot = storeLookup(selector, {
995
+ config,
996
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
997
+ });
998
+ return cacheSnapshot;
999
+ }
1000
+ const getTimelineDataAdapterFactory = (luvio) => function Timeline__getTimelineData(untrustedConfig, requestContext) {
1001
+ const config = validateAdapterConfig$2(untrustedConfig, getTimelineData_ConfigPropertyNames);
1002
+ // Invalid or incomplete config
1003
+ if (config === null) {
1004
+ return null;
1005
+ }
1006
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1007
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1008
+ };
1009
+
1010
+ function validate$9(obj, path = 'DmoFieldsOutputRepresentation') {
1011
+ const v_error = (() => {
1012
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1013
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
721
1014
  }
722
- let obj_title_union1 = null;
723
- const obj_title_union1_error = (() => {
724
- if (obj_title !== null) {
725
- return new TypeError('Expected "null" but received "' + typeof obj_title + '" (at "' + path_title + '")');
726
- }
727
- })();
728
- if (obj_title_union1_error != null) {
729
- obj_title_union1 = obj_title_union1_error.message;
1015
+ const obj_displayName = obj.displayName;
1016
+ const path_displayName = path + '.displayName';
1017
+ if (typeof obj_displayName !== 'string') {
1018
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
730
1019
  }
731
- if (obj_title_union0 && obj_title_union1) {
732
- let message = 'Object doesn\'t match union (at "' + path_title + '")';
733
- message += '\n' + obj_title_union0.split('\n').map((line) => '\t' + line).join('\n');
734
- message += '\n' + obj_title_union1.split('\n').map((line) => '\t' + line).join('\n');
735
- return new TypeError(message);
1020
+ const obj_name = obj.name;
1021
+ const path_name = path + '.name';
1022
+ if (typeof obj_name !== 'string') {
1023
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
736
1024
  }
737
1025
  const obj_type = obj.type;
738
1026
  const path_type = path + '.type';
739
- let obj_type_union0 = null;
740
- const obj_type_union0_error = (() => {
741
- if (typeof obj_type !== 'string') {
742
- return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
743
- }
744
- })();
745
- if (obj_type_union0_error != null) {
746
- obj_type_union0 = obj_type_union0_error.message;
1027
+ if (typeof obj_type !== 'string') {
1028
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
747
1029
  }
748
- let obj_type_union1 = null;
749
- const obj_type_union1_error = (() => {
750
- if (obj_type !== null) {
751
- return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
752
- }
753
- })();
754
- if (obj_type_union1_error != null) {
755
- obj_type_union1 = obj_type_union1_error.message;
1030
+ })();
1031
+ return v_error === undefined ? null : v_error;
1032
+ }
1033
+
1034
+ function validate$8(obj, path = 'RelationshipTypeOutputRepresentation') {
1035
+ const v_error = (() => {
1036
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1037
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
756
1038
  }
757
- if (obj_type_union0 && obj_type_union1) {
758
- let message = 'Object doesn\'t match union (at "' + path_type + '")';
759
- message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
760
- message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
1039
+ const obj_attribute = obj.attribute;
1040
+ const path_attribute = path + '.attribute';
1041
+ if (typeof obj_attribute !== 'string') {
1042
+ return new TypeError('Expected "string" but received "' + typeof obj_attribute + '" (at "' + path_attribute + '")');
1043
+ }
1044
+ const obj_name = obj.name;
1045
+ const path_name = path + '.name';
1046
+ if (typeof obj_name !== 'string') {
1047
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1048
+ }
1049
+ })();
1050
+ return v_error === undefined ? null : v_error;
1051
+ }
1052
+
1053
+ function validate$7(obj, path = 'DmoRelationshipsOutputRepresentation') {
1054
+ const v_error = (() => {
1055
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1056
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1057
+ }
1058
+ const obj_fromEntity = obj.fromEntity;
1059
+ const path_fromEntity = path + '.fromEntity';
1060
+ const referencepath_fromEntityValidationError = validate$8(obj_fromEntity, path_fromEntity);
1061
+ if (referencepath_fromEntityValidationError !== null) {
1062
+ let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_fromEntity + '")\n';
1063
+ message += referencepath_fromEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1064
+ return new TypeError(message);
1065
+ }
1066
+ const obj_toEntity = obj.toEntity;
1067
+ const path_toEntity = path + '.toEntity';
1068
+ const referencepath_toEntityValidationError = validate$8(obj_toEntity, path_toEntity);
1069
+ if (referencepath_toEntityValidationError !== null) {
1070
+ let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_toEntity + '")\n';
1071
+ message += referencepath_toEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
761
1072
  return new TypeError(message);
762
1073
  }
763
1074
  })();
764
1075
  return v_error === undefined ? null : v_error;
765
1076
  }
766
1077
 
767
- const TTL$1 = 500;
768
- const VERSION$1 = "fdc9f6f24a05bf6064b5dd39db6e4e4d";
769
- function validate$5(obj, path = 'TimelineDataGetResultRepresentation') {
1078
+ function validate$6(obj, path = 'DmoOutputRepresentation') {
770
1079
  const v_error = (() => {
771
1080
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
772
1081
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
773
1082
  }
774
- if (obj.errors !== undefined) {
775
- const obj_errors = obj.errors;
776
- const path_errors = path + '.errors';
777
- if (!ArrayIsArray(obj_errors)) {
778
- return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
779
- }
780
- for (let i = 0; i < obj_errors.length; i++) {
781
- const obj_errors_item = obj_errors[i];
782
- const path_errors_item = path_errors + '[' + i + ']';
783
- const referencepath_errors_itemValidationError = validate$9(obj_errors_item, path_errors_item);
784
- if (referencepath_errors_itemValidationError !== null) {
785
- let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
786
- message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
787
- return new TypeError(message);
788
- }
789
- }
1083
+ const obj_category = obj.category;
1084
+ const path_category = path + '.category';
1085
+ if (typeof obj_category !== 'string') {
1086
+ return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
790
1087
  }
791
- if (obj.eventTypes !== undefined) {
792
- const obj_eventTypes = obj.eventTypes;
793
- const path_eventTypes = path + '.eventTypes';
794
- if (!ArrayIsArray(obj_eventTypes)) {
795
- return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
796
- }
797
- for (let i = 0; i < obj_eventTypes.length; i++) {
798
- const obj_eventTypes_item = obj_eventTypes[i];
799
- const path_eventTypes_item = path_eventTypes + '[' + i + ']';
800
- const referencepath_eventTypes_itemValidationError = validate$8(obj_eventTypes_item, path_eventTypes_item);
801
- if (referencepath_eventTypes_itemValidationError !== null) {
802
- let message = 'Object doesn\'t match TimelineEventTypeRepresentation (at "' + path_eventTypes_item + '")\n';
803
- message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
804
- return new TypeError(message);
805
- }
806
- }
1088
+ const obj_displayName = obj.displayName;
1089
+ const path_displayName = path + '.displayName';
1090
+ if (typeof obj_displayName !== 'string') {
1091
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
807
1092
  }
808
- if (obj.events !== undefined) {
809
- const obj_events = obj.events;
810
- const path_events = path + '.events';
811
- if (!ArrayIsArray(obj_events)) {
812
- return new TypeError('Expected "array" but received "' + typeof obj_events + '" (at "' + path_events + '")');
813
- }
814
- for (let i = 0; i < obj_events.length; i++) {
815
- const obj_events_item = obj_events[i];
816
- const path_events_item = path_events + '[' + i + ']';
817
- const referencepath_events_itemValidationError = validate$6(obj_events_item, path_events_item);
818
- if (referencepath_events_itemValidationError !== null) {
819
- let message = 'Object doesn\'t match TimelineEventRepresentation (at "' + path_events_item + '")\n';
820
- message += referencepath_events_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
821
- return new TypeError(message);
822
- }
1093
+ const obj_fields = obj.fields;
1094
+ const path_fields = path + '.fields';
1095
+ if (!ArrayIsArray(obj_fields)) {
1096
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
1097
+ }
1098
+ for (let i = 0; i < obj_fields.length; i++) {
1099
+ const obj_fields_item = obj_fields[i];
1100
+ const path_fields_item = path_fields + '[' + i + ']';
1101
+ const referencepath_fields_itemValidationError = validate$9(obj_fields_item, path_fields_item);
1102
+ if (referencepath_fields_itemValidationError !== null) {
1103
+ let message = 'Object doesn\'t match DmoFieldsOutputRepresentation (at "' + path_fields_item + '")\n';
1104
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1105
+ return new TypeError(message);
823
1106
  }
824
1107
  }
825
- if (obj.hasMoreData !== undefined) {
826
- const obj_hasMoreData = obj.hasMoreData;
827
- const path_hasMoreData = path + '.hasMoreData';
828
- if (typeof obj_hasMoreData !== 'boolean') {
829
- return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreData + '" (at "' + path_hasMoreData + '")');
1108
+ const obj_name = obj.name;
1109
+ const path_name = path + '.name';
1110
+ if (typeof obj_name !== 'string') {
1111
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1112
+ }
1113
+ const obj_relationships = obj.relationships;
1114
+ const path_relationships = path + '.relationships';
1115
+ if (!ArrayIsArray(obj_relationships)) {
1116
+ return new TypeError('Expected "array" but received "' + typeof obj_relationships + '" (at "' + path_relationships + '")');
1117
+ }
1118
+ for (let i = 0; i < obj_relationships.length; i++) {
1119
+ const obj_relationships_item = obj_relationships[i];
1120
+ const path_relationships_item = path_relationships + '[' + i + ']';
1121
+ const referencepath_relationships_itemValidationError = validate$7(obj_relationships_item, path_relationships_item);
1122
+ if (referencepath_relationships_itemValidationError !== null) {
1123
+ let message = 'Object doesn\'t match DmoRelationshipsOutputRepresentation (at "' + path_relationships_item + '")\n';
1124
+ message += referencepath_relationships_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1125
+ return new TypeError(message);
830
1126
  }
831
1127
  }
832
- if (obj.isSuccess !== undefined) {
833
- const obj_isSuccess = obj.isSuccess;
834
- const path_isSuccess = path + '.isSuccess';
835
- if (typeof obj_isSuccess !== 'boolean') {
836
- return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1128
+ })();
1129
+ return v_error === undefined ? null : v_error;
1130
+ }
1131
+
1132
+ const TTL$1 = 600000;
1133
+ const VERSION$1 = "84ccc17f91013e292e7b01a291dd0322";
1134
+ function validate$5(obj, path = 'CdpMetadataOutputRepresentation') {
1135
+ const v_error = (() => {
1136
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1137
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1138
+ }
1139
+ const obj_dmos = obj.dmos;
1140
+ const path_dmos = path + '.dmos';
1141
+ if (!ArrayIsArray(obj_dmos)) {
1142
+ return new TypeError('Expected "array" but received "' + typeof obj_dmos + '" (at "' + path_dmos + '")');
1143
+ }
1144
+ for (let i = 0; i < obj_dmos.length; i++) {
1145
+ const obj_dmos_item = obj_dmos[i];
1146
+ const path_dmos_item = path_dmos + '[' + i + ']';
1147
+ const referencepath_dmos_itemValidationError = validate$6(obj_dmos_item, path_dmos_item);
1148
+ if (referencepath_dmos_itemValidationError !== null) {
1149
+ let message = 'Object doesn\'t match DmoOutputRepresentation (at "' + path_dmos_item + '")\n';
1150
+ message += referencepath_dmos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1151
+ return new TypeError(message);
837
1152
  }
838
1153
  }
839
1154
  })();
840
1155
  return v_error === undefined ? null : v_error;
841
1156
  }
842
- const RepresentationType$1 = 'TimelineDataGetResultRepresentation';
1157
+ const RepresentationType$1 = 'CdpMetadataOutputRepresentation';
843
1158
  function normalize$1(input, existing, path, luvio, store, timestamp) {
844
1159
  return input;
845
1160
  }
846
- const select$3 = function TimelineDataGetResultRepresentationSelect() {
1161
+ const select$3 = function CdpMetadataOutputRepresentationSelect() {
847
1162
  return {
848
1163
  kind: 'Fragment',
849
1164
  version: VERSION$1,
@@ -857,7 +1172,7 @@ function equals$1(existing, incoming) {
857
1172
  }
858
1173
  return true;
859
1174
  }
860
- const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
1175
+ const ingest$1 = function CdpMetadataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
861
1176
  if (process.env.NODE_ENV !== 'production') {
862
1177
  const validateError = validate$5(input);
863
1178
  if (validateError !== null) {
@@ -887,8 +1202,7 @@ const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path,
887
1202
  }
888
1203
  return createLink(key);
889
1204
  };
890
- function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
891
- const rootKeySet = new StoreKeyMap();
1205
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
892
1206
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
893
1207
  const rootKey = fullPathFactory();
894
1208
  rootKeySet.set(rootKey, {
@@ -896,17 +1210,16 @@ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
896
1210
  representationName: RepresentationType$1,
897
1211
  mergeable: false
898
1212
  });
899
- return rootKeySet;
900
1213
  }
901
1214
 
902
1215
  function select$2(luvio, params) {
903
1216
  return select$3();
904
1217
  }
905
1218
  function keyBuilder$3(luvio, params) {
906
- 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 + ')';
1219
+ return keyPrefix + '::CdpMetadataOutputRepresentation:(' + 'objectCategory:' + params.queryParams.objectCategory + ')';
907
1220
  }
908
- function getResponseCacheKeys$1(luvio, resourceParams, response) {
909
- return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
1221
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1222
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
910
1223
  }
911
1224
  function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
912
1225
  const { body } = response;
@@ -941,30 +1254,27 @@ function createResourceRequest$1(config) {
941
1254
  const headers = {};
942
1255
  return {
943
1256
  baseUri: '/services/data/v59.0',
944
- basePath: '/connect/timeline/' + config.urlParams.timelineObjRecordId + '/timeline-definitions/' + config.urlParams.timelineConfigFullName + '/events',
1257
+ basePath: '/connect/timeline/cust-data-pfrm/data-model-objects',
945
1258
  method: 'get',
946
1259
  body: null,
947
- urlParams: config.urlParams,
1260
+ urlParams: {},
948
1261
  queryParams: config.queryParams,
949
1262
  headers,
950
1263
  priority: 'normal',
951
1264
  };
952
1265
  }
953
1266
 
954
- const getTimelineData_ConfigPropertyNames = {
955
- displayName: 'getTimelineData',
1267
+ const getDataModelObjects_ConfigPropertyNames = {
1268
+ displayName: 'getDataModelObjects',
956
1269
  parameters: {
957
- required: ['timelineConfigFullName', 'timelineObjRecordId'],
958
- optional: ['direction', 'endDate', 'eventTypeOffsets', 'eventTypes', 'startDate']
1270
+ required: [],
1271
+ optional: ['objectCategory']
959
1272
  }
960
1273
  };
961
1274
  function createResourceParams$1(config) {
962
1275
  const resourceParams = {
963
- urlParams: {
964
- timelineConfigFullName: config.timelineConfigFullName, timelineObjRecordId: config.timelineObjRecordId
965
- },
966
1276
  queryParams: {
967
- direction: config.direction, endDate: config.endDate, eventTypeOffsets: config.eventTypeOffsets, eventTypes: config.eventTypes, startDate: config.startDate
1277
+ objectCategory: config.objectCategory
968
1278
  }
969
1279
  };
970
1280
  return resourceParams;
@@ -975,33 +1285,9 @@ function keyBuilder$2(luvio, config) {
975
1285
  }
976
1286
  function typeCheckConfig$1(untrustedConfig) {
977
1287
  const config = {};
978
- const untrustedConfig_timelineConfigFullName = untrustedConfig.timelineConfigFullName;
979
- if (typeof untrustedConfig_timelineConfigFullName === 'string') {
980
- config.timelineConfigFullName = untrustedConfig_timelineConfigFullName;
981
- }
982
- const untrustedConfig_timelineObjRecordId = untrustedConfig.timelineObjRecordId;
983
- if (typeof untrustedConfig_timelineObjRecordId === 'string') {
984
- config.timelineObjRecordId = untrustedConfig_timelineObjRecordId;
985
- }
986
- const untrustedConfig_direction = untrustedConfig.direction;
987
- if (typeof untrustedConfig_direction === 'string') {
988
- config.direction = untrustedConfig_direction;
989
- }
990
- const untrustedConfig_endDate = untrustedConfig.endDate;
991
- if (typeof untrustedConfig_endDate === 'string') {
992
- config.endDate = untrustedConfig_endDate;
993
- }
994
- const untrustedConfig_eventTypeOffsets = untrustedConfig.eventTypeOffsets;
995
- if (typeof untrustedConfig_eventTypeOffsets === 'string') {
996
- config.eventTypeOffsets = untrustedConfig_eventTypeOffsets;
997
- }
998
- const untrustedConfig_eventTypes = untrustedConfig.eventTypes;
999
- if (typeof untrustedConfig_eventTypes === 'string') {
1000
- config.eventTypes = untrustedConfig_eventTypes;
1001
- }
1002
- const untrustedConfig_startDate = untrustedConfig.startDate;
1003
- if (typeof untrustedConfig_startDate === 'string') {
1004
- config.startDate = untrustedConfig_startDate;
1288
+ const untrustedConfig_objectCategory = untrustedConfig.objectCategory;
1289
+ if (typeof untrustedConfig_objectCategory === 'string') {
1290
+ config.objectCategory = untrustedConfig_objectCategory;
1005
1291
  }
1006
1292
  return config;
1007
1293
  }
@@ -1041,7 +1327,11 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1041
1327
  const request = createResourceRequest$1(resourceParams);
1042
1328
  return luvio.dispatchResourceRequest(request, options)
1043
1329
  .then((response) => {
1044
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
1330
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1331
+ const cache = new StoreKeyMap();
1332
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1333
+ return cache;
1334
+ });
1045
1335
  }, (response) => {
1046
1336
  return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1047
1337
  });
@@ -1076,8 +1366,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1076
1366
  });
1077
1367
  return cacheSnapshot;
1078
1368
  }
1079
- const getTimelineDataAdapterFactory = (luvio) => function Timeline__getTimelineData(untrustedConfig, requestContext) {
1080
- const config = validateAdapterConfig$1(untrustedConfig, getTimelineData_ConfigPropertyNames);
1369
+ const getDataModelObjectsAdapterFactory = (luvio) => function Timeline__getDataModelObjects(untrustedConfig, requestContext) {
1370
+ const config = validateAdapterConfig$1(untrustedConfig, getDataModelObjects_ConfigPropertyNames);
1081
1371
  // Invalid or incomplete config
1082
1372
  if (config === null) {
1083
1373
  return null;
@@ -1608,7 +1898,7 @@ function validate(obj, path = 'TimelineMetadataResultRepresentation') {
1608
1898
  for (let i = 0; i < obj_errors.length; i++) {
1609
1899
  const obj_errors_item = obj_errors[i];
1610
1900
  const path_errors_item = path_errors + '[' + i + ']';
1611
- const referencepath_errors_itemValidationError = validate$9(obj_errors_item, path_errors_item);
1901
+ const referencepath_errors_itemValidationError = validate$f(obj_errors_item, path_errors_item);
1612
1902
  if (referencepath_errors_itemValidationError !== null) {
1613
1903
  let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
1614
1904
  message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1693,8 +1983,7 @@ const ingest = function TimelineMetadataResultRepresentationIngest(input, path,
1693
1983
  }
1694
1984
  return createLink(key);
1695
1985
  };
1696
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
1697
- const rootKeySet = new StoreKeyMap();
1986
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1698
1987
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1699
1988
  const rootKey = fullPathFactory();
1700
1989
  rootKeySet.set(rootKey, {
@@ -1702,7 +1991,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
1702
1991
  representationName: RepresentationType,
1703
1992
  mergeable: false
1704
1993
  });
1705
- return rootKeySet;
1706
1994
  }
1707
1995
 
1708
1996
  function select(luvio, params) {
@@ -1711,8 +1999,8 @@ function select(luvio, params) {
1711
1999
  function keyBuilder$1(luvio, params) {
1712
2000
  return keyPrefix + '::TimelineMetadataResultRepresentation:(' + 'fullNames:' + params.queryParams.fullNames + ')';
1713
2001
  }
1714
- function getResponseCacheKeys(luvio, resourceParams, response) {
1715
- return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
2002
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
2003
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1716
2004
  }
1717
2005
  function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1718
2006
  const { body } = response;
@@ -1827,7 +2115,11 @@ function buildNetworkSnapshot(luvio, config, options) {
1827
2115
  const request = createResourceRequest(resourceParams);
1828
2116
  return luvio.dispatchResourceRequest(request, options)
1829
2117
  .then((response) => {
1830
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
2118
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
2119
+ const cache = new StoreKeyMap();
2120
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
2121
+ return cache;
2122
+ });
1831
2123
  }, (response) => {
1832
2124
  return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1833
2125
  });
@@ -1872,4 +2164,4 @@ const getTimelineMetadataAdapterFactory = (luvio) => function Timeline__getTimel
1872
2164
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1873
2165
  };
1874
2166
 
1875
- export { getDataModelObjectsAdapterFactory, getTimelineDataAdapterFactory, getTimelineMetadataAdapterFactory };
2167
+ export { getDataModelObjectsAdapterFactory, getEngagementEventsAdapterFactory, getTimelineDataAdapterFactory, getTimelineMetadataAdapterFactory };