@salesforce/lds-adapters-industries-timeline 1.168.0 → 1.169.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.
@@ -58,6 +58,373 @@ function createLink(ref) {
58
58
  };
59
59
  }
60
60
 
61
+ function validate$e(obj, path = 'DmoFieldsOutputRepresentation') {
62
+ const v_error = (() => {
63
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
64
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
65
+ }
66
+ const obj_displayName = obj.displayName;
67
+ const path_displayName = path + '.displayName';
68
+ if (typeof obj_displayName !== 'string') {
69
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
70
+ }
71
+ const obj_name = obj.name;
72
+ const path_name = path + '.name';
73
+ if (typeof obj_name !== 'string') {
74
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
75
+ }
76
+ const obj_type = obj.type;
77
+ const path_type = path + '.type';
78
+ if (typeof obj_type !== 'string') {
79
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
80
+ }
81
+ })();
82
+ return v_error === undefined ? null : v_error;
83
+ }
84
+
85
+ function validate$d(obj, path = 'RelationshipTypeOutputRepresentation') {
86
+ const v_error = (() => {
87
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
88
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
89
+ }
90
+ const obj_attribute = obj.attribute;
91
+ const path_attribute = path + '.attribute';
92
+ if (typeof obj_attribute !== 'string') {
93
+ return new TypeError('Expected "string" but received "' + typeof obj_attribute + '" (at "' + path_attribute + '")');
94
+ }
95
+ const obj_name = obj.name;
96
+ const path_name = path + '.name';
97
+ if (typeof obj_name !== 'string') {
98
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
99
+ }
100
+ })();
101
+ return v_error === undefined ? null : v_error;
102
+ }
103
+
104
+ function validate$c(obj, path = 'DmoRelationshipsOutputRepresentation') {
105
+ const v_error = (() => {
106
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
107
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
108
+ }
109
+ const obj_fromEntity = obj.fromEntity;
110
+ const path_fromEntity = path + '.fromEntity';
111
+ const referencepath_fromEntityValidationError = validate$d(obj_fromEntity, path_fromEntity);
112
+ if (referencepath_fromEntityValidationError !== null) {
113
+ let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_fromEntity + '")\n';
114
+ message += referencepath_fromEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
115
+ return new TypeError(message);
116
+ }
117
+ const obj_toEntity = obj.toEntity;
118
+ const path_toEntity = path + '.toEntity';
119
+ const referencepath_toEntityValidationError = validate$d(obj_toEntity, path_toEntity);
120
+ if (referencepath_toEntityValidationError !== null) {
121
+ let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_toEntity + '")\n';
122
+ message += referencepath_toEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
123
+ return new TypeError(message);
124
+ }
125
+ })();
126
+ return v_error === undefined ? null : v_error;
127
+ }
128
+
129
+ function validate$b(obj, path = 'DmoOutputRepresentation') {
130
+ const v_error = (() => {
131
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
132
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
133
+ }
134
+ const obj_category = obj.category;
135
+ const path_category = path + '.category';
136
+ if (typeof obj_category !== 'string') {
137
+ return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
138
+ }
139
+ const obj_displayName = obj.displayName;
140
+ const path_displayName = path + '.displayName';
141
+ if (typeof obj_displayName !== 'string') {
142
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
143
+ }
144
+ const obj_fields = obj.fields;
145
+ const path_fields = path + '.fields';
146
+ if (!ArrayIsArray(obj_fields)) {
147
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
148
+ }
149
+ for (let i = 0; i < obj_fields.length; i++) {
150
+ const obj_fields_item = obj_fields[i];
151
+ const path_fields_item = path_fields + '[' + i + ']';
152
+ const referencepath_fields_itemValidationError = validate$e(obj_fields_item, path_fields_item);
153
+ if (referencepath_fields_itemValidationError !== null) {
154
+ let message = 'Object doesn\'t match DmoFieldsOutputRepresentation (at "' + path_fields_item + '")\n';
155
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
156
+ return new TypeError(message);
157
+ }
158
+ }
159
+ const obj_name = obj.name;
160
+ const path_name = path + '.name';
161
+ if (typeof obj_name !== 'string') {
162
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
163
+ }
164
+ const obj_relationships = obj.relationships;
165
+ const path_relationships = path + '.relationships';
166
+ if (!ArrayIsArray(obj_relationships)) {
167
+ return new TypeError('Expected "array" but received "' + typeof obj_relationships + '" (at "' + path_relationships + '")');
168
+ }
169
+ for (let i = 0; i < obj_relationships.length; i++) {
170
+ const obj_relationships_item = obj_relationships[i];
171
+ const path_relationships_item = path_relationships + '[' + i + ']';
172
+ const referencepath_relationships_itemValidationError = validate$c(obj_relationships_item, path_relationships_item);
173
+ if (referencepath_relationships_itemValidationError !== null) {
174
+ let message = 'Object doesn\'t match DmoRelationshipsOutputRepresentation (at "' + path_relationships_item + '")\n';
175
+ message += referencepath_relationships_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
176
+ return new TypeError(message);
177
+ }
178
+ }
179
+ })();
180
+ return v_error === undefined ? null : v_error;
181
+ }
182
+
183
+ const TTL$2 = 600000;
184
+ const VERSION$2 = "84ccc17f91013e292e7b01a291dd0322";
185
+ function validate$a(obj, path = 'CdpMetadataOutputRepresentation') {
186
+ const v_error = (() => {
187
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
188
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
189
+ }
190
+ const obj_dmos = obj.dmos;
191
+ const path_dmos = path + '.dmos';
192
+ if (!ArrayIsArray(obj_dmos)) {
193
+ return new TypeError('Expected "array" but received "' + typeof obj_dmos + '" (at "' + path_dmos + '")');
194
+ }
195
+ for (let i = 0; i < obj_dmos.length; i++) {
196
+ const obj_dmos_item = obj_dmos[i];
197
+ const path_dmos_item = path_dmos + '[' + i + ']';
198
+ const referencepath_dmos_itemValidationError = validate$b(obj_dmos_item, path_dmos_item);
199
+ if (referencepath_dmos_itemValidationError !== null) {
200
+ let message = 'Object doesn\'t match DmoOutputRepresentation (at "' + path_dmos_item + '")\n';
201
+ message += referencepath_dmos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
202
+ return new TypeError(message);
203
+ }
204
+ }
205
+ })();
206
+ return v_error === undefined ? null : v_error;
207
+ }
208
+ const RepresentationType$2 = 'CdpMetadataOutputRepresentation';
209
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
210
+ return input;
211
+ }
212
+ const select$5 = function CdpMetadataOutputRepresentationSelect() {
213
+ return {
214
+ kind: 'Fragment',
215
+ version: VERSION$2,
216
+ private: [],
217
+ opaque: true
218
+ };
219
+ };
220
+ function equals$2(existing, incoming) {
221
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
222
+ return false;
223
+ }
224
+ return true;
225
+ }
226
+ const ingest$2 = function CdpMetadataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
227
+ if (process.env.NODE_ENV !== 'production') {
228
+ const validateError = validate$a(input);
229
+ if (validateError !== null) {
230
+ throw validateError;
231
+ }
232
+ }
233
+ const key = path.fullPath;
234
+ const existingRecord = store.readEntry(key);
235
+ const ttlToUse = TTL$2;
236
+ let incomingRecord = normalize$2(input, store.readEntry(key), {
237
+ fullPath: key,
238
+ parent: path.parent,
239
+ propertyName: path.propertyName,
240
+ ttl: ttlToUse
241
+ });
242
+ if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
243
+ luvio.storePublish(key, incomingRecord);
244
+ }
245
+ {
246
+ const storeMetadataParams = {
247
+ ttl: ttlToUse,
248
+ namespace: "Timeline",
249
+ version: VERSION$2,
250
+ representationName: RepresentationType$2,
251
+ };
252
+ luvio.publishStoreMetadata(key, storeMetadataParams);
253
+ }
254
+ return createLink(key);
255
+ };
256
+ function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
257
+ const rootKeySet = new StoreKeyMap();
258
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
259
+ const rootKey = fullPathFactory();
260
+ rootKeySet.set(rootKey, {
261
+ namespace: keyPrefix,
262
+ representationName: RepresentationType$2,
263
+ mergeable: false
264
+ });
265
+ return rootKeySet;
266
+ }
267
+
268
+ function select$4(luvio, params) {
269
+ return select$5();
270
+ }
271
+ function keyBuilder$5(luvio, params) {
272
+ return keyPrefix + '::CdpMetadataOutputRepresentation:(' + 'objectCategory:' + params.queryParams.objectCategory + ')';
273
+ }
274
+ function getResponseCacheKeys$2(luvio, resourceParams, response) {
275
+ return getTypeCacheKeys$2(luvio, response, () => keyBuilder$5(luvio, resourceParams));
276
+ }
277
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
278
+ const { body } = response;
279
+ const key = keyBuilder$5(luvio, resourceParams);
280
+ luvio.storeIngest(key, ingest$2, body);
281
+ const snapshot = luvio.storeLookup({
282
+ recordId: key,
283
+ node: select$4(),
284
+ variables: {},
285
+ }, snapshotRefresh);
286
+ if (process.env.NODE_ENV !== 'production') {
287
+ if (snapshot.state !== 'Fulfilled') {
288
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
289
+ }
290
+ }
291
+ deepFreeze(snapshot.data);
292
+ return snapshot;
293
+ }
294
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
295
+ const key = keyBuilder$5(luvio, params);
296
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
297
+ const storeMetadataParams = {
298
+ ttl: TTL$2,
299
+ namespace: keyPrefix,
300
+ version: VERSION$2,
301
+ representationName: RepresentationType$2
302
+ };
303
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
304
+ return errorSnapshot;
305
+ }
306
+ function createResourceRequest$2(config) {
307
+ const headers = {};
308
+ return {
309
+ baseUri: '/services/data/v59.0',
310
+ basePath: '/connect/timeline/cust-data-pfrm/data-model-objects',
311
+ method: 'get',
312
+ body: null,
313
+ urlParams: {},
314
+ queryParams: config.queryParams,
315
+ headers,
316
+ priority: 'normal',
317
+ };
318
+ }
319
+
320
+ const getDataModelObjects_ConfigPropertyNames = {
321
+ displayName: 'getDataModelObjects',
322
+ parameters: {
323
+ required: [],
324
+ optional: ['objectCategory']
325
+ }
326
+ };
327
+ function createResourceParams$2(config) {
328
+ const resourceParams = {
329
+ queryParams: {
330
+ objectCategory: config.objectCategory
331
+ }
332
+ };
333
+ return resourceParams;
334
+ }
335
+ function keyBuilder$4(luvio, config) {
336
+ const resourceParams = createResourceParams$2(config);
337
+ return keyBuilder$5(luvio, resourceParams);
338
+ }
339
+ function typeCheckConfig$2(untrustedConfig) {
340
+ const config = {};
341
+ const untrustedConfig_objectCategory = untrustedConfig.objectCategory;
342
+ if (typeof untrustedConfig_objectCategory === 'string') {
343
+ config.objectCategory = untrustedConfig_objectCategory;
344
+ }
345
+ return config;
346
+ }
347
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
348
+ if (!untrustedIsObject(untrustedConfig)) {
349
+ return null;
350
+ }
351
+ if (process.env.NODE_ENV !== 'production') {
352
+ validateConfig(untrustedConfig, configPropertyNames);
353
+ }
354
+ const config = typeCheckConfig$2(untrustedConfig);
355
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
356
+ return null;
357
+ }
358
+ return config;
359
+ }
360
+ function adapterFragment$2(luvio, config) {
361
+ createResourceParams$2(config);
362
+ return select$4();
363
+ }
364
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
365
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
366
+ config,
367
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
368
+ });
369
+ return luvio.storeBroadcast().then(() => snapshot);
370
+ }
371
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
372
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
373
+ config,
374
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
375
+ });
376
+ return luvio.storeBroadcast().then(() => snapshot);
377
+ }
378
+ function buildNetworkSnapshot$2(luvio, config, options) {
379
+ const resourceParams = createResourceParams$2(config);
380
+ const request = createResourceRequest$2(resourceParams);
381
+ return luvio.dispatchResourceRequest(request, options)
382
+ .then((response) => {
383
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
384
+ }, (response) => {
385
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
386
+ });
387
+ }
388
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
389
+ const { luvio, config } = context;
390
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
391
+ const dispatchOptions = {
392
+ resourceRequestContext: {
393
+ requestCorrelator,
394
+ luvioRequestMethod: undefined,
395
+ },
396
+ eventObservers
397
+ };
398
+ if (networkPriority !== 'normal') {
399
+ dispatchOptions.overrides = {
400
+ priority: networkPriority
401
+ };
402
+ }
403
+ return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
404
+ }
405
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
406
+ const { luvio, config } = context;
407
+ const selector = {
408
+ recordId: keyBuilder$4(luvio, config),
409
+ node: adapterFragment$2(luvio, config),
410
+ variables: {},
411
+ };
412
+ const cacheSnapshot = storeLookup(selector, {
413
+ config,
414
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
415
+ });
416
+ return cacheSnapshot;
417
+ }
418
+ const getDataModelObjectsAdapterFactory = (luvio) => function Timeline__getDataModelObjects(untrustedConfig, requestContext) {
419
+ const config = validateAdapterConfig$2(untrustedConfig, getDataModelObjects_ConfigPropertyNames);
420
+ // Invalid or incomplete config
421
+ if (config === null) {
422
+ return null;
423
+ }
424
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
425
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
426
+ };
427
+
61
428
  function validate$9(obj, path = 'TimelineErrorRepresentation') {
62
429
  const v_error = (() => {
63
430
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -1505,4 +1872,4 @@ const getTimelineMetadataAdapterFactory = (luvio) => function Timeline__getTimel
1505
1872
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1506
1873
  };
1507
1874
 
1508
- export { getTimelineDataAdapterFactory, getTimelineMetadataAdapterFactory };
1875
+ export { getDataModelObjectsAdapterFactory, getTimelineDataAdapterFactory, getTimelineMetadataAdapterFactory };
@@ -0,0 +1,26 @@
1
+ import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
2
+ import { ResourceRequestConfig as resources_getConnectTimelineCustDataPfrmDataModelObjects_ResourceRequestConfig } from '../resources/getConnectTimelineCustDataPfrmDataModelObjects';
3
+ import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
4
+ import { CdpMetadataOutputRepresentation as types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation } from '../types/CdpMetadataOutputRepresentation';
5
+ export declare const adapterName = "getDataModelObjects";
6
+ export declare const getDataModelObjects_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
+ export interface GetDataModelObjectsConfig {
8
+ objectCategory?: string;
9
+ }
10
+ export declare function createResourceParams(config: GetDataModelObjectsConfig): resources_getConnectTimelineCustDataPfrmDataModelObjects_ResourceRequestConfig;
11
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetDataModelObjectsConfig): string;
12
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetDataModelObjectsConfig): $64$luvio_engine_NormalizedKeyMetadata;
13
+ export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetDataModelObjectsConfig>): adapter$45$utils_Untrusted<GetDataModelObjectsConfig>;
14
+ export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetDataModelObjectsConfig | null;
15
+ export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetDataModelObjectsConfig): $64$luvio_engine_Fragment;
16
+ export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetDataModelObjectsConfig): $64$luvio_engine_Snapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, any>;
17
+ export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetDataModelObjectsConfig, resourceParams: resources_getConnectTimelineCustDataPfrmDataModelObjects_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, any>>;
18
+ export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetDataModelObjectsConfig, resourceParams: resources_getConnectTimelineCustDataPfrmDataModelObjects_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
19
+ export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetDataModelObjectsConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, any>>;
20
+ export type BuildSnapshotContext = {
21
+ luvio: $64$luvio_engine_Luvio;
22
+ config: GetDataModelObjectsConfig;
23
+ };
24
+ export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, any>>;
25
+ export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation>): $64$luvio_engine_Snapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, any>;
26
+ export declare const getDataModelObjectsAdapterFactory: $64$luvio_engine_AdapterFactory<GetDataModelObjectsConfig, types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation>;
@@ -1,2 +1,3 @@
1
+ export { getDataModelObjectsAdapterFactory } from '../adapters/getDataModelObjects';
1
2
  export { getTimelineDataAdapterFactory } from '../adapters/getTimelineData';
