@salesforce/lds-adapters-industries-timeline 1.124.2 → 1.124.4

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 (24) hide show
  1. package/dist/es/es2018/industries-timeline.js +1590 -1590
  2. package/dist/{types → es/es2018/types}/src/generated/adapters/adapter-utils.d.ts +66 -66
  3. package/dist/{types → es/es2018/types}/src/generated/adapters/getTimelineData.d.ts +32 -32
  4. package/dist/{types → es/es2018/types}/src/generated/adapters/getTimelineMetadata.d.ts +26 -26
  5. package/dist/{types → es/es2018/types}/src/generated/artifacts/main.d.ts +2 -2
  6. package/dist/{types → es/es2018/types}/src/generated/artifacts/sfdc.d.ts +5 -5
  7. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectTimelineMetadataConfigurations.d.ts +15 -15
  8. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectTimelineTimelineDefinitionsEventsByTimelineConfigFullNameAndTimelineObjRecordId.d.ts +23 -23
  9. package/dist/{types → es/es2018/types}/src/generated/types/TimelineDataGetResultRepresentation.d.ts +45 -45
  10. package/dist/{types → es/es2018/types}/src/generated/types/TimelineElementRepresentation.d.ts +35 -35
  11. package/dist/{types → es/es2018/types}/src/generated/types/TimelineEntityRepresentation.d.ts +44 -44
  12. package/dist/{types → es/es2018/types}/src/generated/types/TimelineErrorRepresentation.d.ts +32 -32
  13. package/dist/{types → es/es2018/types}/src/generated/types/TimelineEventFieldRepresentation.d.ts +32 -32
  14. package/dist/{types → es/es2018/types}/src/generated/types/TimelineEventRepresentation.d.ts +45 -45
  15. package/dist/{types → es/es2018/types}/src/generated/types/TimelineEventTypeMetadataRepresentation.d.ts +50 -50
  16. package/dist/{types → es/es2018/types}/src/generated/types/TimelineEventTypeRepresentation.d.ts +32 -32
  17. package/dist/{types → es/es2018/types}/src/generated/types/TimelineMetadataDefinitionRepresentation.d.ts +42 -42
  18. package/dist/{types → es/es2018/types}/src/generated/types/TimelineMetadataResultRepresentation.d.ts +38 -38
  19. package/dist/{types → es/es2018/types}/src/generated/types/type-utils.d.ts +39 -39
  20. package/package.json +5 -5
  21. package/sfdc/index.d.ts +1 -1
  22. package/sfdc/index.js +1618 -1618
  23. package/dist/umd/es2018/industries-timeline.js +0 -1640
  24. package/dist/umd/es5/industries-timeline.js +0 -1650
@@ -6,1626 +6,1626 @@
6
6
 
7
7
  import { serializeStructuredKey, StoreKeyMap } from '@luvio/engine';
8
8
 
9
- const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
- const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
11
- const { isArray: ArrayIsArray$1 } = Array;
12
- /**
13
- * Validates an adapter config is well-formed.
14
- * @param config The config to validate.
15
- * @param adapter The adapter validation configuration.
16
- * @param oneOf The keys the config must contain at least one of.
17
- * @throws A TypeError if config doesn't satisfy the adapter's config validation.
18
- */
19
- function validateConfig(config, adapter, oneOf) {
20
- const { displayName } = adapter;
21
- const { required, optional, unsupported } = adapter.parameters;
22
- if (config === undefined ||
23
- required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
24
- throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
25
- }
26
- if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
27
- throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
28
- }
29
- if (unsupported !== undefined &&
30
- unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
31
- throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
- }
33
- const supported = required.concat(optional);
34
- if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
35
- throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
- }
37
- }
38
- function untrustedIsObject(untrusted) {
39
- return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
40
- }
41
- function areRequiredParametersPresent(config, configPropertyNames) {
42
- return configPropertyNames.parameters.required.every(req => req in config);
43
- }
44
- const snapshotRefreshOptions = {
45
- overrides: {
46
- headers: {
47
- 'Cache-Control': 'no-cache',
48
- },
49
- }
50
- };
9
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
+ const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
11
+ const { isArray: ArrayIsArray$1 } = Array;
12
+ /**
13
+ * Validates an adapter config is well-formed.
14
+ * @param config The config to validate.
15
+ * @param adapter The adapter validation configuration.
16
+ * @param oneOf The keys the config must contain at least one of.
17
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
18
+ */
19
+ function validateConfig(config, adapter, oneOf) {
20
+ const { displayName } = adapter;
21
+ const { required, optional, unsupported } = adapter.parameters;
22
+ if (config === undefined ||
23
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
24
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
25
+ }
26
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
27
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
28
+ }
29
+ if (unsupported !== undefined &&
30
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
31
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
+ }
33
+ const supported = required.concat(optional);
34
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
35
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
+ }
37
+ }
38
+ function untrustedIsObject(untrusted) {
39
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
40
+ }
41
+ function areRequiredParametersPresent(config, configPropertyNames) {
42
+ return configPropertyNames.parameters.required.every(req => req in config);
43
+ }
44
+ const snapshotRefreshOptions = {
45
+ overrides: {
46
+ headers: {
47
+ 'Cache-Control': 'no-cache',
48
+ },
49
+ }
50
+ };
51
51
  const keyPrefix = 'Timeline';
52
52
 
53
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
- const { isArray: ArrayIsArray } = Array;
55
- const { stringify: JSONStringify } = JSON;
56
- function createLink(ref) {
57
- return {
58
- __ref: serializeStructuredKey(ref),
59
- };
53
+ const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
+ const { isArray: ArrayIsArray } = Array;
55
+ const { stringify: JSONStringify } = JSON;
56
+ function createLink(ref) {
57
+ return {
58
+ __ref: serializeStructuredKey(ref),
59
+ };
60
60
  }
61
61
 
62
- function validate$9(obj, path = 'TimelineErrorRepresentation') {
63
- const v_error = (() => {
64
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
65
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
66
- }
67
- const obj_code = obj.code;
68
- const path_code = path + '.code';
69
- let obj_code_union0 = null;
70
- const obj_code_union0_error = (() => {
71
- if (typeof obj_code !== 'string') {
72
- return new TypeError('Expected "string" but received "' + typeof obj_code + '" (at "' + path_code + '")');
73
- }
74
- })();
75
- if (obj_code_union0_error != null) {
76
- obj_code_union0 = obj_code_union0_error.message;
77
- }
78
- let obj_code_union1 = null;
79
- const obj_code_union1_error = (() => {
80
- if (obj_code !== null) {
81
- return new TypeError('Expected "null" but received "' + typeof obj_code + '" (at "' + path_code + '")');
82
- }
83
- })();
84
- if (obj_code_union1_error != null) {
85
- obj_code_union1 = obj_code_union1_error.message;
86
- }
87
- if (obj_code_union0 && obj_code_union1) {
88
- let message = 'Object doesn\'t match union (at "' + path_code + '")';
89
- message += '\n' + obj_code_union0.split('\n').map((line) => '\t' + line).join('\n');
90
- message += '\n' + obj_code_union1.split('\n').map((line) => '\t' + line).join('\n');
91
- return new TypeError(message);
92
- }
93
- const obj_message = obj.message;
94
- const path_message = path + '.message';
95
- let obj_message_union0 = null;
96
- const obj_message_union0_error = (() => {
97
- if (typeof obj_message !== 'string') {
98
- return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
99
- }
100
- })();
101
- if (obj_message_union0_error != null) {
102
- obj_message_union0 = obj_message_union0_error.message;
103
- }
104
- let obj_message_union1 = null;
105
- const obj_message_union1_error = (() => {
106
- if (obj_message !== null) {
107
- return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
108
- }
109
- })();
110
- if (obj_message_union1_error != null) {
111
- obj_message_union1 = obj_message_union1_error.message;
112
- }
113
- if (obj_message_union0 && obj_message_union1) {
114
- let message = 'Object doesn\'t match union (at "' + path_message + '")';
115
- message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
116
- message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
117
- return new TypeError(message);
118
- }
119
- })();
120
- return v_error === undefined ? null : v_error;
121
- }
122
- function deepFreeze$9(input) {
123
- ObjectFreeze(input);
62
+ function validate$9(obj, path = 'TimelineErrorRepresentation') {
63
+ const v_error = (() => {
64
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
65
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
66
+ }
67
+ const obj_code = obj.code;
68
+ const path_code = path + '.code';
69
+ let obj_code_union0 = null;
70
+ const obj_code_union0_error = (() => {
71
+ if (typeof obj_code !== 'string') {
72
+ return new TypeError('Expected "string" but received "' + typeof obj_code + '" (at "' + path_code + '")');
73
+ }
74
+ })();
75
+ if (obj_code_union0_error != null) {
76
+ obj_code_union0 = obj_code_union0_error.message;
77
+ }
78
+ let obj_code_union1 = null;
79
+ const obj_code_union1_error = (() => {
80
+ if (obj_code !== null) {
81
+ return new TypeError('Expected "null" but received "' + typeof obj_code + '" (at "' + path_code + '")');
82
+ }
83
+ })();
84
+ if (obj_code_union1_error != null) {
85
+ obj_code_union1 = obj_code_union1_error.message;
86
+ }
87
+ if (obj_code_union0 && obj_code_union1) {
88
+ let message = 'Object doesn\'t match union (at "' + path_code + '")';
89
+ message += '\n' + obj_code_union0.split('\n').map((line) => '\t' + line).join('\n');
90
+ message += '\n' + obj_code_union1.split('\n').map((line) => '\t' + line).join('\n');
91
+ return new TypeError(message);
92
+ }
93
+ const obj_message = obj.message;
94
+ const path_message = path + '.message';
95
+ let obj_message_union0 = null;
96
+ const obj_message_union0_error = (() => {
97
+ if (typeof obj_message !== 'string') {
98
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
99
+ }
100
+ })();
101
+ if (obj_message_union0_error != null) {
102
+ obj_message_union0 = obj_message_union0_error.message;
103
+ }
104
+ let obj_message_union1 = null;
105
+ const obj_message_union1_error = (() => {
106
+ if (obj_message !== null) {
107
+ return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
108
+ }
109
+ })();
110
+ if (obj_message_union1_error != null) {
111
+ obj_message_union1 = obj_message_union1_error.message;
112
+ }
113
+ if (obj_message_union0 && obj_message_union1) {
114
+ let message = 'Object doesn\'t match union (at "' + path_message + '")';
115
+ message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
116
+ message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
117
+ return new TypeError(message);
118
+ }
119
+ })();
120
+ return v_error === undefined ? null : v_error;
121
+ }
122
+ function deepFreeze$9(input) {
123
+ ObjectFreeze(input);
124
124
  }
125
125
 
