@salesforce/lds-adapters-uiapi 1.282.0 → 1.284.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/types/src/configuration.d.ts +23 -0
- package/dist/es/es2018/types/src/generated/types/ListObjectInfoRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/ListRecordCollectionRepresentation.d.ts +1 -4
- package/dist/es/es2018/types/src/main.d.ts +6 -2
- package/dist/es/es2018/types/src/primitives/FieldId/coerce.d.ts +2 -1
- package/dist/es/es2018/types/src/primitives/FieldIdArray/coerce.d.ts +4 -1
- package/dist/es/es2018/uiapi-records-service.js +67 -13
- package/package.json +7 -7
- package/sfdc/graphqlAdapters.js +46 -7
- package/sfdc/index.js +82 -18
- package/sfdc/uiapi-static-functions.js +5 -3
- package/src/raml/api.raml +4 -0
- package/src/raml/luvio.raml +6 -3
|
@@ -10,13 +10,35 @@ import type { DraftAwareDeleteRecordAdapter } from './wire/deleteRecord/configur
|
|
|
10
10
|
import type { GraphqlBatchConfig } from './wire/graphqlBatch';
|
|
11
11
|
import type { GraphQLBatchRepresentation } from './wire/graphqlBatch/postGraphqlBatch';
|
|
12
12
|
import type { BuildSnapshotContext as BatchBuildSnapshotContext } from './wire/graphqlBatch';
|
|
13
|
+
import type { WireAdapterConstructor } from '@lwc/engine-core';
|
|
13
14
|
export type DraftAwareGraphQLAdapter = (config: GraphqlConfig, buildCachedSnapshotCachePolicy: (context: BuildSnapshotContext, storeLookup: StoreLookup<GraphQLRepresentation, unknown>) => Snapshot<GraphQLRepresentation, any>, buildNetworkSnapshotCachePolicy: (context: BuildSnapshotContext, coercedAdapterRequestContext: CoercedAdapterRequestContext) => Promise<Snapshot<GraphQLRepresentation, any>>, requestContext?: AdapterRequestContext) => Promise<AvailableSnapshot<GraphQLRepresentation>>;
|
|
14
15
|
export type EnvironmentAwareGraphQLBatchAdapter = (config: GraphqlBatchConfig, buildCachedSnapshotCachePolicy: (context: BatchBuildSnapshotContext, storeLookup: StoreLookup<GraphQLBatchRepresentation, unknown>) => Snapshot<GraphQLBatchRepresentation, any>, buildNetworkSnapshotCachePolicy: (context: BatchBuildSnapshotContext, coercedAdapterRequestContext: CoercedAdapterRequestContext) => Promise<Snapshot<GraphQLBatchRepresentation, any>>, requestContext?: AdapterRequestContext) => Promise<AvailableSnapshot<GraphQLBatchRepresentation>>;
|
|
16
|
+
/**
|
|
17
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
18
|
+
* Configuration for one store enabled REST adapters only.
|
|
19
|
+
*/
|
|
20
|
+
export declare const configurationForOneStoreEnabledAdapters: {
|
|
21
|
+
setGetObjectInfoAdapter: (adapter: WireAdapterConstructor) => void;
|
|
22
|
+
getGetObjectInfoAdapter: () => WireAdapterConstructor | undefined;
|
|
23
|
+
setGetObjectInfosAdapter: (adapter: WireAdapterConstructor) => void;
|
|
24
|
+
getGetObjectInfosAdapter: () => WireAdapterConstructor | undefined;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
28
|
+
* @param luvioAdapter - The luvio bound adapter.
|
|
29
|
+
* @param oneStoreAdapter - The one store bound adapter.
|
|
30
|
+
* @returns Luvio or one store wire adapter constructor.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getLuvioOrOneStoreAdapter(luvioAdapter: WireAdapterConstructor, oneStoreAdapter: WireAdapterConstructor | undefined): WireAdapterConstructor;
|
|
15
33
|
/**
|
|
16
34
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
17
35
|
* Configuration for REST adapters only.
|
|
18
36
|
*/
|
|
19
37
|
export declare const configurationForRestAdapters: {
|
|
38
|
+
setGetObjectInfoAdapter: (adapter: WireAdapterConstructor) => void;
|
|
39
|
+
getGetObjectInfoAdapter: () => WireAdapterConstructor | undefined;
|
|
40
|
+
setGetObjectInfosAdapter: (adapter: WireAdapterConstructor) => void;
|
|
41
|
+
getGetObjectInfosAdapter: () => WireAdapterConstructor | undefined;
|
|
20
42
|
setTrackedFieldDepthOnCacheMiss: (trackedFieldDepthOnCacheMissParam: number) => void;
|
|
21
43
|
getTrackedFieldDepthOnCacheMiss: () => number;
|
|
22
44
|
setTrackedFieldDepthOnCacheMergeConflict: (trackedFieldDepthOnCacheMergeConflictParam: number) => void;
|
|
@@ -52,6 +74,7 @@ export declare const configurationForGraphQLAdapters: {
|
|
|
52
74
|
*/
|
|
53
75
|
export type ConfigurationForRestAdapters = typeof configurationForRestAdapters;
|
|
54
76
|
export type ConfigurationForGraphQLAdapters = typeof configurationForGraphQLAdapters;
|
|
77
|
+
export type ConfigurationForOneStoreEnabledAdapters = typeof configurationForOneStoreEnabledAdapters;
|
|
55
78
|
/**
|
|
56
79
|
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
57
80
|
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
@@ -2,7 +2,7 @@ import { ListObjectScopeRepresentation as ListObjectScopeRepresentation_ListObje
|
|
|
2
2
|
import { ListObjectColumnRepresentation as ListObjectColumnRepresentation_ListObjectColumnRepresentation } from './ListObjectColumnRepresentation';
|
|
3
3
|
import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
|
|
4
4
|
export declare const TTL = 900000;
|
|
5
|
-
export declare const VERSION = "
|
|
5
|
+
export declare const VERSION = "2405a0b25c2c00f82e88b600edc16387";
|
|
6
6
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
7
7
|
export declare const RepresentationType: string;
|
|
8
8
|
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
@@ -34,6 +34,8 @@ export interface ListObjectInfoRepresentationNormalized {
|
|
|
34
34
|
createable: boolean;
|
|
35
35
|
/** The requested object API name. */
|
|
36
36
|
objectApiName: string;
|
|
37
|
+
/** Indicates whether the current user can create a new public or shared listview for this listview's SObject. */
|
|
38
|
+
publicOrSharedCreateable: boolean;
|
|
37
39
|
/** Null, or the type of related entity to which this LV can be scoped. */
|
|
38
40
|
relatedEntityApiName: string | null;
|
|
39
41
|
}
|
|
@@ -48,5 +50,6 @@ export interface ListObjectInfoRepresentation {
|
|
|
48
50
|
columns: Array<ListObjectColumnRepresentation_ListObjectColumnRepresentation>;
|
|
49
51
|
createable: boolean;
|
|
50
52
|
objectApiName: string;
|
|
53
|
+
publicOrSharedCreateable: boolean;
|
|
51
54
|
relatedEntityApiName: string | null;
|
|
52
55
|
}
|
|
@@ -3,14 +3,13 @@ import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $
|
|
|
3
3
|
import { PaginationParams as pagination_cursor_PaginationParams, PaginationMetadata as pagination_cursor_PaginationMetadata, PageMetadata as pagination_cursor_PageMetadata } from '../pagination/cursor';
|
|
4
4
|
import { RecordRepresentation as RecordRepresentation_RecordRepresentation } from './RecordRepresentation';
|
|
5
5
|
export declare const TTL = 30000;
|
|
6
|
-
export declare const VERSION = "
|
|
6
|
+
export declare const VERSION = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
7
7
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
8
8
|
export declare const RepresentationType: string;
|
|
9
9
|
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
10
10
|
objectApiName: string;
|
|
11
11
|
searchTerm: string | null;
|
|
12
12
|
sortBy: Array<string> | null;
|
|
13
|
-
listViewId: string | null;
|
|
14
13
|
where: string | null;
|
|
15
14
|
listViewApiName: string | null;
|
|
16
15
|
}
|
|
@@ -44,7 +43,6 @@ export declare function dynamicIngest(ingestParams: DynamicIngestParams): $64$lu
|
|
|
44
43
|
* objectApiName (string): listReference.objectApiName
|
|
45
44
|
* searchTerm (string | null): searchTerm
|
|
46
45
|
* sortBy (Array<string> | null): sortBy
|
|
47
|
-
* listViewId (string | null): listInfoETag
|
|
48
46
|
* where (string | null): where
|
|
49
47
|
* listViewApiName (string | null): listReference.listViewApiName
|
|
50
48
|
*/
|
|
@@ -88,7 +86,6 @@ export interface ListRecordCollectionRepresentationNormalized {
|
|
|
88
86
|
* objectApiName (string): listReference.objectApiName
|
|
89
87
|
* searchTerm (string | null): searchTerm
|
|
90
88
|
* sortBy (Array<string> | null): sortBy
|
|
91
|
-
* listViewId (string | null): listInfoETag
|
|
92
89
|
* where (string | null): where
|
|
93
90
|
* listViewApiName (string | null): listReference.listViewApiName
|
|
94
91
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigurationForRestAdapters, ConfigurationForGraphQLAdapters } from './configuration';
|
|
1
|
+
import type { ConfigurationForRestAdapters, ConfigurationForGraphQLAdapters, ConfigurationForOneStoreEnabledAdapters } from './configuration';
|
|
2
2
|
import type { Instrument } from './instrumentation';
|
|
3
3
|
export * from './predictive-loading';
|
|
4
4
|
export { MRU } from './wire/getListUi';
|
|
@@ -77,8 +77,12 @@ export { createRecordInputFilteredByEditedFields, generateRecordInputForCreate,
|
|
|
77
77
|
export { buildSelectionFromFields, buildSelectionFromRecord } from './selectors/record';
|
|
78
78
|
export { createFieldsIngestSuccess as getRecordResourceIngest } from './generated/fields/resources/getUiApiRecordsByRecordId';
|
|
79
79
|
export type { DraftAwareGraphQLAdapter, EnvironmentAwareGraphQLBatchAdapter, } from './configuration';
|
|
80
|
-
export type Configuration = ConfigurationForRestAdapters & ConfigurationForGraphQLAdapters;
|
|
80
|
+
export type Configuration = ConfigurationForRestAdapters & ConfigurationForGraphQLAdapters & ConfigurationForOneStoreEnabledAdapters;
|
|
81
81
|
export declare const configuration: {
|
|
82
|
+
setGetObjectInfoAdapter: (adapter: import("@lwc/engine-core").WireAdapterConstructor) => void;
|
|
83
|
+
getGetObjectInfoAdapter: () => import("@lwc/engine-core").WireAdapterConstructor | undefined;
|
|
84
|
+
setGetObjectInfosAdapter: (adapter: import("@lwc/engine-core").WireAdapterConstructor) => void;
|
|
85
|
+
getGetObjectInfosAdapter: () => import("@lwc/engine-core").WireAdapterConstructor | undefined;
|
|
82
86
|
setDraftAwareGraphQLAdapter: (adapter: import("./configuration").DraftAwareGraphQLAdapter) => void;
|
|
83
87
|
getDraftAwareGraphQLAdapter: () => import("./configuration").DraftAwareGraphQLAdapter | undefined;
|
|
84
88
|
setEnvironmentAwareGraphQLBatchAdapter: (adapter: import("./configuration").EnvironmentAwareGraphQLBatchAdapter) => void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the field API name, qualified with an object name if possible.
|
|
3
3
|
* @param value The value from which to get the qualified field API name.
|
|
4
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
4
5
|
* @return The qualified field API name.
|
|
5
6
|
*/
|
|
6
|
-
export default function getFieldApiName(value: unknown): string | undefined;
|
|
7
|
+
export default function getFieldApiName(value: unknown, onlyQualifiedFieldNames?: boolean): string | undefined;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the field API name.
|
|
3
3
|
* @param value The value from which to get the field API name.
|
|
4
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
4
5
|
* @returns The field API name.
|
|
5
6
|
*/
|
|
6
|
-
export default function getFieldApiNamesArray(value: unknown
|
|
7
|
+
export default function getFieldApiNamesArray(value: unknown, options?: {
|
|
8
|
+
onlyQualifiedFieldNames: boolean;
|
|
9
|
+
}): Array<string> | undefined;
|
|
@@ -66,6 +66,32 @@ let trackedFieldDepthOnNotifyChange = 5;
|
|
|
66
66
|
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
67
67
|
*/
|
|
68
68
|
let trackedFieldLeafNodeIdAndNameOnly = false;
|
|
69
|
+
/**
|
|
70
|
+
* One store enabled Get Object Info adapter
|
|
71
|
+
*/
|
|
72
|
+
let oneStoreGetObjectInfoAdapter = undefined;
|
|
73
|
+
/**
|
|
74
|
+
* One store enabled Get Object Infos adapter
|
|
75
|
+
*/
|
|
76
|
+
let oneStoreGetObjectInfosAdapter = undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
79
|
+
* Configuration for one store enabled REST adapters only.
|
|
80
|
+
*/
|
|
81
|
+
const configurationForOneStoreEnabledAdapters = {
|
|
82
|
+
setGetObjectInfoAdapter: function (adapter) {
|
|
83
|
+
oneStoreGetObjectInfoAdapter = adapter;
|
|
84
|
+
},
|
|
85
|
+
getGetObjectInfoAdapter: function () {
|
|
86
|
+
return oneStoreGetObjectInfoAdapter;
|
|
87
|
+
},
|
|
88
|
+
setGetObjectInfosAdapter: function (adapter) {
|
|
89
|
+
oneStoreGetObjectInfosAdapter = adapter;
|
|
90
|
+
},
|
|
91
|
+
getGetObjectInfosAdapter: function () {
|
|
92
|
+
return oneStoreGetObjectInfosAdapter;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
69
95
|
/**
|
|
70
96
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
71
97
|
* Configuration for REST adapters only.
|
|
@@ -130,6 +156,7 @@ const configurationForRestAdapters = {
|
|
|
130
156
|
getDraftAwareCreateContentVersionAdapter: function () {
|
|
131
157
|
return draftAwareCreateContentVersionAdapter;
|
|
132
158
|
},
|
|
159
|
+
...configurationForOneStoreEnabledAdapters,
|
|
133
160
|
};
|
|
134
161
|
/**
|
|
135
162
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
@@ -526,15 +553,17 @@ function splitQualifiedFieldApiName(fieldApiName) {
|
|
|
526
553
|
/**
|
|
527
554
|
* Returns the field API name, qualified with an object name if possible.
|
|
528
555
|
* @param value The value from which to get the qualified field API name.
|
|
556
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
529
557
|
* @return The qualified field API name.
|
|
530
558
|
*/
|
|
531
|
-
function getFieldApiName(value) {
|
|
559
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
532
560
|
// Note: tightening validation logic changes behavior from userland getting
|
|
533
561
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
534
|
-
// change the behavior.
|
|
562
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
563
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
535
564
|
if (isString(value)) {
|
|
536
565
|
const trimmed = value.trim();
|
|
537
|
-
if (trimmed.length > 0) {
|
|
566
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
538
567
|
return trimmed;
|
|
539
568
|
}
|
|
540
569
|
}
|
|
@@ -547,15 +576,19 @@ function getFieldApiName(value) {
|
|
|
547
576
|
/**
|
|
548
577
|
* Returns the field API name.
|
|
549
578
|
* @param value The value from which to get the field API name.
|
|
579
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
550
580
|
* @returns The field API name.
|
|
551
581
|
*/
|
|
552
|
-
function getFieldApiNamesArray(value) {
|
|
582
|
+
function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
|
|
553
583
|
const valueArray = isArray(value) ? value : [value];
|
|
554
584
|
const array = [];
|
|
555
585
|
for (let i = 0, len = valueArray.length; i < len; i += 1) {
|
|
556
586
|
const item = valueArray[i];
|
|
557
|
-
const apiName = getFieldApiName(item);
|
|
587
|
+
const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
|
|
558
588
|
if (apiName === undefined) {
|
|
589
|
+
if (options.onlyQualifiedFieldNames) {
|
|
590
|
+
continue; // Just skips invalid field names rather than failing to return an array at all
|
|
591
|
+
}
|
|
559
592
|
return undefined;
|
|
560
593
|
}
|
|
561
594
|
push.call(array, apiName);
|
|
@@ -6545,7 +6578,7 @@ function revertPaginationOptimization(variables) {
|
|
|
6545
6578
|
}
|
|
6546
6579
|
|
|
6547
6580
|
const TTL$C = 30000;
|
|
6548
|
-
const VERSION$2m = "
|
|
6581
|
+
const VERSION$2m = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
6549
6582
|
function validate$1S(obj, path = 'ListRecordCollectionRepresentation') {
|
|
6550
6583
|
const v_error = (() => {
|
|
6551
6584
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -6835,14 +6868,13 @@ function validate$1S(obj, path = 'ListRecordCollectionRepresentation') {
|
|
|
6835
6868
|
}
|
|
6836
6869
|
const RepresentationType$Y = 'ListRecordCollectionRepresentation';
|
|
6837
6870
|
function keyBuilder$3k(luvio, config) {
|
|
6838
|
-
return keyPrefix + '::' + RepresentationType$Y + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.
|
|
6871
|
+
return keyPrefix + '::' + RepresentationType$Y + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
|
|
6839
6872
|
}
|
|
6840
6873
|
function keyBuilderFromType$B(luvio, object) {
|
|
6841
6874
|
const keyParams = {
|
|
6842
6875
|
objectApiName: object.listReference.objectApiName,
|
|
6843
6876
|
searchTerm: object.searchTerm,
|
|
6844
6877
|
sortBy: object.sortBy,
|
|
6845
|
-
listViewId: object.listInfoETag,
|
|
6846
6878
|
where: object.where,
|
|
6847
6879
|
listViewApiName: object.listReference.listViewApiName
|
|
6848
6880
|
};
|
|
@@ -7278,7 +7310,7 @@ function getTypeCacheKeys$21(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
7278
7310
|
const notifyUpdateAvailableFactory$4 = (luvio) => {
|
|
7279
7311
|
return function notifyListRecordCollectionUpdateAvailable(configs) {
|
|
7280
7312
|
if (process.env.NODE_ENV !== 'production') {
|
|
7281
|
-
const requiredKeyParams = ['objectApiName', 'searchTerm', 'sortBy', '
|
|
7313
|
+
const requiredKeyParams = ['objectApiName', 'searchTerm', 'sortBy', 'where', 'listViewApiName'];
|
|
7282
7314
|
configs.forEach(config => {
|
|
7283
7315
|
if (false === requiredKeyParams.every(req => req in config)) {
|
|
7284
7316
|
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
@@ -8632,7 +8664,8 @@ function keyBuilder$3c(luvio, params) {
|
|
|
8632
8664
|
return keyBuilder$3k(luvio, {
|
|
8633
8665
|
objectApiName: listReference.objectApiName,
|
|
8634
8666
|
listViewApiName: listReference.listViewApiName,
|
|
8635
|
-
listViewId
|
|
8667
|
+
// # removing listViewId from key only supporing getting records using api name
|
|
8668
|
+
// listViewId: listReference.id,
|
|
8636
8669
|
searchTerm: params.body.searchTerm || null,
|
|
8637
8670
|
where: params.body.where || null,
|
|
8638
8671
|
sortBy: params.body.sortBy !== undefined && params.body.sortBy.length <= 0
|
|
@@ -8645,7 +8678,8 @@ function keyBuilder$3c(luvio, params) {
|
|
|
8645
8678
|
return keyBuilder$3k(luvio, {
|
|
8646
8679
|
objectApiName: params.urlParams.objectApiName,
|
|
8647
8680
|
listViewApiName: params.urlParams.listViewApiName,
|
|
8648
|
-
listViewId
|
|
8681
|
+
// # removing listViewId from key only supporing getting records using api name
|
|
8682
|
+
// listViewId: '',
|
|
8649
8683
|
searchTerm: params.body.searchTerm || null,
|
|
8650
8684
|
where: params.body.where || null,
|
|
8651
8685
|
sortBy: params.body.sortBy || [],
|
|
@@ -21538,7 +21572,7 @@ function equals$C(existing, incoming) {
|
|
|
21538
21572
|
}
|
|
21539
21573
|
|
|
21540
21574
|
const TTL$p = 900000;
|
|
21541
|
-
const VERSION$1R = "
|
|
21575
|
+
const VERSION$1R = "2405a0b25c2c00f82e88b600edc16387";
|
|
21542
21576
|
function validate$16(obj, path = 'ListObjectInfoRepresentation') {
|
|
21543
21577
|
const v_error = (() => {
|
|
21544
21578
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -21584,6 +21618,11 @@ function validate$16(obj, path = 'ListObjectInfoRepresentation') {
|
|
|
21584
21618
|
if (typeof obj_objectApiName !== 'string') {
|
|
21585
21619
|
return new TypeError('Expected "string" but received "' + typeof obj_objectApiName + '" (at "' + path_objectApiName + '")');
|
|
21586
21620
|
}
|
|
21621
|
+
const obj_publicOrSharedCreateable = obj.publicOrSharedCreateable;
|
|
21622
|
+
const path_publicOrSharedCreateable = path + '.publicOrSharedCreateable';
|
|
21623
|
+
if (typeof obj_publicOrSharedCreateable !== 'boolean') {
|
|
21624
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_publicOrSharedCreateable + '" (at "' + path_publicOrSharedCreateable + '")');
|
|
21625
|
+
}
|
|
21587
21626
|
const obj_relatedEntityApiName = obj.relatedEntityApiName;
|
|
21588
21627
|
const path_relatedEntityApiName = path + '.relatedEntityApiName';
|
|
21589
21628
|
let obj_relatedEntityApiName_union0 = null;
|
|
@@ -21654,6 +21693,10 @@ const select$29 = function ListObjectInfoRepresentationSelect() {
|
|
|
21654
21693
|
name: 'objectApiName',
|
|
21655
21694
|
kind: 'Scalar'
|
|
21656
21695
|
},
|
|
21696
|
+
{
|
|
21697
|
+
name: 'publicOrSharedCreateable',
|
|
21698
|
+
kind: 'Scalar'
|
|
21699
|
+
},
|
|
21657
21700
|
{
|
|
21658
21701
|
name: 'relatedEntityApiName',
|
|
21659
21702
|
kind: 'Scalar'
|
|
@@ -21667,6 +21710,11 @@ function equals$B(existing, incoming) {
|
|
|
21667
21710
|
if (!(existing_createable === incoming_createable)) {
|
|
21668
21711
|
return false;
|
|
21669
21712
|
}
|
|
21713
|
+
const existing_publicOrSharedCreateable = existing.publicOrSharedCreateable;
|
|
21714
|
+
const incoming_publicOrSharedCreateable = incoming.publicOrSharedCreateable;
|
|
21715
|
+
if (!(existing_publicOrSharedCreateable === incoming_publicOrSharedCreateable)) {
|
|
21716
|
+
return false;
|
|
21717
|
+
}
|
|
21670
21718
|
const existing_objectApiName = existing.objectApiName;
|
|
21671
21719
|
const incoming_objectApiName = incoming.objectApiName;
|
|
21672
21720
|
if (!(existing_objectApiName === incoming_objectApiName)) {
|
|
@@ -52091,6 +52139,7 @@ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
|
52091
52139
|
// Note: The original listReference will remain unchanged in the response.
|
|
52092
52140
|
mutatedListRef.id = body.listInfoETag;
|
|
52093
52141
|
addListReferenceWithId(mutatedListRef, context, body.listReference.id);
|
|
52142
|
+
// storing sortBy ensuring a cache hit when requesting records with no sortBy provided
|
|
52094
52143
|
addServerDefaults(config, body, originalListRef, context);
|
|
52095
52144
|
}
|
|
52096
52145
|
return onFetchResponseSuccess$2(luvio, config, resourceParams, response);
|
|
@@ -55630,10 +55679,15 @@ class InMemoryRecordRepresentationQueryEvaluator {
|
|
|
55630
55679
|
const configuration = {
|
|
55631
55680
|
...configurationForRestAdapters,
|
|
55632
55681
|
...configurationForGraphQLAdapters,
|
|
55682
|
+
...configurationForOneStoreEnabledAdapters,
|
|
55633
55683
|
};
|
|
55634
55684
|
ensureRegisteredOnce({
|
|
55635
55685
|
id: '@salesforce/lds-adapters-uiapi',
|
|
55636
|
-
configuration: {
|
|
55686
|
+
configuration: {
|
|
55687
|
+
...configurationForRestAdapters,
|
|
55688
|
+
...configurationForGraphQLAdapters,
|
|
55689
|
+
...configurationForOneStoreEnabledAdapters,
|
|
55690
|
+
},
|
|
55637
55691
|
instrument,
|
|
55638
55692
|
});
|
|
55639
55693
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-uiapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.284.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",
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@salesforce/lds-bindings": "^1.
|
|
72
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
71
|
+
"@salesforce/lds-bindings": "^1.284.0",
|
|
72
|
+
"@salesforce/lds-default-luvio": "^1.284.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@databases/sqlite": "^3.0.0",
|
|
76
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
77
|
-
"@salesforce/lds-jest": "^1.
|
|
78
|
-
"@salesforce/lds-store-binary": "^1.
|
|
76
|
+
"@salesforce/lds-compiler-plugins": "^1.284.0",
|
|
77
|
+
"@salesforce/lds-jest": "^1.284.0",
|
|
78
|
+
"@salesforce/lds-store-binary": "^1.284.0"
|
|
79
79
|
},
|
|
80
80
|
"luvioBundlesize": [
|
|
81
81
|
{
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"maxSize": {
|
|
84
84
|
"none": "1.60 MB",
|
|
85
85
|
"min": "800 kB",
|
|
86
|
-
"compressed": "
|
|
86
|
+
"compressed": "111 kB"
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
{
|
package/sfdc/graphqlAdapters.js
CHANGED
|
@@ -18585,6 +18585,32 @@ let trackedFieldDepthOnNotifyChange = 5;
|
|
|
18585
18585
|
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
18586
18586
|
*/
|
|
18587
18587
|
let trackedFieldLeafNodeIdAndNameOnly = false;
|
|
18588
|
+
/**
|
|
18589
|
+
* One store enabled Get Object Info adapter
|
|
18590
|
+
*/
|
|
18591
|
+
let oneStoreGetObjectInfoAdapter = undefined;
|
|
18592
|
+
/**
|
|
18593
|
+
* One store enabled Get Object Infos adapter
|
|
18594
|
+
*/
|
|
18595
|
+
let oneStoreGetObjectInfosAdapter = undefined;
|
|
18596
|
+
/**
|
|
18597
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
18598
|
+
* Configuration for one store enabled REST adapters only.
|
|
18599
|
+
*/
|
|
18600
|
+
const configurationForOneStoreEnabledAdapters = {
|
|
18601
|
+
setGetObjectInfoAdapter: function (adapter) {
|
|
18602
|
+
oneStoreGetObjectInfoAdapter = adapter;
|
|
18603
|
+
},
|
|
18604
|
+
getGetObjectInfoAdapter: function () {
|
|
18605
|
+
return oneStoreGetObjectInfoAdapter;
|
|
18606
|
+
},
|
|
18607
|
+
setGetObjectInfosAdapter: function (adapter) {
|
|
18608
|
+
oneStoreGetObjectInfosAdapter = adapter;
|
|
18609
|
+
},
|
|
18610
|
+
getGetObjectInfosAdapter: function () {
|
|
18611
|
+
return oneStoreGetObjectInfosAdapter;
|
|
18612
|
+
},
|
|
18613
|
+
};
|
|
18588
18614
|
/**
|
|
18589
18615
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
18590
18616
|
* Configuration for REST adapters only.
|
|
@@ -18649,6 +18675,7 @@ const configurationForRestAdapters = {
|
|
|
18649
18675
|
getDraftAwareCreateContentVersionAdapter: function () {
|
|
18650
18676
|
return draftAwareCreateContentVersionAdapter;
|
|
18651
18677
|
},
|
|
18678
|
+
...configurationForOneStoreEnabledAdapters,
|
|
18652
18679
|
};
|
|
18653
18680
|
/**
|
|
18654
18681
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
@@ -19176,6 +19203,7 @@ function bindExportsTo(luvio) {
|
|
|
19176
19203
|
// Wire Adapters
|
|
19177
19204
|
graphql: createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
19178
19205
|
graphqlBatch: createGraphQLWireAdapterConstructor(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
19206
|
+
// One Store Enabled Adapters
|
|
19179
19207
|
// Imperative Adapters
|
|
19180
19208
|
graphql_imperative: createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
19181
19209
|
graphqlBatch_imperative: createGraphQLImperativeAdapter(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
@@ -19297,15 +19325,17 @@ function isFieldId(unknown) {
|
|
|
19297
19325
|
/**
|
|
19298
19326
|
* Returns the field API name, qualified with an object name if possible.
|
|
19299
19327
|
* @param value The value from which to get the qualified field API name.
|
|
19328
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
19300
19329
|
* @return The qualified field API name.
|
|
19301
19330
|
*/
|
|
19302
|
-
function getFieldApiName(value) {
|
|
19331
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
19303
19332
|
// Note: tightening validation logic changes behavior from userland getting
|
|
19304
19333
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
19305
|
-
// change the behavior.
|
|
19334
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
19335
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
19306
19336
|
if (isString(value)) {
|
|
19307
19337
|
const trimmed = value.trim();
|
|
19308
|
-
if (trimmed.length > 0) {
|
|
19338
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
19309
19339
|
return trimmed;
|
|
19310
19340
|
}
|
|
19311
19341
|
}
|
|
@@ -19318,15 +19348,19 @@ function getFieldApiName(value) {
|
|
|
19318
19348
|
/**
|
|
19319
19349
|
* Returns the field API name.
|
|
19320
19350
|
* @param value The value from which to get the field API name.
|
|
19351
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
19321
19352
|
* @returns The field API name.
|
|
19322
19353
|
*/
|
|
19323
|
-
function getFieldApiNamesArray(value) {
|
|
19354
|
+
function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
|
|
19324
19355
|
const valueArray = isArray(value) ? value : [value];
|
|
19325
19356
|
const array = [];
|
|
19326
19357
|
for (let i = 0, len = valueArray.length; i < len; i += 1) {
|
|
19327
19358
|
const item = valueArray[i];
|
|
19328
|
-
const apiName = getFieldApiName(item);
|
|
19359
|
+
const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
|
|
19329
19360
|
if (apiName === undefined) {
|
|
19361
|
+
if (options.onlyQualifiedFieldNames) {
|
|
19362
|
+
continue; // Just skips invalid field names rather than failing to return an array at all
|
|
19363
|
+
}
|
|
19330
19364
|
return undefined;
|
|
19331
19365
|
}
|
|
19332
19366
|
push.call(array, apiName);
|
|
@@ -19675,10 +19709,15 @@ var DiscriminatorValues;
|
|
|
19675
19709
|
({
|
|
19676
19710
|
...configurationForRestAdapters,
|
|
19677
19711
|
...configurationForGraphQLAdapters,
|
|
19712
|
+
...configurationForOneStoreEnabledAdapters,
|
|
19678
19713
|
});
|
|
19679
19714
|
ensureRegisteredOnce({
|
|
19680
19715
|
id: '@salesforce/lds-adapters-uiapi',
|
|
19681
|
-
configuration: {
|
|
19716
|
+
configuration: {
|
|
19717
|
+
...configurationForRestAdapters,
|
|
19718
|
+
...configurationForGraphQLAdapters,
|
|
19719
|
+
...configurationForOneStoreEnabledAdapters,
|
|
19720
|
+
},
|
|
19682
19721
|
instrument,
|
|
19683
19722
|
});
|
|
19684
19723
|
|
|
@@ -19689,4 +19728,4 @@ register({
|
|
|
19689
19728
|
});
|
|
19690
19729
|
|
|
19691
19730
|
export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative };
|
|
19692
|
-
// version: 1.
|
|
19731
|
+
// version: 1.284.0-8b78b708e
|
package/sfdc/index.js
CHANGED
|
@@ -114,6 +114,41 @@ let trackedFieldDepthOnNotifyChange = 5;
|
|
|
114
114
|
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
115
115
|
*/
|
|
116
116
|
let trackedFieldLeafNodeIdAndNameOnly = false;
|
|
117
|
+
/**
|
|
118
|
+
* One store enabled Get Object Info adapter
|
|
119
|
+
*/
|
|
120
|
+
let oneStoreGetObjectInfoAdapter = undefined;
|
|
121
|
+
/**
|
|
122
|
+
* One store enabled Get Object Infos adapter
|
|
123
|
+
*/
|
|
124
|
+
let oneStoreGetObjectInfosAdapter = undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
127
|
+
* Configuration for one store enabled REST adapters only.
|
|
128
|
+
*/
|
|
129
|
+
const configurationForOneStoreEnabledAdapters = {
|
|
130
|
+
setGetObjectInfoAdapter: function (adapter) {
|
|
131
|
+
oneStoreGetObjectInfoAdapter = adapter;
|
|
132
|
+
},
|
|
133
|
+
getGetObjectInfoAdapter: function () {
|
|
134
|
+
return oneStoreGetObjectInfoAdapter;
|
|
135
|
+
},
|
|
136
|
+
setGetObjectInfosAdapter: function (adapter) {
|
|
137
|
+
oneStoreGetObjectInfosAdapter = adapter;
|
|
138
|
+
},
|
|
139
|
+
getGetObjectInfosAdapter: function () {
|
|
140
|
+
return oneStoreGetObjectInfosAdapter;
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
145
|
+
* @param luvioAdapter - The luvio bound adapter.
|
|
146
|
+
* @param oneStoreAdapter - The one store bound adapter.
|
|
147
|
+
* @returns Luvio or one store wire adapter constructor.
|
|
148
|
+
*/
|
|
149
|
+
function getLuvioOrOneStoreAdapter(luvioAdapter, oneStoreAdapter) {
|
|
150
|
+
return oneStoreAdapter !== null && oneStoreAdapter !== void 0 ? oneStoreAdapter : luvioAdapter;
|
|
151
|
+
}
|
|
117
152
|
/**
|
|
118
153
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
119
154
|
* Configuration for REST adapters only.
|
|
@@ -178,6 +213,7 @@ const configurationForRestAdapters = {
|
|
|
178
213
|
getDraftAwareCreateContentVersionAdapter: function () {
|
|
179
214
|
return draftAwareCreateContentVersionAdapter;
|
|
180
215
|
},
|
|
216
|
+
...configurationForOneStoreEnabledAdapters,
|
|
181
217
|
};
|
|
182
218
|
/**
|
|
183
219
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
@@ -574,15 +610,17 @@ function splitQualifiedFieldApiName(fieldApiName) {
|
|
|
574
610
|
/**
|
|
575
611
|
* Returns the field API name, qualified with an object name if possible.
|
|
576
612
|
* @param value The value from which to get the qualified field API name.
|
|
613
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
577
614
|
* @return The qualified field API name.
|
|
578
615
|
*/
|
|
579
|
-
function getFieldApiName(value) {
|
|
616
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
580
617
|
// Note: tightening validation logic changes behavior from userland getting
|
|
581
618
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
582
|
-
// change the behavior.
|
|
619
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
620
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
583
621
|
if (isString(value)) {
|
|
584
622
|
const trimmed = value.trim();
|
|
585
|
-
if (trimmed.length > 0) {
|
|
623
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
586
624
|
return trimmed;
|
|
587
625
|
}
|
|
588
626
|
}
|
|
@@ -595,15 +633,19 @@ function getFieldApiName(value) {
|
|
|
595
633
|
/**
|
|
596
634
|
* Returns the field API name.
|
|
597
635
|
* @param value The value from which to get the field API name.
|
|
636
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
598
637
|
* @returns The field API name.
|
|
599
638
|
*/
|
|
600
|
-
function getFieldApiNamesArray(value) {
|
|
639
|
+
function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
|
|
601
640
|
const valueArray = isArray(value) ? value : [value];
|
|
602
641
|
const array = [];
|
|
603
642
|
for (let i = 0, len = valueArray.length; i < len; i += 1) {
|
|
604
643
|
const item = valueArray[i];
|
|
605
|
-
const apiName = getFieldApiName(item);
|
|
644
|
+
const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
|
|
606
645
|
if (apiName === undefined) {
|
|
646
|
+
if (options.onlyQualifiedFieldNames) {
|
|
647
|
+
continue; // Just skips invalid field names rather than failing to return an array at all
|
|
648
|
+
}
|
|
607
649
|
return undefined;
|
|
608
650
|
}
|
|
609
651
|
push.call(array, apiName);
|
|
@@ -6297,7 +6339,7 @@ function tokenForAtMost(paginationMetadata, maxOffset) {
|
|
|
6297
6339
|
}
|
|
6298
6340
|
|
|
6299
6341
|
const TTL$x = 30000;
|
|
6300
|
-
const VERSION$18 = "
|
|
6342
|
+
const VERSION$18 = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
6301
6343
|
function validate$1O(obj, path = 'ListRecordCollectionRepresentation') {
|
|
6302
6344
|
const v_error = (() => {
|
|
6303
6345
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -6587,14 +6629,13 @@ function validate$1O(obj, path = 'ListRecordCollectionRepresentation') {
|
|
|
6587
6629
|
}
|
|
6588
6630
|
const RepresentationType$T = 'ListRecordCollectionRepresentation';
|
|
6589
6631
|
function keyBuilder$23(luvio, config) {
|
|
6590
|
-
return keyPrefix + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.
|
|
6632
|
+
return keyPrefix + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
|
|
6591
6633
|
}
|
|
6592
6634
|
function keyBuilderFromType$B(luvio, object) {
|
|
6593
6635
|
const keyParams = {
|
|
6594
6636
|
objectApiName: object.listReference.objectApiName,
|
|
6595
6637
|
searchTerm: object.searchTerm,
|
|
6596
6638
|
sortBy: object.sortBy,
|
|
6597
|
-
listViewId: object.listInfoETag,
|
|
6598
6639
|
where: object.where,
|
|
6599
6640
|
listViewApiName: object.listReference.listViewApiName
|
|
6600
6641
|
};
|
|
@@ -7030,7 +7071,7 @@ function getTypeCacheKeys$T(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
7030
7071
|
const notifyUpdateAvailableFactory$4 = (luvio) => {
|
|
7031
7072
|
return function notifyListRecordCollectionUpdateAvailable(configs) {
|
|
7032
7073
|
if (process.env.NODE_ENV !== 'production') {
|
|
7033
|
-
const requiredKeyParams = ['objectApiName', 'searchTerm', 'sortBy', '
|
|
7074
|
+
const requiredKeyParams = ['objectApiName', 'searchTerm', 'sortBy', 'where', 'listViewApiName'];
|
|
7034
7075
|
configs.forEach(config => {
|
|
7035
7076
|
if (false === requiredKeyParams.every(req => req in config)) {
|
|
7036
7077
|
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
@@ -7970,7 +8011,7 @@ function splitListRecordCollectionKey(key) {
|
|
|
7970
8011
|
const keyElements = key.split(':');
|
|
7971
8012
|
return {
|
|
7972
8013
|
objectApiName: keyElements[3],
|
|
7973
|
-
listViewApiName: keyElements[
|
|
8014
|
+
listViewApiName: keyElements[7],
|
|
7974
8015
|
};
|
|
7975
8016
|
}
|
|
7976
8017
|
function splitListSummaryCollectionKey(key) {
|
|
@@ -8268,7 +8309,8 @@ function keyBuilder$1$(luvio, params) {
|
|
|
8268
8309
|
return keyBuilder$23(luvio, {
|
|
8269
8310
|
objectApiName: listReference.objectApiName,
|
|
8270
8311
|
listViewApiName: listReference.listViewApiName,
|
|
8271
|
-
listViewId
|
|
8312
|
+
// # removing listViewId from key only supporing getting records using api name
|
|
8313
|
+
// listViewId: listReference.id,
|
|
8272
8314
|
searchTerm: params.body.searchTerm || null,
|
|
8273
8315
|
where: params.body.where || null,
|
|
8274
8316
|
sortBy: params.body.sortBy !== undefined && params.body.sortBy.length <= 0
|
|
@@ -8281,7 +8323,8 @@ function keyBuilder$1$(luvio, params) {
|
|
|
8281
8323
|
return keyBuilder$23(luvio, {
|
|
8282
8324
|
objectApiName: params.urlParams.objectApiName,
|
|
8283
8325
|
listViewApiName: params.urlParams.listViewApiName,
|
|
8284
|
-
listViewId
|
|
8326
|
+
// # removing listViewId from key only supporing getting records using api name
|
|
8327
|
+
// listViewId: '',
|
|
8285
8328
|
searchTerm: params.body.searchTerm || null,
|
|
8286
8329
|
where: params.body.where || null,
|
|
8287
8330
|
sortBy: params.body.sortBy || [],
|
|
@@ -21037,7 +21080,7 @@ function equals$y(existing, incoming) {
|
|
|
21037
21080
|
}
|
|
21038
21081
|
|
|
21039
21082
|
const TTL$k = 900000;
|
|
21040
|
-
const VERSION$D = "
|
|
21083
|
+
const VERSION$D = "2405a0b25c2c00f82e88b600edc16387";
|
|
21041
21084
|
function validate$12(obj, path = 'ListObjectInfoRepresentation') {
|
|
21042
21085
|
const v_error = (() => {
|
|
21043
21086
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -21083,6 +21126,11 @@ function validate$12(obj, path = 'ListObjectInfoRepresentation') {
|
|
|
21083
21126
|
if (typeof obj_objectApiName !== 'string') {
|
|
21084
21127
|
return new TypeError('Expected "string" but received "' + typeof obj_objectApiName + '" (at "' + path_objectApiName + '")');
|
|
21085
21128
|
}
|
|
21129
|
+
const obj_publicOrSharedCreateable = obj.publicOrSharedCreateable;
|
|
21130
|
+
const path_publicOrSharedCreateable = path + '.publicOrSharedCreateable';
|
|
21131
|
+
if (typeof obj_publicOrSharedCreateable !== 'boolean') {
|
|
21132
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_publicOrSharedCreateable + '" (at "' + path_publicOrSharedCreateable + '")');
|
|
21133
|
+
}
|
|
21086
21134
|
const obj_relatedEntityApiName = obj.relatedEntityApiName;
|
|
21087
21135
|
const path_relatedEntityApiName = path + '.relatedEntityApiName';
|
|
21088
21136
|
let obj_relatedEntityApiName_union0 = null;
|
|
@@ -21153,6 +21201,10 @@ const select$Z = function ListObjectInfoRepresentationSelect() {
|
|
|
21153
21201
|
name: 'objectApiName',
|
|
21154
21202
|
kind: 'Scalar'
|
|
21155
21203
|
},
|
|
21204
|
+
{
|
|
21205
|
+
name: 'publicOrSharedCreateable',
|
|
21206
|
+
kind: 'Scalar'
|
|
21207
|
+
},
|
|
21156
21208
|
{
|
|
21157
21209
|
name: 'relatedEntityApiName',
|
|
21158
21210
|
kind: 'Scalar'
|
|
@@ -21166,6 +21218,11 @@ function equals$x(existing, incoming) {
|
|
|
21166
21218
|
if (!(existing_createable === incoming_createable)) {
|
|
21167
21219
|
return false;
|
|
21168
21220
|
}
|
|
21221
|
+
const existing_publicOrSharedCreateable = existing.publicOrSharedCreateable;
|
|
21222
|
+
const incoming_publicOrSharedCreateable = incoming.publicOrSharedCreateable;
|
|
21223
|
+
if (!(existing_publicOrSharedCreateable === incoming_publicOrSharedCreateable)) {
|
|
21224
|
+
return false;
|
|
21225
|
+
}
|
|
21169
21226
|
const existing_objectApiName = existing.objectApiName;
|
|
21170
21227
|
const incoming_objectApiName = incoming.objectApiName;
|
|
21171
21228
|
if (!(existing_objectApiName === incoming_objectApiName)) {
|
|
@@ -33074,6 +33131,7 @@ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
|
33074
33131
|
// Note: The original listReference will remain unchanged in the response.
|
|
33075
33132
|
mutatedListRef.id = body.listInfoETag;
|
|
33076
33133
|
addListReferenceWithId(mutatedListRef, context, body.listReference.id);
|
|
33134
|
+
// storing sortBy ensuring a cache hit when requesting records with no sortBy provided
|
|
33077
33135
|
addServerDefaults(config, body, originalListRef, context);
|
|
33078
33136
|
}
|
|
33079
33137
|
return onFetchResponseSuccess$2(luvio, config, resourceParams, response);
|
|
@@ -36345,10 +36403,15 @@ class InMemoryRecordRepresentationQueryEvaluator {
|
|
|
36345
36403
|
({
|
|
36346
36404
|
...configurationForRestAdapters,
|
|
36347
36405
|
...configurationForGraphQLAdapters,
|
|
36406
|
+
...configurationForOneStoreEnabledAdapters,
|
|
36348
36407
|
});
|
|
36349
36408
|
ensureRegisteredOnce({
|
|
36350
36409
|
id: '@salesforce/lds-adapters-uiapi',
|
|
36351
|
-
configuration: {
|
|
36410
|
+
configuration: {
|
|
36411
|
+
...configurationForRestAdapters,
|
|
36412
|
+
...configurationForGraphQLAdapters,
|
|
36413
|
+
...configurationForOneStoreEnabledAdapters,
|
|
36414
|
+
},
|
|
36352
36415
|
instrument,
|
|
36353
36416
|
});
|
|
36354
36417
|
|
|
@@ -36609,15 +36672,13 @@ function bindExportsTo(luvio) {
|
|
|
36609
36672
|
getListInfosByObjectName: createWireAdapterConstructor(luvio, getListInfosByObjectName_ldsAdapter, getListInfosByObjectNameMetadata),
|
|
36610
36673
|
getListObjectInfo: createWireAdapterConstructor(luvio, getListObjectInfo_ldsAdapter, getListObjectInfoMetadata),
|
|
36611
36674
|
getListPreferences: createWireAdapterConstructor(luvio, getListPreferences_ldsAdapter, getListPreferencesMetadata),
|
|
36612
|
-
getListRecordsByName:
|
|
36675
|
+
getListRecordsByName: createInfiniteScrollingWireAdapterConstructor(luvio, getListRecordsByName_ldsAdapter, getListRecordsByNameMetadata),
|
|
36613
36676
|
getListUi: createInfiniteScrollingWireAdapterConstructor(luvio, getListUi_ldsAdapter, getListUiMetadata),
|
|
36614
36677
|
getLookupActions: createWireAdapterConstructor(luvio, getLookupActions_ldsAdapter, getLookupActionsMetadata),
|
|
36615
36678
|
getLookupMetadata: createWireAdapterConstructor(luvio, getLookupMetadata_ldsAdapter, getLookupMetadataMetadata),
|
|
36616
36679
|
getLookupRecords: createWireAdapterConstructor(luvio, getLookupRecords_ldsAdapter, getLookupRecordsMetadata),
|
|
36617
36680
|
getNavItems: createWireAdapterConstructor(luvio, getNavItems_ldsAdapter, getNavItemsMetadata),
|
|
36618
36681
|
getObjectCreateActions: createWireAdapterConstructor(luvio, getObjectCreateActions_ldsAdapter, getObjectCreateActionsMetadata),
|
|
36619
|
-
getObjectInfo: createWireAdapterConstructor(luvio, getObjectInfo_ldsAdapter, getObjectInfoMetadata),
|
|
36620
|
-
getObjectInfos: createWireAdapterConstructor(luvio, getObjectInfos_ldsAdapter, getObjectInfosMetadata),
|
|
36621
36682
|
getPathLayout: createWireAdapterConstructor(luvio, getPathLayout_ldsAdapter, getPathLayoutMetadata),
|
|
36622
36683
|
getPicklistValues: createWireAdapterConstructor(luvio, getPicklistValues_ldsAdapter, getPicklistValuesMetadata),
|
|
36623
36684
|
getPicklistValuesByRecordType: createWireAdapterConstructor(luvio, getPicklistValuesByRecordType_ldsAdapter, getPicklistValuesByRecordTypeMetadata),
|
|
@@ -36653,6 +36714,9 @@ function bindExportsTo(luvio) {
|
|
|
36653
36714
|
updateListPreferences: createLDSAdapter(luvio, adapterName$z, updateListPreferencesAdapterFactory),
|
|
36654
36715
|
updateRecord: unwrapSnapshotData(factory$2),
|
|
36655
36716
|
updateRecordAvatar: unwrapSnapshotData(factory$8),
|
|
36717
|
+
// One Store Enabled Adapters
|
|
36718
|
+
getObjectInfo: getLuvioOrOneStoreAdapter(createWireAdapterConstructor(luvio, getObjectInfo_ldsAdapter, getObjectInfoMetadata), configurationForOneStoreEnabledAdapters.getGetObjectInfoAdapter()),
|
|
36719
|
+
getObjectInfos: getLuvioOrOneStoreAdapter(createWireAdapterConstructor(luvio, getObjectInfos_ldsAdapter, getObjectInfosMetadata), configurationForOneStoreEnabledAdapters.getGetObjectInfosAdapter()),
|
|
36656
36720
|
// Imperative Adapters
|
|
36657
36721
|
getActionOverrides_imperative: createImperativeAdapter(luvio, getActionOverrides_ldsAdapter, getActionOverridesMetadata),
|
|
36658
36722
|
getAllApps_imperative: createImperativeAdapter(luvio, getAllApps_ldsAdapter, getAllAppsMetadata),
|
|
@@ -36916,4 +36980,4 @@ withDefaultLuvio((luvio) => {
|
|
|
36916
36980
|
});
|
|
36917
36981
|
|
|
36918
36982
|
export { API_NAMESPACE, InMemoryRecordRepresentationQueryEvaluator, MRU, RepresentationType$I as ObjectInfoDirectoryEntryRepresentationType, RepresentationType$N as ObjectInfoRepresentationType, RECORD_FIELDS_KEY_JUNCTION, RECORD_ID_PREFIX, RECORD_REPRESENTATION_NAME, RECORD_VIEW_ENTITY_ID_PREFIX, RECORD_VIEW_ENTITY_REPRESENTATION_NAME, RepresentationType$U as RecordRepresentationRepresentationType, TTL$y as RecordRepresentationTTL, RepresentationType$U as RecordRepresentationType, VERSION$1a as RecordRepresentationVersion, keyPrefix as UiApiNamespace, buildRecordRepKeyFromId, getFieldApiNamesArray as coerceFieldIdArray, configurationForRestAdapters as configuration, createContentDocumentAndVersion, createContentVersion, createIngestRecordWithFields, createLDSAdapterWithPrediction, createListInfo, createRecord, deleteListInfo, deleteRecord, executeBatchRecordOperations, extractRecordIdFromStoreKey, getActionOverrides, getActionOverrides_imperative, getAllApps, getAllApps_imperative, getAppDetails, getAppDetails_imperative, getDuplicateConfiguration, getDuplicateConfiguration_imperative, getDuplicates, getDuplicates_imperative, getFlexipageFormulaOverrides, getFlexipageFormulaOverrides_imperative, getGlobalActions, getGlobalActions_imperative, getKeywordSearchResults, getKeywordSearchResults_imperative, getLayout, getLayoutUserState, getLayoutUserState_imperative, getLayout_imperative, getListInfoByName, getListInfoByName_imperative, getListInfosByName, getListInfosByName_imperative, getListInfosByObjectName, getListInfosByObjectName_imperative, getListObjectInfo, getListObjectInfo_imperative, getListPreferences, getListPreferences_imperative, getListRecordsByName, getListRecordsByName_imperative, getListUi, getListUi_imperative, getLookupActions, getLookupActions_imperative, getLookupMetadata, getLookupMetadata_imperative, getLookupRecords, getLookupRecords_imperative, getNavItems, getNavItems_imperative, getObjectCreateActions, getObjectCreateActions_imperative, getObjectInfo, getObjectInfoAdapterFactory, getObjectInfoDirectoryAdapterFactory, getObjectInfo_imperative, getObjectInfos, getObjectInfosAdapterFactory, getObjectInfos_imperative, getPathLayout, getPathLayout_imperative, getPicklistValues, getPicklistValuesByRecordType, getPicklistValuesByRecordType_imperative, getPicklistValues_imperative, getQuickActionDefaults, getQuickActionDefaults_imperative, getQuickActionLayout, getQuickActionLayout_imperative, getRecord, getRecordActions, getRecordActionsAdapterFactory, getRecordActions_imperative, factory$f as getRecordAdapterFactory, getRecordAvatars, getRecordAvatarsAdapterFactory, getRecordAvatars_imperative, getRecordCreateDefaults, getRecordCreateDefaults_imperative, getRecordEditActions, getRecordEditActions_imperative, getRecordId18, getRecordNotifyChange, getRecordTemplateClone, getRecordTemplateClone_imperative, getRecordTemplateCreate, getRecordTemplateCreate_imperative, getRecordUi, getRecordUi_imperative, getRecord_imperative, getRecords, getRecordsAdapterFactory, getRecords_imperative, getRelatedListActions, getRelatedListActions_imperative, getRelatedListCount, getRelatedListCount_imperative, getRelatedListInfo, getRelatedListInfoBatch, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoBatch_imperative, getRelatedListInfo_imperative, getRelatedListPreferences, getRelatedListPreferencesBatch, getRelatedListPreferencesBatch_imperative, getRelatedListPreferences_imperative, getRelatedListRecordActions, getRelatedListRecordActions_imperative, getRelatedListRecords, getRelatedListRecordsAdapterFactory, getRelatedListRecordsBatch, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsBatch_imperative, getRelatedListRecords_imperative, getRelatedListsActions, getRelatedListsActionsAdapterFactory, getRelatedListsActions_imperative, getRelatedListsCount, getRelatedListsCount_imperative, getRelatedListsInfo, getRelatedListsInfo_imperative, getResponseCacheKeys as getResponseCacheKeysContentDocumentCompositeRepresentation, getSearchFilterMetadata, getSearchFilterMetadata_imperative, getSearchFilterOptions, getSearchFilterOptions_imperative, getSearchResults, getSearchResults_imperative, getTypeCacheKeys$W as getTypeCacheKeysRecord, ingest as ingestContentDocumentCompositeRepresentation, ingest$G as ingestObjectInfo, ingest$A as ingestQuickActionExecutionRepresentation, ingest$N as ingestRecord, instrument, isStoreKeyRecordViewEntity, keyBuilder as keyBuilderContentDocumentCompositeRepresentation, keyBuilderFromType as keyBuilderFromTypeContentDocumentCompositeRepresentation, keyBuilderFromType$C as keyBuilderFromTypeRecordRepresentation, keyBuilder$1V as keyBuilderObjectInfo, keyBuilder$1O as keyBuilderQuickActionExecutionRepresentation, keyBuilder$26 as keyBuilderRecord, notifyAllListInfoSummaryUpdateAvailable, notifyAllListRecordUpdateAvailable, notifyListInfoSummaryUpdateAvailable, notifyListInfoUpdateAvailable, notifyListRecordCollectionUpdateAvailable, notifyListViewSummaryUpdateAvailable, notifyQuickActionDefaultsUpdateAvailable, notifyRecordUpdateAvailable, performQuickAction, performUpdateRecordQuickAction, refresh, registerPrefetcher, updateLayoutUserState, updateListInfoByName, updateListPreferences, updateRecord, updateRecordAvatar, updateRelatedListInfo, updateRelatedListPreferences };
|
|
36919
|
-
// version: 1.
|
|
36983
|
+
// version: 1.284.0-8b78b708e
|
|
@@ -131,15 +131,17 @@ function splitQualifiedFieldApiName(fieldApiName) {
|
|
|
131
131
|
/**
|
|
132
132
|
* Returns the field API name, qualified with an object name if possible.
|
|
133
133
|
* @param value The value from which to get the qualified field API name.
|
|
134
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
134
135
|
* @return The qualified field API name.
|
|
135
136
|
*/
|
|
136
|
-
function getFieldApiName(value) {
|
|
137
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
137
138
|
// Note: tightening validation logic changes behavior from userland getting
|
|
138
139
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
139
|
-
// change the behavior.
|
|
140
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
141
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
140
142
|
if (isString(value)) {
|
|
141
143
|
const trimmed = value.trim();
|
|
142
|
-
if (trimmed.length > 0) {
|
|
144
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
143
145
|
return trimmed;
|
|
144
146
|
}
|
|
145
147
|
}
|
package/src/raml/api.raml
CHANGED
|
@@ -1808,6 +1808,10 @@ types:
|
|
|
1808
1808
|
objectApiName:
|
|
1809
1809
|
description: The requested object API name.
|
|
1810
1810
|
type: string
|
|
1811
|
+
publicOrSharedCreateable:
|
|
1812
|
+
description: Indicates whether the current user can create a new public or
|
|
1813
|
+
shared listview for this listview's SObject.
|
|
1814
|
+
type: boolean
|
|
1811
1815
|
relatedEntityApiName:
|
|
1812
1816
|
description: Null, or the type of related entity to which this LV can be scoped.
|
|
1813
1817
|
type: string | nil # TODO: hand rolled nil union
|
package/src/raml/luvio.raml
CHANGED
|
@@ -129,7 +129,10 @@ types:
|
|
|
129
129
|
# collection. Using the list info etag for now as a work around for now to get the identity of
|
|
130
130
|
# the list.
|
|
131
131
|
(luvio.key):
|
|
132
|
-
listViewId
|
|
132
|
+
# removing listViewId from key only supporing getting records using api name
|
|
133
|
+
# leaving this here in case the lists team ever wants to consider shifting
|
|
134
|
+
# back to fetching records using listViewId
|
|
135
|
+
# listViewId: listInfoETag
|
|
133
136
|
searchTerm: searchTerm
|
|
134
137
|
sortBy: sortBy
|
|
135
138
|
objectApiName: listReference.objectApiName
|
|
@@ -147,7 +150,6 @@ types:
|
|
|
147
150
|
parameters:
|
|
148
151
|
objectApiName: objectApiName
|
|
149
152
|
listViewApiName: listViewApiName
|
|
150
|
-
listViewId: listViewId
|
|
151
153
|
searchTerm: searchTerm
|
|
152
154
|
sortBy: sortBy
|
|
153
155
|
where: where
|
|
@@ -1067,7 +1069,8 @@ types:
|
|
|
1067
1069
|
(luvio.key):
|
|
1068
1070
|
objectApiName: urlParams.objectApiName
|
|
1069
1071
|
listViewApiName: urlParams.listViewApiName
|
|
1070
|
-
listViewId
|
|
1072
|
+
# removing listViewId from key only supporing getting records using api name
|
|
1073
|
+
# listViewId: '""'
|
|
1071
1074
|
searchTerm: body.searchTerm || null
|
|
1072
1075
|
sortBy: body.sortBy || []
|
|
1073
1076
|
where: body.where || null
|