2
3
  export { getTimelineMetadataAdapterFactory } from '../adapters/getTimelineMetadata';
@@ -1,5 +1,7 @@
1
+ declare let getDataModelObjects: any;
1
2
  declare let getTimelineData: any;
2
3
  declare let getTimelineMetadata: any;
4
+ declare let getDataModelObjects_imperative: any;
3
5
  declare let getTimelineData_imperative: any;
4
6
  declare let getTimelineMetadata_imperative: any;
5
- export { getTimelineData, getTimelineMetadata, getTimelineData_imperative, getTimelineMetadata_imperative };
7
+ export { getDataModelObjects, getTimelineData, getTimelineMetadata, getDataModelObjects_imperative, getTimelineData_imperative, getTimelineMetadata_imperative };
@@ -0,0 +1,15 @@
1
+ import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
2
+ import { CdpMetadataOutputRepresentation as types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation } from '../types/CdpMetadataOutputRepresentation';
3
+ export interface ResourceRequestConfig {
4
+ queryParams: {
5
+ objectCategory?: string;
6
+ };
7
+ }
8
+ export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
9
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
10
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
11
+ export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
+ export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation, any>;
13
+ export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_CdpMetadataOutputRepresentation_CdpMetadataOutputRepresentation>): $64$luvio_engine_ErrorSnapshot;
14
+ export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
15
+ export default createResourceRequest;
@@ -0,0 +1,30 @@
1
+ import { DmoOutputRepresentation as DmoOutputRepresentation_DmoOutputRepresentation } from './DmoOutputRepresentation';
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
3
+ export declare const TTL = 600000;
4
+ export declare const VERSION = "84ccc17f91013e292e7b01a291dd0322";
5
+ export declare function validate(obj: any, path?: string): TypeError | null;
6
+ export declare const RepresentationType: string;
7
+ export declare function normalize(input: CdpMetadataOutputRepresentation, existing: CdpMetadataOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): CdpMetadataOutputRepresentationNormalized;
8
+ export declare const select: () => $64$luvio_engine_BaseFragment;
9
+ export declare function equals(existing: CdpMetadataOutputRepresentationNormalized, incoming: CdpMetadataOutputRepresentationNormalized): boolean;
10
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
11
+ export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: CdpMetadataOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
+ /**
13
+ * Output representation to fetch all engagement dmos
14
+ *
15
+ * Keys:
16
+ * (none)
17
+ */
18
+ export interface CdpMetadataOutputRepresentationNormalized {
19
+ /** get all dmos */
20
+ dmos: Array<DmoOutputRepresentation_DmoOutputRepresentation>;
21
+ }
22
+ /**
23
+ * Output representation to fetch all engagement dmos
24
+ *
25
+ * Keys:
26
+ * (none)
27
+ */
28
+ export interface CdpMetadataOutputRepresentation {
29
+ dmos: Array<DmoOutputRepresentation_DmoOutputRepresentation>;
30
+ }
@@ -0,0 +1,34 @@
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
+ export declare const VERSION = "3de3d025c0a0af44f39305af7a738239";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: DmoFieldsOutputRepresentation, existing: DmoFieldsOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DmoFieldsOutputRepresentationNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: DmoFieldsOutputRepresentationNormalized, incoming: DmoFieldsOutputRepresentationNormalized): boolean;
8
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
9
+ export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: DmoFieldsOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
10
+ /**
11
+ * Output representation of each field of DMO
12
+ *
13
+ * Keys:
14
+ * (none)
15
+ */
16
+ export interface DmoFieldsOutputRepresentationNormalized {
17
+ /** get display name of a dmo */
18
+ displayName: string;
19
+ /** get name of a dmo */
20
+ name: string;
21
+ /** get type of fields */
22
+ type: string;
23
+ }
24
+ /**
25
+ * Output representation of each field of DMO
26
+ *
27
+ * Keys:
28
+ * (none)
29
+ */
30
+ export interface DmoFieldsOutputRepresentation {
31
+ displayName: string;
32
+ name: string;
33
+ type: string;
34
+ }
@@ -0,0 +1,42 @@
1
+ import { DmoFieldsOutputRepresentation as DmoFieldsOutputRepresentation_DmoFieldsOutputRepresentation } from './DmoFieldsOutputRepresentation';
2
+ import { DmoRelationshipsOutputRepresentation as DmoRelationshipsOutputRepresentation_DmoRelationshipsOutputRepresentation } from './DmoRelationshipsOutputRepresentation';
3
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
4
+ export declare const VERSION = "f50724468fc2f740b113fd9591e37b8b";
5
+ export declare function validate(obj: any, path?: string): TypeError | null;
6
+ export declare const RepresentationType: string;
7
+ export declare function normalize(input: DmoOutputRepresentation, existing: DmoOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DmoOutputRepresentationNormalized;
8
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
9
+ export declare function equals(existing: DmoOutputRepresentationNormalized, incoming: DmoOutputRepresentationNormalized): boolean;
10
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
11
+ export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: DmoOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
+ /**
13
+ * Output representation of each dmo
14
+ *
15
+ * Keys:
16
+ * (none)
17
+ */
18
+ export interface DmoOutputRepresentationNormalized {
19
+ /** get category of a dmo */
20
+ category: string;
21
+ /** get display name of a dmo */
22
+ displayName: string;
23
+ /** get all fields of a dmo */
24
+ fields: Array<DmoFieldsOutputRepresentation_DmoFieldsOutputRepresentation>;
25
+ /** get name of a dmo */
26
+ name: string;
27
+ /** get all relationships of a dmo */
28
+ relationships: Array<DmoRelationshipsOutputRepresentation_DmoRelationshipsOutputRepresentation>;
29
+ }
30
+ /**
31
+ * Output representation of each dmo
32
+ *
33
+ * Keys:
34
+ * (none)
35
+ */
36
+ export interface DmoOutputRepresentation {
37
+ category: string;
38
+ displayName: string;
39
+ fields: Array<DmoFieldsOutputRepresentation_DmoFieldsOutputRepresentation>;
40
+ name: string;
41
+ relationships: Array<DmoRelationshipsOutputRepresentation_DmoRelationshipsOutputRepresentation>;
42
+ }
@@ -0,0 +1,30 @@
1
+ import { RelationshipTypeOutputRepresentation as RelationshipTypeOutputRepresentation_RelationshipTypeOutputRepresentation } from './RelationshipTypeOutputRepresentation';
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
3
+ export declare const VERSION = "bd9cfb2e9b327ac378ff320957463a19";
4
+ export declare function validate(obj: any, path?: string): TypeError | null;
5
+ export declare const RepresentationType: string;
6
+ export declare function normalize(input: DmoRelationshipsOutputRepresentation, existing: DmoRelationshipsOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DmoRelationshipsOutputRepresentationNormalized;
7
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
8
+ export declare function equals(existing: DmoRelationshipsOutputRepresentationNormalized, incoming: DmoRelationshipsOutputRepresentationNormalized): boolean;
9
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
10
+ export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: DmoRelationshipsOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
+ /**
12
+ * Output representation of relationships for a DMO
13
+ *
14
+ * Keys:
15
+ * (none)
16
+ */
17
+ export interface DmoRelationshipsOutputRepresentationNormalized {
18
+ fromEntity: RelationshipTypeOutputRepresentation_RelationshipTypeOutputRepresentation;
19
+ toEntity: RelationshipTypeOutputRepresentation_RelationshipTypeOutputRepresentation;
20
+ }
21
+ /**
22
+ * Output representation of relationships for a DMO
23
+ *
24
+ * Keys:
25
+ * (none)
26
+ */
27
+ export interface DmoRelationshipsOutputRepresentation {
28
+ fromEntity: RelationshipTypeOutputRepresentation_RelationshipTypeOutputRepresentation;
29
+ toEntity: RelationshipTypeOutputRepresentation_RelationshipTypeOutputRepresentation;
30
+ }
@@ -0,0 +1,31 @@
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
+ export declare const VERSION = "9d364af703abf32478364b295d0a5a1b";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: RelationshipTypeOutputRepresentation, existing: RelationshipTypeOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): RelationshipTypeOutputRepresentationNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: RelationshipTypeOutputRepresentationNormalized, incoming: RelationshipTypeOutputRepresentationNormalized): boolean;
8
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
9
+ export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: RelationshipTypeOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
10
+ /**
11
+ * Output representation of relationship type
12
+ *
13
+ * Keys:
14
+ * (none)
15
+ */
16
+ export interface RelationshipTypeOutputRepresentationNormalized {
17
+ /** get attribute of the entity in Relationship */
18
+ attribute: string;
19
+ /** get name of the entity in Relationship */
20
+ name: string;
21
+ }
22
+ /**
23
+ * Output representation of relationship type
24
+ *
25
+ * Keys:
26
+ * (none)
27
+ */
28
+ export interface RelationshipTypeOutputRepresentation {
29
+ attribute: string;
30
+ name: string;
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-industries-timeline",
3
- "version": "1.168.0",
3
+ "version": "1.169.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": " GET Resource to get the Timeline Data",
6
6
  "main": "dist/es/es2018/industries-timeline.js",
package/sfdc/index.js CHANGED
@@ -68,6 +68,373 @@ function createLink(ref) {
68
68
  };
69
69
  }
