@salesforce/lds-adapters-uiapi 1.244.0 → 1.246.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.
Files changed (33) hide show
  1. package/dist/es/es2018/types/src/generated/adapters/getListPreferences.d.ts +28 -0
  2. package/dist/es/es2018/types/src/generated/adapters/getListRecordsByName.d.ts +1 -0
  3. package/dist/es/es2018/types/src/generated/adapters/getLookupRecords.d.ts +6 -4
  4. package/dist/es/es2018/types/src/generated/adapters/getObjectInfoDirectory.d.ts +26 -0
  5. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/sfdc_restAdapters.d.ts +3 -1
  7. package/dist/es/es2018/types/src/generated/resources/getUiApiListPreferencesByListViewApiNameAndObjectApiName.d.ts +16 -0
  8. package/dist/es/es2018/types/src/generated/resources/getUiApiListRecordsByListViewApiNameAndObjectApiName.d.ts +1 -0
  9. package/dist/es/es2018/types/src/generated/resources/getUiApiListRecordsByListViewId.d.ts +1 -0
  10. package/dist/es/es2018/types/src/generated/resources/{getUiApiLookupsByFieldApiNameAndObjectApiName.d.ts → postUiApiLookupsByFieldApiNameAndObjectApiName.d.ts} +4 -0
  11. package/dist/es/es2018/types/src/generated/types/ListColumnRepresentation.d.ts +4 -1
  12. package/dist/es/es2018/types/src/generated/types/ListInfoRepresentation.d.ts +4 -1
  13. package/dist/es/es2018/types/src/generated/types/ListPreferencesRepresentation.d.ts +59 -0
  14. package/dist/es/es2018/types/src/generated/types/ListRecordCollectionRepresentation.d.ts +13 -7
  15. package/dist/es/es2018/types/src/generated/types/ListScopeInputRepresentation.d.ts +5 -5
  16. package/dist/es/es2018/types/src/generated/types/LookupPOSTRequestBodyRepresentation.d.ts +29 -0
  17. package/dist/es/es2018/types/src/generated/types/ObjectInfoDirectoryEntryRepresentation.d.ts +13 -4
  18. package/dist/es/es2018/types/src/generated/types/ObjectInfoDirectoryRepresentation.d.ts +12 -3
  19. package/dist/es/es2018/types/src/main.d.ts +4 -0
  20. package/dist/es/es2018/types/src/predictive-loading/index.d.ts +1 -0
  21. package/dist/es/es2018/types/src/predictive-loading/registry.d.ts +7 -0
  22. package/dist/es/es2018/types/src/raml-artifacts/adapters/getLookupRecords/validateAdapterConfig.d.ts +2 -0
  23. package/dist/es/es2018/types/src/raml-artifacts/resources/{getUiApiLookupsByFieldApiNameAndObjectApiName → postUiApiLookupsByFieldApiNameAndObjectApiName}/ingestSuccess.d.ts +1 -1
  24. package/dist/es/es2018/types/src/raml-artifacts/resources/{getUiApiLookupsByFieldApiNameAndObjectApiName → postUiApiLookupsByFieldApiNameAndObjectApiName}/select.d.ts +1 -1
  25. package/dist/es/es2018/types/src/sfdc_rest.d.ts +2 -1
  26. package/dist/es/es2018/types/src/util/language.d.ts +2 -2
  27. package/dist/es/es2018/uiapi-records-service.js +3462 -2524
  28. package/package.json +14 -3
  29. package/sfdc/graphqlAdapters.js +2 -2
  30. package/sfdc/index.js +3269 -2323
  31. package/sfdc/uiapi-static-functions.js +2 -2
  32. package/src/raml/api.raml +77 -2
  33. package/src/raml/luvio.raml +43 -17
@@ -95,11 +95,11 @@ var TypeCheckShapes;
95
95
  TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
96
96
  TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
97
97
  })(TypeCheckShapes || (TypeCheckShapes = {}));
98
- // engine version: 0.150.3-a08cc935
98
+ // engine version: 0.150.6-26328503
99
99
 
100
100
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
101
101
 
102
- const { assign, create, freeze, keys } = Object;
102
+ const { assign, create, freeze, isFrozen, keys } = Object;
103
103
 
