@salesforce/lds-runtime-aura 1.401.0 → 1.402.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.
@@ -26,21 +26,22 @@ import { GetApexWireAdapterFactory, registerPrefetcher as registerPrefetcher$1 }
26
26
  import { instrument, getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfosAdapterFactory, coerceObjectIdArray, getObjectInfoAdapterFactory, coerceObjectId, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoAdapterFactory, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getListInfoByNameAdapterFactory, getListInfosByObjectNameAdapterFactory, getListRecordsByNameAdapterFactory, getListObjectInfoAdapterFactory, getRelatedListsInfoAdapterFactory, getRelatedListActionsAdapterFactory, getRecordId18Array, buildRecordRepKeyFromId, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher, RecordRepresentationVersion } from 'force/ldsAdaptersUiapi';
27
27
  import { getInstrumentation } from 'o11y/client';
28
28
  import { findExecutableOperation, buildGraphQLInputExtension, addTypenameToDocument } from 'force/luvioGraphqlNormalization';
29
- import { print } from 'force/luvioOnestoreGraphqlParser';
29
+ import { print, wrapConfigAndVerify, resolveAst, validateGraphQLOperations } from 'force/luvioOnestoreGraphqlParser';
30
30
  import { setServices } from 'force/luvioServiceProvisioner1';
31
+ import { assertIsValid, MissingRequiredPropertyError, JsonSchemaViolationError } from 'force/luvioJsonschemaValidate5';
31
32
  import { dispatchGlobalEvent, unstable_loadComponentDefs, executeGlobalControllerRawResponse } from 'aura';
32
33
  import auraNetworkAdapter, { dispatchAuraAction, defaultActionConfig, instrument as instrument$1, forceRecordTransactionsDisabled as forceRecordTransactionsDisabled$1, ldsNetworkAdapterInstrument, CrudEventState, CrudEventType, UIAPI_RECORDS_PATH, UIAPI_RELATED_LIST_RECORDS_BATCH_PATH, UIAPI_RELATED_LIST_RECORDS_PATH } from 'force/ldsNetwork';
33
- import { pageScopedCache } from 'instrumentation/utility';
34
- import { instrument as instrument$2, generateRequestId, setupLexNetworkAdapter, internalRequestTracker } from 'force/ldsNetworkFetch';
35
34
  import { ThirdPartyTracker } from 'instrumentation:thirdPartyTracker';
35
+ import { markStart, markEnd, counter, registerCacheStats, perfStart, perfEnd, registerPeriodicLogger, interaction, timer } from 'instrumentation/service';
36
+ import { pageScopedCache } from 'instrumentation/utility';
37
+ import { instrument as instrument$2, generateRequestId as generateRequestId$1, setupLexNetworkAdapter, internalRequestTracker } from 'force/ldsNetworkFetch';
36
38
  import { REFRESH_ADAPTER_EVENT, ADAPTER_UNFULFILLED_ERROR, instrument as instrument$3 } from 'force/ldsBindings';
37
- import { counter, registerCacheStats, perfStart, perfEnd, registerPeriodicLogger, interaction, timer } from 'instrumentation/service';
38
- import { LRUCache, instrumentAdapter, instrumentLuvio, setupInstrumentation as setupInstrumentation$1, logObjectInfoChanged as logObjectInfoChanged$1, updatePercentileHistogramMetric, incrementCounterMetric, incrementGetRecordNotifyChangeAllowCount, incrementGetRecordNotifyChangeDropCount, incrementNotifyRecordUpdateAvailableAllowCount, incrementNotifyRecordUpdateAvailableDropCount, setLdsAdaptersUiapiInstrumentation, logError, setLdsNetworkAdapterInstrumentation, incrementStateCreatedCount, executeAsyncActivity, METRIC_KEYS, onIdleDetected } from 'force/ldsInstrumentation';
39
+ import { LRUCache, instrumentAdapter, instrumentLuvio, setupInstrumentation as setupInstrumentation$1, logObjectInfoChanged as logObjectInfoChanged$1, updatePercentileHistogramMetric, incrementCounterMetric, incrementGetRecordNotifyChangeAllowCount, incrementGetRecordNotifyChangeDropCount, incrementNotifyRecordUpdateAvailableAllowCount, incrementNotifyRecordUpdateAvailableDropCount, setLdsAdaptersUiapiInstrumentation, logError as logError$2, setLdsNetworkAdapterInstrumentation, incrementStateCreatedCount, executeAsyncActivity, METRIC_KEYS, onIdleDetected } from 'force/ldsInstrumentation';
39
40
  import { instrument as instrument$4 } from 'force/adsBridge';
40
41
  import { instrument as instrument$5 } from '@lwc/state';
41
42
  import { withRegistration, register, setDefaultLuvio } from 'force/ldsEngine';
42
- import useHotspotLimit from '@salesforce/gate/lds.pdl.useHotspotLimit';
43
43
  import { createStorage, clearStorages } from 'force/ldsStorage';
44
+ import useHotspotLimit from '@salesforce/gate/lds.pdl.useHotspotLimit';
44
45
  import useHttpUiapiOneApp from '@salesforce/gate/lds.useHttpUiapiOneApp';
45
46
  import useHttpUiapiOneRuntime from '@salesforce/gate/lds.useHttpUiapiOneRuntime';
46
47
 
@@ -52,14 +53,15 @@ import useHttpUiapiOneRuntime from '@salesforce/gate/lds.useHttpUiapiOneRuntime'
52
53
  const { create: create$1, freeze, keys: keys$2, entries: entries$1 } = Object;
53
54
  const { isArray: isArray$3 } = Array;
54
55
  const { stringify: stringify$3, parse: parse$2 } = JSON;