126
- function validate$8(obj, path = 'TimelineEventTypeRepresentation') {
127
- const v_error = (() => {
128
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
129
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
130
- }
131
- const obj_eventApiName = obj.eventApiName;
132
- const path_eventApiName = path + '.eventApiName';
133
- let obj_eventApiName_union0 = null;
134
- const obj_eventApiName_union0_error = (() => {
135
- if (typeof obj_eventApiName !== 'string') {
136
- return new TypeError('Expected "string" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
137
- }
138
- })();
139
- if (obj_eventApiName_union0_error != null) {
140
- obj_eventApiName_union0 = obj_eventApiName_union0_error.message;
141
- }
142
- let obj_eventApiName_union1 = null;
143
- const obj_eventApiName_union1_error = (() => {
144
- if (obj_eventApiName !== null) {
145
- return new TypeError('Expected "null" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
146
- }
147
- })();
148
- if (obj_eventApiName_union1_error != null) {
149
- obj_eventApiName_union1 = obj_eventApiName_union1_error.message;
150
- }
151
- if (obj_eventApiName_union0 && obj_eventApiName_union1) {
152
- let message = 'Object doesn\'t match union (at "' + path_eventApiName + '")';
153
- message += '\n' + obj_eventApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
154
- message += '\n' + obj_eventApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
155
- return new TypeError(message);
156
- }
157
- const obj_offset = obj.offset;
158
- const path_offset = path + '.offset';
159
- let obj_offset_union0 = null;
160
- const obj_offset_union0_error = (() => {
161
- if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
162
- return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
163
- }
164
- })();
165
- if (obj_offset_union0_error != null) {
166
- obj_offset_union0 = obj_offset_union0_error.message;
167
- }
168
- let obj_offset_union1 = null;
169
- const obj_offset_union1_error = (() => {
170
- if (obj_offset !== null) {
171
- return new TypeError('Expected "null" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
172
- }
173
- })();
174
- if (obj_offset_union1_error != null) {
175
- obj_offset_union1 = obj_offset_union1_error.message;
176
- }
177
- if (obj_offset_union0 && obj_offset_union1) {
178
- let message = 'Object doesn\'t match union (at "' + path_offset + '")';
179
- message += '\n' + obj_offset_union0.split('\n').map((line) => '\t' + line).join('\n');
180
- message += '\n' + obj_offset_union1.split('\n').map((line) => '\t' + line).join('\n');
181
- return new TypeError(message);
182
- }
183
- })();
184
- return v_error === undefined ? null : v_error;
185
- }
186
- function deepFreeze$8(input) {
187
- ObjectFreeze(input);
126
+ function validate$8(obj, path = 'TimelineEventTypeRepresentation') {
127
+ const v_error = (() => {
128
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
129
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
130
+ }
131
+ const obj_eventApiName = obj.eventApiName;
132
+ const path_eventApiName = path + '.eventApiName';
133
+ let obj_eventApiName_union0 = null;
134
+ const obj_eventApiName_union0_error = (() => {
135
+ if (typeof obj_eventApiName !== 'string') {
136
+ return new TypeError('Expected "string" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
137
+ }
138
+ })();
139
+ if (obj_eventApiName_union0_error != null) {
140
+ obj_eventApiName_union0 = obj_eventApiName_union0_error.message;
141
+ }
142
+ let obj_eventApiName_union1 = null;
143
+ const obj_eventApiName_union1_error = (() => {
144
+ if (obj_eventApiName !== null) {
145
+ return new TypeError('Expected "null" but received "' + typeof obj_eventApiName + '" (at "' + path_eventApiName + '")');
146
+ }
147
+ })();
148
+ if (obj_eventApiName_union1_error != null) {
149
+ obj_eventApiName_union1 = obj_eventApiName_union1_error.message;
150
+ }
151
+ if (obj_eventApiName_union0 && obj_eventApiName_union1) {
152
+ let message = 'Object doesn\'t match union (at "' + path_eventApiName + '")';
153
+ message += '\n' + obj_eventApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
154
+ message += '\n' + obj_eventApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
155
+ return new TypeError(message);
156
+ }
157
+ const obj_offset = obj.offset;
158
+ const path_offset = path + '.offset';
159
+ let obj_offset_union0 = null;
160
+ const obj_offset_union0_error = (() => {
161
+ if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
162
+ return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
163
+ }
164
+ })();
165
+ if (obj_offset_union0_error != null) {
166
+ obj_offset_union0 = obj_offset_union0_error.message;
167
+ }
168
+ let obj_offset_union1 = null;
169
+ const obj_offset_union1_error = (() => {
170
+ if (obj_offset !== null) {
171
+ return new TypeError('Expected "null" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
172
+ }
173
+ })();
174
+ if (obj_offset_union1_error != null) {
175
+ obj_offset_union1 = obj_offset_union1_error.message;
176
+ }
177
+ if (obj_offset_union0 && obj_offset_union1) {
178
+ let message = 'Object doesn\'t match union (at "' + path_offset + '")';
179
+ message += '\n' + obj_offset_union0.split('\n').map((line) => '\t' + line).join('\n');
180
+ message += '\n' + obj_offset_union1.split('\n').map((line) => '\t' + line).join('\n');
181
+ return new TypeError(message);
182
+ }
183
+ })();
184
+ return v_error === undefined ? null : v_error;
185
+ }
186
+ function deepFreeze$8(input) {
187
+ ObjectFreeze(input);
188
188
  }
189
189
 
190
- function validate$7(obj, path = 'TimelineEventFieldRepresentation') {
191
- const v_error = (() => {
192
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
193
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
194
- }
195
- const obj_name = obj.name;
196
- const path_name = path + '.name';
197
- let obj_name_union0 = null;
198
- const obj_name_union0_error = (() => {
199
- if (typeof obj_name !== 'string') {
200
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
201
- }
202
- })();
203
- if (obj_name_union0_error != null) {
204
- obj_name_union0 = obj_name_union0_error.message;
205
- }
206
- let obj_name_union1 = null;
207
- const obj_name_union1_error = (() => {
208
- if (obj_name !== null) {
209
- return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
210
- }
211
- })();
212
- if (obj_name_union1_error != null) {
213
- obj_name_union1 = obj_name_union1_error.message;
214
- }
215
- if (obj_name_union0 && obj_name_union1) {
216
- let message = 'Object doesn\'t match union (at "' + path_name + '")';
217
- message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
218
- message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
219
- return new TypeError(message);
220
- }
221
- const obj_value = obj.value;
222
- const path_value = path + '.value';
223
- let obj_value_union0 = null;
224
- const obj_value_union0_error = (() => {
225
- if (typeof obj_value !== 'string') {
226
- return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
227
- }
228
- })();
229
- if (obj_value_union0_error != null) {
230
- obj_value_union0 = obj_value_union0_error.message;
231
- }
232
- let obj_value_union1 = null;
233
- const obj_value_union1_error = (() => {
234
- if (obj_value !== null) {
235
- return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
236
- }
237
- })();
238
- if (obj_value_union1_error != null) {
239
- obj_value_union1 = obj_value_union1_error.message;
240
- }
241
- if (obj_value_union0 && obj_value_union1) {
242
- let message = 'Object doesn\'t match union (at "' + path_value + '")';
243
- message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
244
- message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
245
- return new TypeError(message);
246
- }
247
- })();
248
- return v_error === undefined ? null : v_error;
249
- }
250
- function deepFreeze$7(input) {
251
- ObjectFreeze(input);
190
+ function validate$7(obj, path = 'TimelineEventFieldRepresentation') {
191
+ const v_error = (() => {
192
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
193
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
194
+ }
195
+ const obj_name = obj.name;
196
+ const path_name = path + '.name';
197
+ let obj_name_union0 = null;
198
+ const obj_name_union0_error = (() => {
199
+ if (typeof obj_name !== 'string') {
200
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
201
+ }
202
+ })();
203
+ if (obj_name_union0_error != null) {
204
+ obj_name_union0 = obj_name_union0_error.message;
205
+ }
206
+ let obj_name_union1 = null;
207
+ const obj_name_union1_error = (() => {
208
+ if (obj_name !== null) {
209
+ return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
210
+ }
211
+ })();
212
+ if (obj_name_union1_error != null) {
213
+ obj_name_union1 = obj_name_union1_error.message;
214
+ }
215
+ if (obj_name_union0 && obj_name_union1) {
216
+ let message = 'Object doesn\'t match union (at "' + path_name + '")';
217
+ message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
218
+ message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
219
+ return new TypeError(message);
220
+ }
221
+ const obj_value = obj.value;
222
+ const path_value = path + '.value';
223
+ let obj_value_union0 = null;
224
+ const obj_value_union0_error = (() => {
225
+ if (typeof obj_value !== 'string') {
226
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
227
+ }
228
+ })();
229
+ if (obj_value_union0_error != null) {
230
+ obj_value_union0 = obj_value_union0_error.message;
231
+ }
232
+ let obj_value_union1 = null;
233
+ const obj_value_union1_error = (() => {
234
+ if (obj_value !== null) {
235
+ return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
236
+ }
237
+ })();
238
+ if (obj_value_union1_error != null) {
239
+ obj_value_union1 = obj_value_union1_error.message;
240
+ }
241
+ if (obj_value_union0 && obj_value_union1) {
242
+ let message = 'Object doesn\'t match union (at "' + path_value + '")';
243
+ message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
244
+ message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
245
+ return new TypeError(message);
246
+ }
247
+ })();
248
+ return v_error === undefined ? null : v_error;
249
+ }
250
+ function deepFreeze$7(input) {
251
+ ObjectFreeze(input);
252
252
  }
253
253
 
254
- function validate$6(obj, path = 'TimelineEventRepresentation') {
255
- const v_error = (() => {
256
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
257
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
258
- }
259
- const obj_description = obj.description;
260
- const path_description = path + '.description';
261
- let obj_description_union0 = null;
262
- const obj_description_union0_error = (() => {
263
- if (typeof obj_description !== 'string') {
264
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
265
- }
266
- })();
267
- if (obj_description_union0_error != null) {
268
- obj_description_union0 = obj_description_union0_error.message;
269
- }
270
- let obj_description_union1 = null;
271
- const obj_description_union1_error = (() => {
272
- if (obj_description !== null) {
273
- return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
274
- }
275
- })();
276
- if (obj_description_union1_error != null) {
277
- obj_description_union1 = obj_description_union1_error.message;
278
- }
279
- if (obj_description_union0 && obj_description_union1) {
280
- let message = 'Object doesn\'t match union (at "' + path_description + '")';
281
- message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
282
- message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
283
- return new TypeError(message);
284
- }
285
- const obj_eventDateTime = obj.eventDateTime;
286
- const path_eventDateTime = path + '.eventDateTime';
287
- let obj_eventDateTime_union0 = null;
288
- const obj_eventDateTime_union0_error = (() => {
289
- if (typeof obj_eventDateTime !== 'string') {
290
- return new TypeError('Expected "string" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
291
- }
292
- })();
293
- if (obj_eventDateTime_union0_error != null) {
294
- obj_eventDateTime_union0 = obj_eventDateTime_union0_error.message;
295
- }
296
- let obj_eventDateTime_union1 = null;
297
- const obj_eventDateTime_union1_error = (() => {
298
- if (obj_eventDateTime !== null) {
299
- return new TypeError('Expected "null" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
300
- }
301
- })();
302
- if (obj_eventDateTime_union1_error != null) {
303
- obj_eventDateTime_union1 = obj_eventDateTime_union1_error.message;
304
- }
305
- if (obj_eventDateTime_union0 && obj_eventDateTime_union1) {
306
- let message = 'Object doesn\'t match union (at "' + path_eventDateTime + '")';
307
- message += '\n' + obj_eventDateTime_union0.split('\n').map((line) => '\t' + line).join('\n');
308
- message += '\n' + obj_eventDateTime_union1.split('\n').map((line) => '\t' + line).join('\n');
309
- return new TypeError(message);
310
- }
311
- if (obj.fields !== undefined) {
312
- const obj_fields = obj.fields;
313
- const path_fields = path + '.fields';
314
- if (!ArrayIsArray(obj_fields)) {
315
- return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
316
- }
317
- for (let i = 0; i < obj_fields.length; i++) {
318
- const obj_fields_item = obj_fields[i];
319
- const path_fields_item = path_fields + '[' + i + ']';
320
- const referencepath_fields_itemValidationError = validate$7(obj_fields_item, path_fields_item);
321
- if (referencepath_fields_itemValidationError !== null) {
322
- let message = 'Object doesn\'t match TimelineEventFieldRepresentation (at "' + path_fields_item + '")\n';
323
- message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
324
- return new TypeError(message);
325
- }
326
- }
327
- }
328
- const obj_id = obj.id;
329
- const path_id = path + '.id';
330
- let obj_id_union0 = null;
331
- const obj_id_union0_error = (() => {
332
- if (typeof obj_id !== 'string') {
333
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
334
- }
335
- })();
336
- if (obj_id_union0_error != null) {
337
- obj_id_union0 = obj_id_union0_error.message;
338
- }
339
- let obj_id_union1 = null;
340
- const obj_id_union1_error = (() => {
341
- if (obj_id !== null) {
342
- return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
343
- }
344
- })();
345
- if (obj_id_union1_error != null) {
346
- obj_id_union1 = obj_id_union1_error.message;
347
- }
348
- if (obj_id_union0 && obj_id_union1) {
349
- let message = 'Object doesn\'t match union (at "' + path_id + '")';
350
- message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
351
- message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
352
- return new TypeError(message);
353
- }
354
- const obj_title = obj.title;
355
- const path_title = path + '.title';
356
- let obj_title_union0 = null;
357
- const obj_title_union0_error = (() => {
358
- if (typeof obj_title !== 'string') {
359
- return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
360
- }
361
- })();
362
- if (obj_title_union0_error != null) {
363
- obj_title_union0 = obj_title_union0_error.message;
364
- }
365
- let obj_title_union1 = null;
366
- const obj_title_union1_error = (() => {
367
- if (obj_title !== null) {
368
- return new TypeError('Expected "null" but received "' + typeof obj_title + '" (at "' + path_title + '")');
369
- }
370
- })();
371
- if (obj_title_union1_error != null) {
372
- obj_title_union1 = obj_title_union1_error.message;
373
- }
374
- if (obj_title_union0 && obj_title_union1) {
375
- let message = 'Object doesn\'t match union (at "' + path_title + '")';
376
- message += '\n' + obj_title_union0.split('\n').map((line) => '\t' + line).join('\n');
377
- message += '\n' + obj_title_union1.split('\n').map((line) => '\t' + line).join('\n');
378
- return new TypeError(message);
379
- }
380
- const obj_type = obj.type;
381
- const path_type = path + '.type';
382
- let obj_type_union0 = null;
383
- const obj_type_union0_error = (() => {
384
- if (typeof obj_type !== 'string') {
385
- return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
386
- }
387
- })();
388
- if (obj_type_union0_error != null) {
389
- obj_type_union0 = obj_type_union0_error.message;
390
- }
391
- let obj_type_union1 = null;
392
- const obj_type_union1_error = (() => {
393
- if (obj_type !== null) {
394
- return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
395
- }
396
- })();
397
- if (obj_type_union1_error != null) {
398
- obj_type_union1 = obj_type_union1_error.message;
399
- }
400
- if (obj_type_union0 && obj_type_union1) {
401
- let message = 'Object doesn\'t match union (at "' + path_type + '")';
402
- message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
403
- message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
404
- return new TypeError(message);
405
- }
406
- })();
407
- return v_error === undefined ? null : v_error;
408
- }
409
- function deepFreeze$6(input) {
410
- const input_fields = input.fields;
411
- if (input_fields !== undefined) {
412
- for (let i = 0; i < input_fields.length; i++) {
413
- const input_fields_item = input_fields[i];
414
- deepFreeze$7(input_fields_item);
415
- }
416
- ObjectFreeze(input_fields);
417
- }
418
- ObjectFreeze(input);
254
+ function validate$6(obj, path = 'TimelineEventRepresentation') {
255
+ const v_error = (() => {
256
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
257
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
258
+ }
259
+ const obj_description = obj.description;
260
+ const path_description = path + '.description';
261
+ let obj_description_union0 = null;
262
+ const obj_description_union0_error = (() => {
263
+ if (typeof obj_description !== 'string') {
264
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
265
+ }
266
+ })();
267
+ if (obj_description_union0_error != null) {
268
+ obj_description_union0 = obj_description_union0_error.message;
269
+ }
270
+ let obj_description_union1 = null;
271
+ const obj_description_union1_error = (() => {
272
+ if (obj_description !== null) {
273
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
274
+ }
275
+ })();
276
+ if (obj_description_union1_error != null) {
277
+ obj_description_union1 = obj_description_union1_error.message;
278
+ }
279
+ if (obj_description_union0 && obj_description_union1) {
280
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
281
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
282
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
283
+ return new TypeError(message);
284
+ }
285
+ const obj_eventDateTime = obj.eventDateTime;
286
+ const path_eventDateTime = path + '.eventDateTime';
287
+ let obj_eventDateTime_union0 = null;
288
+ const obj_eventDateTime_union0_error = (() => {
289
+ if (typeof obj_eventDateTime !== 'string') {
290
+ return new TypeError('Expected "string" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
291
+ }
292
+ })();
293
+ if (obj_eventDateTime_union0_error != null) {
294
+ obj_eventDateTime_union0 = obj_eventDateTime_union0_error.message;
295
+ }
296
+ let obj_eventDateTime_union1 = null;
297
+ const obj_eventDateTime_union1_error = (() => {
298
+ if (obj_eventDateTime !== null) {
299
+ return new TypeError('Expected "null" but received "' + typeof obj_eventDateTime + '" (at "' + path_eventDateTime + '")');
300
+ }
301
+ })();
302
+ if (obj_eventDateTime_union1_error != null) {
303
+ obj_eventDateTime_union1 = obj_eventDateTime_union1_error.message;
304
+ }
305
+ if (obj_eventDateTime_union0 && obj_eventDateTime_union1) {
306
+ let message = 'Object doesn\'t match union (at "' + path_eventDateTime + '")';
307
+ message += '\n' + obj_eventDateTime_union0.split('\n').map((line) => '\t' + line).join('\n');
308
+ message += '\n' + obj_eventDateTime_union1.split('\n').map((line) => '\t' + line).join('\n');
309
+ return new TypeError(message);
310
+ }
311
+ if (obj.fields !== undefined) {
312
+ const obj_fields = obj.fields;
313
+ const path_fields = path + '.fields';
314
+ if (!ArrayIsArray(obj_fields)) {
315
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
316
+ }
317
+ for (let i = 0; i < obj_fields.length; i++) {
318
+ const obj_fields_item = obj_fields[i];
319
+ const path_fields_item = path_fields + '[' + i + ']';
320
+ const referencepath_fields_itemValidationError = validate$7(obj_fields_item, path_fields_item);
321
+ if (referencepath_fields_itemValidationError !== null) {
322
+ let message = 'Object doesn\'t match TimelineEventFieldRepresentation (at "' + path_fields_item + '")\n';
323
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
324
+ return new TypeError(message);
325
+ }
326
+ }
327
+ }
328
+ const obj_id = obj.id;
329
+ const path_id = path + '.id';
330
+ let obj_id_union0 = null;
331
+ const obj_id_union0_error = (() => {
332
+ if (typeof obj_id !== 'string') {
333
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
334
+ }
335
+ })();
336
+ if (obj_id_union0_error != null) {
337
+ obj_id_union0 = obj_id_union0_error.message;
338
+ }
339
+ let obj_id_union1 = null;
340
+ const obj_id_union1_error = (() => {
341
+ if (obj_id !== null) {
342
+ return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
343
+ }
344
+ })();
345
+ if (obj_id_union1_error != null) {
346
+ obj_id_union1 = obj_id_union1_error.message;
347
+ }
348
+ if (obj_id_union0 && obj_id_union1) {
349
+ let message = 'Object doesn\'t match union (at "' + path_id + '")';
350
+ message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
351
+ message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
352
+ return new TypeError(message);
353
+ }
354
+ const obj_title = obj.title;
355
+ const path_title = path + '.title';
356
+ let obj_title_union0 = null;
357
+ const obj_title_union0_error = (() => {
358
+ if (typeof obj_title !== 'string') {
359
+ return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
360
+ }
361
+ })();
362
+ if (obj_title_union0_error != null) {
363
+ obj_title_union0 = obj_title_union0_error.message;
364
+ }
365
+ let obj_title_union1 = null;
366
+ const obj_title_union1_error = (() => {
367
+ if (obj_title !== null) {
368
+ return new TypeError('Expected "null" but received "' + typeof obj_title + '" (at "' + path_title + '")');
369
+ }
370
+ })();
371
+ if (obj_title_union1_error != null) {
372
+ obj_title_union1 = obj_title_union1_error.message;
373
+ }
374
+ if (obj_title_union0 && obj_title_union1) {
375
+ let message = 'Object doesn\'t match union (at "' + path_title + '")';
376
+ message += '\n' + obj_title_union0.split('\n').map((line) => '\t' + line).join('\n');
377
+ message += '\n' + obj_title_union1.split('\n').map((line) => '\t' + line).join('\n');
378
+ return new TypeError(message);
379
+ }
380
+ const obj_type = obj.type;
381
+ const path_type = path + '.type';
382
+ let obj_type_union0 = null;
383
+ const obj_type_union0_error = (() => {
384
+ if (typeof obj_type !== 'string') {
385
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
386
+ }
387
+ })();
388
+ if (obj_type_union0_error != null) {
389
+ obj_type_union0 = obj_type_union0_error.message;
390
+ }
391
+ let obj_type_union1 = null;
392
+ const obj_type_union1_error = (() => {
393
+ if (obj_type !== null) {
394
+ return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
395
+ }
396
+ })();
397
+ if (obj_type_union1_error != null) {
398
+ obj_type_union1 = obj_type_union1_error.message;
399
+ }
400
+ if (obj_type_union0 && obj_type_union1) {
401
+ let message = 'Object doesn\'t match union (at "' + path_type + '")';
402
+ message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
403
+ message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
404
+ return new TypeError(message);
405
+ }
406
+ })();
407
+ return v_error === undefined ? null : v_error;
408
+ }
409
+ function deepFreeze$6(input) {
410
+ const input_fields = input.fields;
411
+ if (input_fields !== undefined) {
412
+ for (let i = 0; i < input_fields.length; i++) {
413
+ const input_fields_item = input_fields[i];
414
+ deepFreeze$7(input_fields_item);
415
+ }
416
+ ObjectFreeze(input_fields);
417
+ }
418
+ ObjectFreeze(input);
419
419
  }
420
420
 
421
- const TTL$1 = 500;
422
- const VERSION$1 = "fdc9f6f24a05bf6064b5dd39db6e4e4d";
423
- function validate$5(obj, path = 'TimelineDataGetResultRepresentation') {
424
- const v_error = (() => {
425
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
426
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
427
- }
428
- if (obj.errors !== undefined) {
429
- const obj_errors = obj.errors;
430
- const path_errors = path + '.errors';
431
- if (!ArrayIsArray(obj_errors)) {
432
- return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
433
- }
434
- for (let i = 0; i < obj_errors.length; i++) {
435
- const obj_errors_item = obj_errors[i];
436
- const path_errors_item = path_errors + '[' + i + ']';
437
- const referencepath_errors_itemValidationError = validate$9(obj_errors_item, path_errors_item);
438
- if (referencepath_errors_itemValidationError !== null) {
439
- let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
440
- message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
441
- return new TypeError(message);
442
- }
443
- }
444
- }
445
- if (obj.eventTypes !== undefined) {
446
- const obj_eventTypes = obj.eventTypes;
447
- const path_eventTypes = path + '.eventTypes';
448
- if (!ArrayIsArray(obj_eventTypes)) {
449
- return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
450
- }
451
- for (let i = 0; i < obj_eventTypes.length; i++) {
452
- const obj_eventTypes_item = obj_eventTypes[i];
453
- const path_eventTypes_item = path_eventTypes + '[' + i + ']';
454
- const referencepath_eventTypes_itemValidationError = validate$8(obj_eventTypes_item, path_eventTypes_item);
455
- if (referencepath_eventTypes_itemValidationError !== null) {
456
- let message = 'Object doesn\'t match TimelineEventTypeRepresentation (at "' + path_eventTypes_item + '")\n';
457
- message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
458
- return new TypeError(message);
459
- }
460
- }
461
- }
462
- if (obj.events !== undefined) {
463
- const obj_events = obj.events;
464
- const path_events = path + '.events';
465
- if (!ArrayIsArray(obj_events)) {
466
- return new TypeError('Expected "array" but received "' + typeof obj_events + '" (at "' + path_events + '")');
467
- }
468
- for (let i = 0; i < obj_events.length; i++) {
469
- const obj_events_item = obj_events[i];
470
- const path_events_item = path_events + '[' + i + ']';
471
- const referencepath_events_itemValidationError = validate$6(obj_events_item, path_events_item);
472
- if (referencepath_events_itemValidationError !== null) {
473
- let message = 'Object doesn\'t match TimelineEventRepresentation (at "' + path_events_item + '")\n';
474
- message += referencepath_events_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
475
- return new TypeError(message);
476
- }
477
- }
478
- }
479
- if (obj.hasMoreData !== undefined) {
480
- const obj_hasMoreData = obj.hasMoreData;
481
- const path_hasMoreData = path + '.hasMoreData';
482
- if (typeof obj_hasMoreData !== 'boolean') {
483
- return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreData + '" (at "' + path_hasMoreData + '")');
484
- }
485
- }
486
- if (obj.isSuccess !== undefined) {
487
- const obj_isSuccess = obj.isSuccess;
488
- const path_isSuccess = path + '.isSuccess';
489
- if (typeof obj_isSuccess !== 'boolean') {
490
- return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
491
- }
492
- }
493
- })();
494
- return v_error === undefined ? null : v_error;
495
- }
496
- const RepresentationType$1 = 'TimelineDataGetResultRepresentation';
497
- function normalize$1(input, existing, path, luvio, store, timestamp) {
498
- return input;
499
- }
500
- const select$3 = function TimelineDataGetResultRepresentationSelect() {
501
- return {
502
- kind: 'Fragment',
503
- version: VERSION$1,
504
- private: [],
505
- opaque: true
506
- };
507
- };
508
- function equals$1(existing, incoming) {
509
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
510
- return false;
511
- }
512
- return true;
513
- }
514
- function deepFreeze$5(input) {
515
- const input_errors = input.errors;
516
- if (input_errors !== undefined) {
517
- for (let i = 0; i < input_errors.length; i++) {
518
- const input_errors_item = input_errors[i];
519
- deepFreeze$9(input_errors_item);
520
- }
521
- ObjectFreeze(input_errors);
522
- }
523
- const input_eventTypes = input.eventTypes;
524
- if (input_eventTypes !== undefined) {
525
- for (let i = 0; i < input_eventTypes.length; i++) {
526
- const input_eventTypes_item = input_eventTypes[i];
527
- deepFreeze$8(input_eventTypes_item);
528
- }
529
- ObjectFreeze(input_eventTypes);
530
- }
531
- const input_events = input.events;
532
- if (input_events !== undefined) {
533
- for (let i = 0; i < input_events.length; i++) {
534
- const input_events_item = input_events[i];
535
- deepFreeze$6(input_events_item);
536
- }
537
- ObjectFreeze(input_events);
538
- }
539
- ObjectFreeze(input);
540
- }
541
- const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
542
- if (process.env.NODE_ENV !== 'production') {
543
- const validateError = validate$5(input);
544
- if (validateError !== null) {
545
- throw validateError;
546
- }
547
- }
548
- const key = path.fullPath;
549
- const existingRecord = store.readEntry(key);
550
- const ttlToUse = TTL$1;
551
- let incomingRecord = normalize$1(input, store.readEntry(key), {
552
- fullPath: key,
553
- parent: path.parent,
554
- propertyName: path.propertyName,
555
- ttl: ttlToUse
556
- });
557
- deepFreeze$5(input);
558
- if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
559
- luvio.storePublish(key, incomingRecord);
560
- }
561
- {
562
- const storeMetadataParams = {
563
- ttl: ttlToUse,
564
- namespace: "Timeline",
565
- version: VERSION$1,
566
- representationName: RepresentationType$1,
567
- };
568
- luvio.publishStoreMetadata(key, storeMetadataParams);
569
- }
570
- return createLink(key);
571
- };
572
- function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
573
- const rootKeySet = new StoreKeyMap();
574
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
575
- const rootKey = fullPathFactory();
576
- rootKeySet.set(rootKey, {
577
- namespace: keyPrefix,
578
- representationName: RepresentationType$1,
579
- mergeable: false
580
- });
581
- return rootKeySet;
421
+ const TTL$1 = 500;
422
+ const VERSION$1 = "fdc9f6f24a05bf6064b5dd39db6e4e4d";
423
+ function validate$5(obj, path = 'TimelineDataGetResultRepresentation') {
424
+ const v_error = (() => {
425
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
426
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
427
+ }
428
+ if (obj.errors !== undefined) {
429
+ const obj_errors = obj.errors;
430
+ const path_errors = path + '.errors';
431
+ if (!ArrayIsArray(obj_errors)) {
432
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
433
+ }
434
+ for (let i = 0; i < obj_errors.length; i++) {
435
+ const obj_errors_item = obj_errors[i];
436
+ const path_errors_item = path_errors + '[' + i + ']';
437
+ const referencepath_errors_itemValidationError = validate$9(obj_errors_item, path_errors_item);
438
+ if (referencepath_errors_itemValidationError !== null) {
439
+ let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
440
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
441
+ return new TypeError(message);
442
+ }
443
+ }
444
+ }
445
+ if (obj.eventTypes !== undefined) {
446
+ const obj_eventTypes = obj.eventTypes;
447
+ const path_eventTypes = path + '.eventTypes';
448
+ if (!ArrayIsArray(obj_eventTypes)) {
449
+ return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
450
+ }
451
+ for (let i = 0; i < obj_eventTypes.length; i++) {
452
+ const obj_eventTypes_item = obj_eventTypes[i];
453
+ const path_eventTypes_item = path_eventTypes + '[' + i + ']';
454
+ const referencepath_eventTypes_itemValidationError = validate$8(obj_eventTypes_item, path_eventTypes_item);
455
+ if (referencepath_eventTypes_itemValidationError !== null) {
456
+ let message = 'Object doesn\'t match TimelineEventTypeRepresentation (at "' + path_eventTypes_item + '")\n';
457
+ message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
458
+ return new TypeError(message);
459
+ }
460
+ }
461
+ }
462
+ if (obj.events !== undefined) {
463
+ const obj_events = obj.events;
464
+ const path_events = path + '.events';
465
+ if (!ArrayIsArray(obj_events)) {
466
+ return new TypeError('Expected "array" but received "' + typeof obj_events + '" (at "' + path_events + '")');
467
+ }
468
+ for (let i = 0; i < obj_events.length; i++) {
469
+ const obj_events_item = obj_events[i];
470
+ const path_events_item = path_events + '[' + i + ']';
471
+ const referencepath_events_itemValidationError = validate$6(obj_events_item, path_events_item);
472
+ if (referencepath_events_itemValidationError !== null) {
473
+ let message = 'Object doesn\'t match TimelineEventRepresentation (at "' + path_events_item + '")\n';
474
+ message += referencepath_events_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
475
+ return new TypeError(message);
476
+ }
477
+ }
478
+ }
479
+ if (obj.hasMoreData !== undefined) {
480
+ const obj_hasMoreData = obj.hasMoreData;
481
+ const path_hasMoreData = path + '.hasMoreData';
482
+ if (typeof obj_hasMoreData !== 'boolean') {
483
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreData + '" (at "' + path_hasMoreData + '")');
484
+ }
485
+ }
486
+ if (obj.isSuccess !== undefined) {
487
+ const obj_isSuccess = obj.isSuccess;
488
+ const path_isSuccess = path + '.isSuccess';
489
+ if (typeof obj_isSuccess !== 'boolean') {
490
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
491
+ }
492
+ }
493
+ })();
494
+ return v_error === undefined ? null : v_error;
495
+ }
496
+ const RepresentationType$1 = 'TimelineDataGetResultRepresentation';
497
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
498
+ return input;
499
+ }
500
+ const select$3 = function TimelineDataGetResultRepresentationSelect() {
501
+ return {
502
+ kind: 'Fragment',
503
+ version: VERSION$1,
504
+ private: [],
505
+ opaque: true
506
+ };
507
+ };
508
+ function equals$1(existing, incoming) {
509
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
510
+ return false;
511
+ }
512
+ return true;
513
+ }
514
+ function deepFreeze$5(input) {
515
+ const input_errors = input.errors;
516
+ if (input_errors !== undefined) {
517
+ for (let i = 0; i < input_errors.length; i++) {
518
+ const input_errors_item = input_errors[i];
519
+ deepFreeze$9(input_errors_item);
520
+ }
521
+ ObjectFreeze(input_errors);
522
+ }
523
+ const input_eventTypes = input.eventTypes;
524
+ if (input_eventTypes !== undefined) {
525
+ for (let i = 0; i < input_eventTypes.length; i++) {
526
+ const input_eventTypes_item = input_eventTypes[i];
527
+ deepFreeze$8(input_eventTypes_item);
528
+ }
529
+ ObjectFreeze(input_eventTypes);
530
+ }
531
+ const input_events = input.events;
532
+ if (input_events !== undefined) {
533
+ for (let i = 0; i < input_events.length; i++) {
534
+ const input_events_item = input_events[i];
535
+ deepFreeze$6(input_events_item);
536
+ }
537
+ ObjectFreeze(input_events);
538
+ }
539
+ ObjectFreeze(input);
540
+ }
541
+ const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
542
+ if (process.env.NODE_ENV !== 'production') {
543
+ const validateError = validate$5(input);
544
+ if (validateError !== null) {
545
+ throw validateError;
546
+ }
547
+ }
548
+ const key = path.fullPath;
549
+ const existingRecord = store.readEntry(key);
550
+ const ttlToUse = TTL$1;
551
+ let incomingRecord = normalize$1(input, store.readEntry(key), {
552
+ fullPath: key,
553
+ parent: path.parent,
554
+ propertyName: path.propertyName,
555
+ ttl: ttlToUse
556
+ });
557
+ deepFreeze$5(input);
558
+ if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
559
+ luvio.storePublish(key, incomingRecord);
560
+ }
561
+ {
562
+ const storeMetadataParams = {
563
+ ttl: ttlToUse,
564
+ namespace: "Timeline",
565
+ version: VERSION$1,
566
+ representationName: RepresentationType$1,
567
+ };
568
+ luvio.publishStoreMetadata(key, storeMetadataParams);
569
+ }
570
+ return createLink(key);
571
+ };
572
+ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
573
+ const rootKeySet = new StoreKeyMap();
574
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
575
+ const rootKey = fullPathFactory();
576
+ rootKeySet.set(rootKey, {
577
+ namespace: keyPrefix,
578
+ representationName: RepresentationType$1,
579
+ mergeable: false
580
+ });
581
+ return rootKeySet;
582
582
  }
