@salesforce/lds-adapters-service-einstein-copilot-bot 1.287.0-dev1 → 1.287.0-dev11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/service-einstein-copilot-bot.js +1092 -232
- package/dist/es/es2018/types/src/generated/adapters/getRecommendedActions.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/adapters/submitFeedback.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/resources/getConnectRecommendedActions.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectCopilotFeedback.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/types/CopilotLLMFeedbackInputRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/CopilotLLMFeedbackOutputRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/CopilotQuickActionRepresentation.d.ts +75 -0
- package/dist/es/es2018/types/src/generated/types/RecommendedActionsRepresentation.d.ts +36 -0
- package/dist/es/es2018/types/src/generated/types/VariableRepresentation.d.ts +6 -3
- package/package.json +3 -3
- package/sfdc/index.js +1084 -209
- package/src/raml/api.raml +169 -1
- package/src/raml/luvio.raml +16 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -122,9 +122,9 @@ function createLink(ref) {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
const TTL$
|
|
126
|
-
const VERSION$
|
|
127
|
-
function validate$
|
|
125
|
+
const TTL$5 = 30000;
|
|
126
|
+
const VERSION$a = "ab85410a28124cfed3d8eae7b8236853";
|
|
127
|
+
function validate$b(obj, path = 'CopilotBotInfoRepresentation') {
|
|
128
128
|
const v_error = (() => {
|
|
129
129
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
130
130
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -151,14 +151,14 @@ function validate$8(obj, path = 'CopilotBotInfoRepresentation') {
|
|
|
151
151
|
})();
|
|
152
152
|
return v_error === undefined ? null : v_error;
|
|
153
153
|
}
|
|
154
|
-
const RepresentationType$
|
|
155
|
-
function normalize$
|
|
154
|
+
const RepresentationType$5 = 'CopilotBotInfoRepresentation';
|
|
155
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
156
156
|
return input;
|
|
157
157
|
}
|
|
158
|
-
const select$
|
|
158
|
+
const select$f = function CopilotBotInfoRepresentationSelect() {
|
|
159
159
|
return {
|
|
160
160
|
kind: 'Fragment',
|
|
161
|
-
version: VERSION$
|
|
161
|
+
version: VERSION$a,
|
|
162
162
|
private: [],
|
|
163
163
|
selections: [
|
|
164
164
|
{
|
|
@@ -178,7 +178,7 @@ const select$a = function CopilotBotInfoRepresentationSelect() {
|
|
|
178
178
|
]
|
|
179
179
|
};
|
|
180
180
|
};
|
|
181
|
-
function equals$
|
|
181
|
+
function equals$a(existing, incoming) {
|
|
182
182
|
const existing_isSuccess = existing.isSuccess;
|
|
183
183
|
const incoming_isSuccess = incoming.isSuccess;
|
|
184
184
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -212,44 +212,44 @@ function equals$7(existing, incoming) {
|
|
|
212
212
|
}
|
|
213
213
|
return true;
|
|
214
214
|
}
|
|
215
|
-
const ingest$
|
|
215
|
+
const ingest$5 = function CopilotBotInfoRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
216
216
|
if (process.env.NODE_ENV !== 'production') {
|
|
217
|
-
const validateError = validate$
|
|
217
|
+
const validateError = validate$b(input);
|
|
218
218
|
if (validateError !== null) {
|
|
219
219
|
throw validateError;
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
const key = path.fullPath;
|
|
223
|
-
const ttlToUse = TTL$
|
|
224
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
223
|
+
const ttlToUse = TTL$5;
|
|
224
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "einstein-copilot-bot", VERSION$a, RepresentationType$5, equals$a);
|
|
225
225
|
return createLink(key);
|
|
226
226
|
};
|
|
227
|
-
function getTypeCacheKeys$
|
|
227
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
228
228
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
229
229
|
const rootKey = fullPathFactory();
|
|
230
230
|
rootKeySet.set(rootKey, {
|
|
231
231
|
namespace: keyPrefix,
|
|
232
|
-
representationName: RepresentationType$
|
|
232
|
+
representationName: RepresentationType$5,
|
|
233
233
|
mergeable: false
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
function select$
|
|
238
|
-
return select$
|
|
237
|
+
function select$e(luvio, params) {
|
|
238
|
+
return select$f();
|
|
239
239
|
}
|
|
240
|
-
function keyBuilder$
|
|
240
|
+
function keyBuilder$8(luvio, params) {
|
|
241
241
|
return keyPrefix + '::CopilotBotInfoRepresentation:(' + ')';
|
|
242
242
|
}
|
|
243
|
-
function getResponseCacheKeys$
|
|
244
|
-
getTypeCacheKeys$
|
|
243
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
244
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$8());
|
|
245
245
|
}
|
|
246
|
-
function ingestSuccess$
|
|
246
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
247
247
|
const { body } = response;
|
|
248
|
-
const key = keyBuilder$
|
|
249
|
-
luvio.storeIngest(key, ingest$
|
|
248
|
+
const key = keyBuilder$8();
|
|
249
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
250
250
|
const snapshot = luvio.storeLookup({
|
|
251
251
|
recordId: key,
|
|
252
|
-
node: select$
|
|
252
|
+
node: select$e(),
|
|
253
253
|
variables: {},
|
|
254
254
|
}, snapshotRefresh);
|
|
255
255
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -260,19 +260,19 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
260
260
|
deepFreeze(snapshot.data);
|
|
261
261
|
return snapshot;
|
|
262
262
|
}
|
|
263
|
-
function ingestError$
|
|
264
|
-
const key = keyBuilder$
|
|
263
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
264
|
+
const key = keyBuilder$8();
|
|
265
265
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
266
266
|
const storeMetadataParams = {
|
|
267
|
-
ttl: TTL$
|
|
267
|
+
ttl: TTL$5,
|
|
268
268
|
namespace: keyPrefix,
|
|
269
|
-
version: VERSION$
|
|
270
|
-
representationName: RepresentationType$
|
|
269
|
+
version: VERSION$a,
|
|
270
|
+
representationName: RepresentationType$5
|
|
271
271
|
};
|
|
272
272
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
273
273
|
return errorSnapshot;
|
|
274
274
|
}
|
|
275
|
-
function createResourceRequest$
|
|
275
|
+
function createResourceRequest$4(config) {
|
|
276
276
|
const headers = {};
|
|
277
277
|
return {
|
|
278
278
|
baseUri: '/services/data/v61.0',
|
|
@@ -286,57 +286,732 @@ function createResourceRequest$2(config) {
|
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
const adapterName$
|
|
289
|
+
const adapterName$4 = 'getBotId';
|
|
290
290
|
const getBotId_ConfigPropertyMetadata = [];
|
|
291
|
-
const getBotId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
292
|
-
const createResourceParams$
|
|
293
|
-
function keyBuilder$
|
|
294
|
-
createResourceParams$
|
|
295
|
-
return keyBuilder$
|
|
291
|
+
const getBotId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getBotId_ConfigPropertyMetadata);
|
|
292
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(getBotId_ConfigPropertyMetadata);
|
|
293
|
+
function keyBuilder$7(luvio, config) {
|
|
294
|
+
createResourceParams$4(config);
|
|
295
|
+
return keyBuilder$8();
|
|
296
296
|
}
|
|
297
|
-
function typeCheckConfig$
|
|
297
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
298
298
|
const config = {};
|
|
299
299
|
return config;
|
|
300
300
|
}
|
|
301
|
-
function validateAdapterConfig$
|
|
301
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
302
302
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
303
303
|
return null;
|
|
304
304
|
}
|
|
305
305
|
if (process.env.NODE_ENV !== 'production') {
|
|
306
306
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
307
307
|
}
|
|
308
|
-
const config = typeCheckConfig$
|
|
308
|
+
const config = typeCheckConfig$4();
|
|
309
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
312
|
+
return config;
|
|
313
|
+
}
|
|
314
|
+
function adapterFragment$2(luvio, config) {
|
|
315
|
+
createResourceParams$4(config);
|
|
316
|
+
return select$e();
|
|
317
|
+
}
|
|
318
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
319
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
320
|
+
config,
|
|
321
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
322
|
+
});
|
|
323
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
324
|
+
}
|
|
325
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
326
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
327
|
+
config,
|
|
328
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
329
|
+
});
|
|
330
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
331
|
+
}
|
|
332
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
333
|
+
const resourceParams = createResourceParams$4(config);
|
|
334
|
+
const request = createResourceRequest$4();
|
|
335
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
336
|
+
.then((response) => {
|
|
337
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
338
|
+
const cache = new StoreKeyMap();
|
|
339
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
340
|
+
return cache;
|
|
341
|
+
});
|
|
342
|
+
}, (response) => {
|
|
343
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
347
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
348
|
+
}
|
|
349
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
350
|
+
const { luvio, config } = context;
|
|
351
|
+
const selector = {
|
|
352
|
+
recordId: keyBuilder$7(luvio, config),
|
|
353
|
+
node: adapterFragment$2(luvio, config),
|
|
354
|
+
variables: {},
|
|
355
|
+
};
|
|
356
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
357
|
+
config,
|
|
358
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
359
|
+
});
|
|
360
|
+
return cacheSnapshot;
|
|
361
|
+
}
|
|
362
|
+
const getBotIdAdapterFactory = (luvio) => function einsteinCopilotBot__getBotId(untrustedConfig, requestContext) {
|
|
363
|
+
const config = validateAdapterConfig$4(untrustedConfig, getBotId_ConfigPropertyNames);
|
|
364
|
+
// Invalid or incomplete config
|
|
365
|
+
if (config === null) {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
369
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
const VERSION$9 = "3d8b52828ddd11f23f898b0bba8db802";
|
|
373
|
+
function validate$a(obj, path = 'CopilotQuickActionRepresentation') {
|
|
374
|
+
const v_error = (() => {
|
|
375
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
376
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
377
|
+
}
|
|
378
|
+
if (obj.actionApiName !== undefined) {
|
|
379
|
+
const obj_actionApiName = obj.actionApiName;
|
|
380
|
+
const path_actionApiName = path + '.actionApiName';
|
|
381
|
+
if (typeof obj_actionApiName !== 'string') {
|
|
382
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionApiName + '" (at "' + path_actionApiName + '")');
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if (obj.createdDate !== undefined) {
|
|
386
|
+
const obj_createdDate = obj.createdDate;
|
|
387
|
+
const path_createdDate = path + '.createdDate';
|
|
388
|
+
if (typeof obj_createdDate !== 'string') {
|
|
389
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
if (obj.description !== undefined) {
|
|
393
|
+
const obj_description = obj.description;
|
|
394
|
+
const path_description = path + '.description';
|
|
395
|
+
if (typeof obj_description !== 'string') {
|
|
396
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if (obj.icon !== undefined) {
|
|
400
|
+
const obj_icon = obj.icon;
|
|
401
|
+
const path_icon = path + '.icon';
|
|
402
|
+
if (typeof obj_icon !== 'string') {
|
|
403
|
+
return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
if (obj.intent !== undefined) {
|
|
407
|
+
const obj_intent = obj.intent;
|
|
408
|
+
const path_intent = path + '.intent';
|
|
409
|
+
if (typeof obj_intent !== 'string') {
|
|
410
|
+
return new TypeError('Expected "string" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
if (obj.isGlobal !== undefined) {
|
|
414
|
+
const obj_isGlobal = obj.isGlobal;
|
|
415
|
+
const path_isGlobal = path + '.isGlobal';
|
|
416
|
+
if (typeof obj_isGlobal !== 'boolean') {
|
|
417
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isGlobal + '" (at "' + path_isGlobal + '")');
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
if (obj.isStandard !== undefined) {
|
|
421
|
+
const obj_isStandard = obj.isStandard;
|
|
422
|
+
const path_isStandard = path + '.isStandard';
|
|
423
|
+
if (typeof obj_isStandard !== 'boolean') {
|
|
424
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isStandard + '" (at "' + path_isStandard + '")');
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
if (obj.label !== undefined) {
|
|
428
|
+
const obj_label = obj.label;
|
|
429
|
+
const path_label = path + '.label';
|
|
430
|
+
if (typeof obj_label !== 'string') {
|
|
431
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
435
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
436
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
437
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
438
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
if (obj.namespace !== undefined) {
|
|
442
|
+
const obj_namespace = obj.namespace;
|
|
443
|
+
const path_namespace = path + '.namespace';
|
|
444
|
+
if (typeof obj_namespace !== 'string') {
|
|
445
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
if (obj.orgAccess !== undefined) {
|
|
449
|
+
const obj_orgAccess = obj.orgAccess;
|
|
450
|
+
const path_orgAccess = path + '.orgAccess';
|
|
451
|
+
if (typeof obj_orgAccess !== 'string') {
|
|
452
|
+
return new TypeError('Expected "string" but received "' + typeof obj_orgAccess + '" (at "' + path_orgAccess + '")');
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
if (obj.planTemplateId !== undefined) {
|
|
456
|
+
const obj_planTemplateId = obj.planTemplateId;
|
|
457
|
+
const path_planTemplateId = path + '.planTemplateId';
|
|
458
|
+
if (typeof obj_planTemplateId !== 'string') {
|
|
459
|
+
return new TypeError('Expected "string" but received "' + typeof obj_planTemplateId + '" (at "' + path_planTemplateId + '")');
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
if (obj.planTemplateInput !== undefined) {
|
|
463
|
+
const obj_planTemplateInput = obj.planTemplateInput;
|
|
464
|
+
const path_planTemplateInput = path + '.planTemplateInput';
|
|
465
|
+
if (typeof obj_planTemplateInput !== 'object' || ArrayIsArray(obj_planTemplateInput) || obj_planTemplateInput === null) {
|
|
466
|
+
return new TypeError('Expected "object" but received "' + typeof obj_planTemplateInput + '" (at "' + path_planTemplateInput + '")');
|
|
467
|
+
}
|
|
468
|
+
const obj_planTemplateInput_keys = ObjectKeys(obj_planTemplateInput);
|
|
469
|
+
for (let i = 0; i < obj_planTemplateInput_keys.length; i++) {
|
|
470
|
+
const key = obj_planTemplateInput_keys[i];
|
|
471
|
+
const obj_planTemplateInput_prop = obj_planTemplateInput[key];
|
|
472
|
+
const path_planTemplateInput_prop = path_planTemplateInput + '["' + key + '"]';
|
|
473
|
+
if (typeof obj_planTemplateInput_prop !== 'string') {
|
|
474
|
+
return new TypeError('Expected "string" but received "' + typeof obj_planTemplateInput_prop + '" (at "' + path_planTemplateInput_prop + '")');
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
if (obj.type !== undefined) {
|
|
479
|
+
const obj_type = obj.type;
|
|
480
|
+
const path_type = path + '.type';
|
|
481
|
+
if (typeof obj_type !== 'string') {
|
|
482
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
if (obj.userUtterance !== undefined) {
|
|
486
|
+
const obj_userUtterance = obj.userUtterance;
|
|
487
|
+
const path_userUtterance = path + '.userUtterance';
|
|
488
|
+
if (typeof obj_userUtterance !== 'string') {
|
|
489
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userUtterance + '" (at "' + path_userUtterance + '")');
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
})();
|
|
493
|
+
return v_error === undefined ? null : v_error;
|
|
494
|
+
}
|
|
495
|
+
const select$d = function CopilotQuickActionRepresentationSelect() {
|
|
496
|
+
return {
|
|
497
|
+
kind: 'Fragment',
|
|
498
|
+
version: VERSION$9,
|
|
499
|
+
private: [],
|
|
500
|
+
selections: [
|
|
501
|
+
{
|
|
502
|
+
name: 'actionApiName',
|
|
503
|
+
kind: 'Scalar',
|
|
504
|
+
required: false
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
name: 'createdDate',
|
|
508
|
+
kind: 'Scalar',
|
|
509
|
+
required: false
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
name: 'description',
|
|
513
|
+
kind: 'Scalar',
|
|
514
|
+
required: false
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
name: 'icon',
|
|
518
|
+
kind: 'Scalar',
|
|
519
|
+
required: false
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
name: 'intent',
|
|
523
|
+
kind: 'Scalar',
|
|
524
|
+
required: false
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
name: 'isGlobal',
|
|
528
|
+
kind: 'Scalar',
|
|
529
|
+
required: false
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
name: 'isStandard',
|
|
533
|
+
kind: 'Scalar',
|
|
534
|
+
required: false
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
name: 'label',
|
|
538
|
+
kind: 'Scalar',
|
|
539
|
+
required: false
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: 'lastModifiedDate',
|
|
543
|
+
kind: 'Scalar',
|
|
544
|
+
required: false
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: 'namespace',
|
|
548
|
+
kind: 'Scalar',
|
|
549
|
+
required: false
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
name: 'orgAccess',
|
|
553
|
+
kind: 'Scalar',
|
|
554
|
+
required: false
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
name: 'planTemplateId',
|
|
558
|
+
kind: 'Scalar',
|
|
559
|
+
required: false
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: 'planTemplateInput',
|
|
563
|
+
kind: 'Scalar',
|
|
564
|
+
map: true,
|
|
565
|
+
required: false
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
name: 'type',
|
|
569
|
+
kind: 'Scalar',
|
|
570
|
+
required: false
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
name: 'userUtterance',
|
|
574
|
+
kind: 'Scalar',
|
|
575
|
+
required: false
|
|
576
|
+
}
|
|
577
|
+
]
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
function equals$9(existing, incoming) {
|
|
581
|
+
const existing_isGlobal = existing.isGlobal;
|
|
582
|
+
const incoming_isGlobal = incoming.isGlobal;
|
|
583
|
+
// if at least one of these optionals is defined
|
|
584
|
+
if (existing_isGlobal !== undefined || incoming_isGlobal !== undefined) {
|
|
585
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
586
|
+
// not equal
|
|
587
|
+
if (existing_isGlobal === undefined || incoming_isGlobal === undefined) {
|
|
588
|
+
return false;
|
|
589
|
+
}
|
|
590
|
+
if (!(existing_isGlobal === incoming_isGlobal)) {
|
|
591
|
+
return false;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
const existing_isStandard = existing.isStandard;
|
|
595
|
+
const incoming_isStandard = incoming.isStandard;
|
|
596
|
+
// if at least one of these optionals is defined
|
|
597
|
+
if (existing_isStandard !== undefined || incoming_isStandard !== undefined) {
|
|
598
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
599
|
+
// not equal
|
|
600
|
+
if (existing_isStandard === undefined || incoming_isStandard === undefined) {
|
|
601
|
+
return false;
|
|
602
|
+
}
|
|
603
|
+
if (!(existing_isStandard === incoming_isStandard)) {
|
|
604
|
+
return false;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
const existing_actionApiName = existing.actionApiName;
|
|
608
|
+
const incoming_actionApiName = incoming.actionApiName;
|
|
609
|
+
// if at least one of these optionals is defined
|
|
610
|
+
if (existing_actionApiName !== undefined || incoming_actionApiName !== undefined) {
|
|
611
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
612
|
+
// not equal
|
|
613
|
+
if (existing_actionApiName === undefined || incoming_actionApiName === undefined) {
|
|
614
|
+
return false;
|
|
615
|
+
}
|
|
616
|
+
if (!(existing_actionApiName === incoming_actionApiName)) {
|
|
617
|
+
return false;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
const existing_createdDate = existing.createdDate;
|
|
621
|
+
const incoming_createdDate = incoming.createdDate;
|
|
622
|
+
// if at least one of these optionals is defined
|
|
623
|
+
if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
|
|
624
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
625
|
+
// not equal
|
|
626
|
+
if (existing_createdDate === undefined || incoming_createdDate === undefined) {
|
|
627
|
+
return false;
|
|
628
|
+
}
|
|
629
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
630
|
+
return false;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
const existing_description = existing.description;
|
|
634
|
+
const incoming_description = incoming.description;
|
|
635
|
+
// if at least one of these optionals is defined
|
|
636
|
+
if (existing_description !== undefined || incoming_description !== undefined) {
|
|
637
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
638
|
+
// not equal
|
|
639
|
+
if (existing_description === undefined || incoming_description === undefined) {
|
|
640
|
+
return false;
|
|
641
|
+
}
|
|
642
|
+
if (!(existing_description === incoming_description)) {
|
|
643
|
+
return false;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
const existing_icon = existing.icon;
|
|
647
|
+
const incoming_icon = incoming.icon;
|
|
648
|
+
// if at least one of these optionals is defined
|
|
649
|
+
if (existing_icon !== undefined || incoming_icon !== undefined) {
|
|
650
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
651
|
+
// not equal
|
|
652
|
+
if (existing_icon === undefined || incoming_icon === undefined) {
|
|
653
|
+
return false;
|
|
654
|
+
}
|
|
655
|
+
if (!(existing_icon === incoming_icon)) {
|
|
656
|
+
return false;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
const existing_intent = existing.intent;
|
|
660
|
+
const incoming_intent = incoming.intent;
|
|
661
|
+
// if at least one of these optionals is defined
|
|
662
|
+
if (existing_intent !== undefined || incoming_intent !== undefined) {
|
|
663
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
664
|
+
// not equal
|
|
665
|
+
if (existing_intent === undefined || incoming_intent === undefined) {
|
|
666
|
+
return false;
|
|
667
|
+
}
|
|
668
|
+
if (!(existing_intent === incoming_intent)) {
|
|
669
|
+
return false;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
const existing_label = existing.label;
|
|
673
|
+
const incoming_label = incoming.label;
|
|
674
|
+
// if at least one of these optionals is defined
|
|
675
|
+
if (existing_label !== undefined || incoming_label !== undefined) {
|
|
676
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
677
|
+
// not equal
|
|
678
|
+
if (existing_label === undefined || incoming_label === undefined) {
|
|
679
|
+
return false;
|
|
680
|
+
}
|
|
681
|
+
if (!(existing_label === incoming_label)) {
|
|
682
|
+
return false;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
const existing_lastModifiedDate = existing.lastModifiedDate;
|
|
686
|
+
const incoming_lastModifiedDate = incoming.lastModifiedDate;
|
|
687
|
+
// if at least one of these optionals is defined
|
|
688
|
+
if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
|
|
689
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
690
|
+
// not equal
|
|
691
|
+
if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
|
|
692
|
+
return false;
|
|
693
|
+
}
|
|
694
|
+
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
695
|
+
return false;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
const existing_namespace = existing.namespace;
|
|
699
|
+
const incoming_namespace = incoming.namespace;
|
|
700
|
+
// if at least one of these optionals is defined
|
|
701
|
+
if (existing_namespace !== undefined || incoming_namespace !== undefined) {
|
|
702
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
703
|
+
// not equal
|
|
704
|
+
if (existing_namespace === undefined || incoming_namespace === undefined) {
|
|
705
|
+
return false;
|
|
706
|
+
}
|
|
707
|
+
if (!(existing_namespace === incoming_namespace)) {
|
|
708
|
+
return false;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
const existing_orgAccess = existing.orgAccess;
|
|
712
|
+
const incoming_orgAccess = incoming.orgAccess;
|
|
713
|
+
// if at least one of these optionals is defined
|
|
714
|
+
if (existing_orgAccess !== undefined || incoming_orgAccess !== undefined) {
|
|
715
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
716
|
+
// not equal
|
|
717
|
+
if (existing_orgAccess === undefined || incoming_orgAccess === undefined) {
|
|
718
|
+
return false;
|
|
719
|
+
}
|
|
720
|
+
if (!(existing_orgAccess === incoming_orgAccess)) {
|
|
721
|
+
return false;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
const existing_planTemplateId = existing.planTemplateId;
|
|
725
|
+
const incoming_planTemplateId = incoming.planTemplateId;
|
|
726
|
+
// if at least one of these optionals is defined
|
|
727
|
+
if (existing_planTemplateId !== undefined || incoming_planTemplateId !== undefined) {
|
|
728
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
729
|
+
// not equal
|
|
730
|
+
if (existing_planTemplateId === undefined || incoming_planTemplateId === undefined) {
|
|
731
|
+
return false;
|
|
732
|
+
}
|
|
733
|
+
if (!(existing_planTemplateId === incoming_planTemplateId)) {
|
|
734
|
+
return false;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
const existing_type = existing.type;
|
|
738
|
+
const incoming_type = incoming.type;
|
|
739
|
+
// if at least one of these optionals is defined
|
|
740
|
+
if (existing_type !== undefined || incoming_type !== undefined) {
|
|
741
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
742
|
+
// not equal
|
|
743
|
+
if (existing_type === undefined || incoming_type === undefined) {
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
if (!(existing_type === incoming_type)) {
|
|
747
|
+
return false;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
const existing_userUtterance = existing.userUtterance;
|
|
751
|
+
const incoming_userUtterance = incoming.userUtterance;
|
|
752
|
+
// if at least one of these optionals is defined
|
|
753
|
+
if (existing_userUtterance !== undefined || incoming_userUtterance !== undefined) {
|
|
754
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
755
|
+
// not equal
|
|
756
|
+
if (existing_userUtterance === undefined || incoming_userUtterance === undefined) {
|
|
757
|
+
return false;
|
|
758
|
+
}
|
|
759
|
+
if (!(existing_userUtterance === incoming_userUtterance)) {
|
|
760
|
+
return false;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
const existing_planTemplateInput = existing.planTemplateInput;
|
|
764
|
+
const incoming_planTemplateInput = incoming.planTemplateInput;
|
|
765
|
+
// if at least one of these optionals is defined
|
|
766
|
+
if (existing_planTemplateInput !== undefined || incoming_planTemplateInput !== undefined) {
|
|
767
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
768
|
+
// not equal
|
|
769
|
+
if (existing_planTemplateInput === undefined || incoming_planTemplateInput === undefined) {
|
|
770
|
+
return false;
|
|
771
|
+
}
|
|
772
|
+
const equals_planTemplateInput_props = equalsObject(existing_planTemplateInput, incoming_planTemplateInput, (existing_planTemplateInput_prop, incoming_planTemplateInput_prop) => {
|
|
773
|
+
if (!(existing_planTemplateInput_prop === incoming_planTemplateInput_prop)) {
|
|
774
|
+
return false;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
if (equals_planTemplateInput_props === false) {
|
|
778
|
+
return false;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
return true;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
const TTL$4 = 900000;
|
|
785
|
+
const VERSION$8 = "122e61b0db6dc38d244a87570efc5522";
|
|
786
|
+
function validate$9(obj, path = 'RecommendedActionsRepresentation') {
|
|
787
|
+
const v_error = (() => {
|
|
788
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
789
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
790
|
+
}
|
|
791
|
+
const obj_copilotQuickActions = obj.copilotQuickActions;
|
|
792
|
+
const path_copilotQuickActions = path + '.copilotQuickActions';
|
|
793
|
+
if (!ArrayIsArray(obj_copilotQuickActions)) {
|
|
794
|
+
return new TypeError('Expected "array" but received "' + typeof obj_copilotQuickActions + '" (at "' + path_copilotQuickActions + '")');
|
|
795
|
+
}
|
|
796
|
+
for (let i = 0; i < obj_copilotQuickActions.length; i++) {
|
|
797
|
+
const obj_copilotQuickActions_item = obj_copilotQuickActions[i];
|
|
798
|
+
const path_copilotQuickActions_item = path_copilotQuickActions + '[' + i + ']';
|
|
799
|
+
const referencepath_copilotQuickActions_itemValidationError = validate$a(obj_copilotQuickActions_item, path_copilotQuickActions_item);
|
|
800
|
+
if (referencepath_copilotQuickActions_itemValidationError !== null) {
|
|
801
|
+
let message = 'Object doesn\'t match CopilotQuickActionRepresentation (at "' + path_copilotQuickActions_item + '")\n';
|
|
802
|
+
message += referencepath_copilotQuickActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
803
|
+
return new TypeError(message);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
if (obj.errorMessage !== undefined) {
|
|
807
|
+
const obj_errorMessage = obj.errorMessage;
|
|
808
|
+
const path_errorMessage = path + '.errorMessage';
|
|
809
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
810
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
const obj_isSuccess = obj.isSuccess;
|
|
814
|
+
const path_isSuccess = path + '.isSuccess';
|
|
815
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
816
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
817
|
+
}
|
|
818
|
+
})();
|
|
819
|
+
return v_error === undefined ? null : v_error;
|
|
820
|
+
}
|
|
821
|
+
const RepresentationType$4 = 'RecommendedActionsRepresentation';
|
|
822
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
823
|
+
return input;
|
|
824
|
+
}
|
|
825
|
+
const select$c = function RecommendedActionsRepresentationSelect() {
|
|
826
|
+
const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$d();
|
|
827
|
+
return {
|
|
828
|
+
kind: 'Fragment',
|
|
829
|
+
version: VERSION$8,
|
|
830
|
+
private: [],
|
|
831
|
+
selections: [
|
|
832
|
+
{
|
|
833
|
+
name: 'copilotQuickActions',
|
|
834
|
+
kind: 'Object',
|
|
835
|
+
plural: true,
|
|
836
|
+
selections: CopilotQuickActionRepresentation__selections
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
name: 'errorMessage',
|
|
840
|
+
kind: 'Scalar',
|
|
841
|
+
required: false
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
name: 'isSuccess',
|
|
845
|
+
kind: 'Scalar'
|
|
846
|
+
}
|
|
847
|
+
]
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
function equals$8(existing, incoming) {
|
|
851
|
+
const existing_isSuccess = existing.isSuccess;
|
|
852
|
+
const incoming_isSuccess = incoming.isSuccess;
|
|
853
|
+
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
854
|
+
return false;
|
|
855
|
+
}
|
|
856
|
+
const existing_errorMessage = existing.errorMessage;
|
|
857
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
858
|
+
// if at least one of these optionals is defined
|
|
859
|
+
if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
|
|
860
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
861
|
+
// not equal
|
|
862
|
+
if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
|
|
863
|
+
return false;
|
|
864
|
+
}
|
|
865
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
866
|
+
return false;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
const existing_copilotQuickActions = existing.copilotQuickActions;
|
|
870
|
+
const incoming_copilotQuickActions = incoming.copilotQuickActions;
|
|
871
|
+
const equals_copilotQuickActions_items = equalsArray(existing_copilotQuickActions, incoming_copilotQuickActions, (existing_copilotQuickActions_item, incoming_copilotQuickActions_item) => {
|
|
872
|
+
if (!(equals$9(existing_copilotQuickActions_item, incoming_copilotQuickActions_item))) {
|
|
873
|
+
return false;
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
if (equals_copilotQuickActions_items === false) {
|
|
877
|
+
return false;
|
|
878
|
+
}
|
|
879
|
+
return true;
|
|
880
|
+
}
|
|
881
|
+
const ingest$4 = function RecommendedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
882
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
883
|
+
const validateError = validate$9(input);
|
|
884
|
+
if (validateError !== null) {
|
|
885
|
+
throw validateError;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
const key = path.fullPath;
|
|
889
|
+
const ttlToUse = TTL$4;
|
|
890
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "einstein-copilot-bot", VERSION$8, RepresentationType$4, equals$8);
|
|
891
|
+
return createLink(key);
|
|
892
|
+
};
|
|
893
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
894
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
895
|
+
const rootKey = fullPathFactory();
|
|
896
|
+
rootKeySet.set(rootKey, {
|
|
897
|
+
namespace: keyPrefix,
|
|
898
|
+
representationName: RepresentationType$4,
|
|
899
|
+
mergeable: false
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
function select$b(luvio, params) {
|
|
904
|
+
return select$c();
|
|
905
|
+
}
|
|
906
|
+
function keyBuilder$6(luvio, params) {
|
|
907
|
+
return keyPrefix + '::RecommendedActionsRepresentation:(' + 'pageName:' + params.queryParams.pageName + ',' + 'pageType:' + params.queryParams.pageType + ',' + 'actionName:' + params.queryParams.actionName + ',' + 'objectApiName:' + params.queryParams.objectApiName + ',' + 'customApplicationName:' + params.queryParams.customApplicationName + ',' + 'sessionId:' + params.queryParams.sessionId + ',' + 'formFactor:' + params.queryParams.formFactor + ')';
|
|
908
|
+
}
|
|
909
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
910
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
911
|
+
}
|
|
912
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
913
|
+
const { body } = response;
|
|
914
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
915
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
916
|
+
const snapshot = luvio.storeLookup({
|
|
917
|
+
recordId: key,
|
|
918
|
+
node: select$b(),
|
|
919
|
+
variables: {},
|
|
920
|
+
}, snapshotRefresh);
|
|
921
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
922
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
923
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
deepFreeze(snapshot.data);
|
|
927
|
+
return snapshot;
|
|
928
|
+
}
|
|
929
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
930
|
+
const key = keyBuilder$6(luvio, params);
|
|
931
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
932
|
+
const storeMetadataParams = {
|
|
933
|
+
ttl: TTL$4,
|
|
934
|
+
namespace: keyPrefix,
|
|
935
|
+
version: VERSION$8,
|
|
936
|
+
representationName: RepresentationType$4
|
|
937
|
+
};
|
|
938
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
939
|
+
return errorSnapshot;
|
|
940
|
+
}
|
|
941
|
+
function createResourceRequest$3(config) {
|
|
942
|
+
const headers = {};
|
|
943
|
+
return {
|
|
944
|
+
baseUri: '/services/data/v61.0',
|
|
945
|
+
basePath: '/connect/recommended-actions',
|
|
946
|
+
method: 'get',
|
|
947
|
+
body: null,
|
|
948
|
+
urlParams: {},
|
|
949
|
+
queryParams: config.queryParams,
|
|
950
|
+
headers,
|
|
951
|
+
priority: 'normal',
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
const adapterName$3 = 'getRecommendedActions';
|
|
956
|
+
const getRecommendedActions_ConfigPropertyMetadata = [
|
|
957
|
+
generateParamConfigMetadata('pageName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
958
|
+
generateParamConfigMetadata('pageType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
959
|
+
generateParamConfigMetadata('actionName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
960
|
+
generateParamConfigMetadata('objectApiName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
961
|
+
generateParamConfigMetadata('customApplicationName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
962
|
+
generateParamConfigMetadata('sessionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
963
|
+
generateParamConfigMetadata('formFactor', false, 1 /* QueryParameter */, 0 /* String */),
|
|
964
|
+
];
|
|
965
|
+
const getRecommendedActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getRecommendedActions_ConfigPropertyMetadata);
|
|
966
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getRecommendedActions_ConfigPropertyMetadata);
|
|
967
|
+
function keyBuilder$5(luvio, config) {
|
|
968
|
+
const resourceParams = createResourceParams$3(config);
|
|
969
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
970
|
+
}
|
|
971
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
972
|
+
const config = {};
|
|
973
|
+
typeCheckConfig$5(untrustedConfig, config, getRecommendedActions_ConfigPropertyMetadata);
|
|
974
|
+
return config;
|
|
975
|
+
}
|
|
976
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
977
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
978
|
+
return null;
|
|
979
|
+
}
|
|
980
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
981
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
982
|
+
}
|
|
983
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
309
984
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
310
985
|
return null;
|
|
311
986
|
}
|
|
312
987
|
return config;
|
|
313
988
|
}
|
|
314
989
|
function adapterFragment$1(luvio, config) {
|
|
315
|
-
createResourceParams$
|
|
316
|
-
return select$
|
|
990
|
+
createResourceParams$3(config);
|
|
991
|
+
return select$b();
|
|
317
992
|
}
|
|
318
993
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
319
|
-
const snapshot = ingestSuccess$
|
|
994
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
320
995
|
config,
|
|
321
|
-
resolve: () => buildNetworkSnapshot$
|
|
996
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
322
997
|
});
|
|
323
998
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
324
999
|
}
|
|
325
1000
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
326
1001
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
327
1002
|
config,
|
|
328
|
-
resolve: () => buildNetworkSnapshot$
|
|
1003
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
329
1004
|
});
|
|
330
1005
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
331
1006
|
}
|
|
332
|
-
function buildNetworkSnapshot$
|
|
333
|
-
const resourceParams = createResourceParams$
|
|
334
|
-
const request = createResourceRequest$
|
|
1007
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1008
|
+
const resourceParams = createResourceParams$3(config);
|
|
1009
|
+
const request = createResourceRequest$3(resourceParams);
|
|
335
1010
|
return luvio.dispatchResourceRequest(request, options)
|
|
336
1011
|
.then((response) => {
|
|
337
1012
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
338
1013
|
const cache = new StoreKeyMap();
|
|
339
|
-
getResponseCacheKeys$
|
|
1014
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
340
1015
|
return cache;
|
|
341
1016
|
});
|
|
342
1017
|
}, (response) => {
|
|
@@ -344,23 +1019,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
344
1019
|
});
|
|
345
1020
|
}
|
|
346
1021
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
347
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1022
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
348
1023
|
}
|
|
349
1024
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
350
1025
|
const { luvio, config } = context;
|
|
351
1026
|
const selector = {
|
|
352
|
-
recordId: keyBuilder$
|
|
1027
|
+
recordId: keyBuilder$5(luvio, config),
|
|
353
1028
|
node: adapterFragment$1(luvio, config),
|
|
354
1029
|
variables: {},
|
|
355
1030
|
};
|
|
356
1031
|
const cacheSnapshot = storeLookup(selector, {
|
|
357
1032
|
config,
|
|
358
|
-
resolve: () => buildNetworkSnapshot$
|
|
1033
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
359
1034
|
});
|
|
360
1035
|
return cacheSnapshot;
|
|
361
1036
|
}
|
|
362
|
-
const
|
|
363
|
-
const config = validateAdapterConfig$
|
|
1037
|
+
const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedActions(untrustedConfig, requestContext) {
|
|
1038
|
+
const config = validateAdapterConfig$3(untrustedConfig, getRecommendedActions_ConfigPropertyNames);
|
|
364
1039
|
// Invalid or incomplete config
|
|
365
1040
|
if (config === null) {
|
|
366
1041
|
return null;
|
|
@@ -369,8 +1044,8 @@ const getBotIdAdapterFactory = (luvio) => function einsteinCopilotBot__getBotId(
|
|
|
369
1044
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
370
1045
|
};
|
|
371
1046
|
|
|
372
|
-
const VERSION$
|
|
373
|
-
function validate$
|
|
1047
|
+
const VERSION$7 = "504437088c2317480c651ac05a7565b5";
|
|
1048
|
+
function validate$8(obj, path = 'PlanTemplateRepresentation') {
|
|
374
1049
|
const v_error = (() => {
|
|
375
1050
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
376
1051
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -412,10 +1087,10 @@ function validate$7(obj, path = 'PlanTemplateRepresentation') {
|
|
|
412
1087
|
})();
|
|
413
1088
|
return v_error === undefined ? null : v_error;
|
|
414
1089
|
}
|
|
415
|
-
const select$
|
|
1090
|
+
const select$a = function PlanTemplateRepresentationSelect() {
|
|
416
1091
|
return {
|
|
417
1092
|
kind: 'Fragment',
|
|
418
|
-
version: VERSION$
|
|
1093
|
+
version: VERSION$7,
|
|
419
1094
|
private: [],
|
|
420
1095
|
selections: [
|
|
421
1096
|
{
|
|
@@ -442,7 +1117,7 @@ const select$8 = function PlanTemplateRepresentationSelect() {
|
|
|
442
1117
|
]
|
|
443
1118
|
};
|
|
444
1119
|
};
|
|
445
|
-
function equals$
|
|
1120
|
+
function equals$7(existing, incoming) {
|
|
446
1121
|
const existing_intent = existing.intent;
|
|
447
1122
|
const incoming_intent = incoming.intent;
|
|
448
1123
|
if (!(existing_intent === incoming_intent)) {
|
|
@@ -476,9 +1151,9 @@ function equals$6(existing, incoming) {
|
|
|
476
1151
|
return true;
|
|
477
1152
|
}
|
|
478
1153
|
|
|
479
|
-
const TTL$
|
|
480
|
-
const VERSION$
|
|
481
|
-
function validate$
|
|
1154
|
+
const TTL$3 = 900000;
|
|
1155
|
+
const VERSION$6 = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
|
|
1156
|
+
function validate$7(obj, path = 'RecommendedPlanTemplatesRepresentation') {
|
|
482
1157
|
const v_error = (() => {
|
|
483
1158
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
484
1159
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -503,7 +1178,7 @@ function validate$6(obj, path = 'RecommendedPlanTemplatesRepresentation') {
|
|
|
503
1178
|
for (let i = 0; i < obj_planTemplates.length; i++) {
|
|
504
1179
|
const obj_planTemplates_item = obj_planTemplates[i];
|
|
505
1180
|
const path_planTemplates_item = path_planTemplates + '[' + i + ']';
|
|
506
|
-
const referencepath_planTemplates_itemValidationError = validate$
|
|
1181
|
+
const referencepath_planTemplates_itemValidationError = validate$8(obj_planTemplates_item, path_planTemplates_item);
|
|
507
1182
|
if (referencepath_planTemplates_itemValidationError !== null) {
|
|
508
1183
|
let message = 'Object doesn\'t match PlanTemplateRepresentation (at "' + path_planTemplates_item + '")\n';
|
|
509
1184
|
message += referencepath_planTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -513,15 +1188,15 @@ function validate$6(obj, path = 'RecommendedPlanTemplatesRepresentation') {
|
|
|
513
1188
|
})();
|
|
514
1189
|
return v_error === undefined ? null : v_error;
|
|
515
1190
|
}
|
|
516
|
-
const RepresentationType$
|
|
517
|
-
function normalize$
|
|
1191
|
+
const RepresentationType$3 = 'RecommendedPlanTemplatesRepresentation';
|
|
1192
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
518
1193
|
return input;
|
|
519
1194
|
}
|
|
520
|
-
const select$
|
|
521
|
-
const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$
|
|
1195
|
+
const select$9 = function RecommendedPlanTemplatesRepresentationSelect() {
|
|
1196
|
+
const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$a();
|
|
522
1197
|
return {
|
|
523
1198
|
kind: 'Fragment',
|
|
524
|
-
version: VERSION$
|
|
1199
|
+
version: VERSION$6,
|
|
525
1200
|
private: [],
|
|
526
1201
|
selections: [
|
|
527
1202
|
{
|
|
@@ -542,7 +1217,7 @@ const select$7 = function RecommendedPlanTemplatesRepresentationSelect() {
|
|
|
542
1217
|
]
|
|
543
1218
|
};
|
|
544
1219
|
};
|
|
545
|
-
function equals$
|
|
1220
|
+
function equals$6(existing, incoming) {
|
|
546
1221
|
const existing_isSuccess = existing.isSuccess;
|
|
547
1222
|
const incoming_isSuccess = incoming.isSuccess;
|
|
548
1223
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -564,7 +1239,7 @@ function equals$5(existing, incoming) {
|
|
|
564
1239
|
const existing_planTemplates = existing.planTemplates;
|
|
565
1240
|
const incoming_planTemplates = incoming.planTemplates;
|
|
566
1241
|
const equals_planTemplates_items = equalsArray(existing_planTemplates, incoming_planTemplates, (existing_planTemplates_item, incoming_planTemplates_item) => {
|
|
567
|
-
if (!(equals$
|
|
1242
|
+
if (!(equals$7(existing_planTemplates_item, incoming_planTemplates_item))) {
|
|
568
1243
|
return false;
|
|
569
1244
|
}
|
|
570
1245
|
});
|
|
@@ -573,44 +1248,44 @@ function equals$5(existing, incoming) {
|
|
|
573
1248
|
}
|
|
574
1249
|
return true;
|
|
575
1250
|
}
|
|
576
|
-
const ingest$
|
|
1251
|
+
const ingest$3 = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
577
1252
|
if (process.env.NODE_ENV !== 'production') {
|
|
578
|
-
const validateError = validate$
|
|
1253
|
+
const validateError = validate$7(input);
|
|
579
1254
|
if (validateError !== null) {
|
|
580
1255
|
throw validateError;
|
|
581
1256
|
}
|
|
582
1257
|
}
|
|
583
1258
|
const key = path.fullPath;
|
|
584
|
-
const ttlToUse = TTL$
|
|
585
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1259
|
+
const ttlToUse = TTL$3;
|
|
1260
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "einstein-copilot-bot", VERSION$6, RepresentationType$3, equals$6);
|
|
586
1261
|
return createLink(key);
|
|
587
1262
|
};
|
|
588
|
-
function getTypeCacheKeys$
|
|
1263
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
589
1264
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
590
1265
|
const rootKey = fullPathFactory();
|
|
591
1266
|
rootKeySet.set(rootKey, {
|
|
592
1267
|
namespace: keyPrefix,
|
|
593
|
-
representationName: RepresentationType$
|
|
1268
|
+
representationName: RepresentationType$3,
|
|
594
1269
|
mergeable: false
|
|
595
1270
|
});
|
|
596
1271
|
}
|
|
597
1272
|
|
|
598
|
-
function select$
|
|
599
|
-
return select$
|
|
1273
|
+
function select$8(luvio, params) {
|
|
1274
|
+
return select$9();
|
|
600
1275
|
}
|
|
601
|
-
function keyBuilder$
|
|
1276
|
+
function keyBuilder$4(luvio, params) {
|
|
602
1277
|
return keyPrefix + '::RecommendedPlanTemplatesRepresentation:(' + 'pageType:' + params.urlParams.pageType + ',' + 'objectType:' + params.urlParams.objectType + ')';
|
|
603
1278
|
}
|
|
604
|
-
function getResponseCacheKeys$
|
|
605
|
-
getTypeCacheKeys$
|
|
1279
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1280
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
606
1281
|
}
|
|
607
|
-
function ingestSuccess$
|
|
1282
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
608
1283
|
const { body } = response;
|
|
609
|
-
const key = keyBuilder$
|
|
610
|
-
luvio.storeIngest(key, ingest$
|
|
1284
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1285
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
611
1286
|
const snapshot = luvio.storeLookup({
|
|
612
1287
|
recordId: key,
|
|
613
|
-
node: select$
|
|
1288
|
+
node: select$8(),
|
|
614
1289
|
variables: {},
|
|
615
1290
|
}, snapshotRefresh);
|
|
616
1291
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -622,18 +1297,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
622
1297
|
return snapshot;
|
|
623
1298
|
}
|
|
624
1299
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
625
|
-
const key = keyBuilder$
|
|
1300
|
+
const key = keyBuilder$4(luvio, params);
|
|
626
1301
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
627
1302
|
const storeMetadataParams = {
|
|
628
|
-
ttl: TTL$
|
|
1303
|
+
ttl: TTL$3,
|
|
629
1304
|
namespace: keyPrefix,
|
|
630
|
-
version: VERSION$
|
|
631
|
-
representationName: RepresentationType$
|
|
1305
|
+
version: VERSION$6,
|
|
1306
|
+
representationName: RepresentationType$3
|
|
632
1307
|
};
|
|
633
1308
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
634
1309
|
return errorSnapshot;
|
|
635
1310
|
}
|
|
636
|
-
function createResourceRequest$
|
|
1311
|
+
function createResourceRequest$2(config) {
|
|
637
1312
|
const headers = {};
|
|
638
1313
|
return {
|
|
639
1314
|
baseUri: '/services/data/v61.0',
|
|
@@ -647,61 +1322,61 @@ function createResourceRequest$1(config) {
|
|
|
647
1322
|
};
|
|
648
1323
|
}
|
|
649
1324
|
|
|
650
|
-
const adapterName$
|
|
1325
|
+
const adapterName$2 = 'getRecommendedPlanTemplates';
|
|
651
1326
|
const getRecommendedPlanTemplates_ConfigPropertyMetadata = [
|
|
652
1327
|
generateParamConfigMetadata('pageType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
653
1328
|
generateParamConfigMetadata('objectType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
654
1329
|
];
|
|
655
|
-
const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
656
|
-
const createResourceParams$
|
|
657
|
-
function keyBuilder$
|
|
658
|
-
const resourceParams = createResourceParams$
|
|
659
|
-
return keyBuilder$
|
|
1330
|
+
const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getRecommendedPlanTemplates_ConfigPropertyMetadata);
|
|
1331
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getRecommendedPlanTemplates_ConfigPropertyMetadata);
|
|
1332
|
+
function keyBuilder$3(luvio, config) {
|
|
1333
|
+
const resourceParams = createResourceParams$2(config);
|
|
1334
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
660
1335
|
}
|
|
661
|
-
function typeCheckConfig$
|
|
1336
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
662
1337
|
const config = {};
|
|
663
|
-
typeCheckConfig$
|
|
1338
|
+
typeCheckConfig$5(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
|
|
664
1339
|
return config;
|
|
665
1340
|
}
|
|
666
|
-
function validateAdapterConfig$
|
|
1341
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
667
1342
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
668
1343
|
return null;
|
|
669
1344
|
}
|
|
670
1345
|
if (process.env.NODE_ENV !== 'production') {
|
|
671
1346
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
672
1347
|
}
|
|
673
|
-
const config = typeCheckConfig$
|
|
1348
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
674
1349
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
675
1350
|
return null;
|
|
676
1351
|
}
|
|
677
1352
|
return config;
|
|
678
1353
|
}
|
|
679
1354
|
function adapterFragment(luvio, config) {
|
|
680
|
-
createResourceParams$
|
|
681
|
-
return select$
|
|
1355
|
+
createResourceParams$2(config);
|
|
1356
|
+
return select$8();
|
|
682
1357
|
}
|
|
683
1358
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
684
|
-
const snapshot = ingestSuccess$
|
|
1359
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
685
1360
|
config,
|
|
686
|
-
resolve: () => buildNetworkSnapshot$
|
|
1361
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
687
1362
|
});
|
|
688
1363
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
689
1364
|
}
|
|
690
1365
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
691
1366
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
692
1367
|
config,
|
|
693
|
-
resolve: () => buildNetworkSnapshot$
|
|
1368
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
694
1369
|
});
|
|
695
1370
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
696
1371
|
}
|
|
697
|
-
function buildNetworkSnapshot$
|
|
698
|
-
const resourceParams = createResourceParams$
|
|
699
|
-
const request = createResourceRequest$
|
|
1372
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1373
|
+
const resourceParams = createResourceParams$2(config);
|
|
1374
|
+
const request = createResourceRequest$2(resourceParams);
|
|
700
1375
|
return luvio.dispatchResourceRequest(request, options)
|
|
701
1376
|
.then((response) => {
|
|
702
1377
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
703
1378
|
const cache = new StoreKeyMap();
|
|
704
|
-
getResponseCacheKeys$
|
|
1379
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
705
1380
|
return cache;
|
|
706
1381
|
});
|
|
707
1382
|
}, (response) => {
|
|
@@ -709,23 +1384,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
709
1384
|
});
|
|
710
1385
|
}
|
|
711
1386
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
712
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1387
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
713
1388
|
}
|
|
714
1389
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
715
1390
|
const { luvio, config } = context;
|
|
716
1391
|
const selector = {
|
|
717
|
-
recordId: keyBuilder$
|
|
1392
|
+
recordId: keyBuilder$3(luvio, config),
|
|
718
1393
|
node: adapterFragment(luvio, config),
|
|
719
1394
|
variables: {},
|
|
720
1395
|
};
|
|
721
1396
|
const cacheSnapshot = storeLookup(selector, {
|
|
722
1397
|
config,
|
|
723
|
-
resolve: () => buildNetworkSnapshot$
|
|
1398
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
724
1399
|
});
|
|
725
1400
|
return cacheSnapshot;
|
|
726
1401
|
}
|
|
727
1402
|
const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedPlanTemplates(untrustedConfig, requestContext) {
|
|
728
|
-
const config = validateAdapterConfig$
|
|
1403
|
+
const config = validateAdapterConfig$2(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
|
|
729
1404
|
// Invalid or incomplete config
|
|
730
1405
|
if (config === null) {
|
|
731
1406
|
return null;
|
|
@@ -734,8 +1409,8 @@ const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCo
|
|
|
734
1409
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
735
1410
|
};
|
|
736
1411
|
|
|
737
|
-
const VERSION$
|
|
738
|
-
function validate$
|
|
1412
|
+
const VERSION$5 = "e8cb7e20392935088ea2f98edb927e8a";
|
|
1413
|
+
function validate$6(obj, path = 'EsTypeMessageRepresentation') {
|
|
739
1414
|
const v_error = (() => {
|
|
740
1415
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
741
1416
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -781,10 +1456,10 @@ function validate$5(obj, path = 'EsTypeMessageRepresentation') {
|
|
|
781
1456
|
})();
|
|
782
1457
|
return v_error === undefined ? null : v_error;
|
|
783
1458
|
}
|
|
784
|
-
const select$
|
|
1459
|
+
const select$7 = function EsTypeMessageRepresentationSelect() {
|
|
785
1460
|
return {
|
|
786
1461
|
kind: 'Fragment',
|
|
787
|
-
version: VERSION$
|
|
1462
|
+
version: VERSION$5,
|
|
788
1463
|
private: [],
|
|
789
1464
|
selections: [
|
|
790
1465
|
{
|
|
@@ -804,7 +1479,7 @@ const select$5 = function EsTypeMessageRepresentationSelect() {
|
|
|
804
1479
|
]
|
|
805
1480
|
};
|
|
806
1481
|
};
|
|
807
|
-
function equals$
|
|
1482
|
+
function equals$5(existing, incoming) {
|
|
808
1483
|
const existing_type = existing.type;
|
|
809
1484
|
const incoming_type = incoming.type;
|
|
810
1485
|
if (!(existing_type === incoming_type)) {
|
|
@@ -831,7 +1506,7 @@ function equals$4(existing, incoming) {
|
|
|
831
1506
|
return true;
|
|
832
1507
|
}
|
|
833
1508
|
|
|
834
|
-
function validate$
|
|
1509
|
+
function validate$5(obj, path = 'VariableRepresentation') {
|
|
835
1510
|
const v_error = (() => {
|
|
836
1511
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
837
1512
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -841,19 +1516,24 @@ function validate$4(obj, path = 'VariableRepresentation') {
|
|
|
841
1516
|
if (typeof obj_name !== 'string') {
|
|
842
1517
|
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
843
1518
|
}
|
|
1519
|
+
const obj_type = obj.type;
|
|
1520
|
+
const path_type = path + '.type';
|
|
1521
|
+
if (typeof obj_type !== 'string') {
|
|
1522
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1523
|
+
}
|
|
844
1524
|
if (obj.value !== undefined) {
|
|
845
1525
|
const obj_value = obj.value;
|
|
846
1526
|
const path_value = path + '.value';
|
|
847
|
-
if (
|
|
848
|
-
return new TypeError('Expected "
|
|
1527
|
+
if (obj_value === undefined) {
|
|
1528
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
849
1529
|
}
|
|
850
1530
|
}
|
|
851
1531
|
})();
|
|
852
1532
|
return v_error === undefined ? null : v_error;
|
|
853
1533
|
}
|
|
854
1534
|
|
|
855
|
-
const VERSION$
|
|
856
|
-
function validate$
|
|
1535
|
+
const VERSION$4 = "4e28b61c3ea362f1c68b28897784111e";
|
|
1536
|
+
function validate$4(obj, path = 'ConversationRuntimeProxyChoiceRepresentation') {
|
|
857
1537
|
const v_error = (() => {
|
|
858
1538
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
859
1539
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -871,10 +1551,10 @@ function validate$3(obj, path = 'ConversationRuntimeProxyChoiceRepresentation')
|
|
|
871
1551
|
})();
|
|
872
1552
|
return v_error === undefined ? null : v_error;
|
|
873
1553
|
}
|
|
874
|
-
const select$
|
|
1554
|
+
const select$6 = function ConversationRuntimeProxyChoiceRepresentationSelect() {
|
|
875
1555
|
return {
|
|
876
1556
|
kind: 'Fragment',
|
|
877
|
-
version: VERSION$
|
|
1557
|
+
version: VERSION$4,
|
|
878
1558
|
private: [],
|
|
879
1559
|
selections: [
|
|
880
1560
|
{
|
|
@@ -888,7 +1568,7 @@ const select$4 = function ConversationRuntimeProxyChoiceRepresentationSelect() {
|
|
|
888
1568
|
]
|
|
889
1569
|
};
|
|
890
1570
|
};
|
|
891
|
-
function equals$
|
|
1571
|
+
function equals$4(existing, incoming) {
|
|
892
1572
|
const existing_alias = existing.alias;
|
|
893
1573
|
const incoming_alias = incoming.alias;
|
|
894
1574
|
if (!(existing_alias === incoming_alias)) {
|
|
@@ -902,8 +1582,8 @@ function equals$3(existing, incoming) {
|
|
|
902
1582
|
return true;
|
|
903
1583
|
}
|
|
904
1584
|
|
|
905
|
-
const VERSION$
|
|
906
|
-
function validate$
|
|
1585
|
+
const VERSION$3 = "477724425d0742c030025796c88ebf5d";
|
|
1586
|
+
function validate$3(obj, path = 'CollectMessageRepresentation') {
|
|
907
1587
|
const v_error = (() => {
|
|
908
1588
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
909
1589
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -911,7 +1591,7 @@ function validate$2(obj, path = 'CollectMessageRepresentation') {
|
|
|
911
1591
|
if (obj.data !== undefined) {
|
|
912
1592
|
const obj_data = obj.data;
|
|
913
1593
|
const path_data = path + '.data';
|
|
914
|
-
const referencepath_dataValidationError = validate$
|
|
1594
|
+
const referencepath_dataValidationError = validate$6(obj_data, path_data);
|
|
915
1595
|
if (referencepath_dataValidationError !== null) {
|
|
916
1596
|
let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_data + '")\n';
|
|
917
1597
|
message += referencepath_dataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -954,11 +1634,11 @@ function validate$2(obj, path = 'CollectMessageRepresentation') {
|
|
|
954
1634
|
})();
|
|
955
1635
|
return v_error === undefined ? null : v_error;
|
|
956
1636
|
}
|
|
957
|
-
const select$
|
|
958
|
-
const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$
|
|
1637
|
+
const select$5 = function CollectMessageRepresentationSelect() {
|
|
1638
|
+
const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$7();
|
|
959
1639
|
return {
|
|
960
1640
|
kind: 'Fragment',
|
|
961
|
-
version: VERSION$
|
|
1641
|
+
version: VERSION$3,
|
|
962
1642
|
private: [],
|
|
963
1643
|
selections: [
|
|
964
1644
|
{
|
|
@@ -979,7 +1659,7 @@ const select$3 = function CollectMessageRepresentationSelect() {
|
|
|
979
1659
|
]
|
|
980
1660
|
};
|
|
981
1661
|
};
|
|
982
|
-
function equals$
|
|
1662
|
+
function equals$3(existing, incoming) {
|
|
983
1663
|
const existing_targetType = existing.targetType;
|
|
984
1664
|
const incoming_targetType = incoming.targetType;
|
|
985
1665
|
if (!(existing_targetType === incoming_targetType)) {
|
|
@@ -994,7 +1674,7 @@ function equals$2(existing, incoming) {
|
|
|
994
1674
|
if (existing_data === undefined || incoming_data === undefined) {
|
|
995
1675
|
return false;
|
|
996
1676
|
}
|
|
997
|
-
if (!(equals$
|
|
1677
|
+
if (!(equals$5(existing_data, incoming_data))) {
|
|
998
1678
|
return false;
|
|
999
1679
|
}
|
|
1000
1680
|
}
|
|
@@ -1014,9 +1694,9 @@ function equals$2(existing, incoming) {
|
|
|
1014
1694
|
return true;
|
|
1015
1695
|
}
|
|
1016
1696
|
|
|
1017
|
-
const TTL$
|
|
1018
|
-
const VERSION$
|
|
1019
|
-
function validate$
|
|
1697
|
+
const TTL$2 = 30000;
|
|
1698
|
+
const VERSION$2 = "55ac02bd055f57a2a12aa0fa4844d1a2";
|
|
1699
|
+
function validate$2(obj, path = 'ConversationRuntimeProxyMessageRepresentation') {
|
|
1020
1700
|
const v_error = (() => {
|
|
1021
1701
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1022
1702
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1030,7 +1710,7 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1030
1710
|
for (let i = 0; i < obj_choices.length; i++) {
|
|
1031
1711
|
const obj_choices_item = obj_choices[i];
|
|
1032
1712
|
const path_choices_item = path_choices + '[' + i + ']';
|
|
1033
|
-
const referencepath_choices_itemValidationError = validate$
|
|
1713
|
+
const referencepath_choices_itemValidationError = validate$4(obj_choices_item, path_choices_item);
|
|
1034
1714
|
if (referencepath_choices_itemValidationError !== null) {
|
|
1035
1715
|
let message = 'Object doesn\'t match ConversationRuntimeProxyChoiceRepresentation (at "' + path_choices_item + '")\n';
|
|
1036
1716
|
message += referencepath_choices_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1047,7 +1727,7 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1047
1727
|
for (let i = 0; i < obj_collect.length; i++) {
|
|
1048
1728
|
const obj_collect_item = obj_collect[i];
|
|
1049
1729
|
const path_collect_item = path_collect + '[' + i + ']';
|
|
1050
|
-
const referencepath_collect_itemValidationError = validate$
|
|
1730
|
+
const referencepath_collect_itemValidationError = validate$3(obj_collect_item, path_collect_item);
|
|
1051
1731
|
if (referencepath_collect_itemValidationError !== null) {
|
|
1052
1732
|
let message = 'Object doesn\'t match CollectMessageRepresentation (at "' + path_collect_item + '")\n';
|
|
1053
1733
|
message += referencepath_collect_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1064,7 +1744,7 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1064
1744
|
for (let i = 0; i < obj_confirm.length; i++) {
|
|
1065
1745
|
const obj_confirm_item = obj_confirm[i];
|
|
1066
1746
|
const path_confirm_item = path_confirm + '[' + i + ']';
|
|
1067
|
-
const referencepath_confirm_itemValidationError = validate$
|
|
1747
|
+
const referencepath_confirm_itemValidationError = validate$6(obj_confirm_item, path_confirm_item);
|
|
1068
1748
|
if (referencepath_confirm_itemValidationError !== null) {
|
|
1069
1749
|
let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_confirm_item + '")\n';
|
|
1070
1750
|
message += referencepath_confirm_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1240,7 +1920,7 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1240
1920
|
for (let i = 0; i < obj_result.length; i++) {
|
|
1241
1921
|
const obj_result_item = obj_result[i];
|
|
1242
1922
|
const path_result_item = path_result + '[' + i + ']';
|
|
1243
|
-
const referencepath_result_itemValidationError = validate$
|
|
1923
|
+
const referencepath_result_itemValidationError = validate$6(obj_result_item, path_result_item);
|
|
1244
1924
|
if (referencepath_result_itemValidationError !== null) {
|
|
1245
1925
|
let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_result_item + '")\n';
|
|
1246
1926
|
message += referencepath_result_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1314,26 +1994,26 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1314
1994
|
})();
|
|
1315
1995
|
return v_error === undefined ? null : v_error;
|
|
1316
1996
|
}
|
|
1317
|
-
const RepresentationType$
|
|
1318
|
-
function keyBuilder$
|
|
1319
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1997
|
+
const RepresentationType$2 = 'ConversationRuntimeProxyMessageRepresentation';
|
|
1998
|
+
function keyBuilder$2(luvio, config) {
|
|
1999
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
1320
2000
|
}
|
|
1321
|
-
function keyBuilderFromType$
|
|
2001
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
1322
2002
|
const keyParams = {
|
|
1323
2003
|
id: object.id
|
|
1324
2004
|
};
|
|
1325
|
-
return keyBuilder$
|
|
2005
|
+
return keyBuilder$2(luvio, keyParams);
|
|
1326
2006
|
}
|
|
1327
|
-
function normalize$
|
|
2007
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1328
2008
|
return input;
|
|
1329
2009
|
}
|
|
1330
|
-
const select$
|
|
1331
|
-
const { selections: ConversationRuntimeProxyChoiceRepresentation__selections, opaque: ConversationRuntimeProxyChoiceRepresentation__opaque, } = select$
|
|
1332
|
-
const { selections: CollectMessageRepresentation__selections, opaque: CollectMessageRepresentation__opaque, } = select$
|
|
1333
|
-
const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$
|
|
2010
|
+
const select$4 = function ConversationRuntimeProxyMessageRepresentationSelect() {
|
|
2011
|
+
const { selections: ConversationRuntimeProxyChoiceRepresentation__selections, opaque: ConversationRuntimeProxyChoiceRepresentation__opaque, } = select$6();
|
|
2012
|
+
const { selections: CollectMessageRepresentation__selections, opaque: CollectMessageRepresentation__opaque, } = select$5();
|
|
2013
|
+
const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$7();
|
|
1334
2014
|
return {
|
|
1335
2015
|
kind: 'Fragment',
|
|
1336
|
-
version: VERSION$
|
|
2016
|
+
version: VERSION$2,
|
|
1337
2017
|
private: [],
|
|
1338
2018
|
selections: [
|
|
1339
2019
|
{
|
|
@@ -1417,7 +2097,7 @@ const select$2 = function ConversationRuntimeProxyMessageRepresentationSelect()
|
|
|
1417
2097
|
]
|
|
1418
2098
|
};
|
|
1419
2099
|
};
|
|
1420
|
-
function equals$
|
|
2100
|
+
function equals$2(existing, incoming) {
|
|
1421
2101
|
const existing_id = existing.id;
|
|
1422
2102
|
const incoming_id = incoming.id;
|
|
1423
2103
|
if (!(existing_id === incoming_id)) {
|
|
@@ -1446,7 +2126,7 @@ function equals$1(existing, incoming) {
|
|
|
1446
2126
|
return false;
|
|
1447
2127
|
}
|
|
1448
2128
|
const equals_choices_items = equalsArray(existing_choices, incoming_choices, (existing_choices_item, incoming_choices_item) => {
|
|
1449
|
-
if (!(equals$
|
|
2129
|
+
if (!(equals$4(existing_choices_item, incoming_choices_item))) {
|
|
1450
2130
|
return false;
|
|
1451
2131
|
}
|
|
1452
2132
|
});
|
|
@@ -1464,7 +2144,7 @@ function equals$1(existing, incoming) {
|
|
|
1464
2144
|
return false;
|
|
1465
2145
|
}
|
|
1466
2146
|
const equals_collect_items = equalsArray(existing_collect, incoming_collect, (existing_collect_item, incoming_collect_item) => {
|
|
1467
|
-
if (!(equals$
|
|
2147
|
+
if (!(equals$3(existing_collect_item, incoming_collect_item))) {
|
|
1468
2148
|
return false;
|
|
1469
2149
|
}
|
|
1470
2150
|
});
|
|
@@ -1482,7 +2162,7 @@ function equals$1(existing, incoming) {
|
|
|
1482
2162
|
return false;
|
|
1483
2163
|
}
|
|
1484
2164
|
const equals_confirm_items = equalsArray(existing_confirm, incoming_confirm, (existing_confirm_item, incoming_confirm_item) => {
|
|
1485
|
-
if (!(equals$
|
|
2165
|
+
if (!(equals$5(existing_confirm_item, incoming_confirm_item))) {
|
|
1486
2166
|
return false;
|
|
1487
2167
|
}
|
|
1488
2168
|
});
|
|
@@ -1583,7 +2263,7 @@ function equals$1(existing, incoming) {
|
|
|
1583
2263
|
return false;
|
|
1584
2264
|
}
|
|
1585
2265
|
const equals_result_items = equalsArray(existing_result, incoming_result, (existing_result_item, incoming_result_item) => {
|
|
1586
|
-
if (!(equals$
|
|
2266
|
+
if (!(equals$5(existing_result_item, incoming_result_item))) {
|
|
1587
2267
|
return false;
|
|
1588
2268
|
}
|
|
1589
2269
|
});
|
|
@@ -1619,31 +2299,31 @@ function equals$1(existing, incoming) {
|
|
|
1619
2299
|
}
|
|
1620
2300
|
return true;
|
|
1621
2301
|
}
|
|
1622
|
-
const ingest$
|
|
2302
|
+
const ingest$2 = function ConversationRuntimeProxyMessageRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1623
2303
|
if (process.env.NODE_ENV !== 'production') {
|
|
1624
|
-
const validateError = validate$
|
|
2304
|
+
const validateError = validate$2(input);
|
|
1625
2305
|
if (validateError !== null) {
|
|
1626
2306
|
throw validateError;
|
|
1627
2307
|
}
|
|
1628
2308
|
}
|
|
1629
|
-
const key = keyBuilderFromType$
|
|
1630
|
-
const ttlToUse = TTL$
|
|
1631
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2309
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
2310
|
+
const ttlToUse = TTL$2;
|
|
2311
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "einstein-copilot-bot", VERSION$2, RepresentationType$2, equals$2);
|
|
1632
2312
|
return createLink(key);
|
|
1633
2313
|
};
|
|
1634
|
-
function getTypeCacheKeys$
|
|
2314
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1635
2315
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1636
|
-
const rootKey = keyBuilderFromType$
|
|
2316
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
1637
2317
|
rootKeySet.set(rootKey, {
|
|
1638
2318
|
namespace: keyPrefix,
|
|
1639
|
-
representationName: RepresentationType$
|
|
2319
|
+
representationName: RepresentationType$2,
|
|
1640
2320
|
mergeable: false
|
|
1641
2321
|
});
|
|
1642
2322
|
}
|
|
1643
2323
|
|
|
1644
|
-
const TTL = 30000;
|
|
1645
|
-
const VERSION = "fe7024fb1132250f97d9616482f09f99";
|
|
1646
|
-
function validate(obj, path = 'ConversationRuntimeProxyRepresentation') {
|
|
2324
|
+
const TTL$1 = 30000;
|
|
2325
|
+
const VERSION$1 = "fe7024fb1132250f97d9616482f09f99";
|
|
2326
|
+
function validate$1(obj, path = 'ConversationRuntimeProxyRepresentation') {
|
|
1647
2327
|
const v_error = (() => {
|
|
1648
2328
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1649
2329
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1695,23 +2375,23 @@ function validate(obj, path = 'ConversationRuntimeProxyRepresentation') {
|
|
|
1695
2375
|
})();
|
|
1696
2376
|
return v_error === undefined ? null : v_error;
|
|
1697
2377
|
}
|
|
1698
|
-
const RepresentationType = 'ConversationRuntimeProxyRepresentation';
|
|
1699
|
-
function keyBuilder(luvio, config) {
|
|
1700
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
2378
|
+
const RepresentationType$1 = 'ConversationRuntimeProxyRepresentation';
|
|
2379
|
+
function keyBuilder$1(luvio, config) {
|
|
2380
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
1701
2381
|
}
|
|
1702
|
-
function keyBuilderFromType(luvio, object) {
|
|
2382
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1703
2383
|
const keyParams = {
|
|
1704
2384
|
id: object.requestId
|
|
1705
2385
|
};
|
|
1706
|
-
return keyBuilder(luvio, keyParams);
|
|
2386
|
+
return keyBuilder$1(luvio, keyParams);
|
|
1707
2387
|
}
|
|
1708
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
2388
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1709
2389
|
const input_messages = input.messages;
|
|
1710
2390
|
const input_messages_id = path.fullPath + '__messages';
|
|
1711
2391
|
for (let i = 0; i < input_messages.length; i++) {
|
|
1712
2392
|
const input_messages_item = input_messages[i];
|
|
1713
2393
|
let input_messages_item_id = input_messages_id + '__' + i;
|
|
1714
|
-
input_messages[i] = ingest$
|
|
2394
|
+
input_messages[i] = ingest$2(input_messages_item, {
|
|
1715
2395
|
fullPath: input_messages_item_id,
|
|
1716
2396
|
propertyName: i,
|
|
1717
2397
|
parent: {
|
|
@@ -1724,10 +2404,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
1724
2404
|
}
|
|
1725
2405
|
return input;
|
|
1726
2406
|
}
|
|
1727
|
-
const select$
|
|
2407
|
+
const select$3 = function ConversationRuntimeProxyRepresentationSelect() {
|
|
1728
2408
|
return {
|
|
1729
2409
|
kind: 'Fragment',
|
|
1730
|
-
version: VERSION,
|
|
2410
|
+
version: VERSION$1,
|
|
1731
2411
|
private: [],
|
|
1732
2412
|
selections: [
|
|
1733
2413
|
{
|
|
@@ -1742,7 +2422,7 @@ const select$1 = function ConversationRuntimeProxyRepresentationSelect() {
|
|
|
1742
2422
|
name: 'messages',
|
|
1743
2423
|
kind: 'Link',
|
|
1744
2424
|
plural: true,
|
|
1745
|
-
fragment: select$
|
|
2425
|
+
fragment: select$4()
|
|
1746
2426
|
},
|
|
1747
2427
|
{
|
|
1748
2428
|
name: 'processedSequenceIds',
|
|
@@ -1760,7 +2440,7 @@ const select$1 = function ConversationRuntimeProxyRepresentationSelect() {
|
|
|
1760
2440
|
]
|
|
1761
2441
|
};
|
|
1762
2442
|
};
|
|
1763
|
-
function equals(existing, incoming) {
|
|
2443
|
+
function equals$1(existing, incoming) {
|
|
1764
2444
|
const existing_botId = existing.botId;
|
|
1765
2445
|
const incoming_botId = incoming.botId;
|
|
1766
2446
|
if (!(existing_botId === incoming_botId)) {
|
|
@@ -1803,45 +2483,45 @@ function equals(existing, incoming) {
|
|
|
1803
2483
|
}
|
|
1804
2484
|
return true;
|
|
1805
2485
|
}
|
|
1806
|
-
const ingest = function ConversationRuntimeProxyRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2486
|
+
const ingest$1 = function ConversationRuntimeProxyRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1807
2487
|
if (process.env.NODE_ENV !== 'production') {
|
|
1808
|
-
const validateError = validate(input);
|
|
2488
|
+
const validateError = validate$1(input);
|
|
1809
2489
|
if (validateError !== null) {
|
|
1810
2490
|
throw validateError;
|
|
1811
2491
|
}
|
|
1812
2492
|
}
|
|
1813
|
-
const key = keyBuilderFromType(luvio, input);
|
|
1814
|
-
const ttlToUse = TTL;
|
|
1815
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "einstein-copilot-bot", VERSION, RepresentationType, equals);
|
|
2493
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
2494
|
+
const ttlToUse = TTL$1;
|
|
2495
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "einstein-copilot-bot", VERSION$1, RepresentationType$1, equals$1);
|
|
1816
2496
|
return createLink(key);
|
|
1817
2497
|
};
|
|
1818
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
2498
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1819
2499
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1820
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
2500
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1821
2501
|
rootKeySet.set(rootKey, {
|
|
1822
2502
|
namespace: keyPrefix,
|
|
1823
|
-
representationName: RepresentationType,
|
|
2503
|
+
representationName: RepresentationType$1,
|
|
1824
2504
|
mergeable: false
|
|
1825
2505
|
});
|
|
1826
2506
|
const input_messages_length = input.messages.length;
|
|
1827
2507
|
for (let i = 0; i < input_messages_length; i++) {
|
|
1828
|
-
getTypeCacheKeys$
|
|
2508
|
+
getTypeCacheKeys$2(rootKeySet, luvio, input.messages[i]);
|
|
1829
2509
|
}
|
|
1830
2510
|
}
|
|
1831
2511
|
|
|
1832
|
-
function select(luvio, params) {
|
|
1833
|
-
return select$
|
|
2512
|
+
function select$2(luvio, params) {
|
|
2513
|
+
return select$3();
|
|
1834
2514
|
}
|
|
1835
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1836
|
-
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
2515
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
2516
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
1837
2517
|
}
|
|
1838
|
-
function ingestSuccess(luvio, resourceParams, response) {
|
|
2518
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1839
2519
|
const { body } = response;
|
|
1840
|
-
const key = keyBuilderFromType(luvio, body);
|
|
1841
|
-
luvio.storeIngest(key, ingest, body);
|
|
2520
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
2521
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1842
2522
|
const snapshot = luvio.storeLookup({
|
|
1843
2523
|
recordId: key,
|
|
1844
|
-
node: select(),
|
|
2524
|
+
node: select$2(),
|
|
1845
2525
|
variables: {},
|
|
1846
2526
|
});
|
|
1847
2527
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1852,7 +2532,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
1852
2532
|
deepFreeze(snapshot.data);
|
|
1853
2533
|
return snapshot;
|
|
1854
2534
|
}
|
|
1855
|
-
function createResourceRequest(config) {
|
|
2535
|
+
function createResourceRequest$1(config) {
|
|
1856
2536
|
const headers = {};
|
|
1857
2537
|
return {
|
|
1858
2538
|
baseUri: '/services/data/v61.0',
|
|
@@ -1866,7 +2546,7 @@ function createResourceRequest(config) {
|
|
|
1866
2546
|
};
|
|
1867
2547
|
}
|
|
1868
2548
|
|
|
1869
|
-
const adapterName = 'sendMessage';
|
|
2549
|
+
const adapterName$1 = 'sendMessage';
|
|
1870
2550
|
const sendMessage_ConfigPropertyMetadata = [
|
|
1871
2551
|
generateParamConfigMetadata('botId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1872
2552
|
generateParamConfigMetadata('botVersionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -1883,11 +2563,11 @@ const sendMessage_ConfigPropertyMetadata = [
|
|
|
1883
2563
|
generateParamConfigMetadata('variables', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1884
2564
|
generateParamConfigMetadata('userUtterance', false, 2 /* Body */, 0 /* String */),
|
|
1885
2565
|
];
|
|
1886
|
-
const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, sendMessage_ConfigPropertyMetadata);
|
|
1887
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1888
|
-
function typeCheckConfig(untrustedConfig) {
|
|
2566
|
+
const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, sendMessage_ConfigPropertyMetadata);
|
|
2567
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(sendMessage_ConfigPropertyMetadata);
|
|
2568
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1889
2569
|
const config = {};
|
|
1890
|
-
typeCheckConfig$
|
|
2570
|
+
typeCheckConfig$5(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
|
|
1891
2571
|
const untrustedConfig_planTemplateVariables = untrustedConfig.planTemplateVariables;
|
|
1892
2572
|
config.planTemplateVariables = untrustedConfig_planTemplateVariables;
|
|
1893
2573
|
const untrustedConfig_reply = untrustedConfig.reply;
|
|
@@ -1895,7 +2575,7 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
1895
2575
|
const untrustedConfig_reply_array = [];
|
|
1896
2576
|
for (let i = 0, arrayLength = untrustedConfig_reply.length; i < arrayLength; i++) {
|
|
1897
2577
|
const untrustedConfig_reply_item = untrustedConfig_reply[i];
|
|
1898
|
-
const referenceEsTypeMessageRepresentationValidationError = validate$
|
|
2578
|
+
const referenceEsTypeMessageRepresentationValidationError = validate$6(untrustedConfig_reply_item);
|
|
1899
2579
|
if (referenceEsTypeMessageRepresentationValidationError === null) {
|
|
1900
2580
|
untrustedConfig_reply_array.push(untrustedConfig_reply_item);
|
|
1901
2581
|
}
|
|
@@ -1907,7 +2587,7 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
1907
2587
|
const untrustedConfig_variables_array = [];
|
|
1908
2588
|
for (let i = 0, arrayLength = untrustedConfig_variables.length; i < arrayLength; i++) {
|
|
1909
2589
|
const untrustedConfig_variables_item = untrustedConfig_variables[i];
|
|
1910
|
-
const referenceVariableRepresentationValidationError = validate$
|
|
2590
|
+
const referenceVariableRepresentationValidationError = validate$5(untrustedConfig_variables_item);
|
|
1911
2591
|
if (referenceVariableRepresentationValidationError === null) {
|
|
1912
2592
|
untrustedConfig_variables_array.push(untrustedConfig_variables_item);
|
|
1913
2593
|
}
|
|
@@ -1916,6 +2596,186 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
1916
2596
|
}
|
|
1917
2597
|
return config;
|
|
1918
2598
|
}
|
|
2599
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
2600
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2601
|
+
return null;
|
|
2602
|
+
}
|
|
2603
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2604
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2605
|
+
}
|
|
2606
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
2607
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2608
|
+
return null;
|
|
2609
|
+
}
|
|
2610
|
+
return config;
|
|
2611
|
+
}
|
|
2612
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
2613
|
+
const resourceParams = createResourceParams$1(config);
|
|
2614
|
+
const request = createResourceRequest$1(resourceParams);
|
|
2615
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2616
|
+
.then((response) => {
|
|
2617
|
+
return luvio.handleSuccessResponse(() => {
|
|
2618
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
2619
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2620
|
+
}, () => {
|
|
2621
|
+
const cache = new StoreKeyMap();
|
|
2622
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
2623
|
+
return cache;
|
|
2624
|
+
});
|
|
2625
|
+
}, (response) => {
|
|
2626
|
+
deepFreeze(response);
|
|
2627
|
+
throw response;
|
|
2628
|
+
});
|
|
2629
|
+
}
|
|
2630
|
+
const sendMessageAdapterFactory = (luvio) => {
|
|
2631
|
+
return function sendMessage(untrustedConfig) {
|
|
2632
|
+
const config = validateAdapterConfig$1(untrustedConfig, sendMessage_ConfigPropertyNames);
|
|
2633
|
+
// Invalid or incomplete config
|
|
2634
|
+
if (config === null) {
|
|
2635
|
+
throw new Error('Invalid config for "sendMessage"');
|
|
2636
|
+
}
|
|
2637
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
2638
|
+
};
|
|
2639
|
+
};
|
|
2640
|
+
|
|
2641
|
+
const TTL = 100;
|
|
2642
|
+
const VERSION = "7454bdd46af1622eb677a9bb9eac3a8b";
|
|
2643
|
+
function validate(obj, path = 'CopilotLLMFeedbackOutputRepresentation') {
|
|
2644
|
+
const v_error = (() => {
|
|
2645
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2646
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2647
|
+
}
|
|
2648
|
+
const obj_submitFeedbackStatus = obj.submitFeedbackStatus;
|
|
2649
|
+
const path_submitFeedbackStatus = path + '.submitFeedbackStatus';
|
|
2650
|
+
if (typeof obj_submitFeedbackStatus !== 'string') {
|
|
2651
|
+
return new TypeError('Expected "string" but received "' + typeof obj_submitFeedbackStatus + '" (at "' + path_submitFeedbackStatus + '")');
|
|
2652
|
+
}
|
|
2653
|
+
})();
|
|
2654
|
+
return v_error === undefined ? null : v_error;
|
|
2655
|
+
}
|
|
2656
|
+
const RepresentationType = 'CopilotLLMFeedbackOutputRepresentation';
|
|
2657
|
+
function keyBuilder(luvio, config) {
|
|
2658
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
2659
|
+
}
|
|
2660
|
+
function keyBuilderFromType(luvio, object) {
|
|
2661
|
+
const keyParams = {
|
|
2662
|
+
id: object.submitFeedbackStatus
|
|
2663
|
+
};
|
|
2664
|
+
return keyBuilder(luvio, keyParams);
|
|
2665
|
+
}
|
|
2666
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
2667
|
+
return input;
|
|
2668
|
+
}
|
|
2669
|
+
const select$1 = function CopilotLLMFeedbackOutputRepresentationSelect() {
|
|
2670
|
+
return {
|
|
2671
|
+
kind: 'Fragment',
|
|
2672
|
+
version: VERSION,
|
|
2673
|
+
private: [],
|
|
2674
|
+
selections: [
|
|
2675
|
+
{
|
|
2676
|
+
name: 'submitFeedbackStatus',
|
|
2677
|
+
kind: 'Scalar'
|
|
2678
|
+
}
|
|
2679
|
+
]
|
|
2680
|
+
};
|
|
2681
|
+
};
|
|
2682
|
+
function equals(existing, incoming) {
|
|
2683
|
+
const existing_submitFeedbackStatus = existing.submitFeedbackStatus;
|
|
2684
|
+
const incoming_submitFeedbackStatus = incoming.submitFeedbackStatus;
|
|
2685
|
+
if (!(existing_submitFeedbackStatus === incoming_submitFeedbackStatus)) {
|
|
2686
|
+
return false;
|
|
2687
|
+
}
|
|
2688
|
+
return true;
|
|
2689
|
+
}
|
|
2690
|
+
const ingest = function CopilotLLMFeedbackOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2691
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2692
|
+
const validateError = validate(input);
|
|
2693
|
+
if (validateError !== null) {
|
|
2694
|
+
throw validateError;
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
const key = keyBuilderFromType(luvio, input);
|
|
2698
|
+
const ttlToUse = TTL;
|
|
2699
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "einstein-copilot-bot", VERSION, RepresentationType, equals);
|
|
2700
|
+
return createLink(key);
|
|
2701
|
+
};
|
|
2702
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
2703
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2704
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
2705
|
+
rootKeySet.set(rootKey, {
|
|
2706
|
+
namespace: keyPrefix,
|
|
2707
|
+
representationName: RepresentationType,
|
|
2708
|
+
mergeable: false
|
|
2709
|
+
});
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
function select(luvio, params) {
|
|
2713
|
+
return select$1();
|
|
2714
|
+
}
|
|
2715
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
2716
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
2717
|
+
}
|
|
2718
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
2719
|
+
const { body } = response;
|
|
2720
|
+
const key = keyBuilderFromType(luvio, body);
|
|
2721
|
+
luvio.storeIngest(key, ingest, body);
|
|
2722
|
+
const snapshot = luvio.storeLookup({
|
|
2723
|
+
recordId: key,
|
|
2724
|
+
node: select(),
|
|
2725
|
+
variables: {},
|
|
2726
|
+
});
|
|
2727
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2728
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2729
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
deepFreeze(snapshot.data);
|
|
2733
|
+
return snapshot;
|
|
2734
|
+
}
|
|
2735
|
+
function createResourceRequest(config) {
|
|
2736
|
+
const headers = {};
|
|
2737
|
+
return {
|
|
2738
|
+
baseUri: '/services/data/v61.0',
|
|
2739
|
+
basePath: '/connect/copilot/feedback',
|
|
2740
|
+
method: 'post',
|
|
2741
|
+
body: config.body,
|
|
2742
|
+
urlParams: {},
|
|
2743
|
+
queryParams: {},
|
|
2744
|
+
headers,
|
|
2745
|
+
priority: 'normal',
|
|
2746
|
+
};
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
const adapterName = 'submitFeedback';
|
|
2750
|
+
const submitFeedback_ConfigPropertyMetadata = [
|
|
2751
|
+
generateParamConfigMetadata('details', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2752
|
+
generateParamConfigMetadata('feedback', true, 2 /* Body */, 0 /* String */),
|
|
2753
|
+
generateParamConfigMetadata('feedbackId', true, 2 /* Body */, 0 /* String */),
|
|
2754
|
+
generateParamConfigMetadata('sessionId', true, 2 /* Body */, 0 /* String */),
|
|
2755
|
+
generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
|
|
2756
|
+
];
|
|
2757
|
+
const submitFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, submitFeedback_ConfigPropertyMetadata);
|
|
2758
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(submitFeedback_ConfigPropertyMetadata);
|
|
2759
|
+
function typeCheckConfig(untrustedConfig) {
|
|
2760
|
+
const config = {};
|
|
2761
|
+
typeCheckConfig$5(untrustedConfig, config, submitFeedback_ConfigPropertyMetadata);
|
|
2762
|
+
const untrustedConfig_details = untrustedConfig.details;
|
|
2763
|
+
if (untrustedIsObject(untrustedConfig_details)) {
|
|
2764
|
+
const untrustedConfig_details_object = {};
|
|
2765
|
+
const untrustedConfig_details_keys = Object.keys(untrustedConfig_details);
|
|
2766
|
+
for (let i = 0, arrayLength = untrustedConfig_details_keys.length; i < arrayLength; i++) {
|
|
2767
|
+
const key = untrustedConfig_details_keys[i];
|
|
2768
|
+
const untrustedConfig_details_prop = untrustedConfig_details[key];
|
|
2769
|
+
if (untrustedConfig_details_object !== undefined) {
|
|
2770
|
+
untrustedConfig_details_object[key] = untrustedConfig_details_prop;
|
|
2771
|
+
}
|
|
2772
|
+
}
|
|
2773
|
+
if (untrustedConfig_details_object !== undefined && Object.keys(untrustedConfig_details_object).length >= 0) {
|
|
2774
|
+
config.details = untrustedConfig_details_object;
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
return config;
|
|
2778
|
+
}
|
|
1919
2779
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1920
2780
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1921
2781
|
return null;
|
|
@@ -1947,25 +2807,33 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1947
2807
|
throw response;
|
|
1948
2808
|
});
|
|
1949
2809
|
}
|
|
1950
|
-
const
|
|
1951
|
-
return function
|
|
1952
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
2810
|
+
const submitFeedbackAdapterFactory = (luvio) => {
|
|
2811
|
+
return function submitFeedback(untrustedConfig) {
|
|
2812
|
+
const config = validateAdapterConfig(untrustedConfig, submitFeedback_ConfigPropertyNames);
|
|
1953
2813
|
// Invalid or incomplete config
|
|
1954
2814
|
if (config === null) {
|
|
1955
|
-
throw new Error('Invalid config for "
|
|
2815
|
+
throw new Error('Invalid config for "submitFeedback"');
|
|
1956
2816
|
}
|
|
1957
2817
|
return buildNetworkSnapshot(luvio, config);
|
|
1958
2818
|
};
|
|
1959
2819
|
};
|
|
1960
2820
|
|
|
1961
2821
|
let getBotId;
|
|
2822
|
+
let getRecommendedActions;
|
|
1962
2823
|
let getRecommendedPlanTemplates;
|
|
1963
2824
|
let sendMessage;
|
|
2825
|
+
let submitFeedback;
|
|
1964
2826
|
// Imperative GET Adapters
|
|
1965
2827
|
let getBotId_imperative;
|
|
2828
|
+
let getRecommendedActions_imperative;
|
|
1966
2829
|
let getRecommendedPlanTemplates_imperative;
|
|
1967
2830
|
// Adapter Metadata
|
|
1968
2831
|
const getBotIdMetadata = { apiFamily: 'einsteincopilot-bot', name: 'getBotId', ttl: 30000 };
|
|
2832
|
+
const getRecommendedActionsMetadata = {
|
|
2833
|
+
apiFamily: 'einsteincopilot-bot',
|
|
2834
|
+
name: 'getRecommendedActions',
|
|
2835
|
+
ttl: 900000,
|
|
2836
|
+
};
|
|
1969
2837
|
const getRecommendedPlanTemplatesMetadata = {
|
|
1970
2838
|
apiFamily: 'einsteincopilot-bot',
|
|
1971
2839
|
name: 'getRecommendedPlanTemplates',
|
|
@@ -1975,6 +2843,7 @@ const getRecommendedPlanTemplatesMetadata = {
|
|
|
1975
2843
|
function bindExportsTo(luvio) {
|
|
1976
2844
|
// LDS Adapters
|
|
1977
2845
|
const getBotId_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getBotId', getBotIdAdapterFactory), getBotIdMetadata);
|
|
2846
|
+
const getRecommendedActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecommendedActions', getRecommendedActionsAdapterFactory), getRecommendedActionsMetadata);
|
|
1978
2847
|
const getRecommendedPlanTemplates_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecommendedPlanTemplates', getRecommendedPlanTemplatesAdapterFactory), getRecommendedPlanTemplatesMetadata);
|
|
1979
2848
|
function unwrapSnapshotData(factory) {
|
|
1980
2849
|
const adapter = factory(luvio);
|
|
@@ -1982,10 +2851,13 @@ function bindExportsTo(luvio) {
|
|
|
1982
2851
|
}
|
|
1983
2852
|
return {
|
|
1984
2853
|
getBotId: createWireAdapterConstructor(luvio, getBotId_ldsAdapter, getBotIdMetadata),
|
|
2854
|
+
getRecommendedActions: createWireAdapterConstructor(luvio, getRecommendedActions_ldsAdapter, getRecommendedActionsMetadata),
|
|
1985
2855
|
getRecommendedPlanTemplates: createWireAdapterConstructor(luvio, getRecommendedPlanTemplates_ldsAdapter, getRecommendedPlanTemplatesMetadata),
|
|
1986
2856
|
sendMessage: unwrapSnapshotData(sendMessageAdapterFactory),
|
|
2857
|
+
submitFeedback: unwrapSnapshotData(submitFeedbackAdapterFactory),
|
|
1987
2858
|
// Imperative GET Adapters
|
|
1988
2859
|
getBotId_imperative: createImperativeAdapter(luvio, getBotId_ldsAdapter, getBotIdMetadata),
|
|
2860
|
+
getRecommendedActions_imperative: createImperativeAdapter(luvio, getRecommendedActions_ldsAdapter, getRecommendedActionsMetadata),
|
|
1989
2861
|
getRecommendedPlanTemplates_imperative: createImperativeAdapter(luvio, getRecommendedPlanTemplates_ldsAdapter, getRecommendedPlanTemplatesMetadata),
|
|
1990
2862
|
// Notify Update Availables
|
|
1991
2863
|
};
|
|
@@ -1993,12 +2865,15 @@ function bindExportsTo(luvio) {
|
|
|
1993
2865
|
withDefaultLuvio((luvio) => {
|
|
1994
2866
|
({
|
|
1995
2867
|
getBotId,
|
|
2868
|
+
getRecommendedActions,
|
|
1996
2869
|
getRecommendedPlanTemplates,
|
|
1997
2870
|
sendMessage,
|
|
2871
|
+
submitFeedback,
|
|
1998
2872
|
getBotId_imperative,
|
|
2873
|
+
getRecommendedActions_imperative,
|
|
1999
2874
|
getRecommendedPlanTemplates_imperative,
|
|
2000
2875
|
} = bindExportsTo(luvio));
|
|
2001
2876
|
});
|
|
2002
2877
|
|
|
2003
|
-
export { getBotId, getBotId_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, sendMessage };
|
|
2004
|
-
// version: 1.287.0-
|
|
2878
|
+
export { getBotId, getBotId_imperative, getRecommendedActions, getRecommendedActions_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, sendMessage, submitFeedback };
|
|
2879
|
+
// version: 1.287.0-dev11-a463417190
|