104
104
  function isString(value) {
105
105
  return typeof value === 'string';
package/src/raml/api.raml CHANGED
@@ -1232,6 +1232,10 @@ types:
1232
1232
  description: The lookupId for the column when the field is a reference, otherwise
1233
1233
  null.
1234
1234
  type: string | nil
1235
+ searchable:
1236
+ description: Whether the list column is searchable.
1237
+ type: boolean
1238
+ required: false # TODO: W-12761618 - make this required once LWC OH is ready for GA
1235
1239
  sortable:
1236
1240
  description: Whether the list column is sortable.
1237
1241
  type: boolean
@@ -1460,6 +1464,10 @@ types:
1460
1464
  description: Scope information for this list view.
1461
1465
  type: ListScopeRepresentation | nil # TODO: hand rolled
1462
1466
  required: false # TODO: W-12761618 - make this required once LWC OH is ready for GA
1467
+ searchable:
1468
+ description: Indicates whether the listview can be searched (SOSL).
1469
+ type: boolean
1470
+ required: false # TODO: W-12761618 - make this required once LWC OH is ready for GA
1463
1471
  updateable:
1464
1472
  description: Indicates whether the listview can be updated.
1465
1473
  type: boolean
@@ -1678,6 +1686,30 @@ types:
1678
1686
  isAscending:
1679
1687
  description: Boolean describing if the orderBy should be ascending.
1680
1688
  type: boolean
1689
+ ListPreferencesRepresentation:
1690
+ description: ListPreferencesRepresentation
1691
+ type: object
1692
+ properties:
1693
+ columnWidths:
1694
+ description: Column width preferences for the list.
1695
+ type: object
1696
+ properties:
1697
+ //:
1698
+ type: integer
1699
+ columnWrap:
1700
+ description: Column wrapping preferences for the list.
1701
+ type: object
1702
+ properties:
1703
+ //:
1704
+ type: boolean
1705
+ listReference:
1706
+ description: Reference information for the list.
1707
+ type: ListReferenceRepresentation
1708
+ orderedBy:
1709
+ description: Ordering preference for the list.
1710
+ type: array
1711
+ items:
1712
+ type: ListOrderByInfoRepresentation
1681
1713
  ListRecordCollectionRepresentation:
1682
1714
  description: ListRecordCollectionRepresentation
1683
1715
  type: object
@@ -1728,6 +1760,9 @@ types:
1728
1760
  type: array
1729
1761
  items:
1730
1762
  type: RecordRepresentation
1763
+ searchTerm:
1764
+ description: The searchTerm field requested when these records were fetched.
1765
+ type: string | nil
1731
1766
  sortBy:
1732
1767
  description: The sortBy field requested when these records were fetched.
1733
1768
  type: string[] | nil # TODO: hand rolled
@@ -1772,9 +1807,11 @@ types:
1772
1807
  entityId:
1773
1808
  description: Input representation for the scope's entity id.
1774
1809
  type: string | nil
1810
+ required: false
1775
1811
  relatedEntityId:
1776
1812
  description: Input representation for the scope's related entity id.
1777
1813
  type: string | nil
1814
+ required: false
1778
1815
  ListScopeRelatedEntityRepresentation:
1779
1816
  description: ListScopeRelatedEntityRepresentation
1780
1817
  type: object
@@ -1991,6 +2028,16 @@ types:
1991
2028
  secondaryField:
1992
2029
  description: API name of the field used as a secondary display field.
1993
2030
  type: string | nil
2031
+ LookupPOSTRequestBodyRepresentation:
2032
+ description: A lookup POST request body.
2033
+ type: object
2034
+ properties:
2035
+ sourceRecord:
2036
+ description: The source record
2037
+ # A bug in the keybuilder code generation forces us to support nil when the property is not required
2038
+ # We can remove the support of nil as soon as W-14087127 is fixed.
2039
+ type: RecordInputRepresentation | nil
2040
+ required: false
1994
2041
  MatchRepresentation:
1995
2042
  description: 'Representation of group of possible matches '
1996
2043
  type: object
@@ -5819,6 +5866,24 @@ types:
5819
5866
  objectApiName:
5820
5867
  type: string
5821
5868
  required: true
5869
+ /list-preferences:
5870
+ /{objectApiName}/{listViewApiName}:
5871
+ get:
5872
+ displayName: getListPreferences
5873
+ description: Retrieve list preferences
5874
+ responses:
5875
+ '200':
5876
+ description: Success
5877
+ body:
5878
+ application/json:
5879
+ type: ListPreferencesRepresentation
5880
+ uriParameters:
5881
+ listViewApiName:
5882
+ type: string
5883
+ required: true
5884
+ objectApiName:
5885
+ type: string
5886
+ required: true
5822
5887
  /list-records:
5823
5888
  /{listViewId}:
5824
5889
  get:
@@ -5850,6 +5915,9 @@ types:
5850
5915
  pageToken:
5851
5916
  type: string
5852
5917
  required: false
5918
+ searchTerm:
5919
+ type: string
5920
+ required: false
5853
5921
  sortBy:
5854
5922
  type: array
5855
5923
  required: false
@@ -5890,6 +5958,9 @@ types:
5890
5958
  pageToken:
5891
5959
  type: string
5892
5960
  required: false
5961
+ searchTerm:
5962
+ type: string
5963
+ required: false
5893
5964
  sortBy:
5894
5965
  type: array
5895
5966
  required: false
@@ -6016,8 +6087,8 @@ types:
6016
6087
  type: string
6017
6088
  required: true
6018
6089
  /lookups/{objectApiName}/{fieldApiName}:
6019
- get:
6020
- displayName: getLookup
6090
+ post:
6091
+ displayName: getLookupRecords
6021
6092
  description: Returns record search results for the given lookup field.
6022
6093
  responses:
6023
6094
  '200':
@@ -6025,6 +6096,10 @@ types:
6025
6096
  body:
6026
6097
  application/json:
6027
6098
  type: LookupValuesRepresentation
6099
+ body:
6100
+ application/json:
6101
+ type: LookupPOSTRequestBodyRepresentation
6102
+ (oas-body-name): body
6028
6103
  queryParameters:
6029
6104
  dependentFieldBindings:
6030
6105
  type: array
@@ -103,6 +103,13 @@ types:
103
103
  (luvio.key):
104
104
  objectApiName: objectApiName
105
105
  (luvio.ttl): 900000
106
+ ListPreferencesRepresentation:
107
+ examples:
108
+ mockListPreferences: !include ../mocks/types/ListPreferencesRepresentation/mockListPreferencesAccountAllAccounts.json
109
+ (luvio.key):
110
+ objectApiName: listReference.objectApiName
111
+ listViewApiName: listReference.listViewApiName
112
+ (luvio.ttl): 900000
106
113
  ListRecordCollectionRepresentation:
107
114
  (luvio.ttl): 30000
108
115
  (luvio.private):
@@ -114,6 +121,7 @@ types:
114
121
  # the list.
115
122
  (luvio.key):
116
123
  listViewId: listInfoETag
124
+ searchTerm: searchTerm
117
125
  sortBy: sortBy
118
126
  objectApiName: listReference.objectApiName
119
127
  listViewApiName: listReference.listViewApiName
@@ -238,6 +246,9 @@ types:
238
246
  - eTag
239
247
  (luvio.private):
240
248
  - eTag
249
+ ObjectInfoDirectoryEntryRepresentation:
250
+ (luvio.key):
251
+ objectInfoUrl: objectInfoUrl
241
252
  PageReferenceRepresentation:
242
253
  (luvio.opaque): true
243
254
  AbstractRecordAvatarBatchRepresentation:
@@ -882,12 +893,38 @@ types:
882
893
  objectApiName: SalesforceObjectId
883
894
  (luvio.key):
884
895
  objectApiName: urlParams.objectApiName
896
+ /list-preferences:
897
+ '/{objectApiName}/{listViewApiName}':
898
+ uriParameters:
899
+ objectApiName:
900
+ examples:
901
+ mockListPreferences: Account
902
+ listViewApiName:
903
+ examples:
904
+ mockListPreferences: AllAccounts
905
+ get:
906
+ (luvio.adapter):
907
+ name: getListPreferences
908
+ tests:
909
+ expectedResponses:
910
+ - configInput: |
911
+ {
912
+ "objectApiName": "Account",
913
+ "listViewApiName": "AllAccounts"
914
+ }
915
+ mockPayloadId: mockListPreferences
916
+ coercedParams:
917
+ objectApiName: SalesforceObjectId
918
+ (luvio.key):
919
+ objectApiName: urlParams.objectApiName
920
+ listViewApiName: urlParams.listViewApiName
885
921
  /list-records:
886
922
  '/{listViewId}':
887
923
  get:
888
924
  (luvio.key):
889
925
  listViewId: urlParams.listViewId
890
926
  sortBy: queryParams.sortBy || null
927
+ searchTerm: queryParams.searchTerm || null
891
928
  objectApiName: '""'
892
929
  listViewApiName: '""'
893
930
  '/{objectApiName}/{listViewApiName}':
@@ -906,6 +943,7 @@ types:
906
943
  objectApiName: urlParams.objectApiName
907
944
  listViewApiName: urlParams.listViewApiName
908
945
  listViewId: '""'
946
+ searchTerm: queryParams.searchTerm || null
909
947
  sortBy: queryParams.sortBy || []
910
948
  (luvio.paginationParams):
911
949
  queryParameters:
@@ -978,25 +1016,10 @@ types:
978
1016
  fieldApiName:
979
1017
  examples:
980
1018
  mockGetLookupRecords: ContactId
981
- get:
1019
+ post:
1020
+ (luvio.method): get
982
1021
  (luvio.adapter):
983
1022
  name: getLookupRecords
984
- # TODO: W-9927420 uncomment when getLookupRecords supports offline
985
- # tests:
986
- # expectedResponses:
987
- # - configInput: |
988
- # {
989
- # "fieldApiName": "Case.ContactId",
990
- # "targetApiName": "Contact",
991
- # "requestParams": {
992
- # "q": "jak",
993
- # "pageSize": 10,
994
- # "searchType": "TypeAhead",
995
- # "page": 1,
996
- # "sourceRecordId": ""
997
- # }
998
- # }
999
- # mockPayloadId: mockGetLookupRecords
1000
1023
  coercedParams:
1001
1024
  fieldApiName: SalesforceFieldId
1002
1025
  /nav-items:
@@ -1159,6 +1182,9 @@ types:
1159
1182
  }
1160
1183
  mockPayloadId: mockGetRecordUiResponse
1161
1184
  /object-info:
1185
+ get:
1186
+ (luvio.adapter):
1187
+ name: getObjectInfoDirectory
1162
1188
  '/batch/{objectApiNames}':
1163
1189
  uriParameters:
1164
1190
  objectApiNames: