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