@salesforce/lds-adapters-industries-service-excellence 0.1.0-dev1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/industries-service-excellence.js +1706 -0
  3. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
  4. package/dist/es/es2018/types/src/generated/adapters/createActionLaunchDetails.d.ts +16 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getEinsteinRecommendedItems.d.ts +23 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getRecentActions.d.ts +28 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getServiceCatalogItems.d.ts +31 -0
  8. package/dist/es/es2018/types/src/generated/adapters/getUserPreference.d.ts +27 -0
  9. package/dist/es/es2018/types/src/generated/adapters/setUserPreference.d.ts +16 -0
  10. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +6 -0
  11. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +10 -0
  12. package/dist/es/es2018/types/src/generated/resources/deleteConnectServiceExcellenceEngagementInteractions.d.ts +8 -0
  13. package/dist/es/es2018/types/src/generated/resources/deleteConnectServiceExcellenceEngagementInteractionsByEngagementInteractionId.d.ts +11 -0
  14. package/dist/es/es2018/types/src/generated/resources/deleteConnectServiceExcellenceEngagementInteractionsEngagementAttendeesByEngagementAttendeeIdAndEngagementInteractionId.d.ts +12 -0
  15. package/dist/es/es2018/types/src/generated/resources/deleteConnectServiceExcellenceEngagementInteractionsEngagementAttendeesByEngagementInteractionId.d.ts +11 -0
  16. package/dist/es/es2018/types/src/generated/resources/deleteConnectServiceExcellenceEngagementInteractionsEngagementTopicsByEngagementInteractionId.d.ts +11 -0
  17. package/dist/es/es2018/types/src/generated/resources/deleteConnectServiceExcellenceEngagementInteractionsEngagementTopicsByEngagementInteractionIdAndEngagementTopicId.d.ts +12 -0
  18. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceEngagementInteractions.d.ts +12 -0
  19. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceEngagementInteractionsByEngagementInteractionId.d.ts +15 -0
  20. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceEngagementInteractionsEngagementAttendeesByEngagementAttendeeIdAndEngagementInteractionId.d.ts +16 -0
  21. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceEngagementInteractionsEngagementAttendeesByEngagementInteractionId.d.ts +15 -0
  22. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceEngagementInteractionsEngagementTopicsByEngagementInteractionId.d.ts +15 -0
  23. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceEngagementInteractionsEngagementTopicsByEngagementInteractionIdAndEngagementTopicId.d.ts +16 -0
  24. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceFetchUserPreference.d.ts +15 -0
  25. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceServiceCatalogItemsByRecordId.d.ts +21 -0
  26. package/dist/es/es2018/types/src/generated/resources/getConnectServiceExcellenceServiceCatalogItemsRecentActions.d.ts +16 -0
  27. package/dist/es/es2018/types/src/generated/resources/patchConnectServiceExcellenceEngagementInteractions.d.ts +26 -0
  28. package/dist/es/es2018/types/src/generated/resources/patchConnectServiceExcellenceEngagementInteractionsByEngagementInteractionId.d.ts +29 -0
  29. package/dist/es/es2018/types/src/generated/resources/patchConnectServiceExcellenceEngagementInteractionsEngagementAttendeesByEngagementAttendeeIdAndEngagementInteractionId.d.ts +22 -0
  30. package/dist/es/es2018/types/src/generated/resources/patchConnectServiceExcellenceEngagementInteractionsEngagementAttendeesByEngagementInteractionId.d.ts +21 -0
  31. package/dist/es/es2018/types/src/generated/resources/patchConnectServiceExcellenceEngagementInteractionsEngagementTopicsByEngagementInteractionId.d.ts +25 -0
  32. package/dist/es/es2018/types/src/generated/resources/patchConnectServiceExcellenceEngagementInteractionsEngagementTopicsByEngagementInteractionIdAndEngagementTopicId.d.ts +26 -0
  33. package/dist/es/es2018/types/src/generated/resources/postConnectServiceExcellenceActionLauncherRecommendations.d.ts +22 -0
  34. package/dist/es/es2018/types/src/generated/resources/postConnectServiceExcellenceServiceCatalogItemsActionLaunch.d.ts +13 -0
  35. package/dist/es/es2018/types/src/generated/resources/postConnectServiceExcellenceUserPreference.d.ts +13 -0
  36. package/dist/es/es2018/types/src/generated/types/ActionLaunchInputRepresentation.d.ts +40 -0
  37. package/dist/es/es2018/types/src/generated/types/ActionLaunchInputWrapper.d.ts +29 -0
  38. package/dist/es/es2018/types/src/generated/types/ActionLaunchStatusRepresentation.d.ts +40 -0
  39. package/dist/es/es2018/types/src/generated/types/ActionLauncherConversationInputRepresentation.d.ts +31 -0
  40. package/dist/es/es2018/types/src/generated/types/ActionLauncherIntentActionsMappingOutputRepresentation.d.ts +31 -0
  41. package/dist/es/es2018/types/src/generated/types/ActionLauncherRecommendationsInputRepresentation.d.ts +38 -0
  42. package/dist/es/es2018/types/src/generated/types/ActionLauncherRecommendationsOutputRepresentation.d.ts +53 -0
  43. package/dist/es/es2018/types/src/generated/types/EngagementAttendeeCreateInputRepresentation.d.ts +46 -0
  44. package/dist/es/es2018/types/src/generated/types/EngagementAttendeeCreateOutputRepresentation.d.ts +40 -0
  45. package/dist/es/es2018/types/src/generated/types/EngagementAttendeeFetchOutputRepresentation.d.ts +40 -0
  46. package/dist/es/es2018/types/src/generated/types/EngagementAttendeeListInputRepresentation.d.ts +28 -0
  47. package/dist/es/es2018/types/src/generated/types/EngagementAttendeeOutputRepresentation.d.ts +46 -0
  48. package/dist/es/es2018/types/src/generated/types/EngagementInteractionCreateInputRepresentation.d.ts +76 -0
  49. package/dist/es/es2018/types/src/generated/types/EngagementInteractionCreateOutputRepresentation.d.ts +40 -0
  50. package/dist/es/es2018/types/src/generated/types/EngagementInteractionFetchOutputRepresentation.d.ts +40 -0
  51. package/dist/es/es2018/types/src/generated/types/EngagementInteractionIdsCreateOutputRepresentation.d.ts +35 -0
  52. package/dist/es/es2018/types/src/generated/types/EngagementInteractionOutputRepresentation.d.ts +81 -0
  53. package/dist/es/es2018/types/src/generated/types/EngagementInteractionUpdateInputRepresentation.d.ts +70 -0
  54. package/dist/es/es2018/types/src/generated/types/EngagementInteractionUpdateOutputRepresentation.d.ts +46 -0
  55. package/dist/es/es2018/types/src/generated/types/EngagementTopicCreateInputRepresentation.d.ts +58 -0
  56. package/dist/es/es2018/types/src/generated/types/EngagementTopicCreateOutputRepresentation.d.ts +40 -0
  57. package/dist/es/es2018/types/src/generated/types/EngagementTopicDetailsOutputRepresentation.d.ts +55 -0
  58. package/dist/es/es2018/types/src/generated/types/EngagementTopicFetchOutputRepresentation.d.ts +40 -0
  59. package/dist/es/es2018/types/src/generated/types/EngagementTopicListInputRepresentation.d.ts +28 -0
  60. package/dist/es/es2018/types/src/generated/types/EngagementTopicOutputRepresentation.d.ts +58 -0
  61. package/dist/es/es2018/types/src/generated/types/EngagementsCreateInputRepresentation.d.ts +28 -0
  62. package/dist/es/es2018/types/src/generated/types/EngagementsFetchOutputRepresentation.d.ts +41 -0
  63. package/dist/es/es2018/types/src/generated/types/EngagementsUpdateInputRepresentation.d.ts +34 -0
  64. package/dist/es/es2018/types/src/generated/types/RecentlyUsedActionsRepresentation.d.ts +33 -0
  65. package/dist/es/es2018/types/src/generated/types/ServiceCatalogActionsCategoryOutputRepresentation.d.ts +34 -0
  66. package/dist/es/es2018/types/src/generated/types/ServiceCatalogFrequentActionsOutputRepresentation.d.ts +32 -0
  67. package/dist/es/es2018/types/src/generated/types/ServiceCatalogItemsFetchOutputRepresentation.d.ts +37 -0
  68. package/dist/es/es2018/types/src/generated/types/ServiceCatalogItemsOutputRepresentation.d.ts +40 -0
  69. package/dist/es/es2018/types/src/generated/types/ServiceExcellenceIdOutputRepresentation.d.ts +28 -0
  70. package/dist/es/es2018/types/src/generated/types/ServiceExcellenceStatusOutputRepresentation.d.ts +43 -0
  71. package/dist/es/es2018/types/src/generated/types/UserPreferenceInputRepresentation.d.ts +31 -0
  72. package/dist/es/es2018/types/src/generated/types/UserPreferenceNodeOutputRepresentation.d.ts +31 -0
  73. package/dist/es/es2018/types/src/generated/types/UserPreferenceOutputRepresentation.d.ts +34 -0
  74. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  75. package/package.json +74 -0
  76. package/sfdc/index.d.ts +1 -0
  77. package/sfdc/index.js +1780 -0
  78. package/src/raml/api.raml +1185 -0
  79. package/src/raml/luvio.raml +54 -0
