@salesforce/lds-adapters-uiapi 1.142.1 → 1.144.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.
@@ -50611,7 +50611,13 @@ function select$7(luvio, config) {
50611
50611
  return select$8(luvio, query, variables, operationName);
50612
50612
  }
50613
50613
  function keyBuilder$d(luvio, params) {
50614
- return keyPrefix + '::' + 'GraphQLRepresentation';
50614
+ const { query, operationName, variables } = params.body;
50615
+ const operationToExecute = getOperationFromDocument(query, operationName);
50616
+ if (operationToExecute !== undefined) {
50617
+ const fragments = createFragmentMap(query);
50618
+ return keyBuilder$e(luvio, operationToExecute, variables || {}, fragments);
50619
+ }
50620
+ return `adapters_adapter$45$utils_keyPrefix::GraphQLRepresentation::InvalidOperation`;
50615
50621
  }
50616
50622
  function getResponseCacheKeys$b(luvio, resourceParams, response) {
50617
50623
  const query = resourceParams.body.query;
@@ -50621,7 +50627,7 @@ function getResponseCacheKeys$b(luvio, resourceParams, response) {
50621
50627
  }
50622
50628
  function ingestSuccess$5(luvio, config, resourceParams, response, snapshotRefresh) {
50623
50629
  const { body } = response;
50624
- const key = keyBuilder$d();
50630
+ const key = keyBuilder$d(luvio, resourceParams);
50625
50631
  const { query, variables, operationName } = resourceParams.body;
50626
50632
  luvio.storeIngest(key, ingest$7(query, variables, operationName), body);
50627
50633
  // revert the optimized pagination variables back to its original so that subsequent store lookup will include all records, not just the ones loaded by an optimized query
@@ -50640,7 +50646,7 @@ function ingestSuccess$5(luvio, config, resourceParams, response, snapshotRefres
50640
50646
  return snapshot;
50641
50647
  }
50642
50648
  function ingestError$2(luvio, config, params, error, snapshotRefresh) {
50643
- const key = keyBuilder$d();
50649
+ const key = keyBuilder$d(luvio, params);
50644
50650
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
50645
50651
  const storeMetadataParams = {
50646
50652
  ttl: TTL$5,
@@ -50769,7 +50775,7 @@ function selectChildResourceParams(luvio, childResources, resourceParams) {
50769
50775
  reader.enterPath(i);
50770
50776
  reader.enterPath(envelopeBodyPath);
50771
50777
  const childResource = childResources[i];
50772
- const childKey = keyBuilder$d();
50778
+ const childKey = keyBuilder$d(luvio, childResource);
50773
50779
  const childFragment = select$7(luvio, childResource.body); // MUST read from the ORIGINAL config not injected
50774
50780
  const isMissingDataBeforeChildRead = reader.getIsDataMissing();
50775
50781
  const childSnapshot = reader.read({
@@ -50888,7 +50894,7 @@ function getResponseCacheKeys$a(luvio, resourceParams, response) {
50888
50894
  ObjectAssign(keys, childKeys);
50889
50895
  }
50890
50896
  else if (childStatusCode === 404) {
50891
- const childKey = keyBuilder$d();
50897
+ const childKey = keyBuilder$d(luvio, childResourceParams);
50892
50898
  keys.set(childKey, {
50893
50899
  namespace: keyPrefix,
50894
50900
  representationName: RepresentationType$c,
@@ -50906,7 +50912,7 @@ function ingestSuccessChildResourceParams(luvio, childConfigs, childResourcePara
50906
50912
  // There's an assumption here that the config and resource params aren't reordered.
50907
50913
  const childConfig = childConfigs[index];
50908
50914
  const childResourceParams = childResourceParamsArray[index];
50909
- const childKey = keyBuilder$d();
50915
+ const childKey = keyBuilder$d(luvio, childResourceParams);
50910
50916
  const result = childEnvelopes[index];
50911
50917
  const { statusCode: childStatusCode, result: childBody } = result;
50912
50918
  if (childStatusCode === 200 &&
@@ -51165,8 +51171,8 @@ function createResourceParams$b(config) {
51165
51171
  return resourceParams;
51166
51172
  }
51167
51173
  function keyBuilder$a(luvio, config) {
51168
- createResourceParams$b(config);
51169
- return keyBuilder$d();
51174
+ const resourceParams = createResourceParams$b(config);
51175
+ return keyBuilder$d(luvio, resourceParams);
51170
51176
  }
51171
51177
  function typeCheckConfig$e(untrustedConfig) {
51172
51178
  const config = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-uiapi",
3
- "version": "1.142.1",
3
+ "version": "1.144.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Wire adapters for record related UI API endpoints",
6
6
  "main": "dist/es/es2018/uiapi-records-service.js",
@@ -16,8 +16,8 @@ import { register, withDefaultLuvio } from 'force/ldsEngine';
16
16
  import { print, visit, parse, astResolver } from 'force/ldsGraphqlParser';
17
17
  import { createInstrumentedAdapter, createLDSAdapter, createGraphQLWireAdapterConstructor, createGraphQLImperativeAdapter } from 'force/ldsBindings';
18
18
  export { refresh as refreshGraphQL } from 'force/ldsBindings';
19
- import { serializeStructuredKey, StoreKeyMap, deepFreeze, StoreKeySet } from 'force/luvioEngine';
20
19
  import { createFragmentMap, serializeFieldArguments, buildQueryTypeStringKey, getOperationFromDocument } from 'force/luvioGraphql';
20
+ import { serializeStructuredKey, StoreKeyMap, deepFreeze, StoreKeySet } from 'force/luvioEngine';
21
21
  import { createIngestRecordWithFields } from 'force/ldsAdaptersUiapi';
22
22
 
23
23
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
@@ -19573,7 +19573,13 @@ function select$7(luvio, config) {
19573
19573
  return select$8(luvio, query, variables, operationName);
19574
19574
  }
19575
19575
  function keyBuilder$3(luvio, params) {
19576
- return keyPrefix + '::' + 'GraphQLRepresentation';
19576
+ const { query, operationName, variables } = params.body;
19577
+ const operationToExecute = getOperationFromDocument(query, operationName);
19578
+ if (operationToExecute !== undefined) {
19579
+ const fragments = createFragmentMap(query);
19580
+ return keyBuilder$4(luvio, operationToExecute, variables || {}, fragments);
19581
+ }
19582
+ return `adapters_adapter$45$utils_keyPrefix::GraphQLRepresentation::InvalidOperation`;
19577
19583
  }
19578
19584
  function getResponseCacheKeys$1(luvio, resourceParams, response) {
19579
19585
  const query = resourceParams.body.query;
@@ -19583,7 +19589,7 @@ function getResponseCacheKeys$1(luvio, resourceParams, response) {
19583
19589
  }
19584
19590
  function ingestSuccess$1(luvio, config, resourceParams, response, snapshotRefresh) {
19585
19591
  const { body } = response;
19586
- const key = keyBuilder$3();
19592
+ const key = keyBuilder$3(luvio, resourceParams);
19587
19593
  const { query, variables, operationName } = resourceParams.body;
19588
19594
  luvio.storeIngest(key, ingest(query, variables, operationName), body);
19589
19595
  // revert the optimized pagination variables back to its original so that subsequent store lookup will include all records, not just the ones loaded by an optimized query
@@ -19602,7 +19608,7 @@ function ingestSuccess$1(luvio, config, resourceParams, response, snapshotRefres
19602
19608
  return snapshot;
19603
19609
  }
19604
19610
  function ingestError$1(luvio, config, params, error, snapshotRefresh) {
19605
- const key = keyBuilder$3();
19611
+ const key = keyBuilder$3(luvio, params);
19606
19612
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
19607
19613
  const storeMetadataParams = {
19608
19614
  ttl: TTL,
@@ -19685,8 +19691,8 @@ function createResourceParams$1(config) {
19685
19691
  return resourceParams;
19686
19692
  }
19687
19693
  function keyBuilder$2(luvio, config) {
19688
- createResourceParams$1(config);
19689
- return keyBuilder$3();
19694
+ const resourceParams = createResourceParams$1(config);
19695
+ return keyBuilder$3(luvio, resourceParams);
19690
19696
  }
19691
19697
  function typeCheckConfig$1(untrustedConfig) {
19692
19698
  const config = {};
@@ -20037,7 +20043,7 @@ function selectChildResourceParams(luvio, childResources, resourceParams) {
20037
20043
  reader.enterPath(i);
20038
20044
  reader.enterPath(envelopeBodyPath);
20039
20045
  const childResource = childResources[i];
20040
- const childKey = keyBuilder$3();
20046
+ const childKey = keyBuilder$3(luvio, childResource);
20041
20047
  const childFragment = select$7(luvio, childResource.body); // MUST read from the ORIGINAL config not injected
20042
20048
  const isMissingDataBeforeChildRead = reader.getIsDataMissing();
20043
20049
  const childSnapshot = reader.read({
@@ -20156,7 +20162,7 @@ function getResponseCacheKeys(luvio, resourceParams, response) {
20156
20162
  ObjectAssign(keys, childKeys);
20157
20163
  }
20158
20164
  else if (childStatusCode === 404) {
20159
- const childKey = keyBuilder$3();
20165
+ const childKey = keyBuilder$3(luvio, childResourceParams);
20160
20166
  keys.set(childKey, {
20161
20167
  namespace: keyPrefix,
20162
20168
  representationName: RepresentationType,
@@ -20174,7 +20180,7 @@ function ingestSuccessChildResourceParams(luvio, childConfigs, childResourcePara
20174
20180
  // There's an assumption here that the config and resource params aren't reordered.
20175
20181
  const childConfig = childConfigs[index];
20176
20182
  const childResourceParams = childResourceParamsArray[index];
20177
- const childKey = keyBuilder$3();
20183
+ const childKey = keyBuilder$3(luvio, childResourceParams);
20178
20184
  const result = childEnvelopes[index];
20179
20185
  const { statusCode: childStatusCode, result: childBody } = result;
20180
20186
  if (childStatusCode === 200 &&
@@ -20805,4 +20811,4 @@ register({
20805
20811
  });
20806
20812
 
20807
20813
  export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative };
20808
- // version: 1.142.1-1511d83f4
20814
+ // version: 1.144.0-32cfd690e
package/sfdc/index.js CHANGED
@@ -35769,4 +35769,4 @@ withDefaultLuvio((luvio) => {
35769
35769
  });
35770
35770
 
35771
35771
  export { InMemoryRecordRepresentationQueryEvaluator, MRU, RepresentationType$I as ObjectInfoRepresentationType, RepresentationType$N as RecordRepresentationRepresentationType, TTL$v as RecordRepresentationTTL, RepresentationType$N as RecordRepresentationType, VERSION$14 as RecordRepresentationVersion, keyPrefix as UiApiNamespace, configurationForRestAdapters as configuration, createContentDocumentAndVersion, createContentVersion, createIngestRecordWithFields, createRecord, deleteRecord, getActionOverrides, getActionOverrides_imperative, getAllApps, getAllApps_imperative, getAppDetails, getAppDetails_imperative, getDuplicateConfiguration, getDuplicateConfiguration_imperative, getDuplicates, getDuplicates_imperative, getGlobalActions, getGlobalActions_imperative, getKeywordSearchResults, getKeywordSearchResults_imperative, getLayout, getLayoutUserState, getLayoutUserState_imperative, getLayout_imperative, getListInfoByName, getListInfoByName_imperative, getListInfosByName, getListInfosByName_imperative, getListRecordsByName, getListRecordsByName_imperative, getListUi, getListUi_imperative, getListViewSummaryCollection, getListViewSummaryCollection_imperative, getLookupActions, getLookupActions_imperative, getLookupMetadata, getLookupMetadata_imperative, getLookupRecords, getLookupRecords_imperative, getNavItems, getNavItems_imperative, getObjectCreateActions, getObjectCreateActions_imperative, getObjectInfo, getObjectInfoAdapterFactory, getObjectInfo_imperative, getObjectInfos, getObjectInfosAdapterFactory, getObjectInfos_imperative, getPicklistValues, getPicklistValuesByRecordType, getPicklistValuesByRecordType_imperative, getPicklistValues_imperative, getQuickActionDefaults, getQuickActionDefaults_imperative, getQuickActionLayout, getQuickActionLayout_imperative, getRecord, getRecordActions, getRecordActions_imperative, factory$e as getRecordAdapterFactory, getRecordAvatars, getRecordAvatars_imperative, getRecordCreateDefaults, getRecordCreateDefaults_imperative, getRecordEditActions, getRecordEditActions_imperative, getRecordId18, getRecordNotifyChange, getRecordTemplateClone, getRecordTemplateClone_imperative, getRecordTemplateCreate, getRecordTemplateCreate_imperative, getRecordUi, getRecordUi_imperative, getRecord_imperative, getRecords, getRecords_imperative, getRelatedListActions, getRelatedListActions_imperative, getRelatedListCount, getRelatedListCount_imperative, getRelatedListInfo, getRelatedListInfoBatch, getRelatedListInfoBatch_imperative, getRelatedListInfo_imperative, getRelatedListPreferences, getRelatedListPreferencesBatch, getRelatedListPreferencesBatch_imperative, getRelatedListPreferences_imperative, getRelatedListRecordActions, getRelatedListRecordActions_imperative, getRelatedListRecords, getRelatedListRecordsBatch, getRelatedListRecordsBatch_imperative, getRelatedListRecords_imperative, getRelatedListsActions, getRelatedListsActions_imperative, getRelatedListsCount, getRelatedListsCount_imperative, getRelatedListsInfo, getRelatedListsInfo_imperative, getResponseCacheKeys as getResponseCacheKeysContentDocumentCompositeRepresentation, getSearchFilterMetadata, getSearchFilterMetadata_imperative, getSearchFilterOptions, getSearchFilterOptions_imperative, getSearchResults, getSearchResults_imperative, getTypeCacheKeys$P as getTypeCacheKeysRecord, ingest as ingestContentDocumentCompositeRepresentation, ingest$B as ingestObjectInfo, ingest$x as ingestQuickActionExecutionRepresentation, ingest$G as ingestRecord, instrument, keyBuilder as keyBuilderContentDocumentCompositeRepresentation, keyBuilderFromType as keyBuilderFromTypeContentDocumentCompositeRepresentation, keyBuilderFromType$x as keyBuilderFromTypeRecordRepresentation, keyBuilder$1F as keyBuilderObjectInfo, keyBuilder$1z as keyBuilderQuickActionExecutionRepresentation, keyBuilder$1Q as keyBuilderRecord, notifyRecordUpdateAvailable, performQuickAction, performUpdateRecordQuickAction, refresh, updateLayoutUserState, updateRecord, updateRecordAvatar, updateRelatedListInfo, updateRelatedListPreferences };
35772
- // version: 1.142.1-1511d83f4
35772
+ // version: 1.144.0-32cfd690e
@@ -79,7 +79,7 @@ var FragmentReadResultState;
79
79
  ({
80
80
  state: FragmentReadResultState.Missing,
81
81
  });
82
- // engine version: 0.142.3-97d0da6c
82
+ // engine version: 0.142.4-be29f4f3
83
83
 
84
84
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
85
85