583
583
 
584
- function select$2(luvio, params) {
585
- return select$3();
586
- }
587
- function keyBuilder$3(luvio, params) {
588
- 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 + ')';
589
- }
590
- function getResponseCacheKeys$1(luvio, resourceParams, response) {
591
- return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
592
- }
593
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
594
- const { body } = response;
595
- const key = keyBuilder$3(luvio, resourceParams);
596
- luvio.storeIngest(key, ingest$1, body);
597
- const snapshot = luvio.storeLookup({
598
- recordId: key,
599
- node: select$2(),
600
- variables: {},
601
- }, snapshotRefresh);
602
- if (process.env.NODE_ENV !== 'production') {
603
- if (snapshot.state !== 'Fulfilled') {
604
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
605
- }
606
- }
607
- return snapshot;
608
- }
609
- function ingestError$1(luvio, params, error, snapshotRefresh) {
610
- const key = keyBuilder$3(luvio, params);
611
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
612
- const storeMetadataParams = {
613
- ttl: TTL$1,
614
- namespace: keyPrefix,
615
- version: VERSION$1,
616
- representationName: RepresentationType$1
617
- };
618
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
619
- return errorSnapshot;
620
- }
621
- function createResourceRequest$1(config) {
622
- const headers = {};
623
- return {
624
- baseUri: '/services/data/v58.0',
625
- basePath: '/connect/timeline/' + config.urlParams.timelineObjRecordId + '/timeline-definitions/' + config.urlParams.timelineConfigFullName + '/events',
626
- method: 'get',
627
- body: null,
628
- urlParams: config.urlParams,
629
- queryParams: config.queryParams,
630
- headers,
631
- priority: 'normal',
632
- };
584
+ function select$2(luvio, params) {
585
+ return select$3();
586
+ }
587
+ function keyBuilder$3(luvio, params) {
588
+ 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 + ')';
589
+ }
590
+ function getResponseCacheKeys$1(luvio, resourceParams, response) {
591
+ return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
592
+ }
593
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
594
+ const { body } = response;
595
+ const key = keyBuilder$3(luvio, resourceParams);
596
+ luvio.storeIngest(key, ingest$1, body);
597
+ const snapshot = luvio.storeLookup({
598
+ recordId: key,
599
+ node: select$2(),
600
+ variables: {},
601
+ }, snapshotRefresh);
602
+ if (process.env.NODE_ENV !== 'production') {
603
+ if (snapshot.state !== 'Fulfilled') {
604
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
605
+ }
606
+ }
607
+ return snapshot;
608
+ }
609
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
610
+ const key = keyBuilder$3(luvio, params);
611
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
612
+ const storeMetadataParams = {
613
+ ttl: TTL$1,
614
+ namespace: keyPrefix,
615
+ version: VERSION$1,
616
+ representationName: RepresentationType$1
617
+ };
618
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
619
+ return errorSnapshot;
620
+ }
621
+ function createResourceRequest$1(config) {
622
+ const headers = {};
623
+ return {
624
+ baseUri: '/services/data/v58.0',
625
+ basePath: '/connect/timeline/' + config.urlParams.timelineObjRecordId + '/timeline-definitions/' + config.urlParams.timelineConfigFullName + '/events',
626
+ method: 'get',
627
+ body: null,
628
+ urlParams: config.urlParams,
629
+ queryParams: config.queryParams,
630
+ headers,
631
+ priority: 'normal',
632
+ };
633
633
  }
634
634
 