55
- const LogLevelMap$1 = {
56
+ const WeakSetConstructor = WeakSet;
57
+ const LogLevelMap = {
56
58
  TRACE: 4,
57
59
  DEBUG: 3,
58
60
  INFO: 2,
59
61
  WARN: 1,
60
62
  ERROR: 0
61
63
  };
62
- let ConsoleLogger$1 = class ConsoleLogger {
64
+ class ConsoleLogger {
63
65
  constructor(level = "WARN", printer = console.log, formatter = (level2, message) => `${level2}: ${message}`) {
64
66
  this.level = level;
65
67
  this.printer = printer;
@@ -82,12 +84,15 @@ let ConsoleLogger$1 = class ConsoleLogger {
82
84
  this.log("ERROR", message);
83
85
  }
84
86
  log(level, message) {
85
- if (LogLevelMap$1[level] > LogLevelMap$1[this.level]) {
87
+ if (LogLevelMap[level] > LogLevelMap[this.level]) {
86
88
  return;
87
89
  }
88
90
  this.printer(this.formatter(level, message));
89
91
  }
90
- };
92
+ }
93
+ function loggerService(level, printer, formatter) {
94
+ return new ConsoleLogger(level, printer, formatter);
95
+ }
91
96
  let Ok$2 = class Ok {
92
97
  constructor(value) {
93
98
  this.value = value;
@@ -131,41 +136,41 @@ function buildSubscribableResult$1(result, subscribe, refresh) {
131
136
  return err$1({ failure: result.error, subscribe, refresh });
132
137
  }
133
138
  }
134
- function resolvedPromiseLike$3(result) {
135
- if (isPromiseLike$3(result)) {
139
+ function resolvedPromiseLike$2(result) {
140
+ if (isPromiseLike$2(result)) {
136
141
  return result.then((nextResult) => nextResult);
137
142
  }
138
143
  return {
139
144
  then: (onFulfilled, _onRejected) => {
140
145
  try {
141
- return resolvedPromiseLike$3(onFulfilled(result));
146
+ return resolvedPromiseLike$2(onFulfilled(result));
142
147
  } catch (e) {
143
148
  if (onFulfilled === void 0) {
144
- return resolvedPromiseLike$3(result);
149
+ return resolvedPromiseLike$2(result);
145
150
  }
146
- return rejectedPromiseLike$3(e);
151
+ return rejectedPromiseLike$2(e);
147
152
  }
148
153
  }
149
154
  };
150
155
  }
151
- function rejectedPromiseLike$3(reason) {
152
- if (isPromiseLike$3(reason)) {
156
+ function rejectedPromiseLike$2(reason) {
157
+ if (isPromiseLike$2(reason)) {
153
158
  return reason.then((nextResult) => nextResult);
154
159
  }
155
160
  return {
156
161
  then: (_onFulfilled, onRejected) => {
157
162
  if (typeof onRejected === "function") {
158
163
  try {
159
- return resolvedPromiseLike$3(onRejected(reason));
164
+ return resolvedPromiseLike$2(onRejected(reason));
160
165
  } catch (e) {
161
- return rejectedPromiseLike$3(e);
166
+ return rejectedPromiseLike$2(e);
162
167
  }
163
168
  }
164
- return rejectedPromiseLike$3(reason);
169
+ return rejectedPromiseLike$2(reason);
165
170
  }
166
171
  };
167
172
  }
168
- function isPromiseLike$3(x) {
173
+ function isPromiseLike$2(x) {
169
174
  return typeof (x == null ? void 0 : x.then) === "function";
170
175
  }
171
176
  function stableJSONStringify$2(node) {
@@ -271,6 +276,24 @@ class FetchResponse extends Error {
271
276
  this.statusText = getStatusText(status);
272
277
  }
273
278
  }
279
+ const deeplyFrozen = new WeakSetConstructor();
280
+ function deepFreeze(value) {
281
+ if (typeof value !== "object" || value === null || deeplyFrozen.has(value)) {
282
+ return;
283
+ }
284
+ deeplyFrozen.add(value);
285
+ if (isArray$3(value)) {
286
+ for (let i = 0, len = value.length; i < len; i += 1) {
287
+ deepFreeze(value[i]);
288
+ }
289
+ } else {
290
+ const keys$1 = keys$2(value);
291
+ for (let i = 0, len = keys$1.length; i < len; i += 1) {
292
+ deepFreeze(value[keys$1[i]]);
293
+ }
294
+ }
295
+ freeze(value);
296
+ }
274
297
  class InternalError extends Error {
275
298
  constructor(data) {
276
299
  super();
@@ -285,6 +308,15 @@ class UserVisibleError extends Error {
285
308
  this.type = "user-visible";
286
309
  }
287
310
  }
311
+ function isUserVisibleError$1(error) {
312
+ return error instanceof Error && "type" in error && error.type === "user-visible";
313
+ }
314
+ function logError$1(error) {
315
+ if (isUserVisibleError$1(error)) {
316
+ return;
317
+ }
318
+ console.error("OneStore Command threw an error that we did not expect", error);
319
+ }
288
320
 
289
321
  /*!
290
322
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -341,7 +373,7 @@ let NetworkCommand$1 = class NetworkCommand extends BaseCommand {
341
373
  async afterRequestHooks(_options) {
342
374
  }
343
375
  };
344
- function buildServiceDescriptor$k() {
376
+ function buildServiceDescriptor$r() {
345
377
  return {
346
378
  type: "networkCommandBaseClass",
347
379
  version: "1.0",
@@ -440,10 +472,10 @@ class AuraNetworkCommand extends NetworkCommand$1 {
440
472
  } else if (this.shouldUseFetch()) {
441
473
  return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
442
474
  }
443
- return resolvedPromiseLike$3(err$1(toError("Aura/Fetch network services not found")));
475
+ return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
444
476
  }
445
477
  }
446
- function buildServiceDescriptor$j() {
478
+ function buildServiceDescriptor$q() {
447
479
  return {
448
480
  type: "auraNetworkCommandBaseClass",
449
481
  version: "1.0",
@@ -493,41 +525,41 @@ function buildSubscribableResult(result, subscribe, refresh) {
493
525
  return err({ failure: result.error, subscribe, refresh });
494
526
  }
495
527
  }
496
- function resolvedPromiseLike$2(result) {
497
- if (isPromiseLike$2(result)) {
528
+ function resolvedPromiseLike$1(result) {
529
+ if (isPromiseLike$1(result)) {
498
530
  return result.then((nextResult) => nextResult);
499
531
  }
500
532
  return {
501
533
  then: (onFulfilled, _onRejected) => {
502
534
  try {
503
- return resolvedPromiseLike$2(onFulfilled(result));
535
+ return resolvedPromiseLike$1(onFulfilled(result));
504
536
  } catch (e) {
505
537
  if (onFulfilled === void 0) {
506
- return resolvedPromiseLike$2(result);
538
+ return resolvedPromiseLike$1(result);
507
539
  }
508
- return rejectedPromiseLike$2(e);
540
+ return rejectedPromiseLike$1(e);
509
541
  }
510
542
  }
511
543
  };
512
544
  }
513
- function rejectedPromiseLike$2(reason) {
514
- if (isPromiseLike$2(reason)) {
545
+ function rejectedPromiseLike$1(reason) {
546
+ if (isPromiseLike$1(reason)) {
515
547
  return reason.then((nextResult) => nextResult);
516
548
  }
517
549
  return {
518
550
  then: (_onFulfilled, onRejected) => {
519
551
  if (typeof onRejected === "function") {
520
552
  try {
521
- return resolvedPromiseLike$2(onRejected(reason));
553
+ return resolvedPromiseLike$1(onRejected(reason));
522
554
  } catch (e) {
523
- return rejectedPromiseLike$2(e);
555
+ return rejectedPromiseLike$1(e);
524
556
  }
525
557
  }
526
- return rejectedPromiseLike$2(reason);
558
+ return rejectedPromiseLike$1(reason);
527
559
  }
528
560
  };
529
561
  }
530
- function isPromiseLike$2(x) {
562
+ function isPromiseLike$1(x) {
531
563
  return typeof (x == null ? void 0 : x.then) === "function";
532
564
  }
533
565
  function deepEquals$1(x, y) {
@@ -762,7 +794,7 @@ class CacheControlCommand extends BaseCommand {
762
794
  });
763
795
  }
764
796
  }
765
- return resolvedPromiseLike$2(void 0);
797
+ return resolvedPromiseLike$1(void 0);
766
798
  }
767
799
  get operationType() {
768
800
  return "query";
@@ -1038,7 +1070,7 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
1038
1070
  } else if (this.shouldUseFetch()) {
1039
1071
  return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
1040
1072
  }
1041
- return resolvedPromiseLike$3(err$1(toError("Aura/Fetch network services not found")));
1073
+ return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
1042
1074
  }
1043
1075
  coerceAuraErrors(auraErrors) {
1044
1076
  return toError(auraErrors[0]);
@@ -1112,9 +1144,9 @@ class AuraResourceCacheControlCommand extends AuraCacheControlCommand$1 {
1112
1144
  var _a;
1113
1145
  const data = (_a = cache.get(this.buildKey())) == null ? void 0 : _a.value;
1114
1146
  if (data === void 0) {
1115
- return resolvedPromiseLike$3(err$1(new Error("Failed to find data in cache")));
1147
+ return resolvedPromiseLike$2(err$1(new Error("Failed to find data in cache")));
1116
1148
  }
1117
- return resolvedPromiseLike$3(ok$2(data));
1149
+ return resolvedPromiseLike$2(ok$2(data));
1118
1150
  }
1119
1151
  writeToCache(cache, networkResult) {
1120
1152
  if (networkResult.isOk()) {
@@ -1125,13 +1157,13 @@ class AuraResourceCacheControlCommand extends AuraCacheControlCommand$1 {
1125
1157
  }
1126
1158
  });
1127
1159
  }
1128
- return resolvedPromiseLike$3(void 0);
1160
+ return resolvedPromiseLike$2(void 0);
1129
1161
  }
1130
1162
  buildKey() {
1131
1163
  return `{"endpoint":${this.endpoint},"params":${stableJSONStringify$2(this.auraParams)}}`;
1132
1164
  }
1133
1165
  }
1134
- function buildServiceDescriptor$i() {
1166
+ function buildServiceDescriptor$p() {
1135
1167
  return {
1136
1168
  type: "auraResourceCacheControlCommand",
1137
1169
  version: "1.0",
@@ -1181,7 +1213,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
1181
1213
  } else if (this.shouldUseFetch()) {
1182
1214
  return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
1183
1215
  }
1184
- return resolvedPromiseLike$3(err$1(toError("Aura/Fetch network services not found")));
1216
+ return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
1185
1217
  }
1186
1218
  coerceAuraErrors(auraErrors) {
1187
1219
  return toError(auraErrors[0]);
@@ -1254,11 +1286,11 @@ class AuraNormalizedCacheControlCommand extends AuraCacheControlCommand {
1254
1286
  readFromCache(cache) {
1255
1287
  const data = this.buildResultType().query(cache, this.buildQuery());
1256
1288
  if (data.isErr()) {
1257
- return resolvedPromiseLike$3(
1289
+ return resolvedPromiseLike$2(
1258
1290
  err$1(new Error(`Failed to build data from type: ${stringify$3(data.error)}`))
1259
1291
  );
1260
1292
  }
1261
- return resolvedPromiseLike$3(ok$2(data.value));
1293
+ return resolvedPromiseLike$2(ok$2(data.value));
1262
1294
  }
1263
1295
  writeToCache(cache, networkResult) {
1264
1296
  if (networkResult.isOk()) {
@@ -1267,10 +1299,10 @@ class AuraNormalizedCacheControlCommand extends AuraCacheControlCommand {
1267
1299
  this.buildWriteInput(networkResult.value)
1268
1300
  );
1269
1301
  }
1270
- return resolvedPromiseLike$3(void 0);
1302
+ return resolvedPromiseLike$2(void 0);
1271
1303
  }
1272
1304
  }
1273
- function buildServiceDescriptor$h() {
1305
+ function buildServiceDescriptor$o() {
1274
1306
  return {
1275
1307
  type: "auraNormalizedCacheControlCommand",
1276
1308
  version: "1.0",
@@ -1343,11 +1375,11 @@ class HttpNormalizedCacheControlCommand extends HttpCacheControlCommand {
1343
1375
  readFromCache(cache) {
1344
1376
  const data = this.buildResultType().query(cache, this.buildQuery());
1345
1377
  if (data.isErr()) {
1346
- return resolvedPromiseLike$3(
1378
+ return resolvedPromiseLike$2(
1347
1379
  err$1(new Error(`Failed to build data from type: ${stringify$3(data.error)}`))
1348
1380
  );
1349
1381
  }
1350
- return resolvedPromiseLike$3(ok$2(data.value));
1382
+ return resolvedPromiseLike$2(ok$2(data.value));
1351
1383
  }
1352
1384
  writeToCache(cache, networkResult) {
1353
1385
  if (networkResult.isOk()) {
@@ -1356,10 +1388,10 @@ class HttpNormalizedCacheControlCommand extends HttpCacheControlCommand {
1356
1388
  this.buildWriteInput(networkResult.value)
1357
1389
  );
1358
1390
  }
1359
- return resolvedPromiseLike$3(void 0);
1391
+ return resolvedPromiseLike$2(void 0);
1360
1392
  }
1361
1393
  }
1362
- function buildServiceDescriptor$g() {
1394
+ function buildServiceDescriptor$n() {
1363
1395
  return {
1364
1396
  type: "httpNormalizedCacheControlCommand",
1365
1397
  version: "1.0",
@@ -1537,7 +1569,7 @@ _FetchNetworkCommand.availableDecorators = {
1537
1569
  abortable: createAbortableDecorator
1538
1570
  };
1539
1571
  let FetchNetworkCommand = _FetchNetworkCommand;
1540
- function buildServiceDescriptor$f() {
1572
+ function buildServiceDescriptor$m() {
1541
1573
  return {
1542
1574
  type: "fetchNetworkCommandBaseClass",
1543
1575
  version: "1.0",
@@ -1573,7 +1605,7 @@ class StreamingCommand extends BaseCommand {
1573
1605
  );
1574
1606
  }
1575
1607
  }
1576
- function buildServiceDescriptor$e() {
1608
+ function buildServiceDescriptor$l() {
1577
1609
  return {
1578
1610
  type: "streamingCommandBaseClass",
1579
1611
  version: "1.0",
@@ -1656,7 +1688,7 @@ class SSEParsingStream extends TransformStream {
1656
1688
  });
1657
1689
  }
1658
1690
  }
1659
- function buildServiceDescriptor$d() {
1691
+ function buildServiceDescriptor$k() {
1660
1692
  return {
1661
1693
  type: "SSECommandBaseClass",
1662
1694
  version: "1.0",
@@ -1707,7 +1739,7 @@ function buildInstrumentCommand(services) {
1707
1739
  };
1708
1740
  };
1709
1741
  }
1710
- function buildServiceDescriptor$c(instrumentation) {
1742
+ function buildServiceDescriptor$j(instrumentation) {
1711
1743
  return {
1712
1744
  type: "instrumentCommand",
1713
1745
  version: "1.0",
@@ -1977,7 +2009,7 @@ class O11yInstrumentation {
1977
2009
  this.metrics = new O11yOTelMetricsAPI(this.services);
1978
2010
  }
1979
2011
  }
1980
- function buildServiceDescriptor$b(logger) {
2012
+ function buildServiceDescriptor$i(logger) {
1981
2013
  return {
1982
2014
  type: "instrumentation",
1983
2015
  version: "1.0",
@@ -2230,7 +2262,7 @@ let DefaultCache$1 = class DefaultCache {
2230
2262
  return new FixedTimeWritableCache$1(this, generatedTime);
2231
2263
  }
2232
2264
  };
2233
- function buildServiceDescriptor$a() {
2265
+ function buildServiceDescriptor$h() {
2234
2266
  return {
2235
2267
  type: "cache",
2236
2268
  version: "1.0",
@@ -2453,7 +2485,7 @@ class CacheController {
2453
2485
  yield* this.services.cacheInclusionPolicy.findAndModify(query, cacheUpdate);
2454
2486
  }
2455
2487
  }
2456
- function buildServiceDescriptor$9(cache, cacheInclusionPolicy, instrumentation) {
2488
+ function buildServiceDescriptor$g(cache, cacheInclusionPolicy, instrumentation) {
2457
2489
  return {
2458
2490
  type: "cacheController",
2459
2491
  version: "1.0",
@@ -2466,48 +2498,6 @@ function buildServiceDescriptor$9(cache, cacheInclusionPolicy, instrumentation)
2466
2498
  * All rights reserved.
2467
2499
  * For full license text, see the LICENSE.txt file
2468
2500
  */
2469
- /*!
2470
- * Copyright (c) 2022, Salesforce, Inc.,
2471
- * All rights reserved.
2472
- * For full license text, see the LICENSE.txt file
2473
- */
2474
- function resolvedPromiseLike$1(result) {
2475
- if (isPromiseLike$1(result)) {
2476
- return result.then((nextResult) => nextResult);
2477
- }
2478
- return {
2479
- then: (onFulfilled, _onRejected) => {
2480
- try {
2481
- return resolvedPromiseLike$1(onFulfilled(result));
2482
- } catch (e) {
2483
- if (onFulfilled === void 0) {
2484
- return resolvedPromiseLike$1(result);
2485
- }
2486
- return rejectedPromiseLike$1(e);
2487
- }
2488
- }
2489
- };
2490
- }
2491
- function rejectedPromiseLike$1(reason) {
2492
- if (isPromiseLike$1(reason)) {
2493
- return reason.then((nextResult) => nextResult);
2494
- }
2495
- return {
2496
- then: (_onFulfilled, onRejected) => {
2497
- if (typeof onRejected === "function") {
2498
- try {
2499
- return resolvedPromiseLike$1(onRejected(reason));
2500
- } catch (e) {
2501
- return rejectedPromiseLike$1(e);
2502
- }
2503
- }
2504
- return rejectedPromiseLike$1(reason);
2505
- }
2506
- };
2507
- }
2508
- function isPromiseLike$1(x) {
2509
- return typeof (x == null ? void 0 : x.then) === "function";
2510
- }
2511
2501
  const EventTypeWildcard = Symbol("EventTypeWildcard");
2512
2502
  class DefaultPubSubService {
2513
2503
  constructor() {
@@ -2535,14 +2525,14 @@ class DefaultPubSubService {
2535
2525
  return;
2536
2526
  }
2537
2527
  const returnVal = subscription.callback.call(subscription, event);
2538
- if (isPromiseLike$1(returnVal)) {
2528
+ if (isPromiseLike$2(returnVal)) {
2539
2529
  promises.push(returnVal);
2540
2530
  }
2541
2531
  });
2542
2532
  if (promises.length > 0) {
2543
2533
  return Promise.all(promises).then(() => void 0);
2544
2534
  }
2545
- return resolvedPromiseLike$1(void 0);
2535
+ return resolvedPromiseLike$2(void 0);
2546
2536
  }
2547
2537
  getSubscriptions(event) {
2548
2538
  const eventTypeSubscriptions = this.subscriptions.get(event.type);
@@ -2563,7 +2553,7 @@ class DefaultPubSubService {
2563
2553
  return matchingSubscriptions;
2564
2554
  }
2565
2555
  }
2566
- function buildServiceDescriptor$8() {
2556
+ function buildServiceDescriptor$f() {
2567
2557
  return {
2568
2558
  type: "pubSub",
2569
2559
  version: "1.0",
@@ -2626,7 +2616,7 @@ class NDJSONParsingStream extends TransformStream {
2626
2616
  });
2627
2617
  }
2628
2618
  }
2629
- function buildServiceDescriptor$7() {
2619
+ function buildServiceDescriptor$e() {
2630
2620
  return {
2631
2621
  type: "NDJSONCommandBaseClass",
2632
2622
  version: "1.0",
@@ -2667,7 +2657,7 @@ function buildServiceDescriptor$7() {
2667
2657
  * };
2668
2658
  * ```
2669
2659
  */
2670
- function buildServiceDescriptor$6(luvio) {
2660
+ function buildServiceDescriptor$d(luvio) {
2671
2661
  return {
2672
2662
  type: 'luvio',
2673
2663
  version: '1.0',
@@ -2676,7 +2666,7 @@ function buildServiceDescriptor$6(luvio) {
2676
2666
  },
2677
2667
  };
2678
2668
  }
2679
- // version: 1.401.0-c620f9ffed
2669
+ // version: 1.402.0-566b6c5389
2680
2670
 
2681
2671
  /*!
2682
2672
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -2798,7 +2788,7 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
2798
2788
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
2799
2789
  });
2800
2790
  }
2801
- return resolvedPromiseLike$3(
2791
+ return resolvedPromiseLike$2(
2802
2792
  buildSubscribableResult$1(
2803
2793
  err$1(toError("Aura/Fetch network services not found")),
2804
2794
  this.buildSubscribe(),
@@ -2840,7 +2830,7 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
2840
2830
  });
2841
2831
  }
2842
2832
  }
2843
- function buildServiceDescriptor$5() {
2833
+ function buildServiceDescriptor$c() {
2844
2834
  return {
2845
2835
  type: "auraGraphQLNormalizedCacheControlCommand",
2846
2836
  version: "1.0",
@@ -2958,7 +2948,7 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
2958
2948
  });
2959
2949
  }
2960
2950
  }
2961
- function buildServiceDescriptor$4() {
2951
+ function buildServiceDescriptor$b() {
2962
2952
  return {
2963
2953
  type: "httpGraphQLNormalizedCacheControlCommand",
2964
2954
  version: "1.0",
@@ -2982,7 +2972,7 @@ class FeatureFlagsService {
2982
2972
  return this.flags.get(flagName) || defaultValue;
2983
2973
  }
2984
2974
  }
2985
- function buildServiceDescriptor$3() {
2975
+ function buildServiceDescriptor$a() {
2986
2976
  return {
2987
2977
  version: "1.0",
2988
2978
  service: new FeatureFlagsService(),
@@ -3004,7 +2994,7 @@ function buildServiceDescriptor$3() {
3004
2994
  * *******************************************************************************************
3005
2995
  */
3006
2996
  /* proxy-compat-disable */
3007
- function buildServiceDescriptor$2(notifyRecordUpdateAvailable, getNormalizedLuvioRecord) {
2997
+ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvioRecord) {
3008
2998
  return {
3009
2999
  type: 'luvioUiapiRecords',
3010
3000
  version: '1.0',
@@ -3014,7 +3004,7 @@ function buildServiceDescriptor$2(notifyRecordUpdateAvailable, getNormalizedLuvi
3014
3004
  },
3015
3005
  };
3016
3006
  }
3017
- // version: 1.401.0-c620f9ffed
3007
+ // version: 1.402.0-566b6c5389
3018
3008
 
3019
3009
  /*!
3020
3010
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3025,44 +3015,923 @@ class RetryService {
3025
3015
  constructor(defaultRetryPolicy) {
3026
3016
  this.defaultRetryPolicy = defaultRetryPolicy;
3027
3017
  }
3028
- applyRetry(operation, retryPolicyOverride) {
3029
- return this.retry(operation, retryPolicyOverride || this.defaultRetryPolicy);
3018
+ applyRetry(operation, retryPolicyOverride) {
3019
+ return this.retry(operation, retryPolicyOverride || this.defaultRetryPolicy);
3020
+ }
3021
+ async retry(operation, policy) {
3022
+ const startTime = Date.now();
3023
+ let attempt = 0;
3024
+ let result = await operation();
3025
+ let context = {
3026
+ attempt,
3027
+ totalElapsedMs: Date.now() - startTime,
3028
+ lastResult: result
3029
+ };
3030
+ while (await policy.shouldRetry(result, context)) {
3031
+ const delay = await policy.calculateDelay(result, context);
3032
+ await this.delay(delay);
3033
+ if (policy.prepareRetry) {
3034
+ await policy.prepareRetry(result, context);
3035
+ }
3036
+ attempt++;
3037
+ result = await operation();
3038
+ context = {
3039
+ attempt,
3040
+ totalElapsedMs: Date.now() - startTime,
3041
+ lastResult: result
3042
+ };
3043
+ }
3044
+ return result;
3045
+ }
3046
+ delay(ms) {
3047
+ return new Promise((resolve) => {
3048
+ setTimeout(resolve, ms);
3049
+ });
3050
+ }
3051
+ }
3052
+ class RetryPolicy {
3053
+ }
3054
+ class ComposedRetryPolicy extends RetryPolicy {
3055
+ constructor(policies) {
3056
+ super();
3057
+ this.policies = policies;
3058
+ }
3059
+ /**
3060
+ * Returns true if any of the composed policies want to retry.
3061
+ *
3062
+ * Uses OR logic: if ANY policy returns true, this returns true.
3063
+ * Policies are checked in order and evaluation short-circuits on the first match.
3064
+ */
3065
+ async shouldRetry(result, context) {
3066
+ for (const policy of this.policies) {
3067
+ if (await policy.shouldRetry(result, context)) {
3068
+ return true;
3069
+ }
3070
+ }
3071
+ return false;
3072
+ }
3073
+ /**
3074
+ * Returns the delay from the first policy that wants to retry.
3075
+ *
3076
+ * If multiple policies want to retry, only the FIRST policy's delay is used.
3077
+ * Policy order in the constructor array determines priority.
3078
+ * If no policy wants to retry, returns 0.
3079
+ *
3080
+ * @example
3081
+ * ```typescript
3082
+ * // If both PolicyA (1000ms) and PolicyB (5000ms) want to retry:
3083
+ * const composed = new ComposedRetryPolicy([policyA, policyB]);
3084
+ * composed.calculateDelay(result, context); // Returns 1000ms (PolicyA wins)
3085
+ * ```
3086
+ */
3087
+ async calculateDelay(result, context) {
3088
+ for (const policy of this.policies) {
3089
+ if (await policy.shouldRetry(result, context)) {
3090
+ return policy.calculateDelay(result, context);
3091
+ }
3092
+ }
3093
+ return 0;
3094
+ }
3095
+ /**
3096
+ * Calls prepareRetry on policies that both:
3097
+ * 1. Implement the prepareRetry hook, AND
3098
+ * 2. Returned true from shouldRetry for this result
3099
+ *
3100
+ * This allows only the matching policies to perform preparation work (e.g., token refresh).
3101
+ * All matching prepareRetry calls run in parallel for efficiency.
3102
+ *
3103
+ * **Important**: prepareRetry only runs on policies that matched shouldRetry. This ensures
3104
+ * you don't perform unnecessary work or side effects for unrelated retry conditions.
3105
+ *
3106
+ * **Note**: If multiple policies match and have prepareRetry, ensure they don't have
3107
+ * conflicting side effects since they run in parallel.
3108
+ *
3109
+ * @example
3110
+ * ```typescript
3111
+ * // Status 401 occurs
3112
+ * const composed = new ComposedRetryPolicy([
3113
+ * authPolicy, // shouldRetry(401) → true, has prepareRetry
3114
+ * throttlePolicy, // shouldRetry(401) → false, has prepareRetry
3115
+ * ]);
3116
+ *
3117
+ * await composed.prepareRetry(result, context);
3118
+ * // → Only authPolicy.prepareRetry() runs (because it matched)
3119
+ * // → throttlePolicy.prepareRetry() does NOT run (didn't match)
3120
+ * ```
3121
+ */
3122
+ async prepareRetry(result, context) {
3123
+ const matchingPolicies = [];
3124
+ for (const policy of this.policies) {
3125
+ if (policy.prepareRetry !== void 0 && await policy.shouldRetry(result, context)) {
3126
+ matchingPolicies.push(policy);
3127
+ }
3128
+ }
3129
+ if (matchingPolicies.length > 0) {
3130
+ await Promise.all(
3131
+ matchingPolicies.map((policy) => policy.prepareRetry(result, context))
3132
+ );
3133
+ }
3134
+ }
3135
+ /**
3136
+ * Returns all composed policies.
3137
+ * Useful for accessing or configuring individual policies after composition.
3138
+ */
3139
+ getPolicies() {
3140
+ return this.policies;
3141
+ }
3142
+ /**
3143
+ * Helper to get a specific policy by type.
3144
+ * Useful for calling policy-specific methods after composition.
3145
+ *
3146
+ * @example
3147
+ * ```typescript
3148
+ * const csrfPolicy = composedPolicy.getPolicyByType(CsrfTokenRetryPolicy);
3149
+ * csrfPolicy?.setRequestContext(mutableRequest);
3150
+ * ```
3151
+ */
3152
+ getPolicyByType(policyType) {
3153
+ return this.policies.find((policy) => policy instanceof policyType);
3154
+ }
3155
+ }
3156
+ function buildServiceDescriptor$8(defaultRetryPolicy) {
3157
+ return {
3158
+ version: "1.0",
3159
+ service: new RetryService(defaultRetryPolicy),
3160
+ type: "retry"
3161
+ };
3162
+ }
3163
+
3164
+ /*!
3165
+ * Copyright (c) 2022, Salesforce, Inc.,
3166
+ * All rights reserved.
3167
+ * For full license text, see the LICENSE.txt file
3168
+ */
3169
+ function isUserVisibleError(error) {
3170
+ return error instanceof Error && "type" in error && error.type === "user-visible";
3171
+ }
3172
+ function throwUserlandError(error) {
3173
+ logError(error);
3174
+ throw buildUserlandError(error);
3175
+ }
3176
+ function emitError(callback, error) {
3177
+ logError(error);
3178
+ callback({ data: void 0, error: buildUserlandError(error) });
3179
+ }
3180
+ function buildUserlandError(error) {
3181
+ if (isUserVisibleError(error)) {
3182
+ return error.data;
3183
+ }
3184
+ return new Error("Internal error in Lightning Data Service adapter occurred.");
3185
+ }
3186
+ function logError(error) {
3187
+ if (isUserVisibleError(error)) {
3188
+ return;
3189
+ }
3190
+ console.error("OneStore Command threw an error that we did not expect", error);
3191
+ }
3192
+
3193
+ /*!
3194
+ * Copyright (c) 2022, Salesforce, Inc.,
3195
+ * All rights reserved.
3196
+ * For full license text, see the LICENSE.txt file
3197
+ */
3198
+ function buildBaseImperativeInvoker(getCommand, transformResult) {
3199
+ return async (...params) => {
3200
+ const command = getCommand({ params, assertIsValid });
3201
+ try {
3202
+ return command.execute().then((result) => transformResult(result));
3203
+ } catch (error) {
3204
+ throwUserlandError(error);
3205
+ }
3206
+ };
3207
+ }
3208
+ const supportedCachePolicyTypes = ["no-cache", "only-if-cached"];
3209
+ function requestContextIsSupportedCachePolicy(requestContext) {
3210
+ return typeof requestContext === "object" && requestContext !== null && "cachePolicy" in requestContext && typeof requestContext.cachePolicy === "object" && requestContext.cachePolicy !== null && "type" in requestContext.cachePolicy && typeof requestContext.cachePolicy.type === "string" && supportedCachePolicyTypes.includes(
3211
+ requestContext.cachePolicy.type
3212
+ );
3213
+ }
3214
+ function getOverridesForLegacyRequestContext(requestContext) {
3215
+ if (requestContextIsSupportedCachePolicy(requestContext)) {
3216
+ return { cacheControlConfig: { type: requestContext.cachePolicy.type } };
3217
+ }
3218
+ return {};
3219
+ }
3220
+ function handleEmit(res, callback) {
3221
+ const consumerEmittedData = {
3222
+ data: void 0,
3223
+ errors: void 0
3224
+ };
3225
+ if (res.isOk()) {
3226
+ consumerEmittedData.data = res.value.data;
3227
+ } else {
3228
+ const { data, errors } = toGraphQLResponseFromFailure$1(res.error);
3229
+ consumerEmittedData.data = data;
3230
+ consumerEmittedData.errors = errors;
3231
+ }
3232
+ callback(consumerEmittedData);
3233
+ }
3234
+ function toGraphQLResponseFromFailure$1(failure) {
3235
+ if (isUserVisibleError$1(failure)) {
3236
+ return {
3237
+ data: failure.data.data,
3238
+ errors: failure.data.errors
3239
+ };
3240
+ }
3241
+ logError$1(failure);
3242
+ return {
3243
+ data: void 0,
3244
+ errors: [{ message: "Internal error in GraphQL adapter occurred", locations: [] }]
3245
+ };
3246
+ }
3247
+ class DefaultImperativeBindingsService {
3248
+ bind(getCommand) {
3249
+ return buildBaseImperativeInvoker(getCommand, (result) => {
3250
+ if (result.isOk()) {
3251
+ deepFreeze(result.value);
3252
+ return isSubscribableResult(result) ? result.value.data : result.value;
3253
+ }
3254
+ throw toError(isSubscribableResult(result) ? result.error.failure : result.error);
3255
+ });
3256
+ }
3257
+ }
3258
+ function buildServiceDescriptor$6() {
3259
+ return {
3260
+ type: "defaultImperativeBindings",
3261
+ version: "1.0",
3262
+ service: new DefaultImperativeBindingsService()
3263
+ };
3264
+ }
3265
+ class QueryImperativeBindingsService {
3266
+ bind(getCommand) {
3267
+ return buildBaseImperativeInvoker(getCommand, (result) => {
3268
+ if (result.isOk()) {
3269
+ deepFreeze(result.value);
3270
+ return isSubscribableResult(result) ? { data: result.value.data } : { data: result.value };
3271
+ }
3272
+ throw toError(isSubscribableResult(result) ? result.error.failure : result.error);
3273
+ });
3274
+ }
3275
+ }
3276
+ function buildServiceDescriptor$5() {
3277
+ return {
3278
+ type: "queryImperativeBindings",
3279
+ version: "1.0",
3280
+ service: new QueryImperativeBindingsService()
3281
+ };
3282
+ }
3283
+ class SubscribableImperativeBindingsService {
3284
+ bind(getCommand, exposeRefresh = false) {
3285
+ return buildBaseImperativeInvoker(
3286
+ getCommand,
3287
+ (result) => this.transformResult(result, exposeRefresh)
3288
+ );
3289
+ }
3290
+ transformResult(result, exposeRefresh = false) {
3291
+ if (!isSubscribableResult(result)) {
3292
+ console.error(
3293
+ "Non-subscribable result encountered - please use correct operation type"
3294
+ );
3295
+ throw new Error("Internal error in Lightning Data Service adapter occurred");
3296
+ }
3297
+ if (result.isOk()) {
3298
+ deepFreeze(result.value.data);
3299
+ const api = {
3300
+ data: result.value.data,
3301
+ subscribe: (cb) => {
3302
+ result.value.subscribe((result2) => {
3303
+ if (result2.isErr()) {
3304
+ return cb({ data: void 0, error: toError(result2.error) });
3305
+ }
3306
+ return cb({ data: result2.value, error: void 0 });
3307
+ });
3308
+ }
3309
+ };
3310
+ if (exposeRefresh) {
3311
+ return {
3312
+ ...api,
3313
+ refresh: () => {
3314
+ return result.value.refresh().then((res) => {
3315
+ if (res.isOk()) {
3316
+ return void 0;
3317
+ }
3318
+ throw res.error;
3319
+ });
3320
+ }
3321
+ };
3322
+ } else {
3323
+ return api;
3324
+ }
3325
+ } else {
3326
+ throw toError(result.error.failure);
3327
+ }
3328
+ }
3329
+ }
3330
+ function buildServiceDescriptor$4() {
3331
+ return {
3332
+ type: "subscribableImperativeBindings",
3333
+ version: "1.0",
3334
+ service: new SubscribableImperativeBindingsService()
3335
+ };
3336
+ }
3337
+ class LegacyImperativeBindingsService {
3338
+ bind(getCommand) {
3339
+ const invoke = async (config, requestContext, callback) => {
3340
+ const command = getCommand({ config, assertIsValid });
3341
+ try {
3342
+ const overrides = getOverridesForLegacyRequestContext(requestContext);
3343
+ const result = await command.execute(overrides);
3344
+ if (result.isOk()) {
3345
+ deepFreeze(result.value);
3346
+ callback({ data: result.value.data, error: void 0 });
3347
+ } else {
3348
+ callback({ data: void 0, error: toError(result.error.failure) });
3349
+ }
3350
+ } catch (error) {
3351
+ emitError(callback, error);
3352
+ }
3353
+ };
3354
+ const subscribe = (config, requestContext, callback) => {
3355
+ const command = getCommand({ config, assertIsValid });
3356
+ let unsubscribe = () => {
3357
+ };
3358
+ try {
3359
+ const overrides = getOverridesForLegacyRequestContext(requestContext);
3360
+ command.execute(overrides).then(
3361
+ (result) => {
3362
+ if (!result.isOk()) {
3363
+ callback({ data: void 0, error: toError(result.error.failure) });
3364
+ return;
3365
+ }
3366
+ unsubscribe = result.value.subscribe((res) => {
3367
+ if (res.isOk()) {
3368
+ callback({ data: res.value, error: void 0 });
3369
+ } else {
3370
+ callback({ data: void 0, error: toError(res.error) });
3371
+ }
3372
+ });
3373
+ callback({ data: result.value.data, error: void 0 });
3374
+ },
3375
+ (e) => {
3376
+ emitError(callback, e);
3377
+ }
3378
+ );
3379
+ } catch (e) {
3380
+ emitError(callback, e);
3381
+ }
3382
+ return () => {
3383
+ unsubscribe();
3384
+ };
3385
+ };
3386
+ return { invoke, subscribe };
3387
+ }
3388
+ }
3389
+ function buildServiceDescriptor$3() {
3390
+ return {
3391
+ type: "legacyImperativeBindings",
3392
+ version: "1.0",
3393
+ service: new LegacyImperativeBindingsService()
3394
+ };
3395
+ }
3396
+ class GraphQLImperativeBindingsService {
3397
+ bind(getCommand, exposeRefresh = false) {
3398
+ return async (...params) => {
3399
+ try {
3400
+ if (params.length) {
3401
+ params[0] = wrapConfigAndVerify(params[0]);
3402
+ }
3403
+ return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
3404
+ } catch (error) {
3405
+ logError$1(error);
3406
+ return {
3407
+ data: void 0,
3408
+ errors: [
3409
+ { message: "Internal error in GraphQL adapter occurred", locations: [] }
3410
+ ]
3411
+ };
3412
+ }
3413
+ };
3414
+ }
3415
+ transformResult(result, exposeRefresh = false) {
3416
+ const consumerEmittedData = {
3417
+ data: void 0,
3418
+ errors: void 0
3419
+ };
3420
+ if (result.isOk()) {
3421
+ deepFreeze(result.value);
3422
+ consumerEmittedData.data = result.value.data.data;
3423
+ consumerEmittedData.subscribe = (cb) => {
3424
+ result.value.subscribe((res) => {
3425
+ const consumerEmittedData2 = {
3426
+ data: void 0,
3427
+ errors: void 0
3428
+ };
3429
+ if (res.isOk()) {
3430
+ consumerEmittedData2.data = res.value.data;
3431
+ } else {
3432
+ if (isUserVisibleError$1(res.error)) {
3433
+ consumerEmittedData2.data = res.error.data.data;
3434
+ consumerEmittedData2.errors = res.error.data.errors;
3435
+ } else {
3436
+ logError$1(res.error);
3437
+ consumerEmittedData2.errors = [
3438
+ {
3439
+ message: "Internal error in GraphQL adapter occurred",
3440
+ locations: []
3441
+ }
3442
+ ];
3443
+ }
3444
+ }
3445
+ cb(consumerEmittedData2);
3446
+ });
3447
+ };
3448
+ if (exposeRefresh) {
3449
+ consumerEmittedData.refresh = () => {
3450
+ return new Promise((resolve, reject) => {
3451
+ try {
3452
+ result.value.refresh().then((res) => {
3453
+ if (res.isOk()) {
3454
+ resolve();
3455
+ } else {
3456
+ reject(
3457
+ new Error(
3458
+ "Internal error in GraphQL adapter occurred: Failed to refresh GraphQL data"
3459
+ )
3460
+ );
3461
+ }
3462
+ });
3463
+ } catch (error) {
3464
+ logError$1(error);
3465
+ reject(
3466
+ new Error(
3467
+ "Internal error in GraphQL adapter occurred: Failed to refresh GraphQL data"
3468
+ )
3469
+ );
3470
+ }
3471
+ });
3472
+ };
3473
+ }
3474
+ } else {
3475
+ const resp = toGraphQLResponseFromFailure$1(result.error.failure);
3476
+ consumerEmittedData.data = resp.data;
3477
+ consumerEmittedData.errors = resp.errors;
3478
+ }
3479
+ return consumerEmittedData;
3480
+ }
3481
+ }
3482
+ function buildServiceDescriptor$2$1() {
3483
+ return {
3484
+ type: "graphQLImperativeBindings",
3485
+ version: "1.0",
3486
+ service: new GraphQLImperativeBindingsService()
3487
+ };
3488
+ }
3489
+ class GraphQLLegacyImperativeBindingsService {
3490
+ bind(getCommand) {
3491
+ const invoke = async (config, requestContext, callback) => {
3492
+ config = wrapConfigAndVerify(config);
3493
+ const command = getCommand({ config, assertIsValid });
3494
+ try {
3495
+ const overrides = getOverridesForLegacyRequestContext(requestContext);
3496
+ const result = await command.execute(overrides);
3497
+ const consumerEmittedData = {
3498
+ data: void 0,
3499
+ errors: void 0
3500
+ };
3501
+ if (result.isOk()) {
3502
+ deepFreeze(result.value);
3503
+ consumerEmittedData.data = result.value.data.data;
3504
+ } else {
3505
+ const { data, errors } = toGraphQLResponseFromFailure$1(result.error.failure);
3506
+ consumerEmittedData.data = data;
3507
+ consumerEmittedData.errors = errors;
3508
+ }
3509
+ callback(consumerEmittedData);
3510
+ } catch (error) {
3511
+ logError$1(error);
3512
+ callback({
3513
+ data: void 0,
3514
+ errors: [
3515
+ { message: "Internal error in GraphQL adapter occurred", locations: [] }
3516
+ ]
3517
+ });
3518
+ }
3519
+ };
3520
+ const subscribe = (config, requestContext, callback) => {
3521
+ config = wrapConfigAndVerify(config);
3522
+ const command = getCommand({ config, assertIsValid });
3523
+ let unsubscribe = () => {
3524
+ };
3525
+ const overrides = getOverridesForLegacyRequestContext(requestContext);
3526
+ command.execute(overrides).then((result) => {
3527
+ const consumerEmittedData = {
3528
+ data: void 0,
3529
+ errors: void 0
3530
+ };
3531
+ if (result.isOk()) {
3532
+ deepFreeze(result.value);
3533
+ consumerEmittedData.data = result.value.data.data;
3534
+ unsubscribe = result.value.subscribe(
3535
+ (res) => {
3536
+ handleEmit(res, callback);
3537
+ }
3538
+ );
3539
+ } else {
3540
+ const { data, errors } = toGraphQLResponseFromFailure$1(result.error.failure);
3541
+ consumerEmittedData.data = data;
3542
+ consumerEmittedData.errors = errors;
3543
+ unsubscribe = result.error.subscribe(
3544
+ (res) => {
3545
+ handleEmit(res, callback);
3546
+ }
3547
+ );
3548
+ }
3549
+ callback(consumerEmittedData);
3550
+ });
3551
+ return () => {
3552
+ unsubscribe();
3553
+ };
3554
+ };
3555
+ return { invoke, subscribe };
3556
+ }
3557
+ }
3558
+ function buildServiceDescriptor$1$1() {
3559
+ return {
3560
+ type: "graphQLLegacyImperativeBindings",
3561
+ version: "1.0",
3562
+ service: new GraphQLLegacyImperativeBindingsService()
3563
+ };
3564
+ }
3565
+ class GraphQLMutationBindingsService {
3566
+ bind(getCommand) {
3567
+ return async (...params) => {
3568
+ try {
3569
+ if (params.length) {
3570
+ params[0] = wrapConfigAndVerify(params[0], {
3571
+ acceptedOperations: ["mutation"]
3572
+ });
3573
+ }
3574
+ const command = getCommand({ params, assertIsValid });
3575
+ const result = await command.execute({ cacheControlConfig: { type: "no-cache" } });
3576
+ if (result.isOk()) {
3577
+ deepFreeze(result.value);
3578
+ return result.value.data;
3579
+ } else {
3580
+ return toGraphQLResponseFromFailure$1(result.error.failure);
3581
+ }
3582
+ } catch (error) {
3583
+ logError$1(error);
3584
+ return {
3585
+ data: void 0,
3586
+ errors: [
3587
+ { message: "Internal error in GraphQL adapter occurred", locations: [] }
3588
+ ]
3589
+ };
3590
+ }
3591
+ };
3592
+ }
3593
+ }
3594
+ function buildServiceDescriptor$7() {
3595
+ return {
3596
+ type: "graphQLMutationBindings",
3597
+ version: "1.0",
3598
+ service: new GraphQLMutationBindingsService()
3599
+ };
3600
+ }
3601
+
3602
+ /*!
3603
+ * Copyright (c) 2022, Salesforce, Inc.,
3604
+ * All rights reserved.
3605
+ * For full license text, see the LICENSE.txt file
3606
+ */
3607
+ class Sanitizer {
3608
+ constructor(obj) {
3609
+ this.obj = obj;
3610
+ this.copy = {};
3611
+ this.currentPath = {
3612
+ key: "",
3613
+ value: obj,
3614
+ parent: null,
3615
+ data: this.copy
3616
+ };
3617
+ }
3618
+ sanitize() {
3619
+ const sanitizer = this;
3620
+ JSON.stringify(this.obj, function(key, value) {
3621
+ if (key === "") {
3622
+ return value;
3623
+ }
3624
+ const parent = this;
3625
+ if (parent !== sanitizer.currentPath.value) {
3626
+ sanitizer.exit(parent);
3627
+ }
3628
+ if (typeof value === "object" && value !== null) {
3629
+ sanitizer.enter(key, value);
3630
+ return value;
3631
+ }
3632
+ sanitizer.currentPath.data[key] = value;
3633
+ return value;
3634
+ });
3635
+ return this.copy;
3636
+ }
3637
+ enter(key, value) {
3638
+ const { currentPath: parentPath } = this;
3639
+ const data = parentPath.data[key] = Array.isArray(value) ? [] : {};
3640
+ this.currentPath = {
3641
+ key,
3642
+ value,
3643
+ parent: parentPath,
3644
+ data
3645
+ };
3646
+ }
3647
+ exit(parent) {
3648
+ while (this.currentPath.value !== parent) {
3649
+ this.currentPath = this.currentPath.parent || this.currentPath;
3650
+ }
3651
+ }
3652
+ }
3653
+ function sanitize(obj) {
3654
+ return new Sanitizer(obj).sanitize();
3655
+ }
3656
+ function isIncompleteConfigError(err) {
3657
+ return err instanceof MissingRequiredPropertyError || err instanceof JsonSchemaViolationError && err.validationErrors.find(
3658
+ (validationError) => validationError instanceof MissingRequiredPropertyError
3659
+ ) !== void 0;
3660
+ }
3661
+ class CommandWireAdapterConstructor {
3662
+ constructor(callback, sourceContext, options) {
3663
+ this.callback = callback;
3664
+ this.connected = false;
3665
+ this.exposeRefresh = false;
3666
+ if (!(options == null ? void 0 : options.skipEmptyEmit)) {
3667
+ this.emit();
3668
+ }
3669
+ }
3670
+ connect() {
3671
+ this.connected = true;
3672
+ this.invokeAdapter();
3673
+ }
3674
+ disconnect() {
3675
+ this.unsubscribe();
3676
+ this.connected = false;
3677
+ }
3678
+ update(config, _context) {
3679
+ this.unsubscribe();
3680
+ this.config = sanitize(config);
3681
+ this.invokeAdapter();
3682
+ }
3683
+ emit(result) {
3684
+ try {
3685
+ if (result === void 0) {
3686
+ this.callback({ data: void 0, error: void 0 });
3687
+ } else {
3688
+ const consumerEmittedRefresh = () => {
3689
+ if (!this.refresh) {
3690
+ return Promise.resolve();
3691
+ }
3692
+ return new Promise((resolve, reject) => {
3693
+ if (!this.refresh) {
3694
+ resolve();
3695
+ return;
3696
+ }
3697
+ this.refresh().then((res) => {
3698
+ if (res.isOk()) {
3699
+ resolve();
3700
+ } else {
3701
+ reject(
3702
+ new Error(
3703
+ "Internal error in Lightning Data Service adapter occurred: Failed to refresh data"
3704
+ )
3705
+ );
3706
+ }
3707
+ });
3708
+ });
3709
+ };
3710
+ let consumerEmittedData = {
3711
+ data: void 0,
3712
+ error: void 0
3713
+ };
3714
+ if (this.exposeRefresh && this.refresh) {
3715
+ consumerEmittedData.refresh = consumerEmittedRefresh;
3716
+ }
3717
+ if (result.isErr()) {
3718
+ if (isSubscribableResult(result)) {
3719
+ consumerEmittedData.error = result.error.failure;
3720
+ } else {
3721
+ consumerEmittedData.error = result.error;
3722
+ }
3723
+ } else {
3724
+ if (isSubscribableResult(result)) {
3725
+ deepFreeze(result.value.data);
3726
+ consumerEmittedData.data = result.value.data;
3727
+ } else {
3728
+ deepFreeze(result.value);
3729
+ consumerEmittedData.data = result.value;
3730
+ }
3731
+ }
3732
+ this.callback(consumerEmittedData);
3733
+ }
3734
+ } catch (e) {
3735
+ this.handleExecutionThrow(e);
3736
+ }
3737
+ }
3738
+ invokeAdapter() {
3739
+ if (!this.connected || this.config === void 0) {
3740
+ return;
3741
+ }
3742
+ if (this.configSchema) {
3743
+ try {
3744
+ assertIsValid(this.config, this.configSchema);
3745
+ } catch (err) {
3746
+ if (isIncompleteConfigError(err)) {
3747
+ return;
3748
+ }
3749
+ throw err;
3750
+ }
3751
+ }
3752
+ const initialConfig = this.config;
3753
+ const command = this.getCommand();
3754
+ try {
3755
+ command.execute().then((result) => {
3756
+ if (!this.connected || this.config !== initialConfig) {
3757
+ return;
3758
+ }
3759
+ this.refresh = void 0;
3760
+ if (result.isOk()) {
3761
+ if (isSubscribableResult(result)) {
3762
+ const value = result.value;
3763
+ this.unsubscriber = value.subscribe((updatedResult) => {
3764
+ if (!this.connected || this.config !== initialConfig) {
3765
+ this.unsubscribe();
3766
+ return;
3767
+ }
3768
+ this.emit(updatedResult);
3769
+ });
3770
+ this.refresh = value.refresh;
3771
+ this.emit(ok$2(value.data));
3772
+ } else {
3773
+ this.emit(result);
3774
+ }
3775
+ } else {
3776
+ if (isSubscribableResult(result)) {
3777
+ const value = result.error;
3778
+ this.unsubscriber = value.subscribe((updatedResult) => {
3779
+ if (!this.connected || this.config !== initialConfig) {
3780
+ this.unsubscribe();
3781
+ return;
3782
+ }
3783
+ this.emit(updatedResult);
3784
+ });
3785
+ this.refresh = value.refresh;
3786
+ this.emit(result);
3787
+ } else {
3788
+ this.unsubscriber = () => {
3789
+ };
3790
+ this.emit(result);
3791
+ }
3792
+ }
3793
+ });
3794
+ } catch (e) {
3795
+ this.handleExecutionThrow(e);
3796
+ }
3797
+ }
3798
+ handleExecutionThrow(error) {
3799
+ emitError(this.callback, error);
3030
3800
  }
3031
- async retry(operation, policy) {
3032
- const startTime = Date.now();
3033
- let attempt = 0;
3034
- let result = await operation();
3035
- let context = {
3036
- attempt,
3037
- totalElapsedMs: Date.now() - startTime,
3038
- lastResult: result
3801
+ unsubscribe() {
3802
+ if (this.unsubscriber) {
3803
+ this.unsubscriber();
3804
+ delete this.unsubscriber;
3805
+ }
3806
+ }
3807
+ }
3808
+ function toGraphQLResponseFromFailure(failure) {
3809
+ if (isUserVisibleError$1(failure)) {
3810
+ return {
3811
+ data: failure.data.data,
3812
+ errors: failure.data.errors
3039
3813
  };
3040
- while (policy.shouldRetry(result, context)) {
3041
- const delay = policy.calculateDelay(result, context);
3042
- await this.delay(delay);
3043
- attempt++;
3044
- result = await operation();
3045
- context = {
3046
- attempt,
3047
- totalElapsedMs: Date.now() - startTime,
3048
- lastResult: result
3049
- };
3814
+ }
3815
+ logError$1(failure);
3816
+ return {
3817
+ data: void 0,
3818
+ errors: [{ message: "Internal error in GraphQL adapter occurred", locations: [] }]
3819
+ };
3820
+ }
3821
+ class LWCWireBindingsService {
3822
+ bind(getCommand, configSchema, exposeRefresh = false) {
3823
+ return class extends CommandWireAdapterConstructor {
3824
+ constructor() {
3825
+ super(...arguments);
3826
+ this.configSchema = configSchema;
3827
+ this.exposeRefresh = exposeRefresh;
3828
+ }
3829
+ getCommand() {
3830
+ return getCommand(this.config);
3831
+ }
3832
+ };
3833
+ }
3834
+ }
3835
+ function buildServiceDescriptor$1() {
3836
+ return {
3837
+ type: "lwcWireBindings",
3838
+ version: "1.0",
3839
+ service: new LWCWireBindingsService()
3840
+ };
3841
+ }
3842
+ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor {
3843
+ emit(result) {
3844
+ try {
3845
+ if (result === void 0) {
3846
+ this.callback({ data: void 0, errors: void 0 });
3847
+ } else {
3848
+ const consumerEmittedRefresh = () => {
3849
+ if (!this.refresh) {
3850
+ return Promise.resolve();
3851
+ }
3852
+ return new Promise((resolve, reject) => {
3853
+ if (!this.refresh) {
3854
+ resolve();
3855
+ return;
3856
+ }
3857
+ this.refresh().then((res) => {
3858
+ if (res.isOk()) {
3859
+ resolve();
3860
+ } else {
3861
+ reject(
3862
+ new Error(
3863
+ "Internal error in GraphQL adapter occurred: Failed to refresh GraphQL data"
3864
+ )
3865
+ );
3866
+ }
3867
+ });
3868
+ });
3869
+ };
3870
+ let consumerEmittedData = {
3871
+ data: void 0,
3872
+ errors: void 0
3873
+ };
3874
+ if (this.exposeRefresh && this.refresh) {
3875
+ consumerEmittedData.refresh = consumerEmittedRefresh;
3876
+ }
3877
+ if (result.isErr()) {
3878
+ const failure = isSubscribableResult(result) ? result.error.failure : result.error;
3879
+ const resp = toGraphQLResponseFromFailure(failure);
3880
+ consumerEmittedData.data = resp.data;
3881
+ consumerEmittedData.errors = resp.errors;
3882
+ } else {
3883
+ consumerEmittedData.data = result.value.data;
3884
+ }
3885
+ deepFreeze(consumerEmittedData);
3886
+ this.callback(consumerEmittedData);
3887
+ }
3888
+ } catch (e) {
3889
+ logError$1(e);
3890
+ this.handleExecutionThrow(e);
3050
3891
  }
3051
- return result;
3052
3892
  }
3053
- delay(ms) {
3054
- return new Promise((resolve) => {
3055
- setTimeout(resolve, ms);
3893
+ handleExecutionThrow(e) {
3894
+ logError$1(e);
3895
+ this.callback({
3896
+ data: void 0,
3897
+ errors: [{ message: "Internal error in GraphQL adapter occurred", locations: [] }]
3056
3898
  });
3057
3899
  }
3900
+ update(config, _context) {
3901
+ this.unsubscribe();
3902
+ const resolvedQuery = resolveAst(config.query);
3903
+ if (resolvedQuery) {
3904
+ validateGraphQLOperations(
3905
+ { query: resolvedQuery, operationName: config == null ? void 0 : config.operationName },
3906
+ { acceptedOperations: ["query"] }
3907
+ );
3908
+ }
3909
+ this.config = {
3910
+ ...sanitize(config),
3911
+ query: resolvedQuery
3912
+ };
3913
+ this.invokeAdapter();
3914
+ }
3058
3915
  }
3059
- class RetryPolicy {
3916
+ class LWCGraphQLWireBindingsService {
3917
+ bind(getCommand, configSchema, exposeRefresh = false) {
3918
+ return class extends GraphQLCommandWireAdapterConstructor {
3919
+ constructor() {
3920
+ super(...arguments);
3921
+ this.configSchema = configSchema;
3922
+ this.exposeRefresh = exposeRefresh;
3923
+ }
3924
+ getCommand() {
3925
+ return getCommand(this.config);
3926
+ }
3927
+ };
3928
+ }
3060
3929
  }
3061
- function buildServiceDescriptor$1(defaultRetryPolicy) {
3930
+ function buildServiceDescriptor$2() {
3062
3931
  return {
3932
+ type: "lwcGraphQLWireBindings",
3063
3933
  version: "1.0",
3064
- service: new RetryService(defaultRetryPolicy),
3065
- type: "retry"
3934
+ service: new LWCGraphQLWireBindingsService()
3066
3935
  };
3067
3936
  }
3068
3937
 
@@ -3119,50 +3988,6 @@ function o(e2, r2) {
3119
3988
  }
3120
3989
  }
3121
3990
  n$1.prototype = new Error(), n$1.prototype.name = "InvalidTokenError";
3122
- /*!
3123
- * Copyright (c) 2022, Salesforce, Inc.,
3124
- * All rights reserved.
3125
- * For full license text, see the LICENSE.txt file
3126
- */
3127
- const LogLevelMap = {
3128
- TRACE: 4,
3129
- DEBUG: 3,
3130
- INFO: 2,
3131
- WARN: 1,
3132
- ERROR: 0
3133
- };
3134
- class ConsoleLogger {
3135
- constructor(level = "WARN", printer = console.log, formatter = (level2, message) => `${level2}: ${message}`) {
3136
- this.level = level;
3137
- this.printer = printer;
3138
- this.formatter = formatter;
3139
- this.messages = [];
3140
- }
3141
- trace(message) {
3142
- this.log("TRACE", message);
3143
- }
3144
- debug(message) {
3145
- this.log("DEBUG", message);
3146
- }
3147
- info(message) {
3148
- this.log("INFO", message);
3149
- }
3150
- warn(message) {
3151
- this.log("WARN", message);
3152
- }
3153
- error(message) {
3154
- this.log("ERROR", message);
3155
- }
3156
- log(level, message) {
3157
- if (LogLevelMap[level] > LogLevelMap[this.level]) {
3158
- return;
3159
- }
3160
- this.printer(this.formatter(level, message));
3161
- }
3162
- }
3163
- function loggerService(level, printer, formatter) {
3164
- return new ConsoleLogger(level, printer, formatter);
3165
- }
3166
3991
  class JwtToken {
3167
3992
  /**
3168
3993
  * Create a new JwtToken.
@@ -3445,7 +4270,7 @@ function setHeaderAuthorization({ token }, fetchParams) {
3445
4270
  }
3446
4271
  function buildJwtRequestHeaderInterceptor(jwtManager, jwtRequestModifier = (_e, fetchArgs) => fetchArgs) {
3447
4272
  return (args) => {
3448
- return resolvedPromiseLike$3(jwtManager.getJwt()).then((token) => {
4273
+ return resolvedPromiseLike$2(jwtManager.getJwt()).then((token) => {
3449
4274
  const fetchArgsWithRequestHeaderAuthorization = setHeaderAuthorization(token, args);
3450
4275
  return token.extraInfo ? jwtRequestModifier(token.extraInfo, fetchArgsWithRequestHeaderAuthorization) : fetchArgsWithRequestHeaderAuthorization;
3451
4276
  });
@@ -3653,6 +4478,7 @@ function generateHeaders(headers) {
3653
4478
  }
3654
4479
 
3655
4480
  const SALESFORCE_API_BASE_URI_FLAG = 'api.salesforce.com';
4481
+ const X_REQUEST_ID_HEADER = 'x-request-id';
3656
4482
  const SFAPController = 'SalesforceApiPlatformController';
3657
4483
  const SFAPJwtMethod = 'getSFAPLightningJwtService';
3658
4484
  /**
@@ -3733,6 +4559,8 @@ const modifySfapResourceRequest = function (resourceRequest, jwtToken) {
3733
4559
  baseUri,
3734
4560
  };
3735
4561
  };
4562
+ // used for instrumentation and tracking
4563
+ let sfapRequestCount = 0;
3736
4564
  const sfapNetworkAdapter = async (resourceRequest, resourceRequestContext) => {
3737
4565
  let jwtToken;
3738
4566
  try {
@@ -3746,7 +4574,32 @@ const sfapNetworkAdapter = async (resourceRequest, resourceRequestContext) => {
3746
4574
  }
3747
4575
  let authenticatedRequest = authenticateRequest(resourceRequest, jwtToken);
3748
4576
  authenticatedRequest = modifySfapResourceRequest(authenticatedRequest, jwtToken);
3749
- return fetchNetworkAdapter(authenticatedRequest);
4577
+ // --- instrumentation block --- start
4578
+ const uniqueRequestTaskIdentifier = 'sfap-' + sfapRequestCount++;
4579
+ const uniqueRequestGuid = generateRequestId();
4580
+ // request id header allows logging the request id and searching for the request logs
4581
+ authenticatedRequest.headers[X_REQUEST_ID_HEADER] = uniqueRequestGuid;
4582
+ let fetchComplete = false;
4583
+ ThirdPartyTracker.registerHandler(uniqueRequestTaskIdentifier, 'sfap-request', () => fetchComplete);
4584
+ markStart('transport', 'request', {
4585
+ auraXHRId: uniqueRequestTaskIdentifier,
4586
+ requestLength: -1,
4587
+ background: false,
4588
+ actionDefs: ['sfap'],
4589
+ requestId: uniqueRequestGuid,
4590
+ });
4591
+ // --- instrumentation block --- end
4592
+ const fetchNetworkAdapterPromise = fetchNetworkAdapter(authenticatedRequest);
4593
+ // --- instrumentation block --- start
4594
+ fetchNetworkAdapterPromise.finally(function requestCompleteTracker() {
4595
+ ThirdPartyTracker.markLoaded(uniqueRequestTaskIdentifier);
4596
+ fetchComplete = true;
4597
+ markEnd('transport', 'request', {
4598
+ auraXHRId: uniqueRequestTaskIdentifier,
4599
+ });
4600
+ });
4601
+ // --- instrumentation block --- end
4602
+ return fetchNetworkAdapterPromise;
3750
4603
  };
3751
4604
  class LdsNetworkAdapterErrorResponse extends Error {
3752
4605
  constructor(message, _error) {
@@ -3762,6 +4615,17 @@ const composedNetworkAdapter$1 = {
3762
4615
  },
3763
4616
  adapter: sfapNetworkAdapter,
3764
4617
  };
4618
+ function generateRequestId() {
4619
+ if (typeof crypto !== 'undefined' && crypto.randomUUID) {
4620
+ // as nov. 2025 caniuse says this has 93.5% support (all modern browsers)
4621
+ return crypto.randomUUID();
4622
+ }
4623
+ else {
4624
+ // fallback to Math.random() if crypto.randomUUID is not available (unlikely)
4625
+ return (Math.random().toString(36).substring(2, 15) +
4626
+ Math.random().toString(36).substring(2, 15));
4627
+ }
4628
+ }
3765
4629
 
3766
4630
  function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function n(e){this.message=e;}n.prototype=new Error,n.prototype.name="InvalidTokenError";
3767
4631
 
@@ -3959,7 +4823,7 @@ function buildPageScopedCacheRequestInterceptor() {
3959
4823
  Object.entries(pageScopedCacheHeaders).forEach(([key, value]) => {
3960
4824
  returnedFetchArgs = setHeader(key, value, returnedFetchArgs);
3961
4825
  });
3962
- return resolvedPromiseLike$3(returnedFetchArgs);
4826
+ return resolvedPromiseLike$2(returnedFetchArgs);
3963
4827
  };
3964
4828
  }
3965
4829
 
@@ -4001,7 +4865,7 @@ function getEnvironmentSetting(name) {
4001
4865
  }
4002
4866
  return undefined;
4003
4867
  }
4004
- // version: 1.401.0-c620f9ffed
4868
+ // version: 1.402.0-566b6c5389
4005
4869
 
4006
4870
  /**
4007
4871
  * Observability / Critical Availability Program (230+)
@@ -4526,7 +5390,7 @@ function setAuraInstrumentationHooks() {
4526
5390
  networkResponse: incrementRequestResponseCount,
4527
5391
  });
4528
5392
  instrument$2({
4529
- error: logError,
5393
+ error: logError$2,
4530
5394
  });
4531
5395
  instrument$3({
4532
5396
  refreshCalled: instrumentation.handleRefreshApiCall.bind(instrumentation),
@@ -4821,15 +5685,15 @@ function buildLuvioPageScopedCacheRequestInterceptor() {
4821
5685
  }
4822
5686
  // Pass the headers to pageScopedCache which will mutate them
4823
5687
  pageScopedCache.addHeader(resourceRequest.headers);
4824
- return resolvedPromiseLike$3(resourceRequest);
5688
+ return resolvedPromiseLike$2(resourceRequest);
4825
5689
  };
4826
5690
  }
4827
5691
 
4828
5692
  const REQUEST_ID_KEY = 'X-SFDC-Request-Id';
4829
5693
  function buildRequestIdInterceptor() {
4830
5694
  return async (fetchArgs) => {
4831
- fetchArgs = setHeader(REQUEST_ID_KEY, generateRequestId(), fetchArgs);
4832
- return resolvedPromiseLike$3(fetchArgs);
5695
+ fetchArgs = setHeader(REQUEST_ID_KEY, generateRequestId$1(), fetchArgs);
5696
+ return resolvedPromiseLike$2(fetchArgs);
4833
5697
  };
4834
5698
  }
4835
5699
  function buildLuvioRequestIdInterceptor() {
@@ -4840,9 +5704,198 @@ function buildLuvioRequestIdInterceptor() {
4840
5704
  }
4841
5705
  // Don't overwrite request id header if it already exists
4842
5706
  if (!resourceRequest.headers[REQUEST_ID_KEY]) {
4843
- resourceRequest.headers[REQUEST_ID_KEY] = generateRequestId();
5707
+ resourceRequest.headers[REQUEST_ID_KEY] = generateRequestId$1();
5708
+ }
5709
+ return resolvedPromiseLike$2(resourceRequest);
5710
+ };
5711
+ }
5712
+
5713
+ const CSRF_TOKEN_KEY = 'salesforce_csrf_token';
5714
+ const CSRF_STORAGE_NAME = 'ldsCSRFToken';
5715
+ const CSRF_STORAGE_CONFIG = {
5716
+ name: CSRF_STORAGE_NAME,
5717
+ persistent: true,
5718
+ secure: true,
5719
+ maxSize: 1024,
5720
+ expiration: 24 * 60 * 60,
5721
+ clearOnInit: false,
5722
+ debugLogging: false,
5723
+ };
5724
+ /**
5725
+ * Manages CSRF token fetching and caching for secure requests.
5726
+ * Implements a singleton pattern to ensure consistent token management across the application.
5727
+ */
5728
+ class CsrfTokenManager {
5729
+ constructor() {
5730
+ // Initialize AuraStorage
5731
+ this.storage = createStorage(CSRF_STORAGE_CONFIG);
5732
+ // Try to load token from AuraStorage on initialization
5733
+ this.tokenPromise = this.loadOrFetchToken();
5734
+ }
5735
+ static getInstance() {
5736
+ if (!CsrfTokenManager.instance) {
5737
+ CsrfTokenManager.instance = new CsrfTokenManager();
5738
+ }
5739
+ return CsrfTokenManager.instance;
5740
+ }
5741
+ /**
5742
+ * Obtain a CSRF token, either from AuraStorage or by fetching a fresh one.
5743
+ *
5744
+ * @private
5745
+ */
5746
+ async loadOrFetchToken() {
5747
+ // First try to get token from AuraStorage
5748
+ if (this.storage) {
5749
+ try {
5750
+ const cachedToken = await this.storage.get(CSRF_TOKEN_KEY);
5751
+ if (typeof cachedToken === 'string' && cachedToken) {
5752
+ return cachedToken;
5753
+ }
5754
+ }
5755
+ catch {
5756
+ // If storage read fails, continue to fetch
5757
+ }
5758
+ }
5759
+ // No cached token, fetch from server
5760
+ return this.fetchFreshToken();
5761
+ }
5762
+ /**
5763
+ * Call API endpoint to acquire a CSRF token and cache it.
5764
+ *
5765
+ * @private
5766
+ */
5767
+ async fetchFreshToken() {
5768
+ try {
5769
+ const response = await fetch('/session/csrf', {
5770
+ method: 'GET',
5771
+ credentials: 'same-origin',
5772
+ });
5773
+ if (!response.ok) {
5774
+ return undefined;
5775
+ }
5776
+ const data = await response.json();
5777
+ const token = data.csrfToken;
5778
+ if (token && this.storage) {
5779
+ // Cache the token in AuraStorage
5780
+ try {
5781
+ await this.storage.set(CSRF_TOKEN_KEY, token);
5782
+ }
5783
+ catch {
5784
+ // Non-fatal: token is still available even if caching fails
5785
+ }
5786
+ }
5787
+ return token;
5788
+ }
5789
+ catch {
5790
+ return undefined;
5791
+ }
5792
+ }
5793
+ /**
5794
+ * Returns the current token value as a Promise.
5795
+ */
5796
+ async getToken() {
5797
+ return this.tokenPromise;
5798
+ }
5799
+ /**
5800
+ * Obtains and returns a new token value as a promise.
5801
+ * This will clear the cached token and fetch a fresh one.
5802
+ */
5803
+ async refreshToken() {
5804
+ // Clear cached token
5805
+ if (this.storage) {
5806
+ try {
5807
+ await this.storage.remove(CSRF_TOKEN_KEY);
5808
+ }
5809
+ catch {
5810
+ // Non-fatal: continue with refresh even if clear fails
5811
+ }
5812
+ }
5813
+ // Fetch (and cache) fresh token
5814
+ this.tokenPromise = this.fetchFreshToken();
5815
+ return this.tokenPromise;
5816
+ }
5817
+ /**
5818
+ * Reset the singleton instance (useful for testing).
5819
+ * @internal
5820
+ */
5821
+ static resetInstance() {
5822
+ CsrfTokenManager.instance = null;
5823
+ }
5824
+ }
5825
+ CsrfTokenManager.instance = null;
5826
+
5827
+ const CSRF_TOKEN_HEADER = 'X-CSRF-Token';
5828
+ /**
5829
+ * Determines if the HTTP method requires CSRF protection.
5830
+ * Only mutating operations (POST, PUT, PATCH, DELETE) require CSRF tokens.
5831
+ *
5832
+ * @param method - The HTTP method to check
5833
+ * @returns true if the method requires CSRF protection
5834
+ */
5835
+ function isCsrfMethod(method) {
5836
+ if (!method) {
5837
+ return false;
5838
+ }
5839
+ const normalizedMethod = method.toLowerCase();
5840
+ return (normalizedMethod === 'post' ||
5841
+ normalizedMethod === 'put' ||
5842
+ normalizedMethod === 'patch' ||
5843
+ normalizedMethod === 'delete');
5844
+ }
5845
+ /**
5846
+ * Builds a request interceptor that adds CSRF token headers to mutating requests.
5847
+ * The CSRF token is fetched once and cached for subsequent requests.
5848
+ * Only POST, PUT, PATCH, and DELETE requests will have the CSRF token added.
5849
+ *
5850
+ * @returns A RequestInterceptor function for FetchParameters
5851
+ */
5852
+ function buildCsrfTokenInterceptor() {
5853
+ const csrfTokenManager = CsrfTokenManager.getInstance();
5854
+ return async (fetchArgs) => {
5855
+ const [urlOrRequest, options] = fetchArgs;
5856
+ // Determine the method from either Request object or options
5857
+ let method;
5858
+ if (typeof urlOrRequest !== 'string' && 'method' in urlOrRequest) {
5859
+ method = urlOrRequest.method;
5860
+ }
5861
+ else if (options && 'method' in options) {
5862
+ method = options.method;
5863
+ }
5864
+ // Only add CSRF token for mutating operations
5865
+ if (isCsrfMethod(method)) {
5866
+ const token = await csrfTokenManager.getToken();
5867
+ if (token) {
5868
+ fetchArgs = setHeader(CSRF_TOKEN_HEADER, token, fetchArgs);
5869
+ }
5870
+ }
5871
+ return resolvedPromiseLike$2(fetchArgs);
5872
+ };
5873
+ }
5874
+ /**
5875
+ * Builds a Luvio request interceptor that adds CSRF token headers to mutating requests.
5876
+ * The CSRF token is fetched once and cached for subsequent requests.
5877
+ * Only POST, PUT, PATCH, and DELETE requests will have the CSRF token added.
5878
+ *
5879
+ * @returns A request interceptor function for Luvio ResourceRequest objects
5880
+ */
5881
+ function buildLuvioCsrfTokenInterceptor() {
5882
+ const csrfTokenManager = CsrfTokenManager.getInstance();
5883
+ return async (resourceRequest) => {
5884
+ // Ensure headers object exists
5885
+ if (!resourceRequest.headers) {
5886
+ resourceRequest.headers = {};
4844
5887
  }
4845
- return resolvedPromiseLike$3(resourceRequest);
5888
+ // Only add CSRF token for mutating operations
5889
+ if (isCsrfMethod(resourceRequest.method)) {
5890
+ // Don't overwrite existing CSRF token header if it already exists
5891
+ if (!resourceRequest.headers[CSRF_TOKEN_HEADER]) {
5892
+ const token = await csrfTokenManager.getToken();
5893
+ if (token) {
5894
+ resourceRequest.headers[CSRF_TOKEN_HEADER] = token;
5895
+ }
5896
+ }
5897
+ }
5898
+ return resolvedPromiseLike$2(resourceRequest);
4846
5899
  };
4847
5900
  }
4848
5901
 
@@ -4907,7 +5960,11 @@ const composedFetchNetworkAdapter = {
4907
5960
  return API_PATH_MATCHERS.some((matcher) => matcher.test(path));
4908
5961
  },
4909
5962
  adapter: setupLexNetworkAdapter(requestTracker, requestLogger, {
4910
- request: [buildLuvioPageScopedCacheRequestInterceptor(), buildLuvioRequestIdInterceptor()],
5963
+ request: [
5964
+ buildLuvioPageScopedCacheRequestInterceptor(),
5965
+ buildLuvioRequestIdInterceptor(),
5966
+ buildLuvioCsrfTokenInterceptor(),
5967
+ ],
4911
5968
  response: [
4912
5969
  buildLexRuntimeLuvio5xxStatusResponseInterceptor(),
4913
5970
  buildLexRuntimeLuvioAuthExpirationRedirectResponseInterceptor(),
@@ -4915,9 +5972,114 @@ const composedFetchNetworkAdapter = {
4915
5972
  }),
4916
5973
  };
4917
5974
 
5975
+ const DEFAULT_CONFIG$1 = {
5976
+ maxRetries: 1, // Only retry once after token refresh
5977
+ };
5978
+ /**
5979
+ * Retry policy that handles CSRF token expiration errors.
5980
+ *
5981
+ * When a request fails with a CSRF token error this policy will:
5982
+ * 1. Detect the error condition in shouldRetry
5983
+ * 2. Refresh the CSRF token in prepareRetry hook
5984
+ * 3. Update the request headers with the new token via mutable context
5985
+ * 4. Retry the request once (maxRetries = 1)
5986
+ *
5987
+ */
5988
+ class CsrfTokenRetryPolicy extends RetryPolicy {
5989
+ constructor(config = DEFAULT_CONFIG$1) {
5990
+ super();
5991
+ this.config = config;
5992
+ this.csrfTokenManager = CsrfTokenManager.getInstance();
5993
+ }
5994
+ /**
5995
+ * Allows the fetch service to pass mutable request context.
5996
+ * This is a side-channel that enables request modification between retries.
5997
+ *
5998
+ * @param context - Mutable container holding fetch arguments
5999
+ */
6000
+ setRequestContext(context) {
6001
+ this.requestContext = context;
6002
+ }
6003
+ /**
6004
+ * Determines if a failed request should be retried due to CSRF token issues.
6005
+ */
6006
+ async shouldRetry(result, context) {
6007
+ // Only retry once
6008
+ if (context.attempt >= this.config.maxRetries) {
6009
+ return false;
6010
+ }
6011
+ // Only retry on 400 status
6012
+ if (result.status !== 400) {
6013
+ return false;
6014
+ }
6015
+ // Check if this is a CSRF error by examining the response body
6016
+ // This avoids retrying all 400s (validation errors, bad requests, etc.)
6017
+ return await isCsrfError(result);
6018
+ }
6019
+ /**
6020
+ * CSRF token refresh should happen immediately with no delay.
6021
+ */
6022
+ async calculateDelay(_result, _context) {
6023
+ return 0; // No delay - retry immediately after token refresh
6024
+ }
6025
+ /**
6026
+ * Called by retry service before each retry attempt.
6027
+ *
6028
+ * This hook is supported by the Conduit retry service (with prepareRetry support).
6029
+ * It performs token refresh and request update:
6030
+ * 1. Refreshes the CSRF token from the server
6031
+ * 2. Updates the mutable request context with the new token
6032
+ *
6033
+ * Note: We already validated this is a CSRF error in shouldRetry,
6034
+ * so we can proceed directly to token refresh.
6035
+ *
6036
+ * The fetch service must call setRequestContext() to provide the mutable args container.
6037
+ * When the retry service re-executes the operation, it will use the updated args.
6038
+ *
6039
+ * @param _result - The failed response that triggered the retry (unused, already validated)
6040
+ * @param _context - Current retry context (unused but part of interface)
6041
+ */
6042
+ async prepareRetry(_result, _context) {
6043
+ // Refresh the CSRF token (we already know this is a CSRF error from shouldRetry)
6044
+ const newToken = await this.csrfTokenManager.refreshToken();
6045
+ if (!newToken || !this.requestContext) {
6046
+ // If we can't get a new token or don't have request context,
6047
+ // the retry will fail again but that's expected
6048
+ return;
6049
+ }
6050
+ // Update the fetch arguments with the new token using the setHeader utility
6051
+ this.requestContext.args = setHeader('X-CSRF-Token', newToken, this.requestContext.args);
6052
+ }
6053
+ }
6054
+ /**
6055
+ * Helper to check if a response indicates a CSRF token error.
6056
+ *
6057
+ * @param response - The response to check
6058
+ * @returns true if the response indicates a CSRF token error (INVALID_ACCESS_TOKEN)
6059
+ */
6060
+ async function isCsrfError(response) {
6061
+ try {
6062
+ // Clone to avoid consuming the original response
6063
+ const cloned = response.clone();
6064
+ const body = await cloned.json();
6065
+ // Check the error array format: data[0].errorCode
6066
+ const errorCode = body?.data?.[0]?.errorCode;
6067
+ return errorCode === 'INVALID_ACCESS_TOKEN';
6068
+ }
6069
+ catch {
6070
+ // If we can't parse the body (network error, non-JSON response, etc.),
6071
+ // assume it's not a CSRF error
6072
+ return false;
6073
+ }
6074
+ }
6075
+
4918
6076
  function buildLexRuntimeDefaultFetchServiceDescriptor(logger, retryService) {
4919
6077
  const fetchService = buildLexConnectFetchServiceDescriptor({
4920
- request: [buildPageScopedCacheRequestInterceptor(), buildRequestIdInterceptor()],
6078
+ request: [
6079
+ buildPageScopedCacheRequestInterceptor(),
6080
+ buildRequestIdInterceptor(),
6081
+ buildCsrfTokenInterceptor(),
6082
+ ],
4921
6083
  response: [
4922
6084
  buildLexRuntime5xxStatusResponseInterceptor(logger),
4923
6085
  buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger),
@@ -4929,7 +6091,11 @@ function buildLexRuntimeDefaultFetchServiceDescriptor(logger, retryService) {
4929
6091
  }
4930
6092
  function buildLexRuntimeAllow5xxFetchServiceDescriptor(logger, retryService) {
4931
6093
  const fetchService = buildLexConnectFetchServiceDescriptor({
4932
- request: [buildPageScopedCacheRequestInterceptor(), buildRequestIdInterceptor()],
6094
+ request: [
6095
+ buildPageScopedCacheRequestInterceptor(),
6096
+ buildRequestIdInterceptor(),
6097
+ buildCsrfTokenInterceptor(),
6098
+ ],
4933
6099
  response: [buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger)],
4934
6100
  }, retryService);
4935
6101
  return {
@@ -4943,21 +6109,39 @@ function buildLexConnectFetchServiceDescriptor(interceptors = { request: [], res
4943
6109
  version: '1.0',
4944
6110
  service: function (...args) {
4945
6111
  const { request: requestInterceptors = [], response: responseInterceptors = [] } = interceptors;
4946
- const pending = requestInterceptors.reduce((previousPromise, interceptor) => previousPromise.then(interceptor), resolvedPromiseLike$3(args));
4947
- const trackerId = generateRequestId();
6112
+ const pending = requestInterceptors.reduce((previousPromise, interceptor) => previousPromise.then(interceptor), resolvedPromiseLike$2(args));
6113
+ const trackerId = generateRequestId$1();
4948
6114
  instrumentationTracker.registerHandler(trackerId, 'onestore-inflight-network-request', () => {
4949
6115
  // return false until we signal we are finished
4950
6116
  return false;
4951
6117
  });
4952
6118
  return Promise.resolve(pending)
4953
- .then((args) => {
6119
+ .then((interceptedArgs) => {
4954
6120
  if (retryService) {
4955
- return retryService.applyRetry(() => fetch(...args));
6121
+ // Create mutable context for CSRF retry policy
6122
+ const mutableRequest = { args: interceptedArgs };
6123
+ // Pass context to CSRF policy if it's being used
6124
+ const policy = retryService.defaultRetryPolicy;
6125
+ // Handle both direct CSRF policy and composed policy
6126
+ if (policy instanceof CsrfTokenRetryPolicy) {
6127
+ policy.setRequestContext(mutableRequest);
6128
+ }
6129
+ else if (policy instanceof ComposedRetryPolicy) {
6130
+ // Extract CSRF policy from composed policy
6131
+ const csrfPolicy = policy.getPolicyByType(CsrfTokenRetryPolicy);
6132
+ if (csrfPolicy) {
6133
+ csrfPolicy.setRequestContext(mutableRequest);
6134
+ }
6135
+ }
6136
+ // Retry service will call prepareRetry hook which updates mutableRequest.args
6137
+ return retryService.applyRetry(async () => {
6138
+ return await fetch(...mutableRequest.args);
6139
+ });
4956
6140
  }
4957
- return fetch(...args);
6141
+ return fetch(...interceptedArgs);
4958
6142
  })
4959
6143
  .then((response) => {
4960
- return responseInterceptors.reduce((previousPromise, interceptor) => previousPromise.then(interceptor), resolvedPromiseLike$3(response));
6144
+ return responseInterceptors.reduce((previousPromise, interceptor) => previousPromise.then(interceptor), resolvedPromiseLike$2(response));
4961
6145
  })
4962
6146
  .finally(() => {
4963
6147
  instrumentationTracker.markFinished(trackerId);
@@ -5003,9 +6187,9 @@ function buildCopilotFetchServiceDescriptor(logger) {
5003
6187
  requestInit.method !== 'POST' ||
5004
6188
  !requestInit.body ||
5005
6189
  typeof requestInit.body !== 'string') {
5006
- return resolvedPromiseLike$3(args);
6190
+ return resolvedPromiseLike$2(args);
5007
6191
  }
5008
- return resolvedPromiseLike$3(sfapJwtManager.getJwt()).then((token) => {
6192
+ return resolvedPromiseLike$2(sfapJwtManager.getJwt()).then((token) => {
5009
6193
  // replace the body's instanceConfig.endpoint with the JWT's iss value
5010
6194
  const body = JSON.parse(requestInit.body);
5011
6195
  if (!body || !token.decodedInfo || !token.decodedInfo.iss) {
@@ -7785,12 +8969,12 @@ class FetchThrottlingRetryPolicy extends RetryPolicy {
7785
8969
  super();
7786
8970
  this.config = config;
7787
8971
  }
7788
- shouldRetry(result, context) {
8972
+ async shouldRetry(result, context) {
7789
8973
  return ((result.status === 429 || result.status === 503) &&
7790
8974
  context.attempt < this.config.maxRetries &&
7791
8975
  context.totalElapsedMs <= this.config.maxTimeToRetry);
7792
8976
  }
7793
- calculateDelay(result, context) {
8977
+ async calculateDelay(result, context) {
7794
8978
  let delay;
7795
8979
  // If retry-after header is present and valid, use it
7796
8980
  const retryAfterHeader = this.parseRetryAfterHeader(result);
@@ -8407,18 +9591,18 @@ function initializeLDS() {
8407
9591
  }
8408
9592
  // Initializes OneStore in LEX
8409
9593
  function initializeOneStore(luvio) {
8410
- const loggerService = new ConsoleLogger$1('ERROR');
8411
- const cacheServiceDescriptor = buildServiceDescriptor$a();
8412
- const instrumentationServiceDescriptor = buildServiceDescriptor$b(loggerService);
9594
+ const loggerService = new ConsoleLogger('ERROR');
9595
+ const cacheServiceDescriptor = buildServiceDescriptor$h();
9596
+ const instrumentationServiceDescriptor = buildServiceDescriptor$i(loggerService);
8413
9597
  const inMemoryCacheInclusionPolicyServiceDescriptor = buildInMemoryCacheInclusionPolicyService(cacheServiceDescriptor.service);
8414
9598
  const durableCacheInclusionPolicyServiceDescriptor = buildAuraDurableCacheInclusionPolicyService();
8415
9599
  const durableCacheControlService = {
8416
- ...buildServiceDescriptor$9(cacheServiceDescriptor.service, durableCacheInclusionPolicyServiceDescriptor.service, instrumentationServiceDescriptor.service),
9600
+ ...buildServiceDescriptor$g(cacheServiceDescriptor.service, durableCacheInclusionPolicyServiceDescriptor.service, instrumentationServiceDescriptor.service),
8417
9601
  tags: { storage: 'durable' },
8418
9602
  };
8419
- const featureFlagsServiceDescriptor = buildServiceDescriptor$3();
9603
+ const featureFlagsServiceDescriptor = buildServiceDescriptor$a();
8420
9604
  const featureFlagsService = featureFlagsServiceDescriptor.service;
8421
- const luvioUiapiRecordsServiceDescriptor = buildServiceDescriptor$2((configs) => {
9605
+ const luvioUiapiRecordsServiceDescriptor = buildServiceDescriptor$9((configs) => {
8422
9606
  return notifyUpdateAvailableFactory(luvio)(configs);
8423
9607
  }, (recordId, reader) => {
8424
9608
  const recordKey = buildRecordRepKeyFromId(recordId);
@@ -8437,8 +9621,11 @@ function initializeOneStore(luvio) {
8437
9621
  reader.unMarkMissing();
8438
9622
  return linkedData.data;
8439
9623
  });
8440
- const retryPolicy = new FetchThrottlingRetryPolicy();
8441
- const retryServiceDescriptor = buildServiceDescriptor$1(retryPolicy);
9624
+ // Compose both throttling and CSRF retry policies
9625
+ const throttlingPolicy = new FetchThrottlingRetryPolicy();
9626
+ const csrfPolicy = new CsrfTokenRetryPolicy();
9627
+ const retryPolicy = new ComposedRetryPolicy([throttlingPolicy, csrfPolicy]);
9628
+ const retryServiceDescriptor = buildServiceDescriptor$8(retryPolicy);
8442
9629
  const retryService = retryServiceDescriptor.service;
8443
9630
  // set flags based on gates
8444
9631
  featureFlagsService.set('useOneStoreGraphQL', useOneStoreGraphql.isOpen({ fallback: false }));
@@ -8449,27 +9636,36 @@ function initializeOneStore(luvio) {
8449
9636
  buildJwtAuthorizedSfapFetchServiceDescriptor(loggerService),
8450
9637
  buildCopilotFetchServiceDescriptor(loggerService),
8451
9638
  buildAuraNetworkService(),
8452
- buildServiceDescriptor$c(instrumentationServiceDescriptor.service),
9639
+ buildServiceDescriptor$j(instrumentationServiceDescriptor.service),
8453
9640
  // Ordering of services matters - L1 only CacheControlService must come before durable
8454
- buildServiceDescriptor$9(cacheServiceDescriptor.service, inMemoryCacheInclusionPolicyServiceDescriptor.service, instrumentationServiceDescriptor.service),
9641
+ buildServiceDescriptor$g(cacheServiceDescriptor.service, inMemoryCacheInclusionPolicyServiceDescriptor.service, instrumentationServiceDescriptor.service),
8455
9642
  durableCacheControlService,
8456
- buildServiceDescriptor$j(),
8457
- buildServiceDescriptor$7(),
8458
- buildServiceDescriptor$f(),
8459
- buildServiceDescriptor$k(),
9643
+ buildServiceDescriptor$q(),
8460
9644
  buildServiceDescriptor$e(),
8461
- buildServiceDescriptor$d(),
8462
- buildServiceDescriptor$i(),
8463
- buildServiceDescriptor$h(),
8464
- buildServiceDescriptor$g(),
8465
- buildServiceDescriptor$8(),
9645
+ buildServiceDescriptor$m(),
9646
+ buildServiceDescriptor$r(),
9647
+ buildServiceDescriptor$l(),
9648
+ buildServiceDescriptor$k(),
9649
+ buildServiceDescriptor$p(),
9650
+ buildServiceDescriptor$o(),
9651
+ buildServiceDescriptor$n(),
9652
+ buildServiceDescriptor$f(),
8466
9653
  buildLexRuntimeAllow5xxFetchServiceDescriptor(loggerService, retryService),
8467
- buildServiceDescriptor$6(luvio),
9654
+ buildServiceDescriptor$d(luvio),
8468
9655
  luvioUiapiRecordsServiceDescriptor,
8469
- buildServiceDescriptor$5(),
8470
- buildServiceDescriptor$4(),
9656
+ buildServiceDescriptor$c(),
9657
+ buildServiceDescriptor$b(),
8471
9658
  featureFlagsServiceDescriptor,
8472
9659
  retryServiceDescriptor,
9660
+ buildServiceDescriptor$6(),
9661
+ buildServiceDescriptor$5(),
9662
+ buildServiceDescriptor$4(),
9663
+ buildServiceDescriptor$3(),
9664
+ buildServiceDescriptor$2$1(),
9665
+ buildServiceDescriptor$1$1(),
9666
+ buildServiceDescriptor$7(),
9667
+ buildServiceDescriptor$1(),
9668
+ buildServiceDescriptor$2(),
8473
9669
  ];
8474
9670
  setServices(services);
8475
9671
  }
@@ -8489,4 +9685,4 @@ function ldsEngineCreator() {
8489
9685
  }
8490
9686
 
8491
9687
  export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
8492
- // version: 1.401.0-b1adb82748
9688
+ // version: 1.402.0-bf9ae185ef