@salesforce/lds-adapters-service-einstein-copilot-bot 1.294.0 → 1.296.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/service-einstein-copilot-bot.js +396 -211
- package/dist/es/es2018/types/src/generated/adapters/submitFeedback.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- 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/package.json +3 -3
- package/sfdc/index.js +452 -264
- package/src/raml/api.raml +46 -0
- package/src/raml/luvio.raml +8 -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$3, StoreKeyMap, createResourceParams as createResourceParams$
|
|
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$a(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$d = 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$9(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') {
|
|
@@ -261,18 +261,18 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
261
261
|
return snapshot;
|
|
262
262
|
}
|
|
263
263
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
264
|
-
const key = keyBuilder$
|
|
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/v62.0',
|
|
@@ -286,57 +286,57 @@ function createResourceRequest$3(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
309
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
310
310
|
return null;
|
|
311
311
|
}
|
|
312
312
|
return config;
|
|
313
313
|
}
|
|
314
314
|
function adapterFragment$2(luvio, config) {
|
|
315
|
-
createResourceParams$
|
|
316
|
-
return select$
|
|
315
|
+
createResourceParams$4(config);
|
|
316
|
+
return select$e();
|
|
317
317
|
}
|
|
318
318
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
319
|
-
const snapshot = ingestSuccess$
|
|
319
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
320
320
|
config,
|
|
321
|
-
resolve: () => buildNetworkSnapshot$
|
|
321
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
322
322
|
});
|
|
323
323
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
324
324
|
}
|
|
325
325
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
326
326
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
327
327
|
config,
|
|
328
|
-
resolve: () => buildNetworkSnapshot$
|
|
328
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
329
329
|
});
|
|
330
330
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
331
331
|
}
|
|
332
|
-
function buildNetworkSnapshot$
|
|
333
|
-
const resourceParams = createResourceParams$
|
|
334
|
-
const request = createResourceRequest$
|
|
332
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
333
|
+
const resourceParams = createResourceParams$4(config);
|
|
334
|
+
const request = createResourceRequest$4();
|
|
335
335
|
return luvio.dispatchResourceRequest(request, options)
|
|
336
336
|
.then((response) => {
|
|
337
337
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
338
338
|
const cache = new StoreKeyMap();
|
|
339
|
-
getResponseCacheKeys$
|
|
339
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
340
340
|
return cache;
|
|
341
341
|
});
|
|
342
342
|
}, (response) => {
|
|
@@ -344,23 +344,23 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
347
|
-
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
347
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
348
348
|
}
|
|
349
349
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
350
350
|
const { luvio, config } = context;
|
|
351
351
|
const selector = {
|
|
352
|
-
recordId: keyBuilder$
|
|
352
|
+
recordId: keyBuilder$7(luvio, config),
|
|
353
353
|
node: adapterFragment$2(luvio, config),
|
|
354
354
|
variables: {},
|
|
355
355
|
};
|
|
356
356
|
const cacheSnapshot = storeLookup(selector, {
|
|
357
357
|
config,
|
|
358
|
-
resolve: () => buildNetworkSnapshot$
|
|
358
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
359
359
|
});
|
|
360
360
|
return cacheSnapshot;
|
|
361
361
|
}
|
|
362
362
|
const getBotIdAdapterFactory = (luvio) => function einsteinCopilotBot__getBotId(untrustedConfig, requestContext) {
|
|
363
|
-
const config = validateAdapterConfig$
|
|
363
|
+
const config = validateAdapterConfig$4(untrustedConfig, getBotId_ConfigPropertyNames);
|
|
364
364
|
// Invalid or incomplete config
|
|
365
365
|
if (config === null) {
|
|
366
366
|
return null;
|
|
@@ -369,8 +369,8 @@ const getBotIdAdapterFactory = (luvio) => function einsteinCopilotBot__getBotId(
|
|
|
369
369
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
370
370
|
};
|
|
371
371
|
|
|
372
|
-
const VERSION$
|
|
373
|
-
function validate$
|
|
372
|
+
const VERSION$9 = "3d8b52828ddd11f23f898b0bba8db802";
|
|
373
|
+
function validate$a(obj, path = 'CopilotQuickActionRepresentation') {
|
|
374
374
|
const v_error = (() => {
|
|
375
375
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
376
376
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -492,10 +492,10 @@ function validate$9(obj, path = 'CopilotQuickActionRepresentation') {
|
|
|
492
492
|
})();
|
|
493
493
|
return v_error === undefined ? null : v_error;
|
|
494
494
|
}
|
|
495
|
-
const select$
|
|
495
|
+
const select$d = function CopilotQuickActionRepresentationSelect() {
|
|
496
496
|
return {
|
|
497
497
|
kind: 'Fragment',
|
|
498
|
-
version: VERSION$
|
|
498
|
+
version: VERSION$9,
|
|
499
499
|
private: [],
|
|
500
500
|
selections: [
|
|
501
501
|
{
|
|
@@ -577,7 +577,7 @@ const select$b = function CopilotQuickActionRepresentationSelect() {
|
|
|
577
577
|
]
|
|
578
578
|
};
|
|
579
579
|
};
|
|
580
|
-
function equals$
|
|
580
|
+
function equals$9(existing, incoming) {
|
|
581
581
|
const existing_isGlobal = existing.isGlobal;
|
|
582
582
|
const incoming_isGlobal = incoming.isGlobal;
|
|
583
583
|
// if at least one of these optionals is defined
|
|
@@ -781,9 +781,9 @@ function equals$8(existing, incoming) {
|
|
|
781
781
|
return true;
|
|
782
782
|
}
|
|
783
783
|
|
|
784
|
-
const TTL$
|
|
785
|
-
const VERSION$
|
|
786
|
-
function validate$
|
|
784
|
+
const TTL$4 = 900000;
|
|
785
|
+
const VERSION$8 = "122e61b0db6dc38d244a87570efc5522";
|
|
786
|
+
function validate$9(obj, path = 'RecommendedActionsRepresentation') {
|
|
787
787
|
const v_error = (() => {
|
|
788
788
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
789
789
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -796,7 +796,7 @@ function validate$8(obj, path = 'RecommendedActionsRepresentation') {
|
|
|
796
796
|
for (let i = 0; i < obj_copilotQuickActions.length; i++) {
|
|
797
797
|
const obj_copilotQuickActions_item = obj_copilotQuickActions[i];
|
|
798
798
|
const path_copilotQuickActions_item = path_copilotQuickActions + '[' + i + ']';
|
|
799
|
-
const referencepath_copilotQuickActions_itemValidationError = validate$
|
|
799
|
+
const referencepath_copilotQuickActions_itemValidationError = validate$a(obj_copilotQuickActions_item, path_copilotQuickActions_item);
|
|
800
800
|
if (referencepath_copilotQuickActions_itemValidationError !== null) {
|
|
801
801
|
let message = 'Object doesn\'t match CopilotQuickActionRepresentation (at "' + path_copilotQuickActions_item + '")\n';
|
|
802
802
|
message += referencepath_copilotQuickActions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -818,15 +818,15 @@ function validate$8(obj, path = 'RecommendedActionsRepresentation') {
|
|
|
818
818
|
})();
|
|
819
819
|
return v_error === undefined ? null : v_error;
|
|
820
820
|
}
|
|
821
|
-
const RepresentationType$
|
|
822
|
-
function normalize$
|
|
821
|
+
const RepresentationType$4 = 'RecommendedActionsRepresentation';
|
|
822
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
823
823
|
return input;
|
|
824
824
|
}
|
|
825
|
-
const select$
|
|
826
|
-
const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$
|
|
825
|
+
const select$c = function RecommendedActionsRepresentationSelect() {
|
|
826
|
+
const { selections: CopilotQuickActionRepresentation__selections, opaque: CopilotQuickActionRepresentation__opaque, } = select$d();
|
|
827
827
|
return {
|
|
828
828
|
kind: 'Fragment',
|
|
829
|
-
version: VERSION$
|
|
829
|
+
version: VERSION$8,
|
|
830
830
|
private: [],
|
|
831
831
|
selections: [
|
|
832
832
|
{
|
|
@@ -847,7 +847,7 @@ const select$a = function RecommendedActionsRepresentationSelect() {
|
|
|
847
847
|
]
|
|
848
848
|
};
|
|
849
849
|
};
|
|
850
|
-
function equals$
|
|
850
|
+
function equals$8(existing, incoming) {
|
|
851
851
|
const existing_isSuccess = existing.isSuccess;
|
|
852
852
|
const incoming_isSuccess = incoming.isSuccess;
|
|
853
853
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -869,7 +869,7 @@ function equals$7(existing, incoming) {
|
|
|
869
869
|
const existing_copilotQuickActions = existing.copilotQuickActions;
|
|
870
870
|
const incoming_copilotQuickActions = incoming.copilotQuickActions;
|
|
871
871
|
const equals_copilotQuickActions_items = equalsArray(existing_copilotQuickActions, incoming_copilotQuickActions, (existing_copilotQuickActions_item, incoming_copilotQuickActions_item) => {
|
|
872
|
-
if (!(equals$
|
|
872
|
+
if (!(equals$9(existing_copilotQuickActions_item, incoming_copilotQuickActions_item))) {
|
|
873
873
|
return false;
|
|
874
874
|
}
|
|
875
875
|
});
|
|
@@ -878,44 +878,44 @@ function equals$7(existing, incoming) {
|
|
|
878
878
|
}
|
|
879
879
|
return true;
|
|
880
880
|
}
|
|
881
|
-
const ingest$
|
|
881
|
+
const ingest$4 = function RecommendedActionsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
882
882
|
if (process.env.NODE_ENV !== 'production') {
|
|
883
|
-
const validateError = validate$
|
|
883
|
+
const validateError = validate$9(input);
|
|
884
884
|
if (validateError !== null) {
|
|
885
885
|
throw validateError;
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
888
|
const key = path.fullPath;
|
|
889
|
-
const ttlToUse = TTL$
|
|
890
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
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
891
|
return createLink(key);
|
|
892
892
|
};
|
|
893
|
-
function getTypeCacheKeys$
|
|
893
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
894
894
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
895
895
|
const rootKey = fullPathFactory();
|
|
896
896
|
rootKeySet.set(rootKey, {
|
|
897
897
|
namespace: keyPrefix,
|
|
898
|
-
representationName: RepresentationType$
|
|
898
|
+
representationName: RepresentationType$4,
|
|
899
899
|
mergeable: false
|
|
900
900
|
});
|
|
901
901
|
}
|
|
902
902
|
|
|
903
|
-
function select$
|
|
904
|
-
return select$
|
|
903
|
+
function select$b(luvio, params) {
|
|
904
|
+
return select$c();
|
|
905
905
|
}
|
|
906
|
-
function keyBuilder$
|
|
906
|
+
function keyBuilder$6(luvio, params) {
|
|
907
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
908
|
}
|
|
909
|
-
function getResponseCacheKeys$
|
|
910
|
-
getTypeCacheKeys$
|
|
909
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
910
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
911
911
|
}
|
|
912
|
-
function ingestSuccess$
|
|
912
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
913
913
|
const { body } = response;
|
|
914
|
-
const key = keyBuilder$
|
|
915
|
-
luvio.storeIngest(key, ingest$
|
|
914
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
915
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
916
916
|
const snapshot = luvio.storeLookup({
|
|
917
917
|
recordId: key,
|
|
918
|
-
node: select$
|
|
918
|
+
node: select$b(),
|
|
919
919
|
variables: {},
|
|
920
920
|
}, snapshotRefresh);
|
|
921
921
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -927,18 +927,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
927
927
|
return snapshot;
|
|
928
928
|
}
|
|
929
929
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
930
|
-
const key = keyBuilder$
|
|
930
|
+
const key = keyBuilder$6(luvio, params);
|
|
931
931
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
932
932
|
const storeMetadataParams = {
|
|
933
|
-
ttl: TTL$
|
|
933
|
+
ttl: TTL$4,
|
|
934
934
|
namespace: keyPrefix,
|
|
935
|
-
version: VERSION$
|
|
936
|
-
representationName: RepresentationType$
|
|
935
|
+
version: VERSION$8,
|
|
936
|
+
representationName: RepresentationType$4
|
|
937
937
|
};
|
|
938
938
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
939
939
|
return errorSnapshot;
|
|
940
940
|
}
|
|
941
|
-
function createResourceRequest$
|
|
941
|
+
function createResourceRequest$3(config) {
|
|
942
942
|
const headers = {};
|
|
943
943
|
return {
|
|
944
944
|
baseUri: '/services/data/v62.0',
|
|
@@ -952,7 +952,7 @@ function createResourceRequest$2(config) {
|
|
|
952
952
|
};
|
|
953
953
|
}
|
|
954
954
|
|
|
955
|
-
const adapterName$
|
|
955
|
+
const adapterName$3 = 'getRecommendedActions';
|
|
956
956
|
const getRecommendedActions_ConfigPropertyMetadata = [
|
|
957
957
|
generateParamConfigMetadata('pageName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
958
958
|
generateParamConfigMetadata('pageType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -962,56 +962,56 @@ const getRecommendedActions_ConfigPropertyMetadata = [
|
|
|
962
962
|
generateParamConfigMetadata('sessionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
963
963
|
generateParamConfigMetadata('formFactor', false, 1 /* QueryParameter */, 0 /* String */),
|
|
964
964
|
];
|
|
965
|
-
const getRecommendedActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
966
|
-
const createResourceParams$
|
|
967
|
-
function keyBuilder$
|
|
968
|
-
const resourceParams = createResourceParams$
|
|
969
|
-
return keyBuilder$
|
|
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
970
|
}
|
|
971
|
-
function typeCheckConfig$
|
|
971
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
972
972
|
const config = {};
|
|
973
|
-
typeCheckConfig$
|
|
973
|
+
typeCheckConfig$5(untrustedConfig, config, getRecommendedActions_ConfigPropertyMetadata);
|
|
974
974
|
return config;
|
|
975
975
|
}
|
|
976
|
-
function validateAdapterConfig$
|
|
976
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
977
977
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
978
978
|
return null;
|
|
979
979
|
}
|
|
980
980
|
if (process.env.NODE_ENV !== 'production') {
|
|
981
981
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
982
982
|
}
|
|
983
|
-
const config = typeCheckConfig$
|
|
983
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
984
984
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
985
985
|
return null;
|
|
986
986
|
}
|
|
987
987
|
return config;
|
|
988
988
|
}
|
|
989
989
|
function adapterFragment$1(luvio, config) {
|
|
990
|
-
createResourceParams$
|
|
991
|
-
return select$
|
|
990
|
+
createResourceParams$3(config);
|
|
991
|
+
return select$b();
|
|
992
992
|
}
|
|
993
993
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
994
|
-
const snapshot = ingestSuccess$
|
|
994
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
995
995
|
config,
|
|
996
|
-
resolve: () => buildNetworkSnapshot$
|
|
996
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
997
997
|
});
|
|
998
998
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
999
999
|
}
|
|
1000
1000
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1001
1001
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1002
1002
|
config,
|
|
1003
|
-
resolve: () => buildNetworkSnapshot$
|
|
1003
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1004
1004
|
});
|
|
1005
1005
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1006
1006
|
}
|
|
1007
|
-
function buildNetworkSnapshot$
|
|
1008
|
-
const resourceParams = createResourceParams$
|
|
1009
|
-
const request = createResourceRequest$
|
|
1007
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1008
|
+
const resourceParams = createResourceParams$3(config);
|
|
1009
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1010
1010
|
return luvio.dispatchResourceRequest(request, options)
|
|
1011
1011
|
.then((response) => {
|
|
1012
1012
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1013
1013
|
const cache = new StoreKeyMap();
|
|
1014
|
-
getResponseCacheKeys$
|
|
1014
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1015
1015
|
return cache;
|
|
1016
1016
|
});
|
|
1017
1017
|
}, (response) => {
|
|
@@ -1019,23 +1019,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
1021
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1022
|
-
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1022
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1023
1023
|
}
|
|
1024
1024
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1025
1025
|
const { luvio, config } = context;
|
|
1026
1026
|
const selector = {
|
|
1027
|
-
recordId: keyBuilder$
|
|
1027
|
+
recordId: keyBuilder$5(luvio, config),
|
|
1028
1028
|
node: adapterFragment$1(luvio, config),
|
|
1029
1029
|
variables: {},
|
|
1030
1030
|
};
|
|
1031
1031
|
const cacheSnapshot = storeLookup(selector, {
|
|
1032
1032
|
config,
|
|
1033
|
-
resolve: () => buildNetworkSnapshot$
|
|
1033
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1034
1034
|
});
|
|
1035
1035
|
return cacheSnapshot;
|
|
1036
1036
|
}
|
|
1037
1037
|
const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedActions(untrustedConfig, requestContext) {
|
|
1038
|
-
const config = validateAdapterConfig$
|
|
1038
|
+
const config = validateAdapterConfig$3(untrustedConfig, getRecommendedActions_ConfigPropertyNames);
|
|
1039
1039
|
// Invalid or incomplete config
|
|
1040
1040
|
if (config === null) {
|
|
1041
1041
|
return null;
|
|
@@ -1044,8 +1044,8 @@ const getRecommendedActionsAdapterFactory = (luvio) => function einsteinCopilotB
|
|
|
1044
1044
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1045
1045
|
};
|
|
1046
1046
|
|
|
1047
|
-
const VERSION$
|
|
1048
|
-
function validate$
|
|
1047
|
+
const VERSION$7 = "504437088c2317480c651ac05a7565b5";
|
|
1048
|
+
function validate$8(obj, path = 'PlanTemplateRepresentation') {
|
|
1049
1049
|
const v_error = (() => {
|
|
1050
1050
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1051
1051
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1087,10 +1087,10 @@ function validate$7(obj, path = 'PlanTemplateRepresentation') {
|
|
|
1087
1087
|
})();
|
|
1088
1088
|
return v_error === undefined ? null : v_error;
|
|
1089
1089
|
}
|
|
1090
|
-
const select$
|
|
1090
|
+
const select$a = function PlanTemplateRepresentationSelect() {
|
|
1091
1091
|
return {
|
|
1092
1092
|
kind: 'Fragment',
|
|
1093
|
-
version: VERSION$
|
|
1093
|
+
version: VERSION$7,
|
|
1094
1094
|
private: [],
|
|
1095
1095
|
selections: [
|
|
1096
1096
|
{
|
|
@@ -1117,7 +1117,7 @@ const select$8 = function PlanTemplateRepresentationSelect() {
|
|
|
1117
1117
|
]
|
|
1118
1118
|
};
|
|
1119
1119
|
};
|
|
1120
|
-
function equals$
|
|
1120
|
+
function equals$7(existing, incoming) {
|
|
1121
1121
|
const existing_intent = existing.intent;
|
|
1122
1122
|
const incoming_intent = incoming.intent;
|
|
1123
1123
|
if (!(existing_intent === incoming_intent)) {
|
|
@@ -1151,9 +1151,9 @@ function equals$6(existing, incoming) {
|
|
|
1151
1151
|
return true;
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
|
-
const TTL$
|
|
1155
|
-
const VERSION$
|
|
1156
|
-
function validate$
|
|
1154
|
+
const TTL$3 = 900000;
|
|
1155
|
+
const VERSION$6 = "0503b0c5ce250e7f5fbf16f2d3f2fec4";
|
|
1156
|
+
function validate$7(obj, path = 'RecommendedPlanTemplatesRepresentation') {
|
|
1157
1157
|
const v_error = (() => {
|
|
1158
1158
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1159
1159
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1178,7 +1178,7 @@ function validate$6(obj, path = 'RecommendedPlanTemplatesRepresentation') {
|
|
|
1178
1178
|
for (let i = 0; i < obj_planTemplates.length; i++) {
|
|
1179
1179
|
const obj_planTemplates_item = obj_planTemplates[i];
|
|
1180
1180
|
const path_planTemplates_item = path_planTemplates + '[' + i + ']';
|
|
1181
|
-
const referencepath_planTemplates_itemValidationError = validate$
|
|
1181
|
+
const referencepath_planTemplates_itemValidationError = validate$8(obj_planTemplates_item, path_planTemplates_item);
|
|
1182
1182
|
if (referencepath_planTemplates_itemValidationError !== null) {
|
|
1183
1183
|
let message = 'Object doesn\'t match PlanTemplateRepresentation (at "' + path_planTemplates_item + '")\n';
|
|
1184
1184
|
message += referencepath_planTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1188,15 +1188,15 @@ function validate$6(obj, path = 'RecommendedPlanTemplatesRepresentation') {
|
|
|
1188
1188
|
})();
|
|
1189
1189
|
return v_error === undefined ? null : v_error;
|
|
1190
1190
|
}
|
|
1191
|
-
const RepresentationType$
|
|
1192
|
-
function normalize$
|
|
1191
|
+
const RepresentationType$3 = 'RecommendedPlanTemplatesRepresentation';
|
|
1192
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1193
1193
|
return input;
|
|
1194
1194
|
}
|
|
1195
|
-
const select$
|
|
1196
|
-
const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$
|
|
1195
|
+
const select$9 = function RecommendedPlanTemplatesRepresentationSelect() {
|
|
1196
|
+
const { selections: PlanTemplateRepresentation__selections, opaque: PlanTemplateRepresentation__opaque, } = select$a();
|
|
1197
1197
|
return {
|
|
1198
1198
|
kind: 'Fragment',
|
|
1199
|
-
version: VERSION$
|
|
1199
|
+
version: VERSION$6,
|
|
1200
1200
|
private: [],
|
|
1201
1201
|
selections: [
|
|
1202
1202
|
{
|
|
@@ -1217,7 +1217,7 @@ const select$7 = function RecommendedPlanTemplatesRepresentationSelect() {
|
|
|
1217
1217
|
]
|
|
1218
1218
|
};
|
|
1219
1219
|
};
|
|
1220
|
-
function equals$
|
|
1220
|
+
function equals$6(existing, incoming) {
|
|
1221
1221
|
const existing_isSuccess = existing.isSuccess;
|
|
1222
1222
|
const incoming_isSuccess = incoming.isSuccess;
|
|
1223
1223
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -1239,7 +1239,7 @@ function equals$5(existing, incoming) {
|
|
|
1239
1239
|
const existing_planTemplates = existing.planTemplates;
|
|
1240
1240
|
const incoming_planTemplates = incoming.planTemplates;
|
|
1241
1241
|
const equals_planTemplates_items = equalsArray(existing_planTemplates, incoming_planTemplates, (existing_planTemplates_item, incoming_planTemplates_item) => {
|
|
1242
|
-
if (!(equals$
|
|
1242
|
+
if (!(equals$7(existing_planTemplates_item, incoming_planTemplates_item))) {
|
|
1243
1243
|
return false;
|
|
1244
1244
|
}
|
|
1245
1245
|
});
|
|
@@ -1248,44 +1248,44 @@ function equals$5(existing, incoming) {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
return true;
|
|
1250
1250
|
}
|
|
1251
|
-
const ingest$
|
|
1251
|
+
const ingest$3 = function RecommendedPlanTemplatesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1252
1252
|
if (process.env.NODE_ENV !== 'production') {
|
|
1253
|
-
const validateError = validate$
|
|
1253
|
+
const validateError = validate$7(input);
|
|
1254
1254
|
if (validateError !== null) {
|
|
1255
1255
|
throw validateError;
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
1258
|
const key = path.fullPath;
|
|
1259
|
-
const ttlToUse = TTL$
|
|
1260
|
-
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);
|
|
1261
1261
|
return createLink(key);
|
|
1262
1262
|
};
|
|
1263
|
-
function getTypeCacheKeys$
|
|
1263
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1264
1264
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1265
1265
|
const rootKey = fullPathFactory();
|
|
1266
1266
|
rootKeySet.set(rootKey, {
|
|
1267
1267
|
namespace: keyPrefix,
|
|
1268
|
-
representationName: RepresentationType$
|
|
1268
|
+
representationName: RepresentationType$3,
|
|
1269
1269
|
mergeable: false
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
1272
1272
|
|
|
1273
|
-
function select$
|
|
1274
|
-
return select$
|
|
1273
|
+
function select$8(luvio, params) {
|
|
1274
|
+
return select$9();
|
|
1275
1275
|
}
|
|
1276
|
-
function keyBuilder$
|
|
1276
|
+
function keyBuilder$4(luvio, params) {
|
|
1277
1277
|
return keyPrefix + '::RecommendedPlanTemplatesRepresentation:(' + 'pageType:' + params.urlParams.pageType + ',' + 'objectType:' + params.urlParams.objectType + ')';
|
|
1278
1278
|
}
|
|
1279
|
-
function getResponseCacheKeys$
|
|
1280
|
-
getTypeCacheKeys$
|
|
1279
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1280
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
1281
1281
|
}
|
|
1282
|
-
function ingestSuccess$
|
|
1282
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1283
1283
|
const { body } = response;
|
|
1284
|
-
const key = keyBuilder$
|
|
1285
|
-
luvio.storeIngest(key, ingest$
|
|
1284
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1285
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1286
1286
|
const snapshot = luvio.storeLookup({
|
|
1287
1287
|
recordId: key,
|
|
1288
|
-
node: select$
|
|
1288
|
+
node: select$8(),
|
|
1289
1289
|
variables: {},
|
|
1290
1290
|
}, snapshotRefresh);
|
|
1291
1291
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1297,18 +1297,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1297
1297
|
return snapshot;
|
|
1298
1298
|
}
|
|
1299
1299
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1300
|
-
const key = keyBuilder$
|
|
1300
|
+
const key = keyBuilder$4(luvio, params);
|
|
1301
1301
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1302
1302
|
const storeMetadataParams = {
|
|
1303
|
-
ttl: TTL$
|
|
1303
|
+
ttl: TTL$3,
|
|
1304
1304
|
namespace: keyPrefix,
|
|
1305
|
-
version: VERSION$
|
|
1306
|
-
representationName: RepresentationType$
|
|
1305
|
+
version: VERSION$6,
|
|
1306
|
+
representationName: RepresentationType$3
|
|
1307
1307
|
};
|
|
1308
1308
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1309
1309
|
return errorSnapshot;
|
|
1310
1310
|
}
|
|
1311
|
-
function createResourceRequest$
|
|
1311
|
+
function createResourceRequest$2(config) {
|
|
1312
1312
|
const headers = {};
|
|
1313
1313
|
return {
|
|
1314
1314
|
baseUri: '/services/data/v62.0',
|
|
@@ -1322,61 +1322,61 @@ function createResourceRequest$1(config) {
|
|
|
1322
1322
|
};
|
|
1323
1323
|
}
|
|
1324
1324
|
|
|
1325
|
-
const adapterName$
|
|
1325
|
+
const adapterName$2 = 'getRecommendedPlanTemplates';
|
|
1326
1326
|
const getRecommendedPlanTemplates_ConfigPropertyMetadata = [
|
|
1327
1327
|
generateParamConfigMetadata('pageType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1328
1328
|
generateParamConfigMetadata('objectType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1329
1329
|
];
|
|
1330
|
-
const getRecommendedPlanTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1331
|
-
const createResourceParams$
|
|
1332
|
-
function keyBuilder$
|
|
1333
|
-
const resourceParams = createResourceParams$
|
|
1334
|
-
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);
|
|
1335
1335
|
}
|
|
1336
|
-
function typeCheckConfig$
|
|
1336
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1337
1337
|
const config = {};
|
|
1338
|
-
typeCheckConfig$
|
|
1338
|
+
typeCheckConfig$5(untrustedConfig, config, getRecommendedPlanTemplates_ConfigPropertyMetadata);
|
|
1339
1339
|
return config;
|
|
1340
1340
|
}
|
|
1341
|
-
function validateAdapterConfig$
|
|
1341
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1342
1342
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1343
1343
|
return null;
|
|
1344
1344
|
}
|
|
1345
1345
|
if (process.env.NODE_ENV !== 'production') {
|
|
1346
1346
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1347
1347
|
}
|
|
1348
|
-
const config = typeCheckConfig$
|
|
1348
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1349
1349
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1350
1350
|
return null;
|
|
1351
1351
|
}
|
|
1352
1352
|
return config;
|
|
1353
1353
|
}
|
|
1354
1354
|
function adapterFragment(luvio, config) {
|
|
1355
|
-
createResourceParams$
|
|
1356
|
-
return select$
|
|
1355
|
+
createResourceParams$2(config);
|
|
1356
|
+
return select$8();
|
|
1357
1357
|
}
|
|
1358
1358
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1359
|
-
const snapshot = ingestSuccess$
|
|
1359
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1360
1360
|
config,
|
|
1361
|
-
resolve: () => buildNetworkSnapshot$
|
|
1361
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1362
1362
|
});
|
|
1363
1363
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1364
1364
|
}
|
|
1365
1365
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1366
1366
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1367
1367
|
config,
|
|
1368
|
-
resolve: () => buildNetworkSnapshot$
|
|
1368
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1369
1369
|
});
|
|
1370
1370
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1371
1371
|
}
|
|
1372
|
-
function buildNetworkSnapshot$
|
|
1373
|
-
const resourceParams = createResourceParams$
|
|
1374
|
-
const request = createResourceRequest$
|
|
1372
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1373
|
+
const resourceParams = createResourceParams$2(config);
|
|
1374
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1375
1375
|
return luvio.dispatchResourceRequest(request, options)
|
|
1376
1376
|
.then((response) => {
|
|
1377
1377
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1378
1378
|
const cache = new StoreKeyMap();
|
|
1379
|
-
getResponseCacheKeys$
|
|
1379
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1380
1380
|
return cache;
|
|
1381
1381
|
});
|
|
1382
1382
|
}, (response) => {
|
|
@@ -1384,23 +1384,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1384
1384
|
});
|
|
1385
1385
|
}
|
|
1386
1386
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1387
|
-
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1387
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1388
1388
|
}
|
|
1389
1389
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1390
1390
|
const { luvio, config } = context;
|
|
1391
1391
|
const selector = {
|
|
1392
|
-
recordId: keyBuilder$
|
|
1392
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1393
1393
|
node: adapterFragment(luvio, config),
|
|
1394
1394
|
variables: {},
|
|
1395
1395
|
};
|
|
1396
1396
|
const cacheSnapshot = storeLookup(selector, {
|
|
1397
1397
|
config,
|
|
1398
|
-
resolve: () => buildNetworkSnapshot$
|
|
1398
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1399
1399
|
});
|
|
1400
1400
|
return cacheSnapshot;
|
|
1401
1401
|
}
|
|
1402
1402
|
const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCopilotBot__getRecommendedPlanTemplates(untrustedConfig, requestContext) {
|
|
1403
|
-
const config = validateAdapterConfig$
|
|
1403
|
+
const config = validateAdapterConfig$2(untrustedConfig, getRecommendedPlanTemplates_ConfigPropertyNames);
|
|
1404
1404
|
// Invalid or incomplete config
|
|
1405
1405
|
if (config === null) {
|
|
1406
1406
|
return null;
|
|
@@ -1409,8 +1409,8 @@ const getRecommendedPlanTemplatesAdapterFactory = (luvio) => function einsteinCo
|
|
|
1409
1409
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1410
1410
|
};
|
|
1411
1411
|
|
|
1412
|
-
const VERSION$
|
|
1413
|
-
function validate$
|
|
1412
|
+
const VERSION$5 = "e8cb7e20392935088ea2f98edb927e8a";
|
|
1413
|
+
function validate$6(obj, path = 'EsTypeMessageRepresentation') {
|
|
1414
1414
|
const v_error = (() => {
|
|
1415
1415
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1416
1416
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1456,10 +1456,10 @@ function validate$5(obj, path = 'EsTypeMessageRepresentation') {
|
|
|
1456
1456
|
})();
|
|
1457
1457
|
return v_error === undefined ? null : v_error;
|
|
1458
1458
|
}
|
|
1459
|
-
const select$
|
|
1459
|
+
const select$7 = function EsTypeMessageRepresentationSelect() {
|
|
1460
1460
|
return {
|
|
1461
1461
|
kind: 'Fragment',
|
|
1462
|
-
version: VERSION$
|
|
1462
|
+
version: VERSION$5,
|
|
1463
1463
|
private: [],
|
|
1464
1464
|
selections: [
|
|
1465
1465
|
{
|
|
@@ -1479,7 +1479,7 @@ const select$5 = function EsTypeMessageRepresentationSelect() {
|
|
|
1479
1479
|
]
|
|
1480
1480
|
};
|
|
1481
1481
|
};
|
|
1482
|
-
function equals$
|
|
1482
|
+
function equals$5(existing, incoming) {
|
|
1483
1483
|
const existing_type = existing.type;
|
|
1484
1484
|
const incoming_type = incoming.type;
|
|
1485
1485
|
if (!(existing_type === incoming_type)) {
|
|
@@ -1506,7 +1506,7 @@ function equals$4(existing, incoming) {
|
|
|
1506
1506
|
return true;
|
|
1507
1507
|
}
|
|
1508
1508
|
|
|
1509
|
-
function validate$
|
|
1509
|
+
function validate$5(obj, path = 'VariableRepresentation') {
|
|
1510
1510
|
const v_error = (() => {
|
|
1511
1511
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1512
1512
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1532,8 +1532,8 @@ function validate$4(obj, path = 'VariableRepresentation') {
|
|
|
1532
1532
|
return v_error === undefined ? null : v_error;
|
|
1533
1533
|
}
|
|
1534
1534
|
|
|
1535
|
-
const VERSION$
|
|
1536
|
-
function validate$
|
|
1535
|
+
const VERSION$4 = "4e28b61c3ea362f1c68b28897784111e";
|
|
1536
|
+
function validate$4(obj, path = 'ConversationRuntimeProxyChoiceRepresentation') {
|
|
1537
1537
|
const v_error = (() => {
|
|
1538
1538
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1539
1539
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1551,10 +1551,10 @@ function validate$3(obj, path = 'ConversationRuntimeProxyChoiceRepresentation')
|
|
|
1551
1551
|
})();
|
|
1552
1552
|
return v_error === undefined ? null : v_error;
|
|
1553
1553
|
}
|
|
1554
|
-
const select$
|
|
1554
|
+
const select$6 = function ConversationRuntimeProxyChoiceRepresentationSelect() {
|
|
1555
1555
|
return {
|
|
1556
1556
|
kind: 'Fragment',
|
|
1557
|
-
version: VERSION$
|
|
1557
|
+
version: VERSION$4,
|
|
1558
1558
|
private: [],
|
|
1559
1559
|
selections: [
|
|
1560
1560
|
{
|
|
@@ -1568,7 +1568,7 @@ const select$4 = function ConversationRuntimeProxyChoiceRepresentationSelect() {
|
|
|
1568
1568
|
]
|
|
1569
1569
|
};
|
|
1570
1570
|
};
|
|
1571
|
-
function equals$
|
|
1571
|
+
function equals$4(existing, incoming) {
|
|
1572
1572
|
const existing_alias = existing.alias;
|
|
1573
1573
|
const incoming_alias = incoming.alias;
|
|
1574
1574
|
if (!(existing_alias === incoming_alias)) {
|
|
@@ -1582,8 +1582,8 @@ function equals$3(existing, incoming) {
|
|
|
1582
1582
|
return true;
|
|
1583
1583
|
}
|
|
1584
1584
|
|
|
1585
|
-
const VERSION$
|
|
1586
|
-
function validate$
|
|
1585
|
+
const VERSION$3 = "477724425d0742c030025796c88ebf5d";
|
|
1586
|
+
function validate$3(obj, path = 'CollectMessageRepresentation') {
|
|
1587
1587
|
const v_error = (() => {
|
|
1588
1588
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1589
1589
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1591,7 +1591,7 @@ function validate$2(obj, path = 'CollectMessageRepresentation') {
|
|
|
1591
1591
|
if (obj.data !== undefined) {
|
|
1592
1592
|
const obj_data = obj.data;
|
|
1593
1593
|
const path_data = path + '.data';
|
|
1594
|
-
const referencepath_dataValidationError = validate$
|
|
1594
|
+
const referencepath_dataValidationError = validate$6(obj_data, path_data);
|
|
1595
1595
|
if (referencepath_dataValidationError !== null) {
|
|
1596
1596
|
let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_data + '")\n';
|
|
1597
1597
|
message += referencepath_dataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1634,11 +1634,11 @@ function validate$2(obj, path = 'CollectMessageRepresentation') {
|
|
|
1634
1634
|
})();
|
|
1635
1635
|
return v_error === undefined ? null : v_error;
|
|
1636
1636
|
}
|
|
1637
|
-
const select$
|
|
1638
|
-
const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$
|
|
1637
|
+
const select$5 = function CollectMessageRepresentationSelect() {
|
|
1638
|
+
const { selections: EsTypeMessageRepresentation__selections, opaque: EsTypeMessageRepresentation__opaque, } = select$7();
|
|
1639
1639
|
return {
|
|
1640
1640
|
kind: 'Fragment',
|
|
1641
|
-
version: VERSION$
|
|
1641
|
+
version: VERSION$3,
|
|
1642
1642
|
private: [],
|
|
1643
1643
|
selections: [
|
|
1644
1644
|
{
|
|
@@ -1659,7 +1659,7 @@ const select$3 = function CollectMessageRepresentationSelect() {
|
|
|
1659
1659
|
]
|
|
1660
1660
|
};
|
|
1661
1661
|
};
|
|
1662
|
-
function equals$
|
|
1662
|
+
function equals$3(existing, incoming) {
|
|
1663
1663
|
const existing_targetType = existing.targetType;
|
|
1664
1664
|
const incoming_targetType = incoming.targetType;
|
|
1665
1665
|
if (!(existing_targetType === incoming_targetType)) {
|
|
@@ -1674,7 +1674,7 @@ function equals$2(existing, incoming) {
|
|
|
1674
1674
|
if (existing_data === undefined || incoming_data === undefined) {
|
|
1675
1675
|
return false;
|
|
1676
1676
|
}
|
|
1677
|
-
if (!(equals$
|
|
1677
|
+
if (!(equals$5(existing_data, incoming_data))) {
|
|
1678
1678
|
return false;
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
@@ -1694,9 +1694,9 @@ function equals$2(existing, incoming) {
|
|
|
1694
1694
|
return true;
|
|
1695
1695
|
}
|
|
1696
1696
|
|
|
1697
|
-
const TTL$
|
|
1698
|
-
const VERSION$
|
|
1699
|
-
function validate$
|
|
1697
|
+
const TTL$2 = 30000;
|
|
1698
|
+
const VERSION$2 = "55ac02bd055f57a2a12aa0fa4844d1a2";
|
|
1699
|
+
function validate$2(obj, path = 'ConversationRuntimeProxyMessageRepresentation') {
|
|
1700
1700
|
const v_error = (() => {
|
|
1701
1701
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1702
1702
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1710,7 +1710,7 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1710
1710
|
for (let i = 0; i < obj_choices.length; i++) {
|
|
1711
1711
|
const obj_choices_item = obj_choices[i];
|
|
1712
1712
|
const path_choices_item = path_choices + '[' + i + ']';
|
|
1713
|
-
const referencepath_choices_itemValidationError = validate$
|
|
1713
|
+
const referencepath_choices_itemValidationError = validate$4(obj_choices_item, path_choices_item);
|
|
1714
1714
|
if (referencepath_choices_itemValidationError !== null) {
|
|
1715
1715
|
let message = 'Object doesn\'t match ConversationRuntimeProxyChoiceRepresentation (at "' + path_choices_item + '")\n';
|
|
1716
1716
|
message += referencepath_choices_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1727,7 +1727,7 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1727
1727
|
for (let i = 0; i < obj_collect.length; i++) {
|
|
1728
1728
|
const obj_collect_item = obj_collect[i];
|
|
1729
1729
|
const path_collect_item = path_collect + '[' + i + ']';
|
|
1730
|
-
const referencepath_collect_itemValidationError = validate$
|
|
1730
|
+
const referencepath_collect_itemValidationError = validate$3(obj_collect_item, path_collect_item);
|
|
1731
1731
|
if (referencepath_collect_itemValidationError !== null) {
|
|
1732
1732
|
let message = 'Object doesn\'t match CollectMessageRepresentation (at "' + path_collect_item + '")\n';
|
|
1733
1733
|
message += referencepath_collect_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1744,7 +1744,7 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1744
1744
|
for (let i = 0; i < obj_confirm.length; i++) {
|
|
1745
1745
|
const obj_confirm_item = obj_confirm[i];
|
|
1746
1746
|
const path_confirm_item = path_confirm + '[' + i + ']';
|
|
1747
|
-
const referencepath_confirm_itemValidationError = validate$
|
|
1747
|
+
const referencepath_confirm_itemValidationError = validate$6(obj_confirm_item, path_confirm_item);
|
|
1748
1748
|
if (referencepath_confirm_itemValidationError !== null) {
|
|
1749
1749
|
let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_confirm_item + '")\n';
|
|
1750
1750
|
message += referencepath_confirm_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1920,7 +1920,7 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1920
1920
|
for (let i = 0; i < obj_result.length; i++) {
|
|
1921
1921
|
const obj_result_item = obj_result[i];
|
|
1922
1922
|
const path_result_item = path_result + '[' + i + ']';
|
|
1923
|
-
const referencepath_result_itemValidationError = validate$
|
|
1923
|
+
const referencepath_result_itemValidationError = validate$6(obj_result_item, path_result_item);
|
|
1924
1924
|
if (referencepath_result_itemValidationError !== null) {
|
|
1925
1925
|
let message = 'Object doesn\'t match EsTypeMessageRepresentation (at "' + path_result_item + '")\n';
|
|
1926
1926
|
message += referencepath_result_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1994,26 +1994,26 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
|
|
|
1994
1994
|
})();
|
|
1995
1995
|
return v_error === undefined ? null : v_error;
|
|
1996
1996
|
}
|
|
1997
|
-
const RepresentationType$
|
|
1998
|
-
function keyBuilder$
|
|
1999
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1997
|
+
const RepresentationType$2 = 'ConversationRuntimeProxyMessageRepresentation';
|
|
1998
|
+
function keyBuilder$2(luvio, config) {
|
|
1999
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
2000
2000
|
}
|
|
2001
|
-
function keyBuilderFromType$
|
|
2001
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
2002
2002
|
const keyParams = {
|
|
2003
2003
|
id: object.id
|
|
2004
2004
|
};
|
|
2005
|
-
return keyBuilder$
|
|
2005
|
+
return keyBuilder$2(luvio, keyParams);
|
|
2006
2006
|
}
|
|
2007
|
-
function normalize$
|
|
2007
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
2008
2008
|
return input;
|
|
2009
2009
|
}
|
|
2010
|
-
const select$
|
|
2011
|
-
const { selections: ConversationRuntimeProxyChoiceRepresentation__selections, opaque: ConversationRuntimeProxyChoiceRepresentation__opaque, } = select$
|
|
2012
|
-
const { selections: CollectMessageRepresentation__selections, opaque: CollectMessageRepresentation__opaque, } = select$
|
|
2013
|
-
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();
|
|
2014
2014
|
return {
|
|
2015
2015
|
kind: 'Fragment',
|
|
2016
|
-
version: VERSION$
|
|
2016
|
+
version: VERSION$2,
|
|
2017
2017
|
private: [],
|
|
2018
2018
|
selections: [
|
|
2019
2019
|
{
|
|
@@ -2097,7 +2097,7 @@ const select$2 = function ConversationRuntimeProxyMessageRepresentationSelect()
|
|
|
2097
2097
|
]
|
|
2098
2098
|
};
|
|
2099
2099
|
};
|
|
2100
|
-
function equals$
|
|
2100
|
+
function equals$2(existing, incoming) {
|
|
2101
2101
|
const existing_id = existing.id;
|
|
2102
2102
|
const incoming_id = incoming.id;
|
|
2103
2103
|
if (!(existing_id === incoming_id)) {
|
|
@@ -2126,7 +2126,7 @@ function equals$1(existing, incoming) {
|
|
|
2126
2126
|
return false;
|
|
2127
2127
|
}
|
|
2128
2128
|
const equals_choices_items = equalsArray(existing_choices, incoming_choices, (existing_choices_item, incoming_choices_item) => {
|
|
2129
|
-
if (!(equals$
|
|
2129
|
+
if (!(equals$4(existing_choices_item, incoming_choices_item))) {
|
|
2130
2130
|
return false;
|
|
2131
2131
|
}
|
|
2132
2132
|
});
|
|
@@ -2144,7 +2144,7 @@ function equals$1(existing, incoming) {
|
|
|
2144
2144
|
return false;
|
|
2145
2145
|
}
|
|
2146
2146
|
const equals_collect_items = equalsArray(existing_collect, incoming_collect, (existing_collect_item, incoming_collect_item) => {
|
|
2147
|
-
if (!(equals$
|
|
2147
|
+
if (!(equals$3(existing_collect_item, incoming_collect_item))) {
|
|
2148
2148
|
return false;
|
|
2149
2149
|
}
|
|
2150
2150
|
});
|
|
@@ -2162,7 +2162,7 @@ function equals$1(existing, incoming) {
|
|
|
2162
2162
|
return false;
|
|
2163
2163
|
}
|
|
2164
2164
|
const equals_confirm_items = equalsArray(existing_confirm, incoming_confirm, (existing_confirm_item, incoming_confirm_item) => {
|
|
2165
|
-
if (!(equals$
|
|
2165
|
+
if (!(equals$5(existing_confirm_item, incoming_confirm_item))) {
|
|
2166
2166
|
return false;
|
|
2167
2167
|
}
|
|
2168
2168
|
});
|
|
@@ -2263,7 +2263,7 @@ function equals$1(existing, incoming) {
|
|
|
2263
2263
|
return false;
|
|
2264
2264
|
}
|
|
2265
2265
|
const equals_result_items = equalsArray(existing_result, incoming_result, (existing_result_item, incoming_result_item) => {
|
|
2266
|
-
if (!(equals$
|
|
2266
|
+
if (!(equals$5(existing_result_item, incoming_result_item))) {
|
|
2267
2267
|
return false;
|
|
2268
2268
|
}
|
|
2269
2269
|
});
|
|
@@ -2299,31 +2299,31 @@ function equals$1(existing, incoming) {
|
|
|
2299
2299
|
}
|
|
2300
2300
|
return true;
|
|
2301
2301
|
}
|
|
2302
|
-
const ingest$
|
|
2302
|
+
const ingest$2 = function ConversationRuntimeProxyMessageRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2303
2303
|
if (process.env.NODE_ENV !== 'production') {
|
|
2304
|
-
const validateError = validate$
|
|
2304
|
+
const validateError = validate$2(input);
|
|
2305
2305
|
if (validateError !== null) {
|
|
2306
2306
|
throw validateError;
|
|
2307
2307
|
}
|
|
2308
2308
|
}
|
|
2309
|
-
const key = keyBuilderFromType$
|
|
2310
|
-
const ttlToUse = TTL$
|
|
2311
|
-
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);
|
|
2312
2312
|
return createLink(key);
|
|
2313
2313
|
};
|
|
2314
|
-
function getTypeCacheKeys$
|
|
2314
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
2315
2315
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2316
|
-
const rootKey = keyBuilderFromType$
|
|
2316
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
2317
2317
|
rootKeySet.set(rootKey, {
|
|
2318
2318
|
namespace: keyPrefix,
|
|
2319
|
-
representationName: RepresentationType$
|
|
2319
|
+
representationName: RepresentationType$2,
|
|
2320
2320
|
mergeable: false
|
|
2321
2321
|
});
|
|
2322
2322
|
}
|
|
2323
2323
|
|
|
2324
|
-
const TTL = 30000;
|
|
2325
|
-
const VERSION = "fe7024fb1132250f97d9616482f09f99";
|
|
2326
|
-
function validate(obj, path = 'ConversationRuntimeProxyRepresentation') {
|
|
2324
|
+
const TTL$1 = 30000;
|
|
2325
|
+
const VERSION$1 = "fe7024fb1132250f97d9616482f09f99";
|
|
2326
|
+
function validate$1(obj, path = 'ConversationRuntimeProxyRepresentation') {
|
|
2327
2327
|
const v_error = (() => {
|
|
2328
2328
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2329
2329
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2375,23 +2375,23 @@ function validate(obj, path = 'ConversationRuntimeProxyRepresentation') {
|
|
|
2375
2375
|
})();
|
|
2376
2376
|
return v_error === undefined ? null : v_error;
|
|
2377
2377
|
}
|
|
2378
|
-
const RepresentationType = 'ConversationRuntimeProxyRepresentation';
|
|
2379
|
-
function keyBuilder(luvio, config) {
|
|
2380
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
2378
|
+
const RepresentationType$1 = 'ConversationRuntimeProxyRepresentation';
|
|
2379
|
+
function keyBuilder$1(luvio, config) {
|
|
2380
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
2381
2381
|
}
|
|
2382
|
-
function keyBuilderFromType(luvio, object) {
|
|
2382
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
2383
2383
|
const keyParams = {
|
|
2384
2384
|
id: object.requestId
|
|
2385
2385
|
};
|
|
2386
|
-
return keyBuilder(luvio, keyParams);
|
|
2386
|
+
return keyBuilder$1(luvio, keyParams);
|
|
2387
2387
|
}
|
|
2388
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
2388
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2389
2389
|
const input_messages = input.messages;
|
|
2390
2390
|
const input_messages_id = path.fullPath + '__messages';
|
|
2391
2391
|
for (let i = 0; i < input_messages.length; i++) {
|
|
2392
2392
|
const input_messages_item = input_messages[i];
|
|
2393
2393
|
let input_messages_item_id = input_messages_id + '__' + i;
|
|
2394
|
-
input_messages[i] = ingest$
|
|
2394
|
+
input_messages[i] = ingest$2(input_messages_item, {
|
|
2395
2395
|
fullPath: input_messages_item_id,
|
|
2396
2396
|
propertyName: i,
|
|
2397
2397
|
parent: {
|
|
@@ -2404,10 +2404,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
2404
2404
|
}
|
|
2405
2405
|
return input;
|
|
2406
2406
|
}
|
|
2407
|
-
const select$
|
|
2407
|
+
const select$3 = function ConversationRuntimeProxyRepresentationSelect() {
|
|
2408
2408
|
return {
|
|
2409
2409
|
kind: 'Fragment',
|
|
2410
|
-
version: VERSION,
|
|
2410
|
+
version: VERSION$1,
|
|
2411
2411
|
private: [],
|
|
2412
2412
|
selections: [
|
|
2413
2413
|
{
|
|
@@ -2422,7 +2422,7 @@ const select$1 = function ConversationRuntimeProxyRepresentationSelect() {
|
|
|
2422
2422
|
name: 'messages',
|
|
2423
2423
|
kind: 'Link',
|
|
2424
2424
|
plural: true,
|
|
2425
|
-
fragment: select$
|
|
2425
|
+
fragment: select$4()
|
|
2426
2426
|
},
|
|
2427
2427
|
{
|
|
2428
2428
|
name: 'processedSequenceIds',
|
|
@@ -2440,7 +2440,7 @@ const select$1 = function ConversationRuntimeProxyRepresentationSelect() {
|
|
|
2440
2440
|
]
|
|
2441
2441
|
};
|
|
2442
2442
|
};
|
|
2443
|
-
function equals(existing, incoming) {
|
|
2443
|
+
function equals$1(existing, incoming) {
|
|
2444
2444
|
const existing_botId = existing.botId;
|
|
2445
2445
|
const incoming_botId = incoming.botId;
|
|
2446
2446
|
if (!(existing_botId === incoming_botId)) {
|
|
@@ -2483,45 +2483,45 @@ function equals(existing, incoming) {
|
|
|
2483
2483
|
}
|
|
2484
2484
|
return true;
|
|
2485
2485
|
}
|
|
2486
|
-
const ingest = function ConversationRuntimeProxyRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2486
|
+
const ingest$1 = function ConversationRuntimeProxyRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2487
2487
|
if (process.env.NODE_ENV !== 'production') {
|
|
2488
|
-
const validateError = validate(input);
|
|
2488
|
+
const validateError = validate$1(input);
|
|
2489
2489
|
if (validateError !== null) {
|
|
2490
2490
|
throw validateError;
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
|
-
const key = keyBuilderFromType(luvio, input);
|
|
2494
|
-
const ttlToUse = TTL;
|
|
2495
|
-
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);
|
|
2496
2496
|
return createLink(key);
|
|
2497
2497
|
};
|
|
2498
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
2498
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
2499
2499
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2500
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
2500
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
2501
2501
|
rootKeySet.set(rootKey, {
|
|
2502
2502
|
namespace: keyPrefix,
|
|
2503
|
-
representationName: RepresentationType,
|
|
2503
|
+
representationName: RepresentationType$1,
|
|
2504
2504
|
mergeable: false
|
|
2505
2505
|
});
|
|
2506
2506
|
const input_messages_length = input.messages.length;
|
|
2507
2507
|
for (let i = 0; i < input_messages_length; i++) {
|
|
2508
|
-
getTypeCacheKeys$
|
|
2508
|
+
getTypeCacheKeys$2(rootKeySet, luvio, input.messages[i]);
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
2511
|
|
|
2512
|
-
function select(luvio, params) {
|
|
2513
|
-
return select$
|
|
2512
|
+
function select$2(luvio, params) {
|
|
2513
|
+
return select$3();
|
|
2514
2514
|
}
|
|
2515
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
2516
|
-
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
2515
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
2516
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
2517
2517
|
}
|
|
2518
|
-
function ingestSuccess(luvio, resourceParams, response) {
|
|
2518
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
2519
2519
|
const { body } = response;
|
|
2520
|
-
const key = keyBuilderFromType(luvio, body);
|
|
2521
|
-
luvio.storeIngest(key, ingest, body);
|
|
2520
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
2521
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
2522
2522
|
const snapshot = luvio.storeLookup({
|
|
2523
2523
|
recordId: key,
|
|
2524
|
-
node: select(),
|
|
2524
|
+
node: select$2(),
|
|
2525
2525
|
variables: {},
|
|
2526
2526
|
});
|
|
2527
2527
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2532,7 +2532,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
2532
2532
|
deepFreeze(snapshot.data);
|
|
2533
2533
|
return snapshot;
|
|
2534
2534
|
}
|
|
2535
|
-
function createResourceRequest(config) {
|
|
2535
|
+
function createResourceRequest$1(config) {
|
|
2536
2536
|
const headers = {};
|
|
2537
2537
|
return {
|
|
2538
2538
|
baseUri: '/services/data/v62.0',
|
|
@@ -2546,7 +2546,7 @@ function createResourceRequest(config) {
|
|
|
2546
2546
|
};
|
|
2547
2547
|
}
|
|
2548
2548
|
|
|
2549
|
-
const adapterName = 'sendMessage';
|
|
2549
|
+
const adapterName$1 = 'sendMessage';
|
|
2550
2550
|
const sendMessage_ConfigPropertyMetadata = [
|
|
2551
2551
|
generateParamConfigMetadata('botId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2552
2552
|
generateParamConfigMetadata('botVersionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -2563,11 +2563,11 @@ const sendMessage_ConfigPropertyMetadata = [
|
|
|
2563
2563
|
generateParamConfigMetadata('variables', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
2564
2564
|
generateParamConfigMetadata('userUtterance', false, 2 /* Body */, 0 /* String */),
|
|
2565
2565
|
];
|
|
2566
|
-
const sendMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, sendMessage_ConfigPropertyMetadata);
|
|
2567
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
2568
|
-
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) {
|
|
2569
2569
|
const config = {};
|
|
2570
|
-
typeCheckConfig$
|
|
2570
|
+
typeCheckConfig$5(untrustedConfig, config, sendMessage_ConfigPropertyMetadata);
|
|
2571
2571
|
const untrustedConfig_planTemplateVariables = untrustedConfig.planTemplateVariables;
|
|
2572
2572
|
config.planTemplateVariables = untrustedConfig_planTemplateVariables;
|
|
2573
2573
|
const untrustedConfig_reply = untrustedConfig.reply;
|
|
@@ -2575,7 +2575,7 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
2575
2575
|
const untrustedConfig_reply_array = [];
|
|
2576
2576
|
for (let i = 0, arrayLength = untrustedConfig_reply.length; i < arrayLength; i++) {
|
|
2577
2577
|
const untrustedConfig_reply_item = untrustedConfig_reply[i];
|
|
2578
|
-
const referenceEsTypeMessageRepresentationValidationError = validate$
|
|
2578
|
+
const referenceEsTypeMessageRepresentationValidationError = validate$6(untrustedConfig_reply_item);
|
|
2579
2579
|
if (referenceEsTypeMessageRepresentationValidationError === null) {
|
|
2580
2580
|
untrustedConfig_reply_array.push(untrustedConfig_reply_item);
|
|
2581
2581
|
}
|
|
@@ -2587,7 +2587,7 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
2587
2587
|
const untrustedConfig_variables_array = [];
|
|
2588
2588
|
for (let i = 0, arrayLength = untrustedConfig_variables.length; i < arrayLength; i++) {
|
|
2589
2589
|
const untrustedConfig_variables_item = untrustedConfig_variables[i];
|
|
2590
|
-
const referenceVariableRepresentationValidationError = validate$
|
|
2590
|
+
const referenceVariableRepresentationValidationError = validate$5(untrustedConfig_variables_item);
|
|
2591
2591
|
if (referenceVariableRepresentationValidationError === null) {
|
|
2592
2592
|
untrustedConfig_variables_array.push(untrustedConfig_variables_item);
|
|
2593
2593
|
}
|
|
@@ -2596,6 +2596,191 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
2596
2596
|
}
|
|
2597
2597
|
return config;
|
|
2598
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/v62.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 (untrustedIsObject(untrustedConfig_details_prop)) {
|
|
2770
|
+
const untrustedConfig_details_prop_object = {};
|
|
2771
|
+
if (untrustedConfig_details_prop_object !== undefined && Object.keys(untrustedConfig_details_prop_object).length >= 0) {
|
|
2772
|
+
if (untrustedConfig_details_object !== undefined) {
|
|
2773
|
+
untrustedConfig_details_object[key] = untrustedConfig_details_prop_object;
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
if (untrustedConfig_details_object !== undefined && Object.keys(untrustedConfig_details_object).length >= 0) {
|
|
2779
|
+
config.details = untrustedConfig_details_object;
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
return config;
|
|
2783
|
+
}
|
|
2599
2784
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
2600
2785
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2601
2786
|
return null;
|
|
@@ -2627,12 +2812,12 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
2627
2812
|
throw response;
|
|
2628
2813
|
});
|
|
2629
2814
|
}
|
|
2630
|
-
const
|
|
2631
|
-
return function
|
|
2632
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
2815
|
+
const submitFeedbackAdapterFactory = (luvio) => {
|
|
2816
|
+
return function submitFeedback(untrustedConfig) {
|
|
2817
|
+
const config = validateAdapterConfig(untrustedConfig, submitFeedback_ConfigPropertyNames);
|
|
2633
2818
|
// Invalid or incomplete config
|
|
2634
2819
|
if (config === null) {
|
|
2635
|
-
throw new Error('Invalid config for "
|
|
2820
|
+
throw new Error('Invalid config for "submitFeedback"');
|
|
2636
2821
|
}
|
|
2637
2822
|
return buildNetworkSnapshot(luvio, config);
|
|
2638
2823
|
};
|
|
@@ -2642,6 +2827,7 @@ let getBotId;
|
|
|
2642
2827
|
let getRecommendedActions;
|
|
2643
2828
|
let getRecommendedPlanTemplates;
|
|
2644
2829
|
let sendMessage;
|
|
2830
|
+
let submitFeedback;
|
|
2645
2831
|
// Imperative GET Adapters
|
|
2646
2832
|
let getBotId_imperative;
|
|
2647
2833
|
let getRecommendedActions_imperative;
|
|
@@ -2673,6 +2859,7 @@ function bindExportsTo(luvio) {
|
|
|
2673
2859
|
getRecommendedActions: createWireAdapterConstructor(luvio, getRecommendedActions_ldsAdapter, getRecommendedActionsMetadata),
|
|
2674
2860
|
getRecommendedPlanTemplates: createWireAdapterConstructor(luvio, getRecommendedPlanTemplates_ldsAdapter, getRecommendedPlanTemplatesMetadata),
|
|
2675
2861
|
sendMessage: unwrapSnapshotData(sendMessageAdapterFactory),
|
|
2862
|
+
submitFeedback: unwrapSnapshotData(submitFeedbackAdapterFactory),
|
|
2676
2863
|
// Imperative GET Adapters
|
|
2677
2864
|
getBotId_imperative: createImperativeAdapter(luvio, getBotId_ldsAdapter, getBotIdMetadata),
|
|
2678
2865
|
getRecommendedActions_imperative: createImperativeAdapter(luvio, getRecommendedActions_ldsAdapter, getRecommendedActionsMetadata),
|
|
@@ -2686,11 +2873,12 @@ withDefaultLuvio((luvio) => {
|
|
|
2686
2873
|
getRecommendedActions,
|
|
2687
2874
|
getRecommendedPlanTemplates,
|
|
2688
2875
|
sendMessage,
|
|
2876
|
+
submitFeedback,
|
|
2689
2877
|
getBotId_imperative,
|
|
2690
2878
|
getRecommendedActions_imperative,
|
|
2691
2879
|
getRecommendedPlanTemplates_imperative,
|
|
2692
2880
|
} = bindExportsTo(luvio));
|
|
2693
2881
|
});
|
|
2694
2882
|
|
|
2695
|
-
export { getBotId, getBotId_imperative, getRecommendedActions, getRecommendedActions_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, sendMessage };
|
|
2696
|
-
// version: 1.
|
|
2883
|
+
export { getBotId, getBotId_imperative, getRecommendedActions, getRecommendedActions_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, sendMessage, submitFeedback };
|
|
2884
|
+
// version: 1.296.0-b5e933418
|