70
70
 
71
+ function validate$e(obj, path = 'DmoFieldsOutputRepresentation') {
72
+ const v_error = (() => {
73
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
74
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
75
+ }
76
+ const obj_displayName = obj.displayName;
77
+ const path_displayName = path + '.displayName';
78
+ if (typeof obj_displayName !== 'string') {
79
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
80
+ }
81
+ const obj_name = obj.name;
82
+ const path_name = path + '.name';
83
+ if (typeof obj_name !== 'string') {
84
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
85
+ }
86
+ const obj_type = obj.type;
87
+ const path_type = path + '.type';
88
+ if (typeof obj_type !== 'string') {
89
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
90
+ }
91
+ })();
92
+ return v_error === undefined ? null : v_error;
93
+ }
94
+
95
+ function validate$d(obj, path = 'RelationshipTypeOutputRepresentation') {
96
+ const v_error = (() => {
97
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
98
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
99
+ }
100
+ const obj_attribute = obj.attribute;
101
+ const path_attribute = path + '.attribute';
102
+ if (typeof obj_attribute !== 'string') {
103
+ return new TypeError('Expected "string" but received "' + typeof obj_attribute + '" (at "' + path_attribute + '")');
104
+ }
105
+ const obj_name = obj.name;
106
+ const path_name = path + '.name';
107
+ if (typeof obj_name !== 'string') {
108
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
109
+ }
110
+ })();
111
+ return v_error === undefined ? null : v_error;
112
+ }
113
+
114
+ function validate$c(obj, path = 'DmoRelationshipsOutputRepresentation') {
115
+ const v_error = (() => {
116
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
117
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
118
+ }
119
+ const obj_fromEntity = obj.fromEntity;
120
+ const path_fromEntity = path + '.fromEntity';
121
+ const referencepath_fromEntityValidationError = validate$d(obj_fromEntity, path_fromEntity);
122
+ if (referencepath_fromEntityValidationError !== null) {
123
+ let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_fromEntity + '")\n';
124
+ message += referencepath_fromEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
125
+ return new TypeError(message);
126
+ }
127
+ const obj_toEntity = obj.toEntity;
128
+ const path_toEntity = path + '.toEntity';
129
+ const referencepath_toEntityValidationError = validate$d(obj_toEntity, path_toEntity);
130
+ if (referencepath_toEntityValidationError !== null) {
131
+ let message = 'Object doesn\'t match RelationshipTypeOutputRepresentation (at "' + path_toEntity + '")\n';
132
+ message += referencepath_toEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
133
+ return new TypeError(message);
134
+ }
135
+ })();
136
+ return v_error === undefined ? null : v_error;
137
+ }
138
+
139
+ function validate$b(obj, path = 'DmoOutputRepresentation') {
140
+ const v_error = (() => {
141
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
142
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
143
+ }
144
+ const obj_category = obj.category;
145
+ const path_category = path + '.category';
146
+ if (typeof obj_category !== 'string') {
147
+ return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
148
+ }
149
+ const obj_displayName = obj.displayName;
150
+ const path_displayName = path + '.displayName';
151
+ if (typeof obj_displayName !== 'string') {
152
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
153
+ }
154
+ const obj_fields = obj.fields;
155
+ const path_fields = path + '.fields';
156
+ if (!ArrayIsArray(obj_fields)) {
157
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
158
+ }
159
+ for (let i = 0; i < obj_fields.length; i++) {
160
+ const obj_fields_item = obj_fields[i];
161
+ const path_fields_item = path_fields + '[' + i + ']';
162
+ const referencepath_fields_itemValidationError = validate$e(obj_fields_item, path_fields_item);
163
+ if (referencepath_fields_itemValidationError !== null) {
164
+ let message = 'Object doesn\'t match DmoFieldsOutputRepresentation (at "' + path_fields_item + '")\n';
165
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
166
+ return new TypeError(message);
167
+ }
168
+ }
169
+ const obj_name = obj.name;
170
+ const path_name = path + '.name';
171
+ if (typeof obj_name !== 'string') {
172
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
173
+ }
174
+ const obj_relationships = obj.relationships;
175
+ const path_relationships = path + '.relationships';
176
+ if (!ArrayIsArray(obj_relationships)) {
177
+ return new TypeError('Expected "array" but received "' + typeof obj_relationships + '" (at "' + path_relationships + '")');
178
+ }
179
+ for (let i = 0; i < obj_relationships.length; i++) {
180
+ const obj_relationships_item = obj_relationships[i];
181
+ const path_relationships_item = path_relationships + '[' + i + ']';
182
+ const referencepath_relationships_itemValidationError = validate$c(obj_relationships_item, path_relationships_item);
183
+ if (referencepath_relationships_itemValidationError !== null) {
184
+ let message = 'Object doesn\'t match DmoRelationshipsOutputRepresentation (at "' + path_relationships_item + '")\n';
185
+ message += referencepath_relationships_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
186
+ return new TypeError(message);
187
+ }
188
+ }
189
+ })();
190
+ return v_error === undefined ? null : v_error;
191
+ }
192
+
193
+ const TTL$2 = 600000;
194
+ const VERSION$2 = "84ccc17f91013e292e7b01a291dd0322";
195
+ function validate$a(obj, path = 'CdpMetadataOutputRepresentation') {
196
+ const v_error = (() => {
197
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
198
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
199
+ }
200
+ const obj_dmos = obj.dmos;
201
+ const path_dmos = path + '.dmos';
202
+ if (!ArrayIsArray(obj_dmos)) {
203
+ return new TypeError('Expected "array" but received "' + typeof obj_dmos + '" (at "' + path_dmos + '")');
204
+ }
205
+ for (let i = 0; i < obj_dmos.length; i++) {
206
+ const obj_dmos_item = obj_dmos[i];
207
+ const path_dmos_item = path_dmos + '[' + i + ']';
208
+ const referencepath_dmos_itemValidationError = validate$b(obj_dmos_item, path_dmos_item);
209
+ if (referencepath_dmos_itemValidationError !== null) {
210
+ let message = 'Object doesn\'t match DmoOutputRepresentation (at "' + path_dmos_item + '")\n';
211
+ message += referencepath_dmos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
212
+ return new TypeError(message);
213
+ }
214
+ }
215
+ })();
216
+ return v_error === undefined ? null : v_error;
217
+ }
218
+ const RepresentationType$2 = 'CdpMetadataOutputRepresentation';
219
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
220
+ return input;
221
+ }
222
+ const select$5 = function CdpMetadataOutputRepresentationSelect() {
223
+ return {
224
+ kind: 'Fragment',
225
+ version: VERSION$2,
226
+ private: [],
227
+ opaque: true
228
+ };
229
+ };
230
+ function equals$2(existing, incoming) {
231
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
232
+ return false;
233
+ }
234
+ return true;
235
+ }
236
+ const ingest$2 = function CdpMetadataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
237
+ if (process.env.NODE_ENV !== 'production') {
238
+ const validateError = validate$a(input);
239
+ if (validateError !== null) {
240
+ throw validateError;
241
+ }
242
+ }
243
+ const key = path.fullPath;
244
+ const existingRecord = store.readEntry(key);
245
+ const ttlToUse = TTL$2;
246
+ let incomingRecord = normalize$2(input, store.readEntry(key), {
247
+ fullPath: key,
248
+ parent: path.parent,
249
+ propertyName: path.propertyName,
250
+ ttl: ttlToUse
251
+ });
252
+ if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
253
+ luvio.storePublish(key, incomingRecord);
254
+ }
255
+ {
256
+ const storeMetadataParams = {
257
+ ttl: ttlToUse,
258
+ namespace: "Timeline",
259
+ version: VERSION$2,
260
+ representationName: RepresentationType$2,
261
+ };
262
+ luvio.publishStoreMetadata(key, storeMetadataParams);
263
+ }
264
+ return createLink(key);
265
+ };
266
+ function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
267
+ const rootKeySet = new StoreKeyMap();
268
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
269
+ const rootKey = fullPathFactory();
270
+ rootKeySet.set(rootKey, {
271
+ namespace: keyPrefix,
272
+ representationName: RepresentationType$2,
273
+ mergeable: false
274
+ });
275
+ return rootKeySet;
276
+ }
277
+
278
+ function select$4(luvio, params) {
279
+ return select$5();
280
+ }
281
+ function keyBuilder$5(luvio, params) {
282
+ return keyPrefix + '::CdpMetadataOutputRepresentation:(' + 'objectCategory:' + params.queryParams.objectCategory + ')';
283
+ }
284
+ function getResponseCacheKeys$2(luvio, resourceParams, response) {
285
+ return getTypeCacheKeys$2(luvio, response, () => keyBuilder$5(luvio, resourceParams));
286
+ }
287
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
288
+ const { body } = response;
289
+ const key = keyBuilder$5(luvio, resourceParams);
290
+ luvio.storeIngest(key, ingest$2, body);
291
+ const snapshot = luvio.storeLookup({
292
+ recordId: key,
293
+ node: select$4(),
294
+ variables: {},
295
+ }, snapshotRefresh);
296
+ if (process.env.NODE_ENV !== 'production') {
297
+ if (snapshot.state !== 'Fulfilled') {
298
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
299
+ }
300
+ }
301
+ deepFreeze(snapshot.data);
302
+ return snapshot;
303
+ }
304
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
305
+ const key = keyBuilder$5(luvio, params);
306
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
307
+ const storeMetadataParams = {
308
+ ttl: TTL$2,
309
+ namespace: keyPrefix,
310
+ version: VERSION$2,
311
+ representationName: RepresentationType$2
312
+ };
313
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
314
+ return errorSnapshot;
315
+ }
316
+ function createResourceRequest$2(config) {
317
+ const headers = {};
318
+ return {
319
+ baseUri: '/services/data/v59.0',
320
+ basePath: '/connect/timeline/cust-data-pfrm/data-model-objects',
321
+ method: 'get',
322
+ body: null,
323
+ urlParams: {},
324
+ queryParams: config.queryParams,
325
+ headers,
326
+ priority: 'normal',
327
+ };
328
+ }
329
+
330
+ const getDataModelObjects_ConfigPropertyNames = {
331
+ displayName: 'getDataModelObjects',
332
+ parameters: {
333
+ required: [],
334
+ optional: ['objectCategory']
335
+ }
336
+ };
337
+ function createResourceParams$2(config) {
338
+ const resourceParams = {
339
+ queryParams: {
340
+ objectCategory: config.objectCategory
341
+ }
342
+ };
343
+ return resourceParams;
344
+ }
345
+ function keyBuilder$4(luvio, config) {
346
+ const resourceParams = createResourceParams$2(config);
347
+ return keyBuilder$5(luvio, resourceParams);
348
+ }
349
+ function typeCheckConfig$2(untrustedConfig) {
350
+ const config = {};
351
+ const untrustedConfig_objectCategory = untrustedConfig.objectCategory;
352
+ if (typeof untrustedConfig_objectCategory === 'string') {
353
+ config.objectCategory = untrustedConfig_objectCategory;
354
+ }
355
+ return config;
356
+ }
357
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
358
+ if (!untrustedIsObject(untrustedConfig)) {
359
+ return null;
360
+ }
361
+ if (process.env.NODE_ENV !== 'production') {
362
+ validateConfig(untrustedConfig, configPropertyNames);
363
+ }
364
+ const config = typeCheckConfig$2(untrustedConfig);
365
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
366
+ return null;
367
+ }
368
+ return config;
369
+ }
370
+ function adapterFragment$2(luvio, config) {
371
+ createResourceParams$2(config);
372
+ return select$4();
373
+ }
374
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
375
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
376
+ config,
377
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
378
+ });
379
+ return luvio.storeBroadcast().then(() => snapshot);
380
+ }
381
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
382
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
383
+ config,
384
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
385
+ });
386
+ return luvio.storeBroadcast().then(() => snapshot);
387
+ }
388
+ function buildNetworkSnapshot$2(luvio, config, options) {
389
+ const resourceParams = createResourceParams$2(config);
390
+ const request = createResourceRequest$2(resourceParams);
391
+ return luvio.dispatchResourceRequest(request, options)
392
+ .then((response) => {
393
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
394
+ }, (response) => {
395
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
396
+ });
397
+ }
398
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
399
+ const { luvio, config } = context;
400
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
401
+ const dispatchOptions = {
402
+ resourceRequestContext: {
403
+ requestCorrelator,
404
+ luvioRequestMethod: undefined,
405
+ },
406
+ eventObservers
407
+ };
408
+ if (networkPriority !== 'normal') {
409
+ dispatchOptions.overrides = {
410
+ priority: networkPriority
411
+ };
412
+ }
413
+ return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
414
+ }
415
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
416
+ const { luvio, config } = context;
417
+ const selector = {
418
+ recordId: keyBuilder$4(luvio, config),
419
+ node: adapterFragment$2(luvio, config),
420
+ variables: {},
421
+ };
422
+ const cacheSnapshot = storeLookup(selector, {
423
+ config,
424
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
425
+ });
426
+ return cacheSnapshot;
427
+ }
428
+ const getDataModelObjectsAdapterFactory = (luvio) => function Timeline__getDataModelObjects(untrustedConfig, requestContext) {
429
+ const config = validateAdapterConfig$2(untrustedConfig, getDataModelObjects_ConfigPropertyNames);
430
+ // Invalid or incomplete config
431
+ if (config === null) {
432
+ return null;
433
+ }
434
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
435
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
436
+ };
437
+
71
438
  function validate$9(obj, path = 'TimelineErrorRepresentation') {
72
439
  const v_error = (() => {
73
440
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -1515,34 +1882,42 @@ const getTimelineMetadataAdapterFactory = (luvio) => function Timeline__getTimel
1515
1882
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1516
1883
  };
1517
1884
 
1885
+ let getDataModelObjects;
1518
1886
  let getTimelineData;
1519
1887
  let getTimelineMetadata;
1520
1888
  // Imperative GET Adapters
1889
+ let getDataModelObjects_imperative;
1521
1890
  let getTimelineData_imperative;
1522
1891
  let getTimelineMetadata_imperative;
1523
1892
  // Adapter Metadata
1893
+ const getDataModelObjectsMetadata = { apiFamily: 'Timeline', name: 'getDataModelObjects', ttl: 600000 };
1524
1894
  const getTimelineDataMetadata = { apiFamily: 'Timeline', name: 'getTimelineData', ttl: 500 };
1525
1895
  const getTimelineMetadataMetadata = { apiFamily: 'Timeline', name: 'getTimelineMetadata', ttl: 500 };
1526
1896
  function bindExportsTo(luvio) {
1527
1897
  // LDS Adapters
1898
+ const getDataModelObjects_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataModelObjects', getDataModelObjectsAdapterFactory), getDataModelObjectsMetadata);
1528
1899
  const getTimelineData_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTimelineData', getTimelineDataAdapterFactory), getTimelineDataMetadata);
1529
1900
  const getTimelineMetadata_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTimelineMetadata', getTimelineMetadataAdapterFactory), getTimelineMetadataMetadata);
1530
1901
  return {
1902
+ getDataModelObjects: createWireAdapterConstructor(luvio, getDataModelObjects_ldsAdapter, getDataModelObjectsMetadata),
1531
1903
  getTimelineData: createWireAdapterConstructor(luvio, getTimelineData_ldsAdapter, getTimelineDataMetadata),
1532
1904
  getTimelineMetadata: createWireAdapterConstructor(luvio, getTimelineMetadata_ldsAdapter, getTimelineMetadataMetadata),
1533
1905
  // Imperative GET Adapters
1906
+ getDataModelObjects_imperative: createImperativeAdapter(luvio, getDataModelObjects_ldsAdapter, getDataModelObjectsMetadata),
1534
1907
  getTimelineData_imperative: createImperativeAdapter(luvio, getTimelineData_ldsAdapter, getTimelineDataMetadata),
1535
1908
  getTimelineMetadata_imperative: createImperativeAdapter(luvio, getTimelineMetadata_ldsAdapter, getTimelineMetadataMetadata)
1536
1909
  };
1537
1910
  }
1538
1911
  withDefaultLuvio((luvio) => {
1539
1912
  ({
1913
+ getDataModelObjects,
1540
1914
  getTimelineData,
1541
1915
  getTimelineMetadata,
1916
+ getDataModelObjects_imperative,
1542
1917
  getTimelineData_imperative,
1543
1918
  getTimelineMetadata_imperative
1544
1919
  } = bindExportsTo(luvio));
1545
1920
  });
1546
1921
 
1547
- export { getTimelineData, getTimelineData_imperative, getTimelineMetadata, getTimelineMetadata_imperative };
1548
- // version: 1.168.0-c58504c20
1922
+ export { getDataModelObjects, getDataModelObjects_imperative, getTimelineData, getTimelineData_imperative, getTimelineMetadata, getTimelineMetadata_imperative };
1923
+ // version: 1.169.0-0c8c3dc31
package/src/raml/api.raml CHANGED
@@ -25,6 +25,71 @@ annotationTypes:
25
25
  type: string
26
26
  allowedTargets: TypeDeclaration
27
27
  types:
28
+ CdpMetadataOutputRepresentation:
29
+ description: Output representation to fetch all engagement dmos
30
+ type: object
31
+ properties:
32
+ dmos:
33
+ description: get all dmos
34
+ type: array
35
+ items:
36
+ type: DmoOutputRepresentation
37
+ DmoFieldsOutputRepresentation:
38
+ description: Output representation of each field of DMO
39
+ type: object
40
+ properties:
41
+ displayName:
42
+ description: get display name of a dmo
43
+ type: string
44
+ name:
45
+ description: get name of a dmo
46
+ type: string
47
+ type:
48
+ description: get type of fields
49
+ type: string
50
+ DmoOutputRepresentation:
51
+ description: Output representation of each dmo
52
+ type: object
53
+ properties:
54
+ category:
55
+ description: get category of a dmo
56
+ type: string
57
+ displayName:
58
+ description: get display name of a dmo
59
+ type: string
60
+ fields:
61
+ description: get all fields of a dmo
62
+ type: array
63
+ items:
64
+ type: DmoFieldsOutputRepresentation
65
+ name:
66
+ description: get name of a dmo
67
+ type: string
68
+ relationships:
69
+ description: get all relationships of a dmo
70
+ type: array
71
+ items:
72
+ type: DmoRelationshipsOutputRepresentation
73
+ DmoRelationshipsOutputRepresentation:
74
+ description: Output representation of relationships for a DMO
75
+ type: object
76
+ properties:
77
+ fromEntity:
78
+ description: 'get fromEntity in relationship '
79
+ type: RelationshipTypeOutputRepresentation
80
+ toEntity:
81
+ description: 'get toEntity in relationship '
82
+ type: RelationshipTypeOutputRepresentation
83
+ RelationshipTypeOutputRepresentation:
84
+ description: Output representation of relationship type
85
+ type: object
86
+ properties:
87
+ attribute:
88
+ description: 'get attribute of the entity in Relationship '
89
+ type: string
90
+ name:
91
+ description: 'get name of the entity in Relationship '
92
+ type: string
28
93
  TimelineDataGetResultRepresentation:
29
94
  description: Output representation of Timeline Data from the GET Resource
30
95
  type: object
@@ -237,6 +302,20 @@ types:
237
302
  description: Element label Name
238
303
  type: string | nil
239
304
  /connect/timeline:
305
+ /cust-data-pfrm/data-model-objects:
306
+ get:
307
+ displayName: getTimelineGetCDPMetadata
308
+ description: Method to fetch TimelineMetadata
309
+ responses:
310
+ '200':
311
+ description: Success
312
+ body:
313
+ application/json:
314
+ type: CdpMetadataOutputRepresentation
315
+ queryParameters:
316
+ objectCategory:
317
+ type: string
318
+ required: false
240
319
  /{timelineObjRecordId}/timeline-definitions/{timelineConfigFullName}/events:
241
320
  get:
242
321
  description: API to get Timeline data
@@ -8,6 +8,9 @@ uses:
8
8
  (luvio.ttl): 360000
9
9
 
10
10
  types:
11
+ CdpMetadataOutputRepresentation:
12
+ (luvio.opaque): true
13
+ (luvio.ttl): 600000
11
14
  TimelineDataGetResultRepresentation:
12
15
  (luvio.opaque): true
13
16
  (luvio.ttl): 500
@@ -21,6 +24,22 @@ types:
21
24
  validMetadataResponse: !include ../wire/getTimelineMetadata/__karma__/data/TimelineMetadataResponse.json
22
25
 
23
26
  /connect/timeline:
27
+ /cust-data-pfrm/data-model-objects:
28
+ get:
29
+ (luvio.adapter):
30
+ name: getDataModelObjects
31
+ tests:
32
+ validConfigs:
33
+ - |
34
+ {}
35
+ - |
36
+ {
37
+ "objectCategory": "Engagement"
38
+ }
39
+ queryParameters:
40
+ objectCategory:
41
+ examples:
42
+ validResponse: 'Engagement'
24
43
  /{timelineObjRecordId}/timeline-definitions/{timelineConfigFullName}/events:
25
44
  get:
26
45
  (luvio.adapter):