package/sfdc/index.js ADDED
@@ -0,0 +1,1780 @@
1
+ /**
2
+ * Copyright (c) 2022, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ /*
8
+ * ATTENTION!
9
+ * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
10
+ * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
11
+ * Any changes made to this file in p4 will be automatically overwritten.
12
+ * *******************************************************************************************
13
+ */
14
+ /* proxy-compat-disable */
15
+ import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
+ import { withDefaultLuvio } from 'force/ldsEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$6, typeCheckConfig as typeCheckConfig$6, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3 } from 'force/luvioEngine';
18
+
19
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
+ const { keys: ObjectKeys, create: ObjectCreate } = Object;
21
+ const { isArray: ArrayIsArray$1 } = Array;
22
+ /**
23
+ * Validates an adapter config is well-formed.
24
+ * @param config The config to validate.
25
+ * @param adapter The adapter validation configuration.
26
+ * @param oneOf The keys the config must contain at least one of.
27
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
28
+ */
29
+ function validateConfig(config, adapter, oneOf) {
30
+ const { displayName } = adapter;
31
+ const { required, optional, unsupported } = adapter.parameters;
32
+ if (config === undefined ||
33
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
34
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
35
+ }
36
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
37
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
38
+ }
39
+ if (unsupported !== undefined &&
40
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
41
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
42
+ }
43
+ const supported = required.concat(optional);
44
+ if (ObjectKeys(config).some(key => !supported.includes(key))) {
45
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
46
+ }
47
+ }
48
+ function untrustedIsObject(untrusted) {
49
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
50
+ }
51
+ function areRequiredParametersPresent(config, configPropertyNames) {
52
+ return configPropertyNames.parameters.required.every(req => req in config);
53
+ }
54
+ const snapshotRefreshOptions = {
55
+ overrides: {
56
+ headers: {
57
+ 'Cache-Control': 'no-cache',
58
+ },
59
+ }
60
+ };
61
+ function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
62
+ return {
63
+ name,
64
+ required,
65
+ resourceType,
66
+ typeCheckShape,
67
+ isArrayShape,
68
+ coerceFn,
69
+ };
70
+ }
71
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
72
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
73
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
74
+ return {
75
+ displayName,
76
+ parameters: {
77
+ required,
78
+ optional,
79
+ }
80
+ };
81
+ }
82
+ const keyPrefix = 'service-excellence';
83
+
84
+ const { isArray: ArrayIsArray } = Array;
85
+ const { stringify: JSONStringify } = JSON;
86
+ function equalsArray(a, b, equalsItem) {
87
+ const aLength = a.length;
88
+ const bLength = b.length;
89
+ if (aLength !== bLength) {
90
+ return false;
91
+ }
92
+ for (let i = 0; i < aLength; i++) {
93
+ if (equalsItem(a[i], b[i]) === false) {
94
+ return false;
95
+ }
96
+ }
97
+ return true;
98
+ }
99
+ function createLink(ref) {
100
+ return {
101
+ __ref: serializeStructuredKey(ref),
102
+ };
103
+ }
104
+
105
+ function validate$c(obj, path = 'ActionLaunchInputRepresentation') {
106
+ const v_error = (() => {
107
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
108
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
109
+ }
110
+ if (obj.actionCategory !== undefined) {
111
+ const obj_actionCategory = obj.actionCategory;
112
+ const path_actionCategory = path + '.actionCategory';
113
+ if (typeof obj_actionCategory !== 'string') {
114
+ return new TypeError('Expected "string" but received "' + typeof obj_actionCategory + '" (at "' + path_actionCategory + '")');
115
+ }
116
+ }
117
+ const obj_actionDevName = obj.actionDevName;
118
+ const path_actionDevName = path + '.actionDevName';
119
+ if (typeof obj_actionDevName !== 'string') {
120
+ return new TypeError('Expected "string" but received "' + typeof obj_actionDevName + '" (at "' + path_actionDevName + '")');
121
+ }
122
+ const obj_actionType = obj.actionType;
123
+ const path_actionType = path + '.actionType';
124
+ if (typeof obj_actionType !== 'string') {
125
+ return new TypeError('Expected "string" but received "' + typeof obj_actionType + '" (at "' + path_actionType + '")');
126
+ }
127
+ if (obj.deploymentId !== undefined) {
128
+ const obj_deploymentId = obj.deploymentId;
129
+ const path_deploymentId = path + '.deploymentId';
130
+ if (typeof obj_deploymentId !== 'string') {
131
+ return new TypeError('Expected "string" but received "' + typeof obj_deploymentId + '" (at "' + path_deploymentId + '")');
132
+ }
133
+ }
134
+ const obj_objectKeyPrefix = obj.objectKeyPrefix;
135
+ const path_objectKeyPrefix = path + '.objectKeyPrefix';
136
+ if (typeof obj_objectKeyPrefix !== 'string') {
137
+ return new TypeError('Expected "string" but received "' + typeof obj_objectKeyPrefix + '" (at "' + path_objectKeyPrefix + '")');
138
+ }
139
+ })();
140
+ return v_error === undefined ? null : v_error;
141
+ }
142
+
143
+ const VERSION$6 = "bbe6b4e653df40e51fd6dfc3260c4327";
144
+ function validate$b(obj, path = 'ActionLaunchStatusRepresentation') {
145
+ const v_error = (() => {
146
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
147
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
148
+ }
149
+ const obj_code = obj.code;
150
+ const path_code = path + '.code';
151
+ if (typeof obj_code !== 'number' || (typeof obj_code === 'number' && Math.floor(obj_code) !== obj_code)) {
152
+ return new TypeError('Expected "integer" but received "' + typeof obj_code + '" (at "' + path_code + '")');
153
+ }
154
+ const obj_message = obj.message;
155
+ const path_message = path + '.message';
156
+ if (typeof obj_message !== 'string') {
157
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
158
+ }
159
+ })();
160
+ return v_error === undefined ? null : v_error;
161
+ }
162
+ const RepresentationType$5 = 'ActionLaunchStatusRepresentation';
163
+ function keyBuilder$8(luvio, config) {
164
+ return keyPrefix + '::' + RepresentationType$5 + ':' + config.message;
165
+ }
166
+ function keyBuilderFromType$2(luvio, object) {
167
+ const keyParams = {
168
+ message: object.message
169
+ };
170
+ return keyBuilder$8(luvio, keyParams);
171
+ }
172
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
173
+ return input;
174
+ }
175
+ const select$c = function ActionLaunchStatusRepresentationSelect() {
176
+ return {
177
+ kind: 'Fragment',
178
+ version: VERSION$6,
179
+ private: [],
180
+ selections: [
181
+ {
182
+ name: 'code',
183
+ kind: 'Scalar'
184
+ },
185
+ {
186
+ name: 'message',
187
+ kind: 'Scalar'
188
+ }
189
+ ]
190
+ };
191
+ };
192
+ function equals$6(existing, incoming) {
193
+ const existing_code = existing.code;
194
+ const incoming_code = incoming.code;
195
+ if (!(existing_code === incoming_code)) {
196
+ return false;
197
+ }
198
+ const existing_message = existing.message;
199
+ const incoming_message = incoming.message;
200
+ if (!(existing_message === incoming_message)) {
201
+ return false;
202
+ }
203
+ return true;
204
+ }
205
+ const ingest$5 = function ActionLaunchStatusRepresentationIngest(input, path, luvio, store, timestamp) {
206
+ if (process.env.NODE_ENV !== 'production') {
207
+ const validateError = validate$b(input);
208
+ if (validateError !== null) {
209
+ throw validateError;
210
+ }
211
+ }
212
+ const key = keyBuilderFromType$2(luvio, input);
213
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
214
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "service-excellence", VERSION$6, RepresentationType$5, equals$6);
215
+ return createLink(key);
216
+ };
217
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
218
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
219
+ const rootKey = keyBuilderFromType$2(luvio, input);
220
+ rootKeySet.set(rootKey, {
221
+ namespace: keyPrefix,
222
+ representationName: RepresentationType$5,
223
+ mergeable: false
224
+ });
225
+ }
226
+
227
+ function select$b(luvio, params) {
228
+ return select$c();
229
+ }
230
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
231
+ getTypeCacheKeys$5(storeKeyMap, luvio, response);
232
+ }
233
+ function ingestSuccess$5(luvio, resourceParams, response) {
234
+ const { body } = response;
235
+ const key = keyBuilderFromType$2(luvio, body);
236
+ luvio.storeIngest(key, ingest$5, body);
237
+ const snapshot = luvio.storeLookup({
238
+ recordId: key,
239
+ node: select$b(),
240
+ variables: {},
241
+ });
242
+ if (process.env.NODE_ENV !== 'production') {
243
+ if (snapshot.state !== 'Fulfilled') {
244
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
245
+ }
246
+ }
247
+ deepFreeze(snapshot.data);
248
+ return snapshot;
249
+ }
250
+ function createResourceRequest$5(config) {
251
+ const headers = {};
252
+ return {
253
+ baseUri: '/services/data/v66.0',
254
+ basePath: '/connect/service-excellence/service-catalog-items/action-launch',
255
+ method: 'post',
256
+ body: config.body,
257
+ urlParams: {},
258
+ queryParams: {},
259
+ headers,
260
+ priority: 'normal',
261
+ };
262
+ }
263
+
264
+ const adapterName$5 = 'createActionLaunchDetails';
265
+ const createActionLaunchDetails_ConfigPropertyMetadata = [
266
+ generateParamConfigMetadata('actionLaunchDetails', true, 2 /* Body */, 4 /* Unsupported */),
267
+ ];
268
+ const createActionLaunchDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createActionLaunchDetails_ConfigPropertyMetadata);
269
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(createActionLaunchDetails_ConfigPropertyMetadata);
270
+ function typeCheckConfig$5(untrustedConfig) {
271
+ const config = {};
272
+ const untrustedConfig_actionLaunchDetails = untrustedConfig.actionLaunchDetails;
273
+ const referenceActionLaunchInputRepresentationValidationError = validate$c(untrustedConfig_actionLaunchDetails);
274
+ if (referenceActionLaunchInputRepresentationValidationError === null) {
275
+ config.actionLaunchDetails = untrustedConfig_actionLaunchDetails;
276
+ }
277
+ return config;
278
+ }
279
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
280
+ if (!untrustedIsObject(untrustedConfig)) {
281
+ return null;
282
+ }
283
+ if (process.env.NODE_ENV !== 'production') {
284
+ validateConfig(untrustedConfig, configPropertyNames);
285
+ }
286
+ const config = typeCheckConfig$5(untrustedConfig);
287
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
288
+ return null;
289
+ }
290
+ return config;
291
+ }
292
+ function buildNetworkSnapshot$5(luvio, config, options) {
293
+ const resourceParams = createResourceParams$5(config);
294
+ const request = createResourceRequest$5(resourceParams);
295
+ return luvio.dispatchResourceRequest(request, options)
296
+ .then((response) => {
297
+ return luvio.handleSuccessResponse(() => {
298
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
299
+ return luvio.storeBroadcast().then(() => snapshot);
300
+ }, () => {
301
+ const cache = new StoreKeyMap();
302
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
303
+ return cache;
304
+ });
305
+ }, (response) => {
306
+ deepFreeze(response);
307
+ throw response;
308
+ });
309
+ }
310
+ const createActionLaunchDetailsAdapterFactory = (luvio) => {
311
+ return function createActionLaunchDetails(untrustedConfig) {
312
+ const config = validateAdapterConfig$5(untrustedConfig, createActionLaunchDetails_ConfigPropertyNames);
313
+ // Invalid or incomplete config
314
+ if (config === null) {
315
+ throw new Error('Invalid config for "createActionLaunchDetails"');
316
+ }
317
+ return buildNetworkSnapshot$5(luvio, config);
318
+ };
319
+ };
320
+
321
+ function validate$a(obj, path = 'ActionLauncherConversationInputRepresentation') {
322
+ const v_error = (() => {
323
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
324
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
325
+ }
326
+ if (obj.id !== undefined) {
327
+ const obj_id = obj.id;
328
+ const path_id = path + '.id';
329
+ if (typeof obj_id !== 'string') {
330
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
331
+ }
332
+ }
333
+ if (obj.type !== undefined) {
334
+ const obj_type = obj.type;
335
+ const path_type = path + '.type';
336
+ if (typeof obj_type !== 'string') {
337
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
338
+ }
339
+ }
340
+ })();
341
+ return v_error === undefined ? null : v_error;
342
+ }
343
+
344
+ const VERSION$5 = "169e7784dec2d40ca1669e854a2a19f2";
345
+ function validate$9(obj, path = 'ActionLauncherIntentActionsMappingOutputRepresentation') {
346
+ const v_error = (() => {
347
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
348
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
349
+ }
350
+ const obj_actions = obj.actions;
351
+ const path_actions = path + '.actions';
352
+ if (!ArrayIsArray(obj_actions)) {
353
+ return new TypeError('Expected "array" but received "' + typeof obj_actions + '" (at "' + path_actions + '")');
354
+ }
355
+ for (let i = 0; i < obj_actions.length; i++) {
356
+ const obj_actions_item = obj_actions[i];
357
+ const path_actions_item = path_actions + '[' + i + ']';
358
+ if (obj_actions_item === undefined) {
359
+ return new TypeError('Expected "defined" but received "' + typeof obj_actions_item + '" (at "' + path_actions_item + '")');
360
+ }
361
+ }
362
+ const obj_name = obj.name;
363
+ const path_name = path + '.name';
364
+ if (typeof obj_name !== 'string') {
365
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
366
+ }
367
+ })();
368
+ return v_error === undefined ? null : v_error;
369
+ }
370
+ const select$a = function ActionLauncherIntentActionsMappingOutputRepresentationSelect() {
371
+ return {
372
+ kind: 'Fragment',
373
+ version: VERSION$5,
374
+ private: [],
375
+ selections: [
376
+ {
377
+ name: 'actions',
378
+ kind: 'Object',
379
+ // any
380
+ },
381
+ {
382
+ name: 'name',
383
+ kind: 'Scalar'
384
+ }
385
+ ]
386
+ };
387
+ };
388
+ function equals$5(existing, incoming) {
389
+ const existing_name = existing.name;
390
+ const incoming_name = incoming.name;
391
+ if (!(existing_name === incoming_name)) {
392
+ return false;
393
+ }
394
+ const existing_actions = existing.actions;
395
+ const incoming_actions = incoming.actions;
396
+ const equals_actions_items = equalsArray(existing_actions, incoming_actions, (existing_actions_item, incoming_actions_item) => {
397
+ if (JSONStringify(incoming_actions_item) !== JSONStringify(existing_actions_item)) {
398
+ return false;
399
+ }
400
+ });
401
+ if (equals_actions_items === false) {
402
+ return false;
403
+ }
404
+ return true;
405
+ }
406
+
407
+ const VERSION$4 = "f27c9f482ac4aecfd717d2393029a320";
408
+ function validate$8(obj, path = 'ServiceExcellenceStatusOutputRepresentation') {
409
+ const v_error = (() => {
410
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
411
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
412
+ }
413
+ const obj_code = obj.code;
414
+ const path_code = path + '.code';
415
+ if (typeof obj_code !== 'number' || (typeof obj_code === 'number' && Math.floor(obj_code) !== obj_code)) {
416
+ return new TypeError('Expected "integer" but received "' + typeof obj_code + '" (at "' + path_code + '")');
417
+ }
418
+ const obj_generationId = obj.generationId;
419
+ const path_generationId = path + '.generationId';
420
+ let obj_generationId_union0 = null;
421
+ const obj_generationId_union0_error = (() => {
422
+ if (typeof obj_generationId !== 'string') {
423
+ return new TypeError('Expected "string" but received "' + typeof obj_generationId + '" (at "' + path_generationId + '")');
424
+ }
425
+ })();
426
+ if (obj_generationId_union0_error != null) {
427
+ obj_generationId_union0 = obj_generationId_union0_error.message;
428
+ }
429
+ let obj_generationId_union1 = null;
430
+ const obj_generationId_union1_error = (() => {
431
+ if (obj_generationId !== null) {
432
+ return new TypeError('Expected "null" but received "' + typeof obj_generationId + '" (at "' + path_generationId + '")');
433
+ }
434
+ })();
435
+ if (obj_generationId_union1_error != null) {
436
+ obj_generationId_union1 = obj_generationId_union1_error.message;
437
+ }
438
+ if (obj_generationId_union0 && obj_generationId_union1) {
439
+ let message = 'Object doesn\'t match union (at "' + path_generationId + '")';
440
+ message += '\n' + obj_generationId_union0.split('\n').map((line) => '\t' + line).join('\n');
441
+ message += '\n' + obj_generationId_union1.split('\n').map((line) => '\t' + line).join('\n');
442
+ return new TypeError(message);
443
+ }
444
+ const obj_message = obj.message;
445
+ const path_message = path + '.message';
446
+ if (typeof obj_message !== 'string') {
447
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
448
+ }
449
+ })();
450
+ return v_error === undefined ? null : v_error;
451
+ }
452
+ const RepresentationType$4 = 'ServiceExcellenceStatusOutputRepresentation';
453
+ function keyBuilder$7(luvio, config) {
454
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.message;
455
+ }
456
+ function keyBuilderFromType$1(luvio, object) {
457
+ const keyParams = {
458
+ message: object.message
459
+ };
460
+ return keyBuilder$7(luvio, keyParams);
461
+ }
462
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
463
+ return input;
464
+ }
465
+ const select$9 = function ServiceExcellenceStatusOutputRepresentationSelect() {
466
+ return {
467
+ kind: 'Fragment',
468
+ version: VERSION$4,
469
+ private: [],
470
+ selections: [
471
+ {
472
+ name: 'code',
473
+ kind: 'Scalar'
474
+ },
475
+ {
476
+ name: 'generationId',
477
+ kind: 'Scalar'
478
+ },
479
+ {
480
+ name: 'message',
481
+ kind: 'Scalar'
482
+ }
483
+ ]
484
+ };
485
+ };
486
+ function equals$4(existing, incoming) {
487
+ const existing_code = existing.code;
488
+ const incoming_code = incoming.code;
489
+ if (!(existing_code === incoming_code)) {
490
+ return false;
491
+ }
492
+ const existing_message = existing.message;
493
+ const incoming_message = incoming.message;
494
+ if (!(existing_message === incoming_message)) {
495
+ return false;
496
+ }
497
+ const existing_generationId = existing.generationId;
498
+ const incoming_generationId = incoming.generationId;
499
+ if (!(existing_generationId === incoming_generationId)) {
500
+ return false;
501
+ }
502
+ return true;
503
+ }
504
+ const ingest$4 = function ServiceExcellenceStatusOutputRepresentationIngest(input, path, luvio, store, timestamp) {
505
+ if (process.env.NODE_ENV !== 'production') {
506
+ const validateError = validate$8(input);
507
+ if (validateError !== null) {
508
+ throw validateError;
509
+ }
510
+ }
511
+ const key = keyBuilderFromType$1(luvio, input);
512
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
513
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "service-excellence", VERSION$4, RepresentationType$4, equals$4);
514
+ return createLink(key);
515
+ };
516
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
517
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
518
+ const rootKey = keyBuilderFromType$1(luvio, input);
519
+ rootKeySet.set(rootKey, {
520
+ namespace: keyPrefix,
521
+ representationName: RepresentationType$4,
522
+ mergeable: false
523
+ });
524
+ }
525
+
526
+ const VERSION$3 = "b13f413587104cad018dd98fc71971d6";
527
+ function validate$7(obj, path = 'ActionLauncherRecommendationsOutputRepresentation') {
528
+ const v_error = (() => {
529
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
530
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
531
+ }
532
+ const obj_intentsActionMapping = obj.intentsActionMapping;
533
+ const path_intentsActionMapping = path + '.intentsActionMapping';
534
+ if (!ArrayIsArray(obj_intentsActionMapping)) {
535
+ return new TypeError('Expected "array" but received "' + typeof obj_intentsActionMapping + '" (at "' + path_intentsActionMapping + '")');
536
+ }
537
+ for (let i = 0; i < obj_intentsActionMapping.length; i++) {
538
+ const obj_intentsActionMapping_item = obj_intentsActionMapping[i];
539
+ const path_intentsActionMapping_item = path_intentsActionMapping + '[' + i + ']';
540
+ const referencepath_intentsActionMapping_itemValidationError = validate$9(obj_intentsActionMapping_item, path_intentsActionMapping_item);
541
+ if (referencepath_intentsActionMapping_itemValidationError !== null) {
542
+ let message = 'Object doesn\'t match ActionLauncherIntentActionsMappingOutputRepresentation (at "' + path_intentsActionMapping_item + '")\n';
543
+ message += referencepath_intentsActionMapping_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
544
+ return new TypeError(message);
545
+ }
546
+ }
547
+ const obj_mode = obj.mode;
548
+ const path_mode = path + '.mode';
549
+ if (typeof obj_mode !== 'string') {
550
+ return new TypeError('Expected "string" but received "' + typeof obj_mode + '" (at "' + path_mode + '")');
551
+ }
552
+ const obj_status = obj.status;
553
+ const path_status = path + '.status';
554
+ if (typeof obj_status !== 'object' || Array.isArray(obj_status)) {
555
+ return new TypeError('Expected "object" but received "' + typeof obj_status + '" (at "' + path_status + '")');
556
+ }
557
+ })();
558
+ return v_error === undefined ? null : v_error;
559
+ }
560
+ const RepresentationType$3 = 'ActionLauncherRecommendationsOutputRepresentation';
561
+ function keyBuilder$6(luvio, config) {
562
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.mode;
563
+ }
564
+ function keyBuilderFromType(luvio, object) {
565
+ const keyParams = {
566
+ mode: object.mode
567
+ };
568
+ return keyBuilder$6(luvio, keyParams);
569
+ }
570
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
571
+ const input_status = input.status;
572
+ const input_status_id = path.fullPath + '__status';
573
+ input.status = ingest$4(input_status, {
574
+ fullPath: input_status_id,
575
+ propertyName: 'status',
576
+ parent: {
577
+ data: input,
578
+ key: path.fullPath,
579
+ existing: existing,
580
+ },
581
+ ttl: path.ttl
582
+ }, luvio, store, timestamp);
583
+ return input;
584
+ }
585
+ const select$8 = function ActionLauncherRecommendationsOutputRepresentationSelect() {
586
+ const { selections: ActionLauncherIntentActionsMappingOutputRepresentation__selections, opaque: ActionLauncherIntentActionsMappingOutputRepresentation__opaque, } = select$a();
587
+ return {
588
+ kind: 'Fragment',
589
+ version: VERSION$3,
590
+ private: [],
591
+ selections: [
592
+ {
593
+ name: 'intentsActionMapping',
594
+ kind: 'Object',
595
+ plural: true,
596
+ selections: ActionLauncherIntentActionsMappingOutputRepresentation__selections
597
+ },
598
+ {
599
+ name: 'mode',
600
+ kind: 'Scalar'
601
+ },
602
+ {
603
+ name: 'status',
604
+ kind: 'Link',
605
+ fragment: select$9()
606
+ }
607
+ ]
608
+ };
609
+ };
610
+ function equals$3(existing, incoming) {
611
+ const existing_mode = existing.mode;
612
+ const incoming_mode = incoming.mode;
613
+ if (!(existing_mode === incoming_mode)) {
614
+ return false;
615
+ }
616
+ const existing_intentsActionMapping = existing.intentsActionMapping;
617
+ const incoming_intentsActionMapping = incoming.intentsActionMapping;
618
+ const equals_intentsActionMapping_items = equalsArray(existing_intentsActionMapping, incoming_intentsActionMapping, (existing_intentsActionMapping_item, incoming_intentsActionMapping_item) => {
619
+ if (!(equals$5(existing_intentsActionMapping_item, incoming_intentsActionMapping_item))) {
620
+ return false;
621
+ }
622
+ });
623
+ if (equals_intentsActionMapping_items === false) {
624
+ return false;
625
+ }
626
+ const existing_status = existing.status;
627
+ const incoming_status = incoming.status;
628
+ if (!(existing_status.__ref === incoming_status.__ref)) {
629
+ return false;
630
+ }
631
+ return true;
632
+ }
633
+ const ingest$3 = function ActionLauncherRecommendationsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
634
+ if (process.env.NODE_ENV !== 'production') {
635
+ const validateError = validate$7(input);
636
+ if (validateError !== null) {
637
+ throw validateError;
638
+ }
639
+ }
640
+ const key = keyBuilderFromType(luvio, input);
641
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
642
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "service-excellence", VERSION$3, RepresentationType$3, equals$3);
643
+ return createLink(key);
644
+ };
645
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
646
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
647
+ const rootKey = keyBuilderFromType(luvio, input);
648
+ rootKeySet.set(rootKey, {
649
+ namespace: keyPrefix,
650
+ representationName: RepresentationType$3,
651
+ mergeable: false
652
+ });
653
+ getTypeCacheKeys$4(rootKeySet, luvio, input.status);
654
+ }
655
+
656
+ function select$7(luvio, params) {
657
+ return select$8();
658
+ }
659
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
660
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
661
+ }
662
+ function ingestSuccess$4(luvio, resourceParams, response) {
663
+ const { body } = response;
664
+ const key = keyBuilderFromType(luvio, body);
665
+ luvio.storeIngest(key, ingest$3, body);
666
+ const snapshot = luvio.storeLookup({
667
+ recordId: key,
668
+ node: select$7(),
669
+ variables: {},
670
+ });
671
+ if (process.env.NODE_ENV !== 'production') {
672
+ if (snapshot.state !== 'Fulfilled') {
673
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
674
+ }
675
+ }
676
+ deepFreeze(snapshot.data);
677
+ return snapshot;
678
+ }
679
+ function createResourceRequest$4(config) {
680
+ const headers = {};
681
+ return {
682
+ baseUri: '/services/data/v66.0',
683
+ basePath: '/connect/service-excellence/action-launcher-recommendations',
684
+ method: 'post',
685
+ body: config.body,
686
+ urlParams: {},
687
+ queryParams: config.queryParams,
688
+ headers,
689
+ priority: 'normal',
690
+ };
691
+ }
692
+
693
+ const adapterName$4 = 'getEinsteinRecommendedItems';
694
+ const getEinsteinRecommendedItems_ConfigPropertyMetadata = [
695
+ generateParamConfigMetadata('catalogId', false, 1 /* QueryParameter */, 0 /* String */),
696
+ generateParamConfigMetadata('dataSpaceName', false, 1 /* QueryParameter */, 0 /* String */),
697
+ generateParamConfigMetadata('deploymentName', false, 1 /* QueryParameter */, 0 /* String */),
698
+ generateParamConfigMetadata('searchIndexName', false, 1 /* QueryParameter */, 0 /* String */),
699
+ generateParamConfigMetadata('conversation', true, 2 /* Body */, 4 /* Unsupported */),
700
+ generateParamConfigMetadata('intents', true, 2 /* Body */, 0 /* String */, true),
701
+ generateParamConfigMetadata('limit', true, 2 /* Body */, 3 /* Integer */),
702
+ generateParamConfigMetadata('mode', true, 2 /* Body */, 0 /* String */),
703
+ ];
704
+ const getEinsteinRecommendedItems_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getEinsteinRecommendedItems_ConfigPropertyMetadata);
705
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(getEinsteinRecommendedItems_ConfigPropertyMetadata);
706
+ function typeCheckConfig$4(untrustedConfig) {
707
+ const config = {};
708
+ typeCheckConfig$6(untrustedConfig, config, getEinsteinRecommendedItems_ConfigPropertyMetadata);
709
+ const untrustedConfig_conversation = untrustedConfig.conversation;
710
+ const referenceActionLauncherConversationInputRepresentationValidationError = validate$a(untrustedConfig_conversation);
711
+ if (referenceActionLauncherConversationInputRepresentationValidationError === null) {
712
+ config.conversation = untrustedConfig_conversation;
713
+ }
714
+ return config;
715
+ }
716
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
717
+ if (!untrustedIsObject(untrustedConfig)) {
718
+ return null;
719
+ }
720
+ if (process.env.NODE_ENV !== 'production') {
721
+ validateConfig(untrustedConfig, configPropertyNames);
722
+ }
723
+ const config = typeCheckConfig$4(untrustedConfig);
724
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
725
+ return null;
726
+ }
727
+ return config;
728
+ }
729
+ function buildNetworkSnapshot$4(luvio, config, options) {
730
+ const resourceParams = createResourceParams$4(config);
731
+ const request = createResourceRequest$4(resourceParams);
732
+ return luvio.dispatchResourceRequest(request, options)
733
+ .then((response) => {
734
+ return luvio.handleSuccessResponse(() => {
735
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
736
+ return luvio.storeBroadcast().then(() => snapshot);
737
+ }, () => {
738
+ const cache = new StoreKeyMap();
739
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
740
+ return cache;
741
+ });
742
+ }, (response) => {
743
+ deepFreeze(response);
744
+ throw response;
745
+ });
746
+ }
747
+ const getEinsteinRecommendedItemsAdapterFactory = (luvio) => {
748
+ return function getEinsteinRecommendedItems(untrustedConfig) {
749
+ const config = validateAdapterConfig$4(untrustedConfig, getEinsteinRecommendedItems_ConfigPropertyNames);
750
+ // Invalid or incomplete config
751
+ if (config === null) {
752
+ throw new Error('Invalid config for "getEinsteinRecommendedItems"');
753
+ }
754
+ return buildNetworkSnapshot$4(luvio, config);
755
+ };
756
+ };
757
+
758
+ function validate$6(obj, path = 'ServiceCatalogItemsOutputRepresentation') {
759
+ const v_error = (() => {
760
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
761
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
762
+ }
763
+ const obj_actionDefinition = obj.actionDefinition;
764
+ const path_actionDefinition = path + '.actionDefinition';
765
+ if (obj_actionDefinition === undefined) {
766
+ return new TypeError('Expected "defined" but received "' + typeof obj_actionDefinition + '" (at "' + path_actionDefinition + '")');
767
+ }
768
+ const obj_actionDescription = obj.actionDescription;
769
+ const path_actionDescription = path + '.actionDescription';
770
+ if (typeof obj_actionDescription !== 'string') {
771
+ return new TypeError('Expected "string" but received "' + typeof obj_actionDescription + '" (at "' + path_actionDescription + '")');
772
+ }
773
+ const obj_actionId = obj.actionId;
774
+ const path_actionId = path + '.actionId';
775
+ if (typeof obj_actionId !== 'string') {
776
+ return new TypeError('Expected "string" but received "' + typeof obj_actionId + '" (at "' + path_actionId + '")');
777
+ }
778
+ const obj_actionLabel = obj.actionLabel;
779
+ const path_actionLabel = path + '.actionLabel';
780
+ if (typeof obj_actionLabel !== 'string') {
781
+ return new TypeError('Expected "string" but received "' + typeof obj_actionLabel + '" (at "' + path_actionLabel + '")');
782
+ }
783
+ const obj_actionType = obj.actionType;
784
+ const path_actionType = path + '.actionType';
785
+ if (typeof obj_actionType !== 'string') {
786
+ return new TypeError('Expected "string" but received "' + typeof obj_actionType + '" (at "' + path_actionType + '")');
787
+ }
788
+ })();
789
+ return v_error === undefined ? null : v_error;
790
+ }
791
+
792
+ const TTL$2 = 1200000;
793
+ const VERSION$2 = "0a4ca6792974894604d3d545554605b2";
794
+ function validate$5(obj, path = 'RecentlyUsedActionsRepresentation') {
795
+ const v_error = (() => {
796
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
797
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
798
+ }
799
+ const obj_recentActions = obj.recentActions;
800
+ const path_recentActions = path + '.recentActions';
801
+ if (!ArrayIsArray(obj_recentActions)) {
802
+ return new TypeError('Expected "array" but received "' + typeof obj_recentActions + '" (at "' + path_recentActions + '")');
803
+ }
804
+ for (let i = 0; i < obj_recentActions.length; i++) {
805
+ const obj_recentActions_item = obj_recentActions[i];
806
+ const path_recentActions_item = path_recentActions + '[' + i + ']';
807
+ const referencepath_recentActions_itemValidationError = validate$6(obj_recentActions_item, path_recentActions_item);
808
+ if (referencepath_recentActions_itemValidationError !== null) {
809
+ let message = 'Object doesn\'t match ServiceCatalogItemsOutputRepresentation (at "' + path_recentActions_item + '")\n';
810
+ message += referencepath_recentActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
811
+ return new TypeError(message);
812
+ }
813
+ }
814
+ const obj_status = obj.status;
815
+ const path_status = path + '.status';
816
+ const referencepath_statusValidationError = validate$8(obj_status, path_status);
817
+ if (referencepath_statusValidationError !== null) {
818
+ let message = 'Object doesn\'t match ServiceExcellenceStatusOutputRepresentation (at "' + path_status + '")\n';
819
+ message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
820
+ return new TypeError(message);
821
+ }
822
+ })();
823
+ return v_error === undefined ? null : v_error;
824
+ }
825
+ const RepresentationType$2 = 'RecentlyUsedActionsRepresentation';
826
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
827
+ return input;
828
+ }
829
+ const select$6 = function RecentlyUsedActionsRepresentationSelect() {
830
+ return {
831
+ kind: 'Fragment',
832
+ version: VERSION$2,
833
+ private: [],
834
+ opaque: true
835
+ };
836
+ };
837
+ function equals$2(existing, incoming) {
838
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
839
+ return false;
840
+ }
841
+ return true;
842
+ }
843
+ const ingest$2 = function RecentlyUsedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
844
+ if (process.env.NODE_ENV !== 'production') {
845
+ const validateError = validate$5(input);
846
+ if (validateError !== null) {
847
+ throw validateError;
848
+ }
849
+ }
850
+ const key = path.fullPath;
851
+ const ttlToUse = TTL$2;
852
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "service-excellence", VERSION$2, RepresentationType$2, equals$2);
853
+ return createLink(key);
854
+ };
855
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
856
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
857
+ const rootKey = fullPathFactory();
858
+ rootKeySet.set(rootKey, {
859
+ namespace: keyPrefix,
860
+ representationName: RepresentationType$2,
861
+ mergeable: false
862
+ });
863
+ }
864
+
865
+ function select$5(luvio, params) {
866
+ return select$6();
867
+ }
868
+ function keyBuilder$5(luvio, params) {
869
+ return keyPrefix + '::RecentlyUsedActionsRepresentation:(' + 'deploymentId:' + params.queryParams.deploymentId + ',' + 'objectKeyPrefix:' + params.queryParams.objectKeyPrefix + ')';
870
+ }
871
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
872
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
873
+ }
874
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
875
+ const { body } = response;
876
+ const key = keyBuilder$5(luvio, resourceParams);
877
+ luvio.storeIngest(key, ingest$2, body);
878
+ const snapshot = luvio.storeLookup({
879
+ recordId: key,
880
+ node: select$5(),
881
+ variables: {},
882
+ }, snapshotRefresh);
883
+ if (process.env.NODE_ENV !== 'production') {
884
+ if (snapshot.state !== 'Fulfilled') {
885
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
886
+ }
887
+ }
888
+ deepFreeze(snapshot.data);
889
+ return snapshot;
890
+ }
891
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
892
+ const key = keyBuilder$5(luvio, params);
893
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
894
+ const storeMetadataParams = {
895
+ ttl: TTL$2,
896
+ namespace: keyPrefix,
897
+ version: VERSION$2,
898
+ representationName: RepresentationType$2
899
+ };
900
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
901
+ return errorSnapshot;
902
+ }
903
+ function createResourceRequest$3(config) {
904
+ const headers = {};
905
+ return {
906
+ baseUri: '/services/data/v66.0',
907
+ basePath: '/connect/service-excellence/service-catalog-items/recent-actions',
908
+ method: 'get',
909
+ body: null,
910
+ urlParams: {},
911
+ queryParams: config.queryParams,
912
+ headers,
913
+ priority: 'normal',
914
+ };
915
+ }
916
+
917
+ const adapterName$3 = 'getRecentActions';
918
+ const getRecentActions_ConfigPropertyMetadata = [
919
+ generateParamConfigMetadata('deploymentId', false, 1 /* QueryParameter */, 0 /* String */),
920
+ generateParamConfigMetadata('objectKeyPrefix', false, 1 /* QueryParameter */, 0 /* String */),
921
+ ];
922
+ const getRecentActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getRecentActions_ConfigPropertyMetadata);
923
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(getRecentActions_ConfigPropertyMetadata);
924
+ function keyBuilder$4(luvio, config) {
925
+ const resourceParams = createResourceParams$3(config);
926
+ return keyBuilder$5(luvio, resourceParams);
927
+ }
928
+ function typeCheckConfig$3(untrustedConfig) {
929
+ const config = {};
930
+ typeCheckConfig$6(untrustedConfig, config, getRecentActions_ConfigPropertyMetadata);
931
+ return config;
932
+ }
933
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
934
+ if (!untrustedIsObject(untrustedConfig)) {
935
+ return null;
936
+ }
937
+ if (process.env.NODE_ENV !== 'production') {
938
+ validateConfig(untrustedConfig, configPropertyNames);
939
+ }
940
+ const config = typeCheckConfig$3(untrustedConfig);
941
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
942
+ return null;
943
+ }
944
+ return config;
945
+ }
946
+ function adapterFragment$2(luvio, config) {
947
+ createResourceParams$3(config);
948
+ return select$5();
949
+ }
950
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
951
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
952
+ config,
953
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
954
+ });
955
+ return luvio.storeBroadcast().then(() => snapshot);
956
+ }
957
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
958
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
959
+ config,
960
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
961
+ });
962
+ return luvio.storeBroadcast().then(() => snapshot);
963
+ }
964
+ function buildNetworkSnapshot$3(luvio, config, options) {
965
+ const resourceParams = createResourceParams$3(config);
966
+ const request = createResourceRequest$3(resourceParams);
967
+ return luvio.dispatchResourceRequest(request, options)
968
+ .then((response) => {
969
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
970
+ const cache = new StoreKeyMap();
971
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
972
+ return cache;
973
+ });
974
+ }, (response) => {
975
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
976
+ });
977
+ }
978
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
979
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
980
+ }
981
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
982
+ const { luvio, config } = context;
983
+ const selector = {
984
+ recordId: keyBuilder$4(luvio, config),
985
+ node: adapterFragment$2(luvio, config),
986
+ variables: {},
987
+ };
988
+ const cacheSnapshot = storeLookup(selector, {
989
+ config,
990
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
991
+ });
992
+ return cacheSnapshot;
993
+ }
994
+ const getRecentActionsAdapterFactory = (luvio) => function serviceExcellence__getRecentActions(untrustedConfig, requestContext) {
995
+ const config = validateAdapterConfig$3(untrustedConfig, getRecentActions_ConfigPropertyNames);
996
+ // Invalid or incomplete config
997
+ if (config === null) {
998
+ return null;
999
+ }
1000
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1001
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1002
+ };
1003
+
1004
+ function validate$4(obj, path = 'ServiceCatalogActionsCategoryOutputRepresentation') {
1005
+ const v_error = (() => {
1006
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1007
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1008
+ }
1009
+ const obj_actionId = obj.actionId;
1010
+ const path_actionId = path + '.actionId';
1011
+ let obj_actionId_union0 = null;
1012
+ const obj_actionId_union0_error = (() => {
1013
+ if (typeof obj_actionId !== 'string') {
1014
+ return new TypeError('Expected "string" but received "' + typeof obj_actionId + '" (at "' + path_actionId + '")');
1015
+ }
1016
+ })();
1017
+ if (obj_actionId_union0_error != null) {
1018
+ obj_actionId_union0 = obj_actionId_union0_error.message;
1019
+ }
1020
+ let obj_actionId_union1 = null;
1021
+ const obj_actionId_union1_error = (() => {
1022
+ if (obj_actionId !== null) {
1023
+ return new TypeError('Expected "null" but received "' + typeof obj_actionId + '" (at "' + path_actionId + '")');
1024
+ }
1025
+ })();
1026
+ if (obj_actionId_union1_error != null) {
1027
+ obj_actionId_union1 = obj_actionId_union1_error.message;
1028
+ }
1029
+ if (obj_actionId_union0 && obj_actionId_union1) {
1030
+ let message = 'Object doesn\'t match union (at "' + path_actionId + '")';
1031
+ message += '\n' + obj_actionId_union0.split('\n').map((line) => '\t' + line).join('\n');
1032
+ message += '\n' + obj_actionId_union1.split('\n').map((line) => '\t' + line).join('\n');
1033
+ return new TypeError(message);
1034
+ }
1035
+ const obj_businessName = obj.businessName;
1036
+ const path_businessName = path + '.businessName';
1037
+ let obj_businessName_union0 = null;
1038
+ const obj_businessName_union0_error = (() => {
1039
+ if (typeof obj_businessName !== 'string') {
1040
+ return new TypeError('Expected "string" but received "' + typeof obj_businessName + '" (at "' + path_businessName + '")');
1041
+ }
1042
+ })();
1043
+ if (obj_businessName_union0_error != null) {
1044
+ obj_businessName_union0 = obj_businessName_union0_error.message;
1045
+ }
1046
+ let obj_businessName_union1 = null;
1047
+ const obj_businessName_union1_error = (() => {
1048
+ if (obj_businessName !== null) {
1049
+ return new TypeError('Expected "null" but received "' + typeof obj_businessName + '" (at "' + path_businessName + '")');
1050
+ }
1051
+ })();
1052
+ if (obj_businessName_union1_error != null) {
1053
+ obj_businessName_union1 = obj_businessName_union1_error.message;
1054
+ }
1055
+ if (obj_businessName_union0 && obj_businessName_union1) {
1056
+ let message = 'Object doesn\'t match union (at "' + path_businessName + '")';
1057
+ message += '\n' + obj_businessName_union0.split('\n').map((line) => '\t' + line).join('\n');
1058
+ message += '\n' + obj_businessName_union1.split('\n').map((line) => '\t' + line).join('\n');
1059
+ return new TypeError(message);
1060
+ }
1061
+ const obj_order = obj.order;
1062
+ const path_order = path + '.order';
1063
+ let obj_order_union0 = null;
1064
+ const obj_order_union0_error = (() => {
1065
+ if (typeof obj_order !== 'number' || (typeof obj_order === 'number' && Math.floor(obj_order) !== obj_order)) {
1066
+ return new TypeError('Expected "integer" but received "' + typeof obj_order + '" (at "' + path_order + '")');
1067
+ }
1068
+ })();
1069
+ if (obj_order_union0_error != null) {
1070
+ obj_order_union0 = obj_order_union0_error.message;
1071
+ }
1072
+ let obj_order_union1 = null;
1073
+ const obj_order_union1_error = (() => {
1074
+ if (obj_order !== null) {
1075
+ return new TypeError('Expected "null" but received "' + typeof obj_order + '" (at "' + path_order + '")');
1076
+ }
1077
+ })();
1078
+ if (obj_order_union1_error != null) {
1079
+ obj_order_union1 = obj_order_union1_error.message;
1080
+ }
1081
+ if (obj_order_union0 && obj_order_union1) {
1082
+ let message = 'Object doesn\'t match union (at "' + path_order + '")';
1083
+ message += '\n' + obj_order_union0.split('\n').map((line) => '\t' + line).join('\n');
1084
+ message += '\n' + obj_order_union1.split('\n').map((line) => '\t' + line).join('\n');
1085
+ return new TypeError(message);
1086
+ }
1087
+ })();
1088
+ return v_error === undefined ? null : v_error;
1089
+ }
1090
+
1091
+ function validate$3(obj, path = 'ServiceCatalogFrequentActionsOutputRepresentation') {
1092
+ const v_error = (() => {
1093
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1094
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1095
+ }
1096
+ const obj_dynamicActions = obj.dynamicActions;
1097
+ const path_dynamicActions = path + '.dynamicActions';
1098
+ if (!ArrayIsArray(obj_dynamicActions)) {
1099
+ return new TypeError('Expected "array" but received "' + typeof obj_dynamicActions + '" (at "' + path_dynamicActions + '")');
1100
+ }
1101
+ for (let i = 0; i < obj_dynamicActions.length; i++) {
1102
+ const obj_dynamicActions_item = obj_dynamicActions[i];
1103
+ const path_dynamicActions_item = path_dynamicActions + '[' + i + ']';
1104
+ const referencepath_dynamicActions_itemValidationError = validate$4(obj_dynamicActions_item, path_dynamicActions_item);
1105
+ if (referencepath_dynamicActions_itemValidationError !== null) {
1106
+ let message = 'Object doesn\'t match ServiceCatalogActionsCategoryOutputRepresentation (at "' + path_dynamicActions_item + '")\n';
1107
+ message += referencepath_dynamicActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1108
+ return new TypeError(message);
1109
+ }
1110
+ }
1111
+ const obj_staticActions = obj.staticActions;
1112
+ const path_staticActions = path + '.staticActions';
1113
+ if (!ArrayIsArray(obj_staticActions)) {
1114
+ return new TypeError('Expected "array" but received "' + typeof obj_staticActions + '" (at "' + path_staticActions + '")');
1115
+ }
1116
+ for (let i = 0; i < obj_staticActions.length; i++) {
1117
+ const obj_staticActions_item = obj_staticActions[i];
1118
+ const path_staticActions_item = path_staticActions + '[' + i + ']';
1119
+ const referencepath_staticActions_itemValidationError = validate$4(obj_staticActions_item, path_staticActions_item);
1120
+ if (referencepath_staticActions_itemValidationError !== null) {
1121
+ let message = 'Object doesn\'t match ServiceCatalogActionsCategoryOutputRepresentation (at "' + path_staticActions_item + '")\n';
1122
+ message += referencepath_staticActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1123
+ return new TypeError(message);
1124
+ }
1125
+ }
1126
+ })();
1127
+ return v_error === undefined ? null : v_error;
1128
+ }
1129
+
1130
+ const TTL$1 = 60000;
1131
+ const VERSION$1 = "f3cfe28321b939c8425290cbdba2fbaa";
1132
+ function validate$2(obj, path = 'ServiceCatalogItemsFetchOutputRepresentation') {
1133
+ const v_error = (() => {
1134
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1135
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1136
+ }
1137
+ const obj_actions = obj.actions;
1138
+ const path_actions = path + '.actions';
1139
+ if (!ArrayIsArray(obj_actions)) {
1140
+ return new TypeError('Expected "array" but received "' + typeof obj_actions + '" (at "' + path_actions + '")');
1141
+ }
1142
+ for (let i = 0; i < obj_actions.length; i++) {
1143
+ const obj_actions_item = obj_actions[i];
1144
+ const path_actions_item = path_actions + '[' + i + ']';
1145
+ const referencepath_actions_itemValidationError = validate$6(obj_actions_item, path_actions_item);
1146
+ if (referencepath_actions_itemValidationError !== null) {
1147
+ let message = 'Object doesn\'t match ServiceCatalogItemsOutputRepresentation (at "' + path_actions_item + '")\n';
1148
+ message += referencepath_actions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1149
+ return new TypeError(message);
1150
+ }
1151
+ }
1152
+ const obj_frequentActions = obj.frequentActions;
1153
+ const path_frequentActions = path + '.frequentActions';
1154
+ const referencepath_frequentActionsValidationError = validate$3(obj_frequentActions, path_frequentActions);
1155
+ if (referencepath_frequentActionsValidationError !== null) {
1156
+ let message = 'Object doesn\'t match ServiceCatalogFrequentActionsOutputRepresentation (at "' + path_frequentActions + '")\n';
1157
+ message += referencepath_frequentActionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1158
+ return new TypeError(message);
1159
+ }
1160
+ const obj_status = obj.status;
1161
+ const path_status = path + '.status';
1162
+ const referencepath_statusValidationError = validate$8(obj_status, path_status);
1163
+ if (referencepath_statusValidationError !== null) {
1164
+ let message = 'Object doesn\'t match ServiceExcellenceStatusOutputRepresentation (at "' + path_status + '")\n';
1165
+ message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1166
+ return new TypeError(message);
1167
+ }
1168
+ })();
1169
+ return v_error === undefined ? null : v_error;
1170
+ }
1171
+ const RepresentationType$1 = 'ServiceCatalogItemsFetchOutputRepresentation';
1172
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1173
+ return input;
1174
+ }
1175
+ const select$4 = function ServiceCatalogItemsFetchOutputRepresentationSelect() {
1176
+ return {
1177
+ kind: 'Fragment',
1178
+ version: VERSION$1,
1179
+ private: [],
1180
+ opaque: true
1181
+ };
1182
+ };
1183
+ function equals$1(existing, incoming) {
1184
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1185
+ return false;
1186
+ }
1187
+ return true;
1188
+ }
1189
+ const ingest$1 = function ServiceCatalogItemsFetchOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1190
+ if (process.env.NODE_ENV !== 'production') {
1191
+ const validateError = validate$2(input);
1192
+ if (validateError !== null) {
1193
+ throw validateError;
1194
+ }
1195
+ }
1196
+ const key = path.fullPath;
1197
+ const ttlToUse = TTL$1;
1198
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "service-excellence", VERSION$1, RepresentationType$1, equals$1);
1199
+ return createLink(key);
1200
+ };
1201
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1202
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1203
+ const rootKey = fullPathFactory();
1204
+ rootKeySet.set(rootKey, {
1205
+ namespace: keyPrefix,
1206
+ representationName: RepresentationType$1,
1207
+ mergeable: false
1208
+ });
1209
+ }
1210
+
1211
+ function select$3(luvio, params) {
1212
+ return select$4();
1213
+ }
1214
+ function keyBuilder$3(luvio, params) {
1215
+ return keyPrefix + '::ServiceCatalogItemsFetchOutputRepresentation:(' + 'catalogId:' + params.queryParams.catalogId + ',' + 'configuration:' + params.queryParams.configuration + ',' + 'deploymentName:' + params.queryParams.deploymentName + ',' + 'expressionSetId:' + params.queryParams.expressionSetId + ',' + 'recordId:' + params.urlParams.recordId + ')';
1216
+ }
1217
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1218
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1219
+ }
1220
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1221
+ const { body } = response;
1222
+ const key = keyBuilder$3(luvio, resourceParams);
1223
+ luvio.storeIngest(key, ingest$1, body);
1224
+ const snapshot = luvio.storeLookup({
1225
+ recordId: key,
1226
+ node: select$3(),
1227
+ variables: {},
1228
+ }, snapshotRefresh);
1229
+ if (process.env.NODE_ENV !== 'production') {
1230
+ if (snapshot.state !== 'Fulfilled') {
1231
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1232
+ }
1233
+ }
1234
+ deepFreeze(snapshot.data);
1235
+ return snapshot;
1236
+ }
1237
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1238
+ const key = keyBuilder$3(luvio, params);
1239
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1240
+ const storeMetadataParams = {
1241
+ ttl: TTL$1,
1242
+ namespace: keyPrefix,
1243
+ version: VERSION$1,
1244
+ representationName: RepresentationType$1
1245
+ };
1246
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1247
+ return errorSnapshot;
1248
+ }
1249
+ function createResourceRequest$2(config) {
1250
+ const headers = {};
1251
+ return {
1252
+ baseUri: '/services/data/v66.0',
1253
+ basePath: '/connect/service-excellence/service-catalog-items/' + config.urlParams.recordId + '',
1254
+ method: 'get',
1255
+ body: null,
1256
+ urlParams: config.urlParams,
1257
+ queryParams: config.queryParams,
1258
+ headers,
1259
+ priority: 'normal',
1260
+ };
1261
+ }
1262
+
1263
+ const adapterName$2 = 'getServiceCatalogItems';
1264
+ const getServiceCatalogItems_ConfigPropertyMetadata = [
1265
+ generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
1266
+ generateParamConfigMetadata('catalogId', false, 1 /* QueryParameter */, 0 /* String */),
1267
+ generateParamConfigMetadata('configuration', true, 1 /* QueryParameter */, 0 /* String */),
1268
+ generateParamConfigMetadata('deploymentName', false, 1 /* QueryParameter */, 0 /* String */),
1269
+ generateParamConfigMetadata('expressionSetId', false, 1 /* QueryParameter */, 0 /* String */),
1270
+ ];
1271
+ const getServiceCatalogItems_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getServiceCatalogItems_ConfigPropertyMetadata);
1272
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getServiceCatalogItems_ConfigPropertyMetadata);
1273
+ function keyBuilder$2(luvio, config) {
1274
+ const resourceParams = createResourceParams$2(config);
1275
+ return keyBuilder$3(luvio, resourceParams);
1276
+ }
1277
+ function typeCheckConfig$2(untrustedConfig) {
1278
+ const config = {};
1279
+ typeCheckConfig$6(untrustedConfig, config, getServiceCatalogItems_ConfigPropertyMetadata);
1280
+ return config;
1281
+ }
1282
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1283
+ if (!untrustedIsObject(untrustedConfig)) {
1284
+ return null;
1285
+ }
1286
+ if (process.env.NODE_ENV !== 'production') {
1287
+ validateConfig(untrustedConfig, configPropertyNames);
1288
+ }
1289
+ const config = typeCheckConfig$2(untrustedConfig);
1290
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1291
+ return null;
1292
+ }
1293
+ return config;
1294
+ }
1295
+ function adapterFragment$1(luvio, config) {
1296
+ createResourceParams$2(config);
1297
+ return select$3();
1298
+ }
1299
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1300
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1301
+ config,
1302
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1303
+ });
1304
+ return luvio.storeBroadcast().then(() => snapshot);
1305
+ }
1306
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1307
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1308
+ config,
1309
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1310
+ });
1311
+ return luvio.storeBroadcast().then(() => snapshot);
1312
+ }
1313
+ function buildNetworkSnapshot$2(luvio, config, options) {
1314
+ const resourceParams = createResourceParams$2(config);
1315
+ const request = createResourceRequest$2(resourceParams);
1316
+ return luvio.dispatchResourceRequest(request, options)
1317
+ .then((response) => {
1318
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1319
+ const cache = new StoreKeyMap();
1320
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1321
+ return cache;
1322
+ });
1323
+ }, (response) => {
1324
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1325
+ });
1326
+ }
1327
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1328
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1329
+ }
1330
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1331
+ const { luvio, config } = context;
1332
+ const selector = {
1333
+ recordId: keyBuilder$2(luvio, config),
1334
+ node: adapterFragment$1(luvio, config),
1335
+ variables: {},
1336
+ };
1337
+ const cacheSnapshot = storeLookup(selector, {
1338
+ config,
1339
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1340
+ });
1341
+ return cacheSnapshot;
1342
+ }
1343
+ const getServiceCatalogItemsAdapterFactory = (luvio) => function serviceExcellence__getServiceCatalogItems(untrustedConfig, requestContext) {
1344
+ const config = validateAdapterConfig$2(untrustedConfig, getServiceCatalogItems_ConfigPropertyNames);
1345
+ // Invalid or incomplete config
1346
+ if (config === null) {
1347
+ return null;
1348
+ }
1349
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1350
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1351
+ };
1352
+
1353
+ function validate$1(obj, path = 'UserPreferenceNodeOutputRepresentation') {
1354
+ const v_error = (() => {
1355
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1356
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1357
+ }
1358
+ const obj_preferenceKey = obj.preferenceKey;
1359
+ const path_preferenceKey = path + '.preferenceKey';
1360
+ let obj_preferenceKey_union0 = null;
1361
+ const obj_preferenceKey_union0_error = (() => {
1362
+ if (typeof obj_preferenceKey !== 'string') {
1363
+ return new TypeError('Expected "string" but received "' + typeof obj_preferenceKey + '" (at "' + path_preferenceKey + '")');
1364
+ }
1365
+ })();
1366
+ if (obj_preferenceKey_union0_error != null) {
1367
+ obj_preferenceKey_union0 = obj_preferenceKey_union0_error.message;
1368
+ }
1369
+ let obj_preferenceKey_union1 = null;
1370
+ const obj_preferenceKey_union1_error = (() => {
1371
+ if (obj_preferenceKey !== null) {
1372
+ return new TypeError('Expected "null" but received "' + typeof obj_preferenceKey + '" (at "' + path_preferenceKey + '")');
1373
+ }
1374
+ })();
1375
+ if (obj_preferenceKey_union1_error != null) {
1376
+ obj_preferenceKey_union1 = obj_preferenceKey_union1_error.message;
1377
+ }
1378
+ if (obj_preferenceKey_union0 && obj_preferenceKey_union1) {
1379
+ let message = 'Object doesn\'t match union (at "' + path_preferenceKey + '")';
1380
+ message += '\n' + obj_preferenceKey_union0.split('\n').map((line) => '\t' + line).join('\n');
1381
+ message += '\n' + obj_preferenceKey_union1.split('\n').map((line) => '\t' + line).join('\n');
1382
+ return new TypeError(message);
1383
+ }
1384
+ const obj_preferenceValue = obj.preferenceValue;
1385
+ const path_preferenceValue = path + '.preferenceValue';
1386
+ let obj_preferenceValue_union0 = null;
1387
+ const obj_preferenceValue_union0_error = (() => {
1388
+ if (typeof obj_preferenceValue !== 'string') {
1389
+ return new TypeError('Expected "string" but received "' + typeof obj_preferenceValue + '" (at "' + path_preferenceValue + '")');
1390
+ }
1391
+ })();
1392
+ if (obj_preferenceValue_union0_error != null) {
1393
+ obj_preferenceValue_union0 = obj_preferenceValue_union0_error.message;
1394
+ }
1395
+ let obj_preferenceValue_union1 = null;
1396
+ const obj_preferenceValue_union1_error = (() => {
1397
+ if (obj_preferenceValue !== null) {
1398
+ return new TypeError('Expected "null" but received "' + typeof obj_preferenceValue + '" (at "' + path_preferenceValue + '")');
1399
+ }
1400
+ })();
1401
+ if (obj_preferenceValue_union1_error != null) {
1402
+ obj_preferenceValue_union1 = obj_preferenceValue_union1_error.message;
1403
+ }
1404
+ if (obj_preferenceValue_union0 && obj_preferenceValue_union1) {
1405
+ let message = 'Object doesn\'t match union (at "' + path_preferenceValue + '")';
1406
+ message += '\n' + obj_preferenceValue_union0.split('\n').map((line) => '\t' + line).join('\n');
1407
+ message += '\n' + obj_preferenceValue_union1.split('\n').map((line) => '\t' + line).join('\n');
1408
+ return new TypeError(message);
1409
+ }
1410
+ })();
1411
+ return v_error === undefined ? null : v_error;
1412
+ }
1413
+
1414
+ const TTL = 60000;
1415
+ const VERSION = "5b77fe710b6c1dc336e022f56cf9efee";
1416
+ function validate(obj, path = 'UserPreferenceOutputRepresentation') {
1417
+ const v_error = (() => {
1418
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1419
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1420
+ }
1421
+ const obj_status = obj.status;
1422
+ const path_status = path + '.status';
1423
+ const referencepath_statusValidationError = validate$8(obj_status, path_status);
1424
+ if (referencepath_statusValidationError !== null) {
1425
+ let message = 'Object doesn\'t match ServiceExcellenceStatusOutputRepresentation (at "' + path_status + '")\n';
1426
+ message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1427
+ return new TypeError(message);
1428
+ }
1429
+ const obj_userPreference = obj.userPreference;
1430
+ const path_userPreference = path + '.userPreference';
1431
+ if (!ArrayIsArray(obj_userPreference)) {
1432
+ return new TypeError('Expected "array" but received "' + typeof obj_userPreference + '" (at "' + path_userPreference + '")');
1433
+ }
1434
+ for (let i = 0; i < obj_userPreference.length; i++) {
1435
+ const obj_userPreference_item = obj_userPreference[i];
1436
+ const path_userPreference_item = path_userPreference + '[' + i + ']';
1437
+ const referencepath_userPreference_itemValidationError = validate$1(obj_userPreference_item, path_userPreference_item);
1438
+ if (referencepath_userPreference_itemValidationError !== null) {
1439
+ let message = 'Object doesn\'t match UserPreferenceNodeOutputRepresentation (at "' + path_userPreference_item + '")\n';
1440
+ message += referencepath_userPreference_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1441
+ return new TypeError(message);
1442
+ }
1443
+ }
1444
+ })();
1445
+ return v_error === undefined ? null : v_error;
1446
+ }
1447
+ const RepresentationType = 'UserPreferenceOutputRepresentation';
1448
+ function normalize(input, existing, path, luvio, store, timestamp) {
1449
+ return input;
1450
+ }
1451
+ const select$2 = function UserPreferenceOutputRepresentationSelect() {
1452
+ return {
1453
+ kind: 'Fragment',
1454
+ version: VERSION,
1455
+ private: [],
1456
+ opaque: true
1457
+ };
1458
+ };
1459
+ function equals(existing, incoming) {
1460
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1461
+ return false;
1462
+ }
1463
+ return true;
1464
+ }
1465
+ const ingest = function UserPreferenceOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1466
+ if (process.env.NODE_ENV !== 'production') {
1467
+ const validateError = validate(input);
1468
+ if (validateError !== null) {
1469
+ throw validateError;
1470
+ }
1471
+ }
1472
+ const key = path.fullPath;
1473
+ const ttlToUse = TTL;
1474
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "service-excellence", VERSION, RepresentationType, equals);
1475
+ return createLink(key);
1476
+ };
1477
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1478
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1479
+ const rootKey = fullPathFactory();
1480
+ rootKeySet.set(rootKey, {
1481
+ namespace: keyPrefix,
1482
+ representationName: RepresentationType,
1483
+ mergeable: false
1484
+ });
1485
+ }
1486
+
1487
+ function select$1(luvio, params) {
1488
+ return select$2();
1489
+ }
1490
+ function keyBuilder$1(luvio, params) {
1491
+ return keyPrefix + '::UserPreferenceOutputRepresentation:(' + 'userPreference:' + params.queryParams.userPreference + ')';
1492
+ }
1493
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1494
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1495
+ }
1496
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1497
+ const { body } = response;
1498
+ const key = keyBuilder$1(luvio, resourceParams);
1499
+ luvio.storeIngest(key, ingest, body);
1500
+ const snapshot = luvio.storeLookup({
1501
+ recordId: key,
1502
+ node: select$1(),
1503
+ variables: {},
1504
+ }, snapshotRefresh);
1505
+ if (process.env.NODE_ENV !== 'production') {
1506
+ if (snapshot.state !== 'Fulfilled') {
1507
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1508
+ }
1509
+ }
1510
+ deepFreeze(snapshot.data);
1511
+ return snapshot;
1512
+ }
1513
+ function ingestError(luvio, params, error, snapshotRefresh) {
1514
+ const key = keyBuilder$1(luvio, params);
1515
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1516
+ const storeMetadataParams = {
1517
+ ttl: TTL,
1518
+ namespace: keyPrefix,
1519
+ version: VERSION,
1520
+ representationName: RepresentationType
1521
+ };
1522
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1523
+ return errorSnapshot;
1524
+ }
1525
+ function createResourceRequest$1(config) {
1526
+ const headers = {};
1527
+ return {
1528
+ baseUri: '/services/data/v66.0',
1529
+ basePath: '/connect/service-excellence/fetch-user-preference',
1530
+ method: 'get',
1531
+ body: null,
1532
+ urlParams: {},
1533
+ queryParams: config.queryParams,
1534
+ headers,
1535
+ priority: 'normal',
1536
+ };
1537
+ }
1538
+
1539
+ const adapterName$1 = 'getUserPreference';
1540
+ const getUserPreference_ConfigPropertyMetadata = [
1541
+ generateParamConfigMetadata('userPreference', true, 1 /* QueryParameter */, 0 /* String */),
1542
+ ];
1543
+ const getUserPreference_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getUserPreference_ConfigPropertyMetadata);
1544
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getUserPreference_ConfigPropertyMetadata);
1545
+ function keyBuilder(luvio, config) {
1546
+ const resourceParams = createResourceParams$1(config);
1547
+ return keyBuilder$1(luvio, resourceParams);
1548
+ }
1549
+ function typeCheckConfig$1(untrustedConfig) {
1550
+ const config = {};
1551
+ typeCheckConfig$6(untrustedConfig, config, getUserPreference_ConfigPropertyMetadata);
1552
+ return config;
1553
+ }
1554
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1555
+ if (!untrustedIsObject(untrustedConfig)) {
1556
+ return null;
1557
+ }
1558
+ if (process.env.NODE_ENV !== 'production') {
1559
+ validateConfig(untrustedConfig, configPropertyNames);
1560
+ }
1561
+ const config = typeCheckConfig$1(untrustedConfig);
1562
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1563
+ return null;
1564
+ }
1565
+ return config;
1566
+ }
1567
+ function adapterFragment(luvio, config) {
1568
+ createResourceParams$1(config);
1569
+ return select$1();
1570
+ }
1571
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1572
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1573
+ config,
1574
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1575
+ });
1576
+ return luvio.storeBroadcast().then(() => snapshot);
1577
+ }
1578
+ function onFetchResponseError(luvio, config, resourceParams, response) {
1579
+ const snapshot = ingestError(luvio, resourceParams, response, {
1580
+ config,
1581
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1582
+ });
1583
+ return luvio.storeBroadcast().then(() => snapshot);
1584
+ }
1585
+ function buildNetworkSnapshot$1(luvio, config, options) {
1586
+ const resourceParams = createResourceParams$1(config);
1587
+ const request = createResourceRequest$1(resourceParams);
1588
+ return luvio.dispatchResourceRequest(request, options)
1589
+ .then((response) => {
1590
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
1591
+ const cache = new StoreKeyMap();
1592
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1593
+ return cache;
1594
+ });
1595
+ }, (response) => {
1596
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1597
+ });
1598
+ }
1599
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1600
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1601
+ }
1602
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1603
+ const { luvio, config } = context;
1604
+ const selector = {
1605
+ recordId: keyBuilder(luvio, config),
1606
+ node: adapterFragment(luvio, config),
1607
+ variables: {},
1608
+ };
1609
+ const cacheSnapshot = storeLookup(selector, {
1610
+ config,
1611
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1612
+ });
1613
+ return cacheSnapshot;
1614
+ }
1615
+ const getUserPreferenceAdapterFactory = (luvio) => function serviceExcellence__getUserPreference(untrustedConfig, requestContext) {
1616
+ const config = validateAdapterConfig$1(untrustedConfig, getUserPreference_ConfigPropertyNames);
1617
+ // Invalid or incomplete config
1618
+ if (config === null) {
1619
+ return null;
1620
+ }
1621
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1622
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1623
+ };
1624
+
1625
+ function select(luvio, params) {
1626
+ return select$9();
1627
+ }
1628
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1629
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
1630
+ }
1631
+ function ingestSuccess(luvio, resourceParams, response) {
1632
+ const { body } = response;
1633
+ const key = keyBuilderFromType$1(luvio, body);
1634
+ luvio.storeIngest(key, ingest$4, body);
1635
+ const snapshot = luvio.storeLookup({
1636
+ recordId: key,
1637
+ node: select(),
1638
+ variables: {},
1639
+ });
1640
+ if (process.env.NODE_ENV !== 'production') {
1641
+ if (snapshot.state !== 'Fulfilled') {
1642
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1643
+ }
1644
+ }
1645
+ deepFreeze(snapshot.data);
1646
+ return snapshot;
1647
+ }
1648
+ function createResourceRequest(config) {
1649
+ const headers = {};
1650
+ return {
1651
+ baseUri: '/services/data/v66.0',
1652
+ basePath: '/connect/service-excellence/user-preference',
1653
+ method: 'post',
1654
+ body: config.body,
1655
+ urlParams: {},
1656
+ queryParams: {},
1657
+ headers,
1658
+ priority: 'normal',
1659
+ };
1660
+ }
1661
+
1662
+ const adapterName = 'setUserPreference';
1663
+ const setUserPreference_ConfigPropertyMetadata = [
1664
+ generateParamConfigMetadata('preferenceKey', true, 2 /* Body */, 0 /* String */),
1665
+ generateParamConfigMetadata('preferenceValue', true, 2 /* Body */, 0 /* String */),
1666
+ ];
1667
+ const setUserPreference_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, setUserPreference_ConfigPropertyMetadata);
1668
+ const createResourceParams = /*#__PURE__*/ createResourceParams$6(setUserPreference_ConfigPropertyMetadata);
1669
+ function typeCheckConfig(untrustedConfig) {
1670
+ const config = {};
1671
+ typeCheckConfig$6(untrustedConfig, config, setUserPreference_ConfigPropertyMetadata);
1672
+ return config;
1673
+ }
1674
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1675
+ if (!untrustedIsObject(untrustedConfig)) {
1676
+ return null;
1677
+ }
1678
+ if (process.env.NODE_ENV !== 'production') {
1679
+ validateConfig(untrustedConfig, configPropertyNames);
1680
+ }
1681
+ const config = typeCheckConfig(untrustedConfig);
1682
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1683
+ return null;
1684
+ }
1685
+ return config;
1686
+ }
1687
+ function buildNetworkSnapshot(luvio, config, options) {
1688
+ const resourceParams = createResourceParams(config);
1689
+ const request = createResourceRequest(resourceParams);
1690
+ return luvio.dispatchResourceRequest(request, options)
1691
+ .then((response) => {
1692
+ return luvio.handleSuccessResponse(() => {
1693
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
1694
+ return luvio.storeBroadcast().then(() => snapshot);
1695
+ }, () => {
1696
+ const cache = new StoreKeyMap();
1697
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1698
+ return cache;
1699
+ });
1700
+ }, (response) => {
1701
+ deepFreeze(response);
1702
+ throw response;
1703
+ });
1704
+ }
1705
+ const setUserPreferenceAdapterFactory = (luvio) => {
1706
+ return function setUserPreference(untrustedConfig) {
1707
+ const config = validateAdapterConfig(untrustedConfig, setUserPreference_ConfigPropertyNames);
1708
+ // Invalid or incomplete config
1709
+ if (config === null) {
1710
+ throw new Error('Invalid config for "setUserPreference"');
1711
+ }
1712
+ return buildNetworkSnapshot(luvio, config);
1713
+ };
1714
+ };
1715
+
1716
+ let createActionLaunchDetails;
1717
+ let getEinsteinRecommendedItems;
1718
+ let getRecentActions;
1719
+ let getServiceCatalogItems;
1720
+ let getUserPreference;
1721
+ let setUserPreference;
1722
+ // Imperative GET Adapters
1723
+ let getRecentActions_imperative;
1724
+ let getServiceCatalogItems_imperative;
1725
+ let getUserPreference_imperative;
1726
+ const getRecentActionsMetadata = {
1727
+ apiFamily: 'serviceexcellence',
1728
+ name: 'getRecentActions',
1729
+ ttl: 1200000,
1730
+ };
1731
+ const getServiceCatalogItemsMetadata = {
1732
+ apiFamily: 'serviceexcellence',
1733
+ name: 'getServiceCatalogItems',
1734
+ ttl: 60000,
1735
+ };
1736
+ const getUserPreferenceMetadata = {
1737
+ apiFamily: 'serviceexcellence',
1738
+ name: 'getUserPreference',
1739
+ ttl: 60000,
1740
+ };
1741
+ // Notify Update Available
1742
+ function bindExportsTo(luvio) {
1743
+ // LDS Adapters
1744
+ const getRecentActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecentActions', getRecentActionsAdapterFactory), getRecentActionsMetadata);
1745
+ const getServiceCatalogItems_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getServiceCatalogItems', getServiceCatalogItemsAdapterFactory), getServiceCatalogItemsMetadata);
1746
+ const getUserPreference_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getUserPreference', getUserPreferenceAdapterFactory), getUserPreferenceMetadata);
1747
+ function unwrapSnapshotData(factory) {
1748
+ const adapter = factory(luvio);
1749
+ return (config) => adapter(config).then((snapshot) => snapshot.data);
1750
+ }
1751
+ return {
1752
+ createActionLaunchDetails: unwrapSnapshotData(createActionLaunchDetailsAdapterFactory),
1753
+ getEinsteinRecommendedItems: unwrapSnapshotData(getEinsteinRecommendedItemsAdapterFactory),
1754
+ getRecentActions: createWireAdapterConstructor(luvio, getRecentActions_ldsAdapter, getRecentActionsMetadata),
1755
+ getServiceCatalogItems: createWireAdapterConstructor(luvio, getServiceCatalogItems_ldsAdapter, getServiceCatalogItemsMetadata),
1756
+ getUserPreference: createWireAdapterConstructor(luvio, getUserPreference_ldsAdapter, getUserPreferenceMetadata),
1757
+ setUserPreference: unwrapSnapshotData(setUserPreferenceAdapterFactory),
1758
+ // Imperative GET Adapters
1759
+ getRecentActions_imperative: createImperativeAdapter(luvio, getRecentActions_ldsAdapter, getRecentActionsMetadata),
1760
+ getServiceCatalogItems_imperative: createImperativeAdapter(luvio, getServiceCatalogItems_ldsAdapter, getServiceCatalogItemsMetadata),
1761
+ getUserPreference_imperative: createImperativeAdapter(luvio, getUserPreference_ldsAdapter, getUserPreferenceMetadata),
1762
+ // Notify Update Availables
1763
+ };
1764
+ }
1765
+ withDefaultLuvio((luvio) => {
1766
+ ({
1767
+ createActionLaunchDetails,
1768
+ getEinsteinRecommendedItems,
1769
+ getRecentActions,
1770
+ getServiceCatalogItems,
1771
+ getUserPreference,
1772
+ setUserPreference,
1773
+ getRecentActions_imperative,
1774
+ getServiceCatalogItems_imperative,
1775
+ getUserPreference_imperative,
1776
+ } = bindExportsTo(luvio));
1777
+ });
1778
+
1779
+ export { createActionLaunchDetails, getEinsteinRecommendedItems, getRecentActions, getRecentActions_imperative, getServiceCatalogItems, getServiceCatalogItems_imperative, getUserPreference, getUserPreference_imperative, setUserPreference };
1780
+ // version: 0.1.0-dev1-c978a7b010