635
- const getTimelineData_ConfigPropertyNames = {
636
- displayName: 'getTimelineData',
637
- parameters: {
638
- required: ['timelineConfigFullName', 'timelineObjRecordId'],
639
- optional: ['direction', 'endDate', 'eventTypeOffsets', 'eventTypes', 'startDate']
640
- }
641
- };
642
- function createResourceParams$1(config) {
643
- const resourceParams = {
644
- urlParams: {
645
- timelineConfigFullName: config.timelineConfigFullName, timelineObjRecordId: config.timelineObjRecordId
646
- },
647
- queryParams: {
648
- direction: config.direction, endDate: config.endDate, eventTypeOffsets: config.eventTypeOffsets, eventTypes: config.eventTypes, startDate: config.startDate
649
- }
650
- };
651
- return resourceParams;
652
- }
653
- function keyBuilder$2(luvio, config) {
654
- const resourceParams = createResourceParams$1(config);
655
- return keyBuilder$3(luvio, resourceParams);
656
- }
657
- function typeCheckConfig$1(untrustedConfig) {
658
- const config = {};
659
- const untrustedConfig_timelineConfigFullName = untrustedConfig.timelineConfigFullName;
660
- if (typeof untrustedConfig_timelineConfigFullName === 'string') {
661
- config.timelineConfigFullName = untrustedConfig_timelineConfigFullName;
662
- }
663
- const untrustedConfig_timelineObjRecordId = untrustedConfig.timelineObjRecordId;
664
- if (typeof untrustedConfig_timelineObjRecordId === 'string') {
665
- config.timelineObjRecordId = untrustedConfig_timelineObjRecordId;
666
- }
667
- const untrustedConfig_direction = untrustedConfig.direction;
668
- if (typeof untrustedConfig_direction === 'string') {
669
- config.direction = untrustedConfig_direction;
670
- }
671
- const untrustedConfig_endDate = untrustedConfig.endDate;
672
- if (typeof untrustedConfig_endDate === 'string') {
673
- config.endDate = untrustedConfig_endDate;
674
- }
675
- const untrustedConfig_eventTypeOffsets = untrustedConfig.eventTypeOffsets;
676
- if (typeof untrustedConfig_eventTypeOffsets === 'string') {
677
- config.eventTypeOffsets = untrustedConfig_eventTypeOffsets;
678
- }
679
- const untrustedConfig_eventTypes = untrustedConfig.eventTypes;
680
- if (typeof untrustedConfig_eventTypes === 'string') {
681
- config.eventTypes = untrustedConfig_eventTypes;
682
- }
683
- const untrustedConfig_startDate = untrustedConfig.startDate;
684
- if (typeof untrustedConfig_startDate === 'string') {
685
- config.startDate = untrustedConfig_startDate;
686
- }
687
- return config;
688
- }
689
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
690
- if (!untrustedIsObject(untrustedConfig)) {
691
- return null;
692
- }
693
- if (process.env.NODE_ENV !== 'production') {
694
- validateConfig(untrustedConfig, configPropertyNames);
695
- }
696
- const config = typeCheckConfig$1(untrustedConfig);
697
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
698
- return null;
699
- }
700
- return config;
701
- }
702
- function adapterFragment$1(luvio, config) {
703
- createResourceParams$1(config);
704
- return select$2();
705
- }
706
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
707
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
708
- config,
709
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
710
- });
711
- return luvio.storeBroadcast().then(() => snapshot);
712
- }
713
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
714
- const snapshot = ingestError$1(luvio, resourceParams, response, {
715
- config,
716
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
717
- });
718
- return luvio.storeBroadcast().then(() => snapshot);
719
- }
720
- function buildNetworkSnapshot$1(luvio, config, options) {
721
- const resourceParams = createResourceParams$1(config);
722
- const request = createResourceRequest$1(resourceParams);
723
- return luvio.dispatchResourceRequest(request, options)
724
- .then((response) => {
725
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
726
- }, (response) => {
727
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
728
- });
729
- }
730
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
731
- const { luvio, config } = context;
732
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
733
- const dispatchOptions = {
734
- resourceRequestContext: {
735
- requestCorrelator,
736
- luvioRequestMethod: undefined,
737
- },
738
- eventObservers
739
- };
740
- if (networkPriority !== 'normal') {
741
- dispatchOptions.overrides = {
742
- priority: networkPriority
743
- };
744
- }
745
- return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
746
- }
747
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
748
- const { luvio, config } = context;
749
- const selector = {
750
- recordId: keyBuilder$2(luvio, config),
751
- node: adapterFragment$1(luvio, config),
752
- variables: {},
753
- };
754
- const cacheSnapshot = storeLookup(selector, {
755
- config,
756
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
757
- });
758
- return cacheSnapshot;
759
- }
760
- const getTimelineDataAdapterFactory = (luvio) => function Timeline__getTimelineData(untrustedConfig, requestContext) {
761
- const config = validateAdapterConfig$1(untrustedConfig, getTimelineData_ConfigPropertyNames);
762
- // Invalid or incomplete config
763
- if (config === null) {
764
- return null;
765
- }
766
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
767
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
635
+ const getTimelineData_ConfigPropertyNames = {
636
+ displayName: 'getTimelineData',
637
+ parameters: {
638
+ required: ['timelineConfigFullName', 'timelineObjRecordId'],
639
+ optional: ['direction', 'endDate', 'eventTypeOffsets', 'eventTypes', 'startDate']
640
+ }
641
+ };
642
+ function createResourceParams$1(config) {
643
+ const resourceParams = {
644
+ urlParams: {
645
+ timelineConfigFullName: config.timelineConfigFullName, timelineObjRecordId: config.timelineObjRecordId
646
+ },
647
+ queryParams: {
648
+ direction: config.direction, endDate: config.endDate, eventTypeOffsets: config.eventTypeOffsets, eventTypes: config.eventTypes, startDate: config.startDate
649
+ }
650
+ };
651
+ return resourceParams;
652
+ }
653
+ function keyBuilder$2(luvio, config) {
654
+ const resourceParams = createResourceParams$1(config);
655
+ return keyBuilder$3(luvio, resourceParams);
656
+ }
657
+ function typeCheckConfig$1(untrustedConfig) {
658
+ const config = {};
659
+ const untrustedConfig_timelineConfigFullName = untrustedConfig.timelineConfigFullName;
660
+ if (typeof untrustedConfig_timelineConfigFullName === 'string') {
661
+ config.timelineConfigFullName = untrustedConfig_timelineConfigFullName;
662
+ }
663
+ const untrustedConfig_timelineObjRecordId = untrustedConfig.timelineObjRecordId;
664
+ if (typeof untrustedConfig_timelineObjRecordId === 'string') {
665
+ config.timelineObjRecordId = untrustedConfig_timelineObjRecordId;
666
+ }
667
+ const untrustedConfig_direction = untrustedConfig.direction;
668
+ if (typeof untrustedConfig_direction === 'string') {
669
+ config.direction = untrustedConfig_direction;
670
+ }
671
+ const untrustedConfig_endDate = untrustedConfig.endDate;
672
+ if (typeof untrustedConfig_endDate === 'string') {
673
+ config.endDate = untrustedConfig_endDate;
674
+ }
675
+ const untrustedConfig_eventTypeOffsets = untrustedConfig.eventTypeOffsets;
676
+ if (typeof untrustedConfig_eventTypeOffsets === 'string') {
677
+ config.eventTypeOffsets = untrustedConfig_eventTypeOffsets;
678
+ }
679
+ const untrustedConfig_eventTypes = untrustedConfig.eventTypes;
680
+ if (typeof untrustedConfig_eventTypes === 'string') {
681
+ config.eventTypes = untrustedConfig_eventTypes;
682
+ }
683
+ const untrustedConfig_startDate = untrustedConfig.startDate;
684
+ if (typeof untrustedConfig_startDate === 'string') {
685
+ config.startDate = untrustedConfig_startDate;
686
+ }
687
+ return config;
688
+ }
689
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
690
+ if (!untrustedIsObject(untrustedConfig)) {
691
+ return null;
692
+ }
693
+ if (process.env.NODE_ENV !== 'production') {
694
+ validateConfig(untrustedConfig, configPropertyNames);
695
+ }
696
+ const config = typeCheckConfig$1(untrustedConfig);
697
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
698
+ return null;
699
+ }
700
+ return config;
701
+ }
702
+ function adapterFragment$1(luvio, config) {
703
+ createResourceParams$1(config);
704
+ return select$2();
705
+ }
706
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
707
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
708
+ config,
709
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
710
+ });
711
+ return luvio.storeBroadcast().then(() => snapshot);
712
+ }
713
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
714
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
715
+ config,
716
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
717
+ });
718
+ return luvio.storeBroadcast().then(() => snapshot);
719
+ }
720
+ function buildNetworkSnapshot$1(luvio, config, options) {
721
+ const resourceParams = createResourceParams$1(config);
722
+ const request = createResourceRequest$1(resourceParams);
723
+ return luvio.dispatchResourceRequest(request, options)
724
+ .then((response) => {
725
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
726
+ }, (response) => {
727
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
728
+ });
729
+ }
730
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
731
+ const { luvio, config } = context;
732
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
733
+ const dispatchOptions = {
734
+ resourceRequestContext: {
735
+ requestCorrelator,
736
+ luvioRequestMethod: undefined,
737
+ },
738
+ eventObservers
739
+ };
740
+ if (networkPriority !== 'normal') {
741
+ dispatchOptions.overrides = {
742
+ priority: networkPriority
743
+ };
744
+ }
745
+ return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
746
+ }
747
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
748
+ const { luvio, config } = context;
749
+ const selector = {
750
+ recordId: keyBuilder$2(luvio, config),
751
+ node: adapterFragment$1(luvio, config),
752
+ variables: {},
753
+ };
754
+ const cacheSnapshot = storeLookup(selector, {
755
+ config,
756
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
757
+ });
758
+ return cacheSnapshot;
759
+ }
760
+ const getTimelineDataAdapterFactory = (luvio) => function Timeline__getTimelineData(untrustedConfig, requestContext) {
761
+ const config = validateAdapterConfig$1(untrustedConfig, getTimelineData_ConfigPropertyNames);
762
+ // Invalid or incomplete config
763
+ if (config === null) {
764
+ return null;
765
+ }
766
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
767
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
768
768
  };
769
769
 
770
- function validate$4(obj, path = 'TimelineEntityRepresentation') {
771
- const v_error = (() => {
772
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
773
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
774
- }
775
- const obj_ageField = obj.ageField;
776
- const path_ageField = path + '.ageField';
777
- let obj_ageField_union0 = null;
778
- const obj_ageField_union0_error = (() => {
779
- if (typeof obj_ageField !== 'string') {
780
- return new TypeError('Expected "string" but received "' + typeof obj_ageField + '" (at "' + path_ageField + '")');
781
- }
782
- })();
783
- if (obj_ageField_union0_error != null) {
784
- obj_ageField_union0 = obj_ageField_union0_error.message;
785
- }
786
- let obj_ageField_union1 = null;
787
- const obj_ageField_union1_error = (() => {
788
- if (obj_ageField !== null) {
789
- return new TypeError('Expected "null" but received "' + typeof obj_ageField + '" (at "' + path_ageField + '")');
790
- }
791
- })();
792
- if (obj_ageField_union1_error != null) {
793
- obj_ageField_union1 = obj_ageField_union1_error.message;
794
- }
795
- if (obj_ageField_union0 && obj_ageField_union1) {
796
- let message = 'Object doesn\'t match union (at "' + path_ageField + '")';
797
- message += '\n' + obj_ageField_union0.split('\n').map((line) => '\t' + line).join('\n');
798
- message += '\n' + obj_ageField_union1.split('\n').map((line) => '\t' + line).join('\n');
799
- return new TypeError(message);
800
- }
801
- const obj_entityLabel = obj.entityLabel;
802
- const path_entityLabel = path + '.entityLabel';
803
- let obj_entityLabel_union0 = null;
804
- const obj_entityLabel_union0_error = (() => {
805
- if (typeof obj_entityLabel !== 'string') {
806
- return new TypeError('Expected "string" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
807
- }
808
- })();
809
- if (obj_entityLabel_union0_error != null) {
810
- obj_entityLabel_union0 = obj_entityLabel_union0_error.message;
811
- }
812
- let obj_entityLabel_union1 = null;
813
- const obj_entityLabel_union1_error = (() => {
814
- if (obj_entityLabel !== null) {
815
- return new TypeError('Expected "null" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
816
- }
817
- })();
818
- if (obj_entityLabel_union1_error != null) {
819
- obj_entityLabel_union1 = obj_entityLabel_union1_error.message;
820
- }
821
- if (obj_entityLabel_union0 && obj_entityLabel_union1) {
822
- let message = 'Object doesn\'t match union (at "' + path_entityLabel + '")';
823
- message += '\n' + obj_entityLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
824
- message += '\n' + obj_entityLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
825
- return new TypeError(message);
826
- }
827
- const obj_entityName = obj.entityName;
828
- const path_entityName = path + '.entityName';
829
- let obj_entityName_union0 = null;
830
- const obj_entityName_union0_error = (() => {
831
- if (typeof obj_entityName !== 'string') {
832
- return new TypeError('Expected "string" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
833
- }
834
- })();
835
- if (obj_entityName_union0_error != null) {
836
- obj_entityName_union0 = obj_entityName_union0_error.message;
837
- }
838
- let obj_entityName_union1 = null;
839
- const obj_entityName_union1_error = (() => {
840
- if (obj_entityName !== null) {
841
- return new TypeError('Expected "null" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
842
- }
843
- })();
844
- if (obj_entityName_union1_error != null) {
845
- obj_entityName_union1 = obj_entityName_union1_error.message;
846
- }
847
- if (obj_entityName_union0 && obj_entityName_union1) {
848
- let message = 'Object doesn\'t match union (at "' + path_entityName + '")';
849
- message += '\n' + obj_entityName_union0.split('\n').map((line) => '\t' + line).join('\n');
850
- message += '\n' + obj_entityName_union1.split('\n').map((line) => '\t' + line).join('\n');
851
- return new TypeError(message);
852
- }
853
- const obj_icon = obj.icon;
854
- const path_icon = path + '.icon';
855
- let obj_icon_union0 = null;
856
- const obj_icon_union0_error = (() => {
857
- if (typeof obj_icon !== 'string') {
858
- return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
859
- }
860
- })();
861
- if (obj_icon_union0_error != null) {
862
- obj_icon_union0 = obj_icon_union0_error.message;
863
- }
864
- let obj_icon_union1 = null;
865
- const obj_icon_union1_error = (() => {
866
- if (obj_icon !== null) {
867
- return new TypeError('Expected "null" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
868
- }
869
- })();
870
- if (obj_icon_union1_error != null) {
871
- obj_icon_union1 = obj_icon_union1_error.message;
872
- }
873
- if (obj_icon_union0 && obj_icon_union1) {
874
- let message = 'Object doesn\'t match union (at "' + path_icon + '")';
875
- message += '\n' + obj_icon_union0.split('\n').map((line) => '\t' + line).join('\n');
876
- message += '\n' + obj_icon_union1.split('\n').map((line) => '\t' + line).join('\n');
877
- return new TypeError(message);
878
- }
879
- if (obj.isAgeFieldSelected !== undefined) {
880
- const obj_isAgeFieldSelected = obj.isAgeFieldSelected;
881
- const path_isAgeFieldSelected = path + '.isAgeFieldSelected';
882
- if (typeof obj_isAgeFieldSelected !== 'boolean') {
883
- return new TypeError('Expected "boolean" but received "' + typeof obj_isAgeFieldSelected + '" (at "' + path_isAgeFieldSelected + '")');
884
- }
885
- }
886
- const obj_source = obj.source;
887
- const path_source = path + '.source';
888
- let obj_source_union0 = null;
889
- const obj_source_union0_error = (() => {
890
- if (typeof obj_source !== 'string') {
891
- return new TypeError('Expected "string" but received "' + typeof obj_source + '" (at "' + path_source + '")');
892
- }
893
- })();
894
- if (obj_source_union0_error != null) {
895
- obj_source_union0 = obj_source_union0_error.message;
896
- }
897
- let obj_source_union1 = null;
898
- const obj_source_union1_error = (() => {
899
- if (obj_source !== null) {
900
- return new TypeError('Expected "null" but received "' + typeof obj_source + '" (at "' + path_source + '")');
901
- }
902
- })();
903
- if (obj_source_union1_error != null) {
904
- obj_source_union1 = obj_source_union1_error.message;
905
- }
906
- if (obj_source_union0 && obj_source_union1) {
907
- let message = 'Object doesn\'t match union (at "' + path_source + '")';
908
- message += '\n' + obj_source_union0.split('\n').map((line) => '\t' + line).join('\n');
909
- message += '\n' + obj_source_union1.split('\n').map((line) => '\t' + line).join('\n');
910
- return new TypeError(message);
911
- }
912
- })();
913
- return v_error === undefined ? null : v_error;
914
- }
915
- function deepFreeze$4(input) {
916
- ObjectFreeze(input);
770
+ function validate$4(obj, path = 'TimelineEntityRepresentation') {
771
+ const v_error = (() => {
772
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
773
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
774
+ }
775
+ const obj_ageField = obj.ageField;
776
+ const path_ageField = path + '.ageField';
777
+ let obj_ageField_union0 = null;
778
+ const obj_ageField_union0_error = (() => {
779
+ if (typeof obj_ageField !== 'string') {
780
+ return new TypeError('Expected "string" but received "' + typeof obj_ageField + '" (at "' + path_ageField + '")');
781
+ }
782
+ })();
783
+ if (obj_ageField_union0_error != null) {
784
+ obj_ageField_union0 = obj_ageField_union0_error.message;
785
+ }
786
+ let obj_ageField_union1 = null;
787
+ const obj_ageField_union1_error = (() => {
788
+ if (obj_ageField !== null) {
789
+ return new TypeError('Expected "null" but received "' + typeof obj_ageField + '" (at "' + path_ageField + '")');
790
+ }
791
+ })();
792
+ if (obj_ageField_union1_error != null) {
793
+ obj_ageField_union1 = obj_ageField_union1_error.message;
794
+ }
795
+ if (obj_ageField_union0 && obj_ageField_union1) {
796
+ let message = 'Object doesn\'t match union (at "' + path_ageField + '")';
797
+ message += '\n' + obj_ageField_union0.split('\n').map((line) => '\t' + line).join('\n');
798
+ message += '\n' + obj_ageField_union1.split('\n').map((line) => '\t' + line).join('\n');
799
+ return new TypeError(message);
800
+ }
801
+ const obj_entityLabel = obj.entityLabel;
802
+ const path_entityLabel = path + '.entityLabel';
803
+ let obj_entityLabel_union0 = null;
804
+ const obj_entityLabel_union0_error = (() => {
805
+ if (typeof obj_entityLabel !== 'string') {
806
+ return new TypeError('Expected "string" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
807
+ }
808
+ })();
809
+ if (obj_entityLabel_union0_error != null) {
810
+ obj_entityLabel_union0 = obj_entityLabel_union0_error.message;
811
+ }
812
+ let obj_entityLabel_union1 = null;
813
+ const obj_entityLabel_union1_error = (() => {
814
+ if (obj_entityLabel !== null) {
815
+ return new TypeError('Expected "null" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
816
+ }
817
+ })();
818
+ if (obj_entityLabel_union1_error != null) {
819
+ obj_entityLabel_union1 = obj_entityLabel_union1_error.message;
820
+ }
821
+ if (obj_entityLabel_union0 && obj_entityLabel_union1) {
822
+ let message = 'Object doesn\'t match union (at "' + path_entityLabel + '")';
823
+ message += '\n' + obj_entityLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
824
+ message += '\n' + obj_entityLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
825
+ return new TypeError(message);
826
+ }
827
+ const obj_entityName = obj.entityName;
828
+ const path_entityName = path + '.entityName';
829
+ let obj_entityName_union0 = null;
830
+ const obj_entityName_union0_error = (() => {
831
+ if (typeof obj_entityName !== 'string') {
832
+ return new TypeError('Expected "string" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
833
+ }
834
+ })();
835
+ if (obj_entityName_union0_error != null) {
836
+ obj_entityName_union0 = obj_entityName_union0_error.message;
837
+ }
838
+ let obj_entityName_union1 = null;
839
+ const obj_entityName_union1_error = (() => {
840
+ if (obj_entityName !== null) {
841
+ return new TypeError('Expected "null" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
842
+ }
843
+ })();
844
+ if (obj_entityName_union1_error != null) {
845
+ obj_entityName_union1 = obj_entityName_union1_error.message;
846
+ }
847
+ if (obj_entityName_union0 && obj_entityName_union1) {
848
+ let message = 'Object doesn\'t match union (at "' + path_entityName + '")';
849
+ message += '\n' + obj_entityName_union0.split('\n').map((line) => '\t' + line).join('\n');
850
+ message += '\n' + obj_entityName_union1.split('\n').map((line) => '\t' + line).join('\n');
851
+ return new TypeError(message);
852
+ }
853
+ const obj_icon = obj.icon;
854
+ const path_icon = path + '.icon';
855
+ let obj_icon_union0 = null;
856
+ const obj_icon_union0_error = (() => {
857
+ if (typeof obj_icon !== 'string') {
858
+ return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
859
+ }
860
+ })();
861
+ if (obj_icon_union0_error != null) {
862
+ obj_icon_union0 = obj_icon_union0_error.message;
863
+ }
864
+ let obj_icon_union1 = null;
865
+ const obj_icon_union1_error = (() => {
866
+ if (obj_icon !== null) {
867
+ return new TypeError('Expected "null" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
868
+ }
869
+ })();
870
+ if (obj_icon_union1_error != null) {
871
+ obj_icon_union1 = obj_icon_union1_error.message;
872
+ }
873
+ if (obj_icon_union0 && obj_icon_union1) {
874
+ let message = 'Object doesn\'t match union (at "' + path_icon + '")';
875
+ message += '\n' + obj_icon_union0.split('\n').map((line) => '\t' + line).join('\n');
876
+ message += '\n' + obj_icon_union1.split('\n').map((line) => '\t' + line).join('\n');
877
+ return new TypeError(message);
878
+ }
879
+ if (obj.isAgeFieldSelected !== undefined) {
880
+ const obj_isAgeFieldSelected = obj.isAgeFieldSelected;
881
+ const path_isAgeFieldSelected = path + '.isAgeFieldSelected';
882
+ if (typeof obj_isAgeFieldSelected !== 'boolean') {
883
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isAgeFieldSelected + '" (at "' + path_isAgeFieldSelected + '")');
884
+ }
885
+ }
886
+ const obj_source = obj.source;
887
+ const path_source = path + '.source';
888
+ let obj_source_union0 = null;
889
+ const obj_source_union0_error = (() => {
890
+ if (typeof obj_source !== 'string') {
891
+ return new TypeError('Expected "string" but received "' + typeof obj_source + '" (at "' + path_source + '")');
892
+ }
893
+ })();
894
+ if (obj_source_union0_error != null) {
895
+ obj_source_union0 = obj_source_union0_error.message;
896
+ }
897
+ let obj_source_union1 = null;
898
+ const obj_source_union1_error = (() => {
899
+ if (obj_source !== null) {
900
+ return new TypeError('Expected "null" but received "' + typeof obj_source + '" (at "' + path_source + '")');
901
+ }
902
+ })();
903
+ if (obj_source_union1_error != null) {
904
+ obj_source_union1 = obj_source_union1_error.message;
905
+ }
906
+ if (obj_source_union0 && obj_source_union1) {
907
+ let message = 'Object doesn\'t match union (at "' + path_source + '")';
908
+ message += '\n' + obj_source_union0.split('\n').map((line) => '\t' + line).join('\n');
909
+ message += '\n' + obj_source_union1.split('\n').map((line) => '\t' + line).join('\n');
910
+ return new TypeError(message);
911
+ }
912
+ })();
913
+ return v_error === undefined ? null : v_error;
914
+ }
915
+ function deepFreeze$4(input) {
916
+ ObjectFreeze(input);
917
917
  }
918
918
 
919
- function validate$3(obj, path = 'TimelineElementRepresentation') {
920
- const v_error = (() => {
921
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
922
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
923
- }
924
- const obj_apiName = obj.apiName;
925
- const path_apiName = path + '.apiName';
926
- let obj_apiName_union0 = null;
927
- const obj_apiName_union0_error = (() => {
928
- if (typeof obj_apiName !== 'string') {
929
- return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
930
- }
931
- })();
932
- if (obj_apiName_union0_error != null) {
933
- obj_apiName_union0 = obj_apiName_union0_error.message;
934
- }
935
- let obj_apiName_union1 = null;
936
- const obj_apiName_union1_error = (() => {
937
- if (obj_apiName !== null) {
938
- return new TypeError('Expected "null" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
939
- }
940
- })();
941
- if (obj_apiName_union1_error != null) {
942
- obj_apiName_union1 = obj_apiName_union1_error.message;
943
- }
944
- if (obj_apiName_union0 && obj_apiName_union1) {
945
- let message = 'Object doesn\'t match union (at "' + path_apiName + '")';
946
- message += '\n' + obj_apiName_union0.split('\n').map((line) => '\t' + line).join('\n');
947
- message += '\n' + obj_apiName_union1.split('\n').map((line) => '\t' + line).join('\n');
948
- return new TypeError(message);
949
- }
950
- const obj_dataType = obj.dataType;
951
- const path_dataType = path + '.dataType';
952
- let obj_dataType_union0 = null;
953
- const obj_dataType_union0_error = (() => {
954
- if (typeof obj_dataType !== 'string') {
955
- return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
956
- }
957
- })();
958
- if (obj_dataType_union0_error != null) {
959
- obj_dataType_union0 = obj_dataType_union0_error.message;
960
- }
961
- let obj_dataType_union1 = null;
962
- const obj_dataType_union1_error = (() => {
963
- if (obj_dataType !== null) {
964
- return new TypeError('Expected "null" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
965
- }
966
- })();
967
- if (obj_dataType_union1_error != null) {
968
- obj_dataType_union1 = obj_dataType_union1_error.message;
969
- }
970
- if (obj_dataType_union0 && obj_dataType_union1) {
971
- let message = 'Object doesn\'t match union (at "' + path_dataType + '")';
972
- message += '\n' + obj_dataType_union0.split('\n').map((line) => '\t' + line).join('\n');
973
- message += '\n' + obj_dataType_union1.split('\n').map((line) => '\t' + line).join('\n');
974
- return new TypeError(message);
975
- }
976
- const obj_label = obj.label;
977
- const path_label = path + '.label';
978
- let obj_label_union0 = null;
979
- const obj_label_union0_error = (() => {
980
- if (typeof obj_label !== 'string') {
981
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
982
- }
983
- })();
984
- if (obj_label_union0_error != null) {
985
- obj_label_union0 = obj_label_union0_error.message;
986
- }
987
- let obj_label_union1 = null;
988
- const obj_label_union1_error = (() => {
989
- if (obj_label !== null) {
990
- return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
991
- }
992
- })();
993
- if (obj_label_union1_error != null) {
994
- obj_label_union1 = obj_label_union1_error.message;
995
- }
996
- if (obj_label_union0 && obj_label_union1) {
997
- let message = 'Object doesn\'t match union (at "' + path_label + '")';
998
- message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
999
- message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
1000
- return new TypeError(message);
1001
- }
1002
- })();
1003
- return v_error === undefined ? null : v_error;
1004
- }
1005
- function deepFreeze$3(input) {
1006
- ObjectFreeze(input);
919
+ function validate$3(obj, path = 'TimelineElementRepresentation') {
920
+ const v_error = (() => {
921
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
922
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
923
+ }
924
+ const obj_apiName = obj.apiName;
925
+ const path_apiName = path + '.apiName';
926
+ let obj_apiName_union0 = null;
927
+ const obj_apiName_union0_error = (() => {
928
+ if (typeof obj_apiName !== 'string') {
929
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
930
+ }
931
+ })();
932
+ if (obj_apiName_union0_error != null) {
933
+ obj_apiName_union0 = obj_apiName_union0_error.message;
934
+ }
935
+ let obj_apiName_union1 = null;
936
+ const obj_apiName_union1_error = (() => {
937
+ if (obj_apiName !== null) {
938
+ return new TypeError('Expected "null" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
939
+ }
940
+ })();
941
+ if (obj_apiName_union1_error != null) {
942
+ obj_apiName_union1 = obj_apiName_union1_error.message;
943
+ }
944
+ if (obj_apiName_union0 && obj_apiName_union1) {
945
+ let message = 'Object doesn\'t match union (at "' + path_apiName + '")';
946
+ message += '\n' + obj_apiName_union0.split('\n').map((line) => '\t' + line).join('\n');
947
+ message += '\n' + obj_apiName_union1.split('\n').map((line) => '\t' + line).join('\n');
948
+ return new TypeError(message);
949
+ }
950
+ const obj_dataType = obj.dataType;
951
+ const path_dataType = path + '.dataType';
952
+ let obj_dataType_union0 = null;
953
+ const obj_dataType_union0_error = (() => {
954
+ if (typeof obj_dataType !== 'string') {
955
+ return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
956
+ }
957
+ })();
958
+ if (obj_dataType_union0_error != null) {
959
+ obj_dataType_union0 = obj_dataType_union0_error.message;
960
+ }
961
+ let obj_dataType_union1 = null;
962
+ const obj_dataType_union1_error = (() => {
963
+ if (obj_dataType !== null) {
964
+ return new TypeError('Expected "null" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
965
+ }
966
+ })();
967
+ if (obj_dataType_union1_error != null) {
968
+ obj_dataType_union1 = obj_dataType_union1_error.message;
969
+ }
970
+ if (obj_dataType_union0 && obj_dataType_union1) {
971
+ let message = 'Object doesn\'t match union (at "' + path_dataType + '")';
972
+ message += '\n' + obj_dataType_union0.split('\n').map((line) => '\t' + line).join('\n');
973
+ message += '\n' + obj_dataType_union1.split('\n').map((line) => '\t' + line).join('\n');
974
+ return new TypeError(message);
975
+ }
976
+ const obj_label = obj.label;
977
+ const path_label = path + '.label';
978
+ let obj_label_union0 = null;
979
+ const obj_label_union0_error = (() => {
980
+ if (typeof obj_label !== 'string') {
981
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
982
+ }
983
+ })();
984
+ if (obj_label_union0_error != null) {
985
+ obj_label_union0 = obj_label_union0_error.message;
986
+ }
987
+ let obj_label_union1 = null;
988
+ const obj_label_union1_error = (() => {
989
+ if (obj_label !== null) {
990
+ return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
991
+ }
992
+ })();
993
+ if (obj_label_union1_error != null) {
994
+ obj_label_union1 = obj_label_union1_error.message;
995
+ }
996
+ if (obj_label_union0 && obj_label_union1) {
997
+ let message = 'Object doesn\'t match union (at "' + path_label + '")';
998
+ message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
999
+ message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
1000
+ return new TypeError(message);
1001
+ }
1002
+ })();
1003
+ return v_error === undefined ? null : v_error;
1004
+ }
1005
+ function deepFreeze$3(input) {
1006
+ ObjectFreeze(input);
1007
1007
  }
1008
1008
 
1009
- function validate$2(obj, path = 'TimelineEventTypeMetadataRepresentation') {
1010
- const v_error = (() => {
1011
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1012
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1013
- }
1014
- if (obj.anchorReferenceField !== undefined) {
1015
- const obj_anchorReferenceField = obj.anchorReferenceField;
1016
- const path_anchorReferenceField = path + '.anchorReferenceField';
1017
- const referencepath_anchorReferenceFieldValidationError = validate$3(obj_anchorReferenceField, path_anchorReferenceField);
1018
- if (referencepath_anchorReferenceFieldValidationError !== null) {
1019
- let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_anchorReferenceField + '")\n';
1020
- message += referencepath_anchorReferenceFieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1021
- return new TypeError(message);
1022
- }
1023
- }
1024
- const obj_entityApiName = obj.entityApiName;
1025
- const path_entityApiName = path + '.entityApiName';
1026
- let obj_entityApiName_union0 = null;
1027
- const obj_entityApiName_union0_error = (() => {
1028
- if (typeof obj_entityApiName !== 'string') {
1029
- return new TypeError('Expected "string" but received "' + typeof obj_entityApiName + '" (at "' + path_entityApiName + '")');
1030
- }
1031
- })();
1032
- if (obj_entityApiName_union0_error != null) {
1033
- obj_entityApiName_union0 = obj_entityApiName_union0_error.message;
1034
- }
1035
- let obj_entityApiName_union1 = null;
1036
- const obj_entityApiName_union1_error = (() => {
1037
- if (obj_entityApiName !== null) {
1038
- return new TypeError('Expected "null" but received "' + typeof obj_entityApiName + '" (at "' + path_entityApiName + '")');
1039
- }
1040
- })();
1041
- if (obj_entityApiName_union1_error != null) {
1042
- obj_entityApiName_union1 = obj_entityApiName_union1_error.message;
1043
- }
1044
- if (obj_entityApiName_union0 && obj_entityApiName_union1) {
1045
- let message = 'Object doesn\'t match union (at "' + path_entityApiName + '")';
1046
- message += '\n' + obj_entityApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
1047
- message += '\n' + obj_entityApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
1048
- return new TypeError(message);
1049
- }
1050
- const obj_entityLabel = obj.entityLabel;
1051
- const path_entityLabel = path + '.entityLabel';
1052
- let obj_entityLabel_union0 = null;
1053
- const obj_entityLabel_union0_error = (() => {
1054
- if (typeof obj_entityLabel !== 'string') {
1055
- return new TypeError('Expected "string" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
1056
- }
1057
- })();
1058
- if (obj_entityLabel_union0_error != null) {
1059
- obj_entityLabel_union0 = obj_entityLabel_union0_error.message;
1060
- }
1061
- let obj_entityLabel_union1 = null;
1062
- const obj_entityLabel_union1_error = (() => {
1063
- if (obj_entityLabel !== null) {
1064
- return new TypeError('Expected "null" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
1065
- }
1066
- })();
1067
- if (obj_entityLabel_union1_error != null) {
1068
- obj_entityLabel_union1 = obj_entityLabel_union1_error.message;
1069
- }
1070
- if (obj_entityLabel_union0 && obj_entityLabel_union1) {
1071
- let message = 'Object doesn\'t match union (at "' + path_entityLabel + '")';
1072
- message += '\n' + obj_entityLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
1073
- message += '\n' + obj_entityLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
1074
- return new TypeError(message);
1075
- }
1076
- if (obj.fieldsToDisplay !== undefined) {
1077
- const obj_fieldsToDisplay = obj.fieldsToDisplay;
1078
- const path_fieldsToDisplay = path + '.fieldsToDisplay';
1079
- if (!ArrayIsArray(obj_fieldsToDisplay)) {
1080
- return new TypeError('Expected "array" but received "' + typeof obj_fieldsToDisplay + '" (at "' + path_fieldsToDisplay + '")');
1081
- }
1082
- for (let i = 0; i < obj_fieldsToDisplay.length; i++) {
1083
- const obj_fieldsToDisplay_item = obj_fieldsToDisplay[i];
1084
- const path_fieldsToDisplay_item = path_fieldsToDisplay + '[' + i + ']';
1085
- const referencepath_fieldsToDisplay_itemValidationError = validate$3(obj_fieldsToDisplay_item, path_fieldsToDisplay_item);
1086
- if (referencepath_fieldsToDisplay_itemValidationError !== null) {
1087
- let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_fieldsToDisplay_item + '")\n';
1088
- message += referencepath_fieldsToDisplay_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1089
- return new TypeError(message);
1090
- }
1091
- }
1092
- }
1093
- if (obj.relatedlistsToDisplay !== undefined) {
1094
- const obj_relatedlistsToDisplay = obj.relatedlistsToDisplay;
1095
- const path_relatedlistsToDisplay = path + '.relatedlistsToDisplay';
1096
- if (!ArrayIsArray(obj_relatedlistsToDisplay)) {
1097
- return new TypeError('Expected "array" but received "' + typeof obj_relatedlistsToDisplay + '" (at "' + path_relatedlistsToDisplay + '")');
1098
- }
1099
- for (let i = 0; i < obj_relatedlistsToDisplay.length; i++) {
1100
- const obj_relatedlistsToDisplay_item = obj_relatedlistsToDisplay[i];
1101
- const path_relatedlistsToDisplay_item = path_relatedlistsToDisplay + '[' + i + ']';
1102
- const referencepath_relatedlistsToDisplay_itemValidationError = validate$3(obj_relatedlistsToDisplay_item, path_relatedlistsToDisplay_item);
1103
- if (referencepath_relatedlistsToDisplay_itemValidationError !== null) {
1104
- let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_relatedlistsToDisplay_item + '")\n';
1105
- message += referencepath_relatedlistsToDisplay_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1106
- return new TypeError(message);
1107
- }
1108
- }
1109
- }
1110
- const obj_relationType = obj.relationType;
1111
- const path_relationType = path + '.relationType';
1112
- let obj_relationType_union0 = null;
1113
- const obj_relationType_union0_error = (() => {
1114
- if (typeof obj_relationType !== 'string') {
1115
- return new TypeError('Expected "string" but received "' + typeof obj_relationType + '" (at "' + path_relationType + '")');
1116
- }
1117
- })();
1118
- if (obj_relationType_union0_error != null) {
1119
- obj_relationType_union0 = obj_relationType_union0_error.message;
1120
- }
1121
- let obj_relationType_union1 = null;
1122
- const obj_relationType_union1_error = (() => {
1123
- if (obj_relationType !== null) {
1124
- return new TypeError('Expected "null" but received "' + typeof obj_relationType + '" (at "' + path_relationType + '")');
1125
- }
1126
- })();
1127
- if (obj_relationType_union1_error != null) {
1128
- obj_relationType_union1 = obj_relationType_union1_error.message;
1129
- }
1130
- if (obj_relationType_union0 && obj_relationType_union1) {
1131
- let message = 'Object doesn\'t match union (at "' + path_relationType + '")';
1132
- message += '\n' + obj_relationType_union0.split('\n').map((line) => '\t' + line).join('\n');
1133
- message += '\n' + obj_relationType_union1.split('\n').map((line) => '\t' + line).join('\n');
1134
- return new TypeError(message);
1135
- }
1136
- if (obj.sortField !== undefined) {
1137
- const obj_sortField = obj.sortField;
1138
- const path_sortField = path + '.sortField';
1139
- const referencepath_sortFieldValidationError = validate$3(obj_sortField, path_sortField);
1140
- if (referencepath_sortFieldValidationError !== null) {
1141
- let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_sortField + '")\n';
1142
- message += referencepath_sortFieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1143
- return new TypeError(message);
1144
- }
1145
- }
1146
- if (obj.subTitle !== undefined) {
1147
- const obj_subTitle = obj.subTitle;
1148
- const path_subTitle = path + '.subTitle';
1149
- const referencepath_subTitleValidationError = validate$3(obj_subTitle, path_subTitle);
1150
- if (referencepath_subTitleValidationError !== null) {
1151
- let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_subTitle + '")\n';
1152
- message += referencepath_subTitleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1153
- return new TypeError(message);
1154
- }
1155
- }
1156
- if (obj.title !== undefined) {
1157
- const obj_title = obj.title;
1158
- const path_title = path + '.title';
1159
- const referencepath_titleValidationError = validate$3(obj_title, path_title);
1160
- if (referencepath_titleValidationError !== null) {
1161
- let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_title + '")\n';
1162
- message += referencepath_titleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1163
- return new TypeError(message);
1164
- }
1165
- }
1166
- })();
1167
- return v_error === undefined ? null : v_error;
1168
- }
1169
- function deepFreeze$2(input) {
1170
- const input_anchorReferenceField = input.anchorReferenceField;
1171
- if (input_anchorReferenceField !== undefined) {
1172
- deepFreeze$3(input_anchorReferenceField);
1173
- }
1174
- const input_fieldsToDisplay = input.fieldsToDisplay;
1175
- if (input_fieldsToDisplay !== undefined) {
1176
- for (let i = 0; i < input_fieldsToDisplay.length; i++) {
1177
- const input_fieldsToDisplay_item = input_fieldsToDisplay[i];
1178
- deepFreeze$3(input_fieldsToDisplay_item);
1179
- }
1180
- ObjectFreeze(input_fieldsToDisplay);
1181
- }
1182
- const input_relatedlistsToDisplay = input.relatedlistsToDisplay;
1183
- if (input_relatedlistsToDisplay !== undefined) {
1184
- for (let i = 0; i < input_relatedlistsToDisplay.length; i++) {
1185
- const input_relatedlistsToDisplay_item = input_relatedlistsToDisplay[i];
1186
- deepFreeze$3(input_relatedlistsToDisplay_item);
1187
- }
1188
- ObjectFreeze(input_relatedlistsToDisplay);
1189
- }
1190
- const input_sortField = input.sortField;
1191
- if (input_sortField !== undefined) {
1192
- deepFreeze$3(input_sortField);
1193
- }
1194
- const input_subTitle = input.subTitle;
1195
- if (input_subTitle !== undefined) {
1196
- deepFreeze$3(input_subTitle);
1197
- }
1198
- const input_title = input.title;
1199
- if (input_title !== undefined) {
1200
- deepFreeze$3(input_title);
1201
- }
1202
- ObjectFreeze(input);
1009
+ function validate$2(obj, path = 'TimelineEventTypeMetadataRepresentation') {
1010
+ const v_error = (() => {
1011
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1012
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1013
+ }
1014
+ if (obj.anchorReferenceField !== undefined) {
1015
+ const obj_anchorReferenceField = obj.anchorReferenceField;
1016
+ const path_anchorReferenceField = path + '.anchorReferenceField';
1017
+ const referencepath_anchorReferenceFieldValidationError = validate$3(obj_anchorReferenceField, path_anchorReferenceField);
1018
+ if (referencepath_anchorReferenceFieldValidationError !== null) {
1019
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_anchorReferenceField + '")\n';
1020
+ message += referencepath_anchorReferenceFieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1021
+ return new TypeError(message);
1022
+ }
1023
+ }
1024
+ const obj_entityApiName = obj.entityApiName;
1025
+ const path_entityApiName = path + '.entityApiName';
1026
+ let obj_entityApiName_union0 = null;
1027
+ const obj_entityApiName_union0_error = (() => {
1028
+ if (typeof obj_entityApiName !== 'string') {
1029
+ return new TypeError('Expected "string" but received "' + typeof obj_entityApiName + '" (at "' + path_entityApiName + '")');
1030
+ }
1031
+ })();
1032
+ if (obj_entityApiName_union0_error != null) {
1033
+ obj_entityApiName_union0 = obj_entityApiName_union0_error.message;
1034
+ }
1035
+ let obj_entityApiName_union1 = null;
1036
+ const obj_entityApiName_union1_error = (() => {
1037
+ if (obj_entityApiName !== null) {
1038
+ return new TypeError('Expected "null" but received "' + typeof obj_entityApiName + '" (at "' + path_entityApiName + '")');
1039
+ }
1040
+ })();
1041
+ if (obj_entityApiName_union1_error != null) {
1042
+ obj_entityApiName_union1 = obj_entityApiName_union1_error.message;
1043
+ }
1044
+ if (obj_entityApiName_union0 && obj_entityApiName_union1) {
1045
+ let message = 'Object doesn\'t match union (at "' + path_entityApiName + '")';
1046
+ message += '\n' + obj_entityApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
1047
+ message += '\n' + obj_entityApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
1048
+ return new TypeError(message);
1049
+ }
1050
+ const obj_entityLabel = obj.entityLabel;
1051
+ const path_entityLabel = path + '.entityLabel';
1052
+ let obj_entityLabel_union0 = null;
1053
+ const obj_entityLabel_union0_error = (() => {
1054
+ if (typeof obj_entityLabel !== 'string') {
1055
+ return new TypeError('Expected "string" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
1056
+ }
1057
+ })();
1058
+ if (obj_entityLabel_union0_error != null) {
1059
+ obj_entityLabel_union0 = obj_entityLabel_union0_error.message;
1060
+ }
1061
+ let obj_entityLabel_union1 = null;
1062
+ const obj_entityLabel_union1_error = (() => {
1063
+ if (obj_entityLabel !== null) {
1064
+ return new TypeError('Expected "null" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
1065
+ }
1066
+ })();
1067
+ if (obj_entityLabel_union1_error != null) {
1068
+ obj_entityLabel_union1 = obj_entityLabel_union1_error.message;
1069
+ }
1070
+ if (obj_entityLabel_union0 && obj_entityLabel_union1) {
1071
+ let message = 'Object doesn\'t match union (at "' + path_entityLabel + '")';
1072
+ message += '\n' + obj_entityLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
1073
+ message += '\n' + obj_entityLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
1074
+ return new TypeError(message);
1075
+ }
1076
+ if (obj.fieldsToDisplay !== undefined) {
1077
+ const obj_fieldsToDisplay = obj.fieldsToDisplay;
1078
+ const path_fieldsToDisplay = path + '.fieldsToDisplay';
1079
+ if (!ArrayIsArray(obj_fieldsToDisplay)) {
1080
+ return new TypeError('Expected "array" but received "' + typeof obj_fieldsToDisplay + '" (at "' + path_fieldsToDisplay + '")');
1081
+ }
1082
+ for (let i = 0; i < obj_fieldsToDisplay.length; i++) {
1083
+ const obj_fieldsToDisplay_item = obj_fieldsToDisplay[i];
1084
+ const path_fieldsToDisplay_item = path_fieldsToDisplay + '[' + i + ']';
1085
+ const referencepath_fieldsToDisplay_itemValidationError = validate$3(obj_fieldsToDisplay_item, path_fieldsToDisplay_item);
1086
+ if (referencepath_fieldsToDisplay_itemValidationError !== null) {
1087
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_fieldsToDisplay_item + '")\n';
1088
+ message += referencepath_fieldsToDisplay_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1089
+ return new TypeError(message);
1090
+ }
1091
+ }
1092
+ }
1093
+ if (obj.relatedlistsToDisplay !== undefined) {
1094
+ const obj_relatedlistsToDisplay = obj.relatedlistsToDisplay;
1095
+ const path_relatedlistsToDisplay = path + '.relatedlistsToDisplay';
1096
+ if (!ArrayIsArray(obj_relatedlistsToDisplay)) {
1097
+ return new TypeError('Expected "array" but received "' + typeof obj_relatedlistsToDisplay + '" (at "' + path_relatedlistsToDisplay + '")');
1098
+ }
1099
+ for (let i = 0; i < obj_relatedlistsToDisplay.length; i++) {
1100
+ const obj_relatedlistsToDisplay_item = obj_relatedlistsToDisplay[i];
1101
+ const path_relatedlistsToDisplay_item = path_relatedlistsToDisplay + '[' + i + ']';
1102
+ const referencepath_relatedlistsToDisplay_itemValidationError = validate$3(obj_relatedlistsToDisplay_item, path_relatedlistsToDisplay_item);
1103
+ if (referencepath_relatedlistsToDisplay_itemValidationError !== null) {
1104
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_relatedlistsToDisplay_item + '")\n';
1105
+ message += referencepath_relatedlistsToDisplay_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1106
+ return new TypeError(message);
1107
+ }
1108
+ }
1109
+ }
1110
+ const obj_relationType = obj.relationType;
1111
+ const path_relationType = path + '.relationType';
1112
+ let obj_relationType_union0 = null;
1113
+ const obj_relationType_union0_error = (() => {
1114
+ if (typeof obj_relationType !== 'string') {
1115
+ return new TypeError('Expected "string" but received "' + typeof obj_relationType + '" (at "' + path_relationType + '")');
1116
+ }
1117
+ })();
1118
+ if (obj_relationType_union0_error != null) {
1119
+ obj_relationType_union0 = obj_relationType_union0_error.message;
1120
+ }
1121
+ let obj_relationType_union1 = null;
1122
+ const obj_relationType_union1_error = (() => {
1123
+ if (obj_relationType !== null) {
1124
+ return new TypeError('Expected "null" but received "' + typeof obj_relationType + '" (at "' + path_relationType + '")');
1125
+ }
1126
+ })();
1127
+ if (obj_relationType_union1_error != null) {
1128
+ obj_relationType_union1 = obj_relationType_union1_error.message;
1129
+ }
1130
+ if (obj_relationType_union0 && obj_relationType_union1) {
1131
+ let message = 'Object doesn\'t match union (at "' + path_relationType + '")';
1132
+ message += '\n' + obj_relationType_union0.split('\n').map((line) => '\t' + line).join('\n');
1133
+ message += '\n' + obj_relationType_union1.split('\n').map((line) => '\t' + line).join('\n');
1134
+ return new TypeError(message);
1135
+ }
1136
+ if (obj.sortField !== undefined) {
1137
+ const obj_sortField = obj.sortField;
1138
+ const path_sortField = path + '.sortField';
1139
+ const referencepath_sortFieldValidationError = validate$3(obj_sortField, path_sortField);
1140
+ if (referencepath_sortFieldValidationError !== null) {
1141
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_sortField + '")\n';
1142
+ message += referencepath_sortFieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1143
+ return new TypeError(message);
1144
+ }
1145
+ }
1146
+ if (obj.subTitle !== undefined) {
1147
+ const obj_subTitle = obj.subTitle;
1148
+ const path_subTitle = path + '.subTitle';
1149
+ const referencepath_subTitleValidationError = validate$3(obj_subTitle, path_subTitle);
1150
+ if (referencepath_subTitleValidationError !== null) {
1151
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_subTitle + '")\n';
1152
+ message += referencepath_subTitleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1153
+ return new TypeError(message);
1154
+ }
1155
+ }
1156
+ if (obj.title !== undefined) {
1157
+ const obj_title = obj.title;
1158
+ const path_title = path + '.title';
1159
+ const referencepath_titleValidationError = validate$3(obj_title, path_title);
1160
+ if (referencepath_titleValidationError !== null) {
1161
+ let message = 'Object doesn\'t match TimelineElementRepresentation (at "' + path_title + '")\n';
1162
+ message += referencepath_titleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1163
+ return new TypeError(message);
1164
+ }
1165
+ }
1166
+ })();
1167
+ return v_error === undefined ? null : v_error;
1168
+ }
1169
+ function deepFreeze$2(input) {
1170
+ const input_anchorReferenceField = input.anchorReferenceField;
1171
+ if (input_anchorReferenceField !== undefined) {
1172
+ deepFreeze$3(input_anchorReferenceField);
1173
+ }
1174
+ const input_fieldsToDisplay = input.fieldsToDisplay;
1175
+ if (input_fieldsToDisplay !== undefined) {
1176
+ for (let i = 0; i < input_fieldsToDisplay.length; i++) {
1177
+ const input_fieldsToDisplay_item = input_fieldsToDisplay[i];
1178
+ deepFreeze$3(input_fieldsToDisplay_item);
1179
+ }
1180
+ ObjectFreeze(input_fieldsToDisplay);
1181
+ }
1182
+ const input_relatedlistsToDisplay = input.relatedlistsToDisplay;
1183
+ if (input_relatedlistsToDisplay !== undefined) {
1184
+ for (let i = 0; i < input_relatedlistsToDisplay.length; i++) {
1185
+ const input_relatedlistsToDisplay_item = input_relatedlistsToDisplay[i];
1186
+ deepFreeze$3(input_relatedlistsToDisplay_item);
1187
+ }
1188
+ ObjectFreeze(input_relatedlistsToDisplay);
1189
+ }
1190
+ const input_sortField = input.sortField;
1191
+ if (input_sortField !== undefined) {
1192
+ deepFreeze$3(input_sortField);
1193
+ }
1194
+ const input_subTitle = input.subTitle;
1195
+ if (input_subTitle !== undefined) {
1196
+ deepFreeze$3(input_subTitle);
1197
+ }
1198
+ const input_title = input.title;
1199
+ if (input_title !== undefined) {
1200
+ deepFreeze$3(input_title);
1201
+ }
1202
+ ObjectFreeze(input);
1203
1203
  }
1204
1204
 
1205
- function validate$1(obj, path = 'TimelineMetadataDefinitionRepresentation') {
1206
- const v_error = (() => {
1207
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1208
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1209
- }
1210
- if (obj.anchorObject !== undefined) {
1211
- const obj_anchorObject = obj.anchorObject;
1212
- const path_anchorObject = path + '.anchorObject';
1213
- const referencepath_anchorObjectValidationError = validate$4(obj_anchorObject, path_anchorObject);
1214
- if (referencepath_anchorObjectValidationError !== null) {
1215
- let message = 'Object doesn\'t match TimelineEntityRepresentation (at "' + path_anchorObject + '")\n';
1216
- message += referencepath_anchorObjectValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1217
- return new TypeError(message);
1218
- }
1219
- }
1220
- if (obj.eventTypes !== undefined) {
1221
- const obj_eventTypes = obj.eventTypes;
1222
- const path_eventTypes = path + '.eventTypes';
1223
- if (!ArrayIsArray(obj_eventTypes)) {
1224
- return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
1225
- }
1226
- for (let i = 0; i < obj_eventTypes.length; i++) {
1227
- const obj_eventTypes_item = obj_eventTypes[i];
1228
- const path_eventTypes_item = path_eventTypes + '[' + i + ']';
1229
- const referencepath_eventTypes_itemValidationError = validate$2(obj_eventTypes_item, path_eventTypes_item);
1230
- if (referencepath_eventTypes_itemValidationError !== null) {
1231
- let message = 'Object doesn\'t match TimelineEventTypeMetadataRepresentation (at "' + path_eventTypes_item + '")\n';
1232
- message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1233
- return new TypeError(message);
1234
- }
1235
- }
1236
- }
1237
- const obj_fullName = obj.fullName;
1238
- const path_fullName = path + '.fullName';
1239
- let obj_fullName_union0 = null;
1240
- const obj_fullName_union0_error = (() => {
1241
- if (typeof obj_fullName !== 'string') {
1242
- return new TypeError('Expected "string" but received "' + typeof obj_fullName + '" (at "' + path_fullName + '")');
1243
- }
1244
- })();
1245
- if (obj_fullName_union0_error != null) {
1246
- obj_fullName_union0 = obj_fullName_union0_error.message;
1247
- }
1248
- let obj_fullName_union1 = null;
1249
- const obj_fullName_union1_error = (() => {
1250
- if (obj_fullName !== null) {
1251
- return new TypeError('Expected "null" but received "' + typeof obj_fullName + '" (at "' + path_fullName + '")');
1252
- }
1253
- })();
1254
- if (obj_fullName_union1_error != null) {
1255
- obj_fullName_union1 = obj_fullName_union1_error.message;
1256
- }
1257
- if (obj_fullName_union0 && obj_fullName_union1) {
1258
- let message = 'Object doesn\'t match union (at "' + path_fullName + '")';
1259
- message += '\n' + obj_fullName_union0.split('\n').map((line) => '\t' + line).join('\n');
1260
- message += '\n' + obj_fullName_union1.split('\n').map((line) => '\t' + line).join('\n');
1261
- return new TypeError(message);
1262
- }
1263
- if (obj.isActive !== undefined) {
1264
- const obj_isActive = obj.isActive;
1265
- const path_isActive = path + '.isActive';
1266
- if (typeof obj_isActive !== 'boolean') {
1267
- return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
1268
- }
1269
- }
1270
- const obj_masterLabel = obj.masterLabel;
1271
- const path_masterLabel = path + '.masterLabel';
1272
- let obj_masterLabel_union0 = null;
1273
- const obj_masterLabel_union0_error = (() => {
1274
- if (typeof obj_masterLabel !== 'string') {
1275
- return new TypeError('Expected "string" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
1276
- }
1277
- })();
1278
- if (obj_masterLabel_union0_error != null) {
1279
- obj_masterLabel_union0 = obj_masterLabel_union0_error.message;
1280
- }
1281
- let obj_masterLabel_union1 = null;
1282
- const obj_masterLabel_union1_error = (() => {
1283
- if (obj_masterLabel !== null) {
1284
- return new TypeError('Expected "null" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
1285
- }
1286
- })();
1287
- if (obj_masterLabel_union1_error != null) {
1288
- obj_masterLabel_union1 = obj_masterLabel_union1_error.message;
1289
- }
1290
- if (obj_masterLabel_union0 && obj_masterLabel_union1) {
1291
- let message = 'Object doesn\'t match union (at "' + path_masterLabel + '")';
1292
- message += '\n' + obj_masterLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
1293
- message += '\n' + obj_masterLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
1294
- return new TypeError(message);
1295
- }
1296
- })();
1297
- return v_error === undefined ? null : v_error;
1298
- }
1299
- function deepFreeze$1(input) {
1300
- const input_anchorObject = input.anchorObject;
1301
- if (input_anchorObject !== undefined) {
1302
- deepFreeze$4(input_anchorObject);
1303
- }
1304
- const input_eventTypes = input.eventTypes;
1305
- if (input_eventTypes !== undefined) {
1306
- for (let i = 0; i < input_eventTypes.length; i++) {
1307
- const input_eventTypes_item = input_eventTypes[i];
1308
- deepFreeze$2(input_eventTypes_item);
1309
- }
1310
- ObjectFreeze(input_eventTypes);
1311
- }
1312
- ObjectFreeze(input);
1205
+ function validate$1(obj, path = 'TimelineMetadataDefinitionRepresentation') {
1206
+ const v_error = (() => {
1207
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1208
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1209
+ }
1210
+ if (obj.anchorObject !== undefined) {
1211
+ const obj_anchorObject = obj.anchorObject;
1212
+ const path_anchorObject = path + '.anchorObject';
1213
+ const referencepath_anchorObjectValidationError = validate$4(obj_anchorObject, path_anchorObject);
1214
+ if (referencepath_anchorObjectValidationError !== null) {
1215
+ let message = 'Object doesn\'t match TimelineEntityRepresentation (at "' + path_anchorObject + '")\n';
1216
+ message += referencepath_anchorObjectValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1217
+ return new TypeError(message);
1218
+ }
1219
+ }
1220
+ if (obj.eventTypes !== undefined) {
1221
+ const obj_eventTypes = obj.eventTypes;
1222
+ const path_eventTypes = path + '.eventTypes';
1223
+ if (!ArrayIsArray(obj_eventTypes)) {
1224
+ return new TypeError('Expected "array" but received "' + typeof obj_eventTypes + '" (at "' + path_eventTypes + '")');
1225
+ }
1226
+ for (let i = 0; i < obj_eventTypes.length; i++) {
1227
+ const obj_eventTypes_item = obj_eventTypes[i];
1228
+ const path_eventTypes_item = path_eventTypes + '[' + i + ']';
1229
+ const referencepath_eventTypes_itemValidationError = validate$2(obj_eventTypes_item, path_eventTypes_item);
1230
+ if (referencepath_eventTypes_itemValidationError !== null) {
1231
+ let message = 'Object doesn\'t match TimelineEventTypeMetadataRepresentation (at "' + path_eventTypes_item + '")\n';
1232
+ message += referencepath_eventTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1233
+ return new TypeError(message);
1234
+ }
1235
+ }
1236
+ }
1237
+ const obj_fullName = obj.fullName;
1238
+ const path_fullName = path + '.fullName';
1239
+ let obj_fullName_union0 = null;
1240
+ const obj_fullName_union0_error = (() => {
1241
+ if (typeof obj_fullName !== 'string') {
1242
+ return new TypeError('Expected "string" but received "' + typeof obj_fullName + '" (at "' + path_fullName + '")');
1243
+ }
1244
+ })();
1245
+ if (obj_fullName_union0_error != null) {
1246
+ obj_fullName_union0 = obj_fullName_union0_error.message;
1247
+ }
1248
+ let obj_fullName_union1 = null;
1249
+ const obj_fullName_union1_error = (() => {
1250
+ if (obj_fullName !== null) {
1251
+ return new TypeError('Expected "null" but received "' + typeof obj_fullName + '" (at "' + path_fullName + '")');
1252
+ }
1253
+ })();
1254
+ if (obj_fullName_union1_error != null) {
1255
+ obj_fullName_union1 = obj_fullName_union1_error.message;
1256
+ }
1257
+ if (obj_fullName_union0 && obj_fullName_union1) {
1258
+ let message = 'Object doesn\'t match union (at "' + path_fullName + '")';
1259
+ message += '\n' + obj_fullName_union0.split('\n').map((line) => '\t' + line).join('\n');
1260
+ message += '\n' + obj_fullName_union1.split('\n').map((line) => '\t' + line).join('\n');
1261
+ return new TypeError(message);
1262
+ }
1263
+ if (obj.isActive !== undefined) {
1264
+ const obj_isActive = obj.isActive;
1265
+ const path_isActive = path + '.isActive';
1266
+ if (typeof obj_isActive !== 'boolean') {
1267
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
1268
+ }
1269
+ }
1270
+ const obj_masterLabel = obj.masterLabel;
1271
+ const path_masterLabel = path + '.masterLabel';
1272
+ let obj_masterLabel_union0 = null;
1273
+ const obj_masterLabel_union0_error = (() => {
1274
+ if (typeof obj_masterLabel !== 'string') {
1275
+ return new TypeError('Expected "string" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
1276
+ }
1277
+ })();
1278
+ if (obj_masterLabel_union0_error != null) {
1279
+ obj_masterLabel_union0 = obj_masterLabel_union0_error.message;
1280
+ }
1281
+ let obj_masterLabel_union1 = null;
1282
+ const obj_masterLabel_union1_error = (() => {
1283
+ if (obj_masterLabel !== null) {
1284
+ return new TypeError('Expected "null" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
1285
+ }
1286
+ })();
1287
+ if (obj_masterLabel_union1_error != null) {
1288
+ obj_masterLabel_union1 = obj_masterLabel_union1_error.message;
1289
+ }
1290
+ if (obj_masterLabel_union0 && obj_masterLabel_union1) {
1291
+ let message = 'Object doesn\'t match union (at "' + path_masterLabel + '")';
1292
+ message += '\n' + obj_masterLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
1293
+ message += '\n' + obj_masterLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
1294
+ return new TypeError(message);
1295
+ }
1296
+ })();
1297
+ return v_error === undefined ? null : v_error;
1298
+ }
1299
+ function deepFreeze$1(input) {
1300
+ const input_anchorObject = input.anchorObject;
1301
+ if (input_anchorObject !== undefined) {
1302
+ deepFreeze$4(input_anchorObject);
1303
+ }
1304
+ const input_eventTypes = input.eventTypes;
1305
+ if (input_eventTypes !== undefined) {
1306
+ for (let i = 0; i < input_eventTypes.length; i++) {
1307
+ const input_eventTypes_item = input_eventTypes[i];
1308
+ deepFreeze$2(input_eventTypes_item);
1309
+ }
1310
+ ObjectFreeze(input_eventTypes);
1311
+ }
1312
+ ObjectFreeze(input);
1313
1313
  }
1314
1314
 
1315
- const TTL = 500;
1316
- const VERSION = "73eb5de038a20239e23e31b0a0bb3cdc";
1317
- function validate(obj, path = 'TimelineMetadataResultRepresentation') {
1318
- const v_error = (() => {
1319
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1320
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1321
- }
1322
- if (obj.definitions !== undefined) {
1323
- const obj_definitions = obj.definitions;
1324
- const path_definitions = path + '.definitions';
1325
- if (!ArrayIsArray(obj_definitions)) {
1326
- return new TypeError('Expected "array" but received "' + typeof obj_definitions + '" (at "' + path_definitions + '")');
1327
- }
1328
- for (let i = 0; i < obj_definitions.length; i++) {
1329
- const obj_definitions_item = obj_definitions[i];
1330
- const path_definitions_item = path_definitions + '[' + i + ']';
1331
- const referencepath_definitions_itemValidationError = validate$1(obj_definitions_item, path_definitions_item);
1332
- if (referencepath_definitions_itemValidationError !== null) {
1333
- let message = 'Object doesn\'t match TimelineMetadataDefinitionRepresentation (at "' + path_definitions_item + '")\n';
1334
- message += referencepath_definitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1335
- return new TypeError(message);
1336
- }
1337
- }
1338
- }
1339
- if (obj.errors !== undefined) {
1340
- const obj_errors = obj.errors;
1341
- const path_errors = path + '.errors';
1342
- if (!ArrayIsArray(obj_errors)) {
1343
- return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1344
- }
1345
- for (let i = 0; i < obj_errors.length; i++) {
1346
- const obj_errors_item = obj_errors[i];
1347
- const path_errors_item = path_errors + '[' + i + ']';
1348
- const referencepath_errors_itemValidationError = validate$9(obj_errors_item, path_errors_item);
1349
- if (referencepath_errors_itemValidationError !== null) {
1350
- let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
1351
- message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1352
- return new TypeError(message);
1353
- }
1354
- }
1355
- }
1356
- const obj_status = obj.status;
1357
- const path_status = path + '.status';
1358
- let obj_status_union0 = null;
1359
- const obj_status_union0_error = (() => {
1360
- if (typeof obj_status !== 'string') {
1361
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1362
- }
1363
- })();
1364
- if (obj_status_union0_error != null) {
1365
- obj_status_union0 = obj_status_union0_error.message;
1366
- }
1367
- let obj_status_union1 = null;
1368
- const obj_status_union1_error = (() => {
1369
- if (obj_status !== null) {
1370
- return new TypeError('Expected "null" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1371
- }
1372
- })();
1373
- if (obj_status_union1_error != null) {
1374
- obj_status_union1 = obj_status_union1_error.message;
1375
- }
1376
- if (obj_status_union0 && obj_status_union1) {
1377
- let message = 'Object doesn\'t match union (at "' + path_status + '")';
1378
- message += '\n' + obj_status_union0.split('\n').map((line) => '\t' + line).join('\n');
1379
- message += '\n' + obj_status_union1.split('\n').map((line) => '\t' + line).join('\n');
1380
- return new TypeError(message);
1381
- }
1382
- })();
1383
- return v_error === undefined ? null : v_error;
1384
- }
1385
- const RepresentationType = 'TimelineMetadataResultRepresentation';
1386
- function normalize(input, existing, path, luvio, store, timestamp) {
1387
- return input;
1388
- }
1389
- const select$1 = function TimelineMetadataResultRepresentationSelect() {
1390
- return {
1391
- kind: 'Fragment',
1392
- version: VERSION,
1393
- private: [],
1394
- opaque: true
1395
- };
1396
- };
1397
- function equals(existing, incoming) {
1398
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
1399
- return false;
1400
- }
1401
- return true;
1402
- }
1403
- function deepFreeze(input) {
1404
- const input_definitions = input.definitions;
1405
- if (input_definitions !== undefined) {
1406
- for (let i = 0; i < input_definitions.length; i++) {
1407
- const input_definitions_item = input_definitions[i];
1408
- deepFreeze$1(input_definitions_item);
1409
- }
1410
- ObjectFreeze(input_definitions);
1411
- }
1412
- const input_errors = input.errors;
1413
- if (input_errors !== undefined) {
1414
- for (let i = 0; i < input_errors.length; i++) {
1415
- const input_errors_item = input_errors[i];
1416
- deepFreeze$9(input_errors_item);
1417
- }
1418
- ObjectFreeze(input_errors);
1419
- }
1420
- ObjectFreeze(input);
1421
- }
1422
- const ingest = function TimelineMetadataResultRepresentationIngest(input, path, luvio, store, timestamp) {
1423
- if (process.env.NODE_ENV !== 'production') {
1424
- const validateError = validate(input);
1425
- if (validateError !== null) {
1426
- throw validateError;
1427
- }
1428
- }
1429
- const key = path.fullPath;
1430
- const existingRecord = store.readEntry(key);
1431
- const ttlToUse = TTL;
1432
- let incomingRecord = normalize(input, store.readEntry(key), {
1433
- fullPath: key,
1434
- parent: path.parent,
1435
- propertyName: path.propertyName,
1436
- ttl: ttlToUse
1437
- });
1438
- deepFreeze(input);
1439
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1440
- luvio.storePublish(key, incomingRecord);
1441
- }
1442
- {
1443
- const storeMetadataParams = {
1444
- ttl: ttlToUse,
1445
- namespace: "Timeline",
1446
- version: VERSION,
1447
- representationName: RepresentationType,
1448
- };
1449
- luvio.publishStoreMetadata(key, storeMetadataParams);
1450
- }
1451
- return createLink(key);
1452
- };
1453
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
1454
- const rootKeySet = new StoreKeyMap();
1455
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1456
- const rootKey = fullPathFactory();
1457
- rootKeySet.set(rootKey, {
1458
- namespace: keyPrefix,
1459
- representationName: RepresentationType,
1460
- mergeable: false
1461
- });
1462
- return rootKeySet;
1315
+ const TTL = 500;
1316
+ const VERSION = "73eb5de038a20239e23e31b0a0bb3cdc";
1317
+ function validate(obj, path = 'TimelineMetadataResultRepresentation') {
1318
+ const v_error = (() => {
1319
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1320
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1321
+ }
1322
+ if (obj.definitions !== undefined) {
1323
+ const obj_definitions = obj.definitions;
1324
+ const path_definitions = path + '.definitions';
1325
+ if (!ArrayIsArray(obj_definitions)) {
1326
+ return new TypeError('Expected "array" but received "' + typeof obj_definitions + '" (at "' + path_definitions + '")');
1327
+ }
1328
+ for (let i = 0; i < obj_definitions.length; i++) {
1329
+ const obj_definitions_item = obj_definitions[i];
1330
+ const path_definitions_item = path_definitions + '[' + i + ']';
1331
+ const referencepath_definitions_itemValidationError = validate$1(obj_definitions_item, path_definitions_item);
1332
+ if (referencepath_definitions_itemValidationError !== null) {
1333
+ let message = 'Object doesn\'t match TimelineMetadataDefinitionRepresentation (at "' + path_definitions_item + '")\n';
1334
+ message += referencepath_definitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1335
+ return new TypeError(message);
1336
+ }
1337
+ }
1338
+ }
1339
+ if (obj.errors !== undefined) {
1340
+ const obj_errors = obj.errors;
1341
+ const path_errors = path + '.errors';
1342
+ if (!ArrayIsArray(obj_errors)) {
1343
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1344
+ }
1345
+ for (let i = 0; i < obj_errors.length; i++) {
1346
+ const obj_errors_item = obj_errors[i];
1347
+ const path_errors_item = path_errors + '[' + i + ']';
1348
+ const referencepath_errors_itemValidationError = validate$9(obj_errors_item, path_errors_item);
1349
+ if (referencepath_errors_itemValidationError !== null) {
1350
+ let message = 'Object doesn\'t match TimelineErrorRepresentation (at "' + path_errors_item + '")\n';
1351
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1352
+ return new TypeError(message);
1353
+ }
1354
+ }
1355
+ }
1356
+ const obj_status = obj.status;
1357
+ const path_status = path + '.status';
1358
+ let obj_status_union0 = null;
1359
+ const obj_status_union0_error = (() => {
1360
+ if (typeof obj_status !== 'string') {
1361
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1362
+ }
1363
+ })();
1364
+ if (obj_status_union0_error != null) {
1365
+ obj_status_union0 = obj_status_union0_error.message;
1366
+ }
1367
+ let obj_status_union1 = null;
1368
+ const obj_status_union1_error = (() => {
1369
+ if (obj_status !== null) {
1370
+ return new TypeError('Expected "null" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1371
+ }
1372
+ })();
1373
+ if (obj_status_union1_error != null) {
1374
+ obj_status_union1 = obj_status_union1_error.message;
1375
+ }
1376
+ if (obj_status_union0 && obj_status_union1) {
1377
+ let message = 'Object doesn\'t match union (at "' + path_status + '")';
1378
+ message += '\n' + obj_status_union0.split('\n').map((line) => '\t' + line).join('\n');
1379
+ message += '\n' + obj_status_union1.split('\n').map((line) => '\t' + line).join('\n');
1380
+ return new TypeError(message);
1381
+ }
1382
+ })();
1383
+ return v_error === undefined ? null : v_error;
1384
+ }
1385
+ const RepresentationType = 'TimelineMetadataResultRepresentation';
1386
+ function normalize(input, existing, path, luvio, store, timestamp) {
1387
+ return input;
1388
+ }
1389
+ const select$1 = function TimelineMetadataResultRepresentationSelect() {
1390
+ return {
1391
+ kind: 'Fragment',
1392
+ version: VERSION,
1393
+ private: [],
1394
+ opaque: true
1395
+ };
1396
+ };
1397
+ function equals(existing, incoming) {
1398
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1399
+ return false;
1400
+ }
1401
+ return true;
1402
+ }
1403
+ function deepFreeze(input) {
1404
+ const input_definitions = input.definitions;
1405
+ if (input_definitions !== undefined) {
1406
+ for (let i = 0; i < input_definitions.length; i++) {
1407
+ const input_definitions_item = input_definitions[i];
1408
+ deepFreeze$1(input_definitions_item);
1409
+ }
1410
+ ObjectFreeze(input_definitions);
1411
+ }
1412
+ const input_errors = input.errors;
1413
+ if (input_errors !== undefined) {
1414
+ for (let i = 0; i < input_errors.length; i++) {
1415
+ const input_errors_item = input_errors[i];
1416
+ deepFreeze$9(input_errors_item);
1417
+ }
1418
+ ObjectFreeze(input_errors);
1419
+ }
1420
+ ObjectFreeze(input);
1421
+ }
1422
+ const ingest = function TimelineMetadataResultRepresentationIngest(input, path, luvio, store, timestamp) {
1423
+ if (process.env.NODE_ENV !== 'production') {
1424
+ const validateError = validate(input);
1425
+ if (validateError !== null) {
1426
+ throw validateError;
1427
+ }
1428
+ }
1429
+ const key = path.fullPath;
1430
+ const existingRecord = store.readEntry(key);
1431
+ const ttlToUse = TTL;
1432
+ let incomingRecord = normalize(input, store.readEntry(key), {
1433
+ fullPath: key,
1434
+ parent: path.parent,
1435
+ propertyName: path.propertyName,
1436
+ ttl: ttlToUse
1437
+ });
1438
+ deepFreeze(input);
1439
+ if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1440
+ luvio.storePublish(key, incomingRecord);
1441
+ }
1442
+ {
1443
+ const storeMetadataParams = {
1444
+ ttl: ttlToUse,
1445
+ namespace: "Timeline",
1446
+ version: VERSION,
1447
+ representationName: RepresentationType,
1448
+ };
1449
+ luvio.publishStoreMetadata(key, storeMetadataParams);
1450
+ }
1451
+ return createLink(key);
1452
+ };
1453
+ function getTypeCacheKeys(luvio, input, fullPathFactory) {
1454
+ const rootKeySet = new StoreKeyMap();
1455
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1456
+ const rootKey = fullPathFactory();
1457
+ rootKeySet.set(rootKey, {
1458
+ namespace: keyPrefix,
1459
+ representationName: RepresentationType,
1460
+ mergeable: false
1461
+ });
1462
+ return rootKeySet;
1463
1463
  }
1464
1464
 
1465
- function select(luvio, params) {
1466
- return select$1();
1467
- }
1468
- function keyBuilder$1(luvio, params) {
1469
- return keyPrefix + '::TimelineMetadataResultRepresentation:(' + 'fullNames:' + params.queryParams.fullNames + ')';
1470
- }
1471
- function getResponseCacheKeys(luvio, resourceParams, response) {
1472
- return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
1473
- }
1474
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1475
- const { body } = response;
1476
- const key = keyBuilder$1(luvio, resourceParams);
1477
- luvio.storeIngest(key, ingest, body);
1478
- const snapshot = luvio.storeLookup({
1479
- recordId: key,
1480
- node: select(),
1481
- variables: {},
1482
- }, snapshotRefresh);
1483
- if (process.env.NODE_ENV !== 'production') {
1484
- if (snapshot.state !== 'Fulfilled') {
1485
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1486
- }
1487
- }
1488
- return snapshot;
1489
- }
1490
- function ingestError(luvio, params, error, snapshotRefresh) {
1491
- const key = keyBuilder$1(luvio, params);
1492
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1493
- const storeMetadataParams = {
1494
- ttl: TTL,
1495
- namespace: keyPrefix,
1496
- version: VERSION,
1497
- representationName: RepresentationType
1498
- };
1499
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1500
- return errorSnapshot;
1501
- }
1502
- function createResourceRequest(config) {
1503
- const headers = {};
1504
- return {
1505
- baseUri: '/services/data/v58.0',
1506
- basePath: '/connect/timeline/metadata/configurations',
1507
- method: 'get',
1508
- body: null,
1509
- urlParams: {},
1510
- queryParams: config.queryParams,
1511
- headers,
1512
- priority: 'normal',
1513
- };
1465
+ function select(luvio, params) {
1466
+ return select$1();
1467
+ }
1468
+ function keyBuilder$1(luvio, params) {
1469
+ return keyPrefix + '::TimelineMetadataResultRepresentation:(' + 'fullNames:' + params.queryParams.fullNames + ')';
1470
+ }
1471
+ function getResponseCacheKeys(luvio, resourceParams, response) {
1472
+ return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
1473
+ }
1474
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1475
+ const { body } = response;
1476
+ const key = keyBuilder$1(luvio, resourceParams);
1477
+ luvio.storeIngest(key, ingest, body);
1478
+ const snapshot = luvio.storeLookup({
1479
+ recordId: key,
1480
+ node: select(),
1481
+ variables: {},
1482
+ }, snapshotRefresh);
1483
+ if (process.env.NODE_ENV !== 'production') {
1484
+ if (snapshot.state !== 'Fulfilled') {
1485
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1486
+ }
1487
+ }
1488
+ return snapshot;
1489
+ }
1490
+ function ingestError(luvio, params, error, snapshotRefresh) {
1491
+ const key = keyBuilder$1(luvio, params);
1492
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1493
+ const storeMetadataParams = {
1494
+ ttl: TTL,
1495
+ namespace: keyPrefix,
1496
+ version: VERSION,
1497
+ representationName: RepresentationType
1498
+ };
1499
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1500
+ return errorSnapshot;
1501
+ }
1502
+ function createResourceRequest(config) {
1503
+ const headers = {};
1504
+ return {
1505
+ baseUri: '/services/data/v58.0',
1506
+ basePath: '/connect/timeline/metadata/configurations',
1507
+ method: 'get',
1508
+ body: null,
1509
+ urlParams: {},
1510
+ queryParams: config.queryParams,
1511
+ headers,
1512
+ priority: 'normal',
1513
+ };
1514
1514
  }
1515
1515
 
1516
- const getTimelineMetadata_ConfigPropertyNames = {
1517
- displayName: 'getTimelineMetadata',
1518
- parameters: {
1519
- required: [],
1520
- optional: ['fullNames']
1521
- }
1522
- };
1523
- function createResourceParams(config) {
1524
- const resourceParams = {
1525
- queryParams: {
1526
- fullNames: config.fullNames
1527
- }
1528
- };
1529
- return resourceParams;
1530
- }
1531
- function keyBuilder(luvio, config) {
1532
- const resourceParams = createResourceParams(config);
1533
- return keyBuilder$1(luvio, resourceParams);
1534
- }
1535
- function typeCheckConfig(untrustedConfig) {
1536
- const config = {};
1537
- const untrustedConfig_fullNames = untrustedConfig.fullNames;
1538
- if (ArrayIsArray$1(untrustedConfig_fullNames)) {
1539
- const untrustedConfig_fullNames_array = [];
1540
- for (let i = 0, arrayLength = untrustedConfig_fullNames.length; i < arrayLength; i++) {
1541
- const untrustedConfig_fullNames_item = untrustedConfig_fullNames[i];
1542
- if (typeof untrustedConfig_fullNames_item === 'string') {
1543
- untrustedConfig_fullNames_array.push(untrustedConfig_fullNames_item);
1544
- }
1545
- }
1546
- config.fullNames = untrustedConfig_fullNames_array;
1547
- }
1548
- return config;
1549
- }
1550
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1551
- if (!untrustedIsObject(untrustedConfig)) {
1552
- return null;
1553
- }
1554
- if (process.env.NODE_ENV !== 'production') {
1555
- validateConfig(untrustedConfig, configPropertyNames);
1556
- }
1557
- const config = typeCheckConfig(untrustedConfig);
1558
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1559
- return null;
1560
- }
1561
- return config;
1562
- }
1563
- function adapterFragment(luvio, config) {
1564
- createResourceParams(config);
1565
- return select();
1566
- }
1567
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1568
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
1569
- config,
1570
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1571
- });
1572
- return luvio.storeBroadcast().then(() => snapshot);
1573
- }
1574
- function onFetchResponseError(luvio, config, resourceParams, response) {
1575
- const snapshot = ingestError(luvio, resourceParams, response, {
1576
- config,
1577
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1578
- });
1579
- return luvio.storeBroadcast().then(() => snapshot);
1580
- }
1581
- function buildNetworkSnapshot(luvio, config, options) {
1582
- const resourceParams = createResourceParams(config);
1583
- const request = createResourceRequest(resourceParams);
1584
- return luvio.dispatchResourceRequest(request, options)
1585
- .then((response) => {
1586
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
1587
- }, (response) => {
1588
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1589
- });
1590
- }
1591
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1592
- const { luvio, config } = context;
1593
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1594
- const dispatchOptions = {
1595
- resourceRequestContext: {
1596
- requestCorrelator,
1597
- luvioRequestMethod: undefined,
1598
- },
1599
- eventObservers
1600
- };
1601
- if (networkPriority !== 'normal') {
1602
- dispatchOptions.overrides = {
1603
- priority: networkPriority
1604
- };
1605
- }
1606
- return buildNetworkSnapshot(luvio, config, dispatchOptions);
1607
- }
1608
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
1609
- const { luvio, config } = context;
1610
- const selector = {
1611
- recordId: keyBuilder(luvio, config),
1612
- node: adapterFragment(luvio, config),
1613
- variables: {},
1614
- };
1615
- const cacheSnapshot = storeLookup(selector, {
1616
- config,
1617
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1618
- });
1619
- return cacheSnapshot;
1620
- }
1621
- const getTimelineMetadataAdapterFactory = (luvio) => function Timeline__getTimelineMetadata(untrustedConfig, requestContext) {
1622
- const config = validateAdapterConfig(untrustedConfig, getTimelineMetadata_ConfigPropertyNames);
1623
- // Invalid or incomplete config
1624
- if (config === null) {
1625
- return null;
1626
- }
1627
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1628
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1516
+ const getTimelineMetadata_ConfigPropertyNames = {
1517
+ displayName: 'getTimelineMetadata',
1518
+ parameters: {
1519
+ required: [],
1520
+ optional: ['fullNames']
1521
+ }
1522
+ };
1523
+ function createResourceParams(config) {
1524
+ const resourceParams = {
1525
+ queryParams: {
1526
+ fullNames: config.fullNames
1527
+ }
1528
+ };
1529
+ return resourceParams;
1530
+ }
1531
+ function keyBuilder(luvio, config) {
1532
+ const resourceParams = createResourceParams(config);
1533
+ return keyBuilder$1(luvio, resourceParams);
1534
+ }
1535
+ function typeCheckConfig(untrustedConfig) {
1536
+ const config = {};
1537
+ const untrustedConfig_fullNames = untrustedConfig.fullNames;
1538
+ if (ArrayIsArray$1(untrustedConfig_fullNames)) {
1539
+ const untrustedConfig_fullNames_array = [];
1540
+ for (let i = 0, arrayLength = untrustedConfig_fullNames.length; i < arrayLength; i++) {
1541
+ const untrustedConfig_fullNames_item = untrustedConfig_fullNames[i];
1542
+ if (typeof untrustedConfig_fullNames_item === 'string') {
1543
+ untrustedConfig_fullNames_array.push(untrustedConfig_fullNames_item);
1544
+ }
1545
+ }
1546
+ config.fullNames = untrustedConfig_fullNames_array;
1547
+ }
1548
+ return config;
1549
+ }
1550
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1551
+ if (!untrustedIsObject(untrustedConfig)) {
1552
+ return null;
1553
+ }
1554
+ if (process.env.NODE_ENV !== 'production') {
1555
+ validateConfig(untrustedConfig, configPropertyNames);
1556
+ }
1557
+ const config = typeCheckConfig(untrustedConfig);
1558
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1559
+ return null;
1560
+ }
1561
+ return config;
1562
+ }
1563
+ function adapterFragment(luvio, config) {
1564
+ createResourceParams(config);
1565
+ return select();
1566
+ }
1567
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1568
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
1569
+ config,
1570
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1571
+ });
1572
+ return luvio.storeBroadcast().then(() => snapshot);
1573
+ }
1574
+ function onFetchResponseError(luvio, config, resourceParams, response) {
1575
+ const snapshot = ingestError(luvio, resourceParams, response, {
1576
+ config,
1577
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1578
+ });
1579
+ return luvio.storeBroadcast().then(() => snapshot);
1580
+ }
1581
+ function buildNetworkSnapshot(luvio, config, options) {
1582
+ const resourceParams = createResourceParams(config);
1583
+ const request = createResourceRequest(resourceParams);
1584
+ return luvio.dispatchResourceRequest(request, options)
1585
+ .then((response) => {
1586
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
1587
+ }, (response) => {
1588
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1589
+ });
1590
+ }
1591
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1592
+ const { luvio, config } = context;
1593
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1594
+ const dispatchOptions = {
1595
+ resourceRequestContext: {
1596
+ requestCorrelator,
1597
+ luvioRequestMethod: undefined,
1598
+ },
1599
+ eventObservers
1600
+ };
1601
+ if (networkPriority !== 'normal') {
1602
+ dispatchOptions.overrides = {
1603
+ priority: networkPriority
1604
+ };
1605
+ }
1606
+ return buildNetworkSnapshot(luvio, config, dispatchOptions);
1607
+ }
1608
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1609
+ const { luvio, config } = context;
1610
+ const selector = {
1611
+ recordId: keyBuilder(luvio, config),
1612
+ node: adapterFragment(luvio, config),
1613
+ variables: {},
1614
+ };
1615
+ const cacheSnapshot = storeLookup(selector, {
1616
+ config,
1617
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1618
+ });
1619
+ return cacheSnapshot;
1620
+ }
1621
+ const getTimelineMetadataAdapterFactory = (luvio) => function Timeline__getTimelineMetadata(untrustedConfig, requestContext) {
1622
+ const config = validateAdapterConfig(untrustedConfig, getTimelineMetadata_ConfigPropertyNames);
1623
+ // Invalid or incomplete config
1624
+ if (config === null) {
1625
+ return null;
1626
+ }
1627
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1628
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1629
1629
  };
1630
1630
 
1631
1631
  export { getTimelineDataAdapterFactory, getTimelineMetadataAdapterFactory };