@salesforce/lds-adapters-platform-enablement 1.213.0 → 1.213.2
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/platform-enablement.js +46 -106
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/adapters/getAssignedEnablementProgramSummary.d.ts +3 -2
- package/dist/es/es2018/types/src/generated/adapters/getAssignedEnablementProgramSummaryForCommunity.d.ts +3 -2
- package/dist/es/es2018/types/src/generated/adapters/getEnablementProgramSummary.d.ts +3 -2
- package/package.json +1 -1
- package/sfdc/index.js +47 -107
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckScalars, StoreKeyMap } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -48,6 +48,24 @@ const snapshotRefreshOptions = {
|
|
|
48
48
|
},
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
+
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
52
|
+
return {
|
|
53
|
+
name,
|
|
54
|
+
required,
|
|
55
|
+
coerceFn,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
59
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
60
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
61
|
+
return {
|
|
62
|
+
displayName,
|
|
63
|
+
parameters: {
|
|
64
|
+
required,
|
|
65
|
+
optional,
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
51
69
|
const keyPrefix = 'enablement';
|
|
52
70
|
|
|
53
71
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -927,26 +945,8 @@ const ingest$1 = function EnablementProgramSummaryRepresentationIngest(input, pa
|
|
|
927
945
|
}
|
|
928
946
|
}
|
|
929
947
|
const key = keyBuilderFromType(luvio, input);
|
|
930
|
-
const existingRecord = store.readEntry(key);
|
|
931
948
|
const ttlToUse = TTL;
|
|
932
|
-
|
|
933
|
-
fullPath: key,
|
|
934
|
-
parent: path.parent,
|
|
935
|
-
propertyName: path.propertyName,
|
|
936
|
-
ttl: ttlToUse
|
|
937
|
-
});
|
|
938
|
-
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
939
|
-
luvio.storePublish(key, incomingRecord);
|
|
940
|
-
}
|
|
941
|
-
{
|
|
942
|
-
const storeMetadataParams = {
|
|
943
|
-
ttl: ttlToUse,
|
|
944
|
-
namespace: "enablement",
|
|
945
|
-
version: VERSION$1,
|
|
946
|
-
representationName: RepresentationType$1,
|
|
947
|
-
};
|
|
948
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
949
|
-
}
|
|
949
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "enablement", VERSION$1, RepresentationType$1, equals$1);
|
|
950
950
|
return createLink(key);
|
|
951
951
|
};
|
|
952
952
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -1001,7 +1001,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
1001
1001
|
existing: existing,
|
|
1002
1002
|
},
|
|
1003
1003
|
ttl: path.ttl
|
|
1004
|
-
}, luvio, store);
|
|
1004
|
+
}, luvio, store, timestamp);
|
|
1005
1005
|
}
|
|
1006
1006
|
return input;
|
|
1007
1007
|
}
|
|
@@ -1050,26 +1050,8 @@ const ingest = function EnablementProgramSummaryListRepresentationIngest(input,
|
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
const key = path.fullPath;
|
|
1053
|
-
const existingRecord = store.readEntry(key);
|
|
1054
1053
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 15000;
|
|
1055
|
-
|
|
1056
|
-
fullPath: key,
|
|
1057
|
-
parent: path.parent,
|
|
1058
|
-
propertyName: path.propertyName,
|
|
1059
|
-
ttl: ttlToUse
|
|
1060
|
-
}, luvio, store);
|
|
1061
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
1062
|
-
luvio.storePublish(key, incomingRecord);
|
|
1063
|
-
}
|
|
1064
|
-
if (ttlToUse !== undefined) {
|
|
1065
|
-
const storeMetadataParams = {
|
|
1066
|
-
ttl: ttlToUse,
|
|
1067
|
-
namespace: "enablement",
|
|
1068
|
-
version: VERSION,
|
|
1069
|
-
representationName: RepresentationType,
|
|
1070
|
-
};
|
|
1071
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1072
|
-
}
|
|
1054
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "enablement", VERSION, RepresentationType, equals);
|
|
1073
1055
|
return createLink(key);
|
|
1074
1056
|
};
|
|
1075
1057
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -1132,13 +1114,14 @@ function createResourceRequest$2(config) {
|
|
|
1132
1114
|
};
|
|
1133
1115
|
}
|
|
1134
1116
|
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1117
|
+
const adapterName$2 = 'getAssignedEnablementProgramSummaryForCommunity';
|
|
1118
|
+
const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata = [
|
|
1119
|
+
generateParamConfigMetadata('communityId', true),
|
|
1120
|
+
generateParamConfigMetadata('filter', false),
|
|
1121
|
+
generateParamConfigMetadata('limit', false),
|
|
1122
|
+
generateParamConfigMetadata('offset', false),
|
|
1123
|
+
];
|
|
1124
|
+
const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata);
|
|
1142
1125
|
function createResourceParams$2(config) {
|
|
1143
1126
|
const resourceParams = {
|
|
1144
1127
|
urlParams: {
|
|
@@ -1210,21 +1193,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1210
1193
|
});
|
|
1211
1194
|
}
|
|
1212
1195
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1213
|
-
|
|
1214
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1215
|
-
const dispatchOptions = {
|
|
1216
|
-
resourceRequestContext: {
|
|
1217
|
-
requestCorrelator,
|
|
1218
|
-
luvioRequestMethod: undefined,
|
|
1219
|
-
},
|
|
1220
|
-
eventObservers
|
|
1221
|
-
};
|
|
1222
|
-
if (networkPriority !== 'normal') {
|
|
1223
|
-
dispatchOptions.overrides = {
|
|
1224
|
-
priority: networkPriority
|
|
1225
|
-
};
|
|
1226
|
-
}
|
|
1227
|
-
return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
|
|
1196
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1228
1197
|
}
|
|
1229
1198
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1230
1199
|
const { luvio, config } = context;
|
|
@@ -1295,13 +1264,13 @@ function createResourceRequest$1(config) {
|
|
|
1295
1264
|
};
|
|
1296
1265
|
}
|
|
1297
1266
|
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1267
|
+
const adapterName$1 = 'getAssignedEnablementProgramSummary';
|
|
1268
|
+
const getAssignedEnablementProgramSummary_ConfigPropertyMetadata = [
|
|
1269
|
+
generateParamConfigMetadata('filter', false),
|
|
1270
|
+
generateParamConfigMetadata('limit', false),
|
|
1271
|
+
generateParamConfigMetadata('offset', false),
|
|
1272
|
+
];
|
|
1273
|
+
const getAssignedEnablementProgramSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getAssignedEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1305
1274
|
function createResourceParams$1(config) {
|
|
1306
1275
|
const resourceParams = {
|
|
1307
1276
|
queryParams: {
|
|
@@ -1369,21 +1338,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1369
1338
|
});
|
|
1370
1339
|
}
|
|
1371
1340
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1372
|
-
|
|
1373
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1374
|
-
const dispatchOptions = {
|
|
1375
|
-
resourceRequestContext: {
|
|
1376
|
-
requestCorrelator,
|
|
1377
|
-
luvioRequestMethod: undefined,
|
|
1378
|
-
},
|
|
1379
|
-
eventObservers
|
|
1380
|
-
};
|
|
1381
|
-
if (networkPriority !== 'normal') {
|
|
1382
|
-
dispatchOptions.overrides = {
|
|
1383
|
-
priority: networkPriority
|
|
1384
|
-
};
|
|
1385
|
-
}
|
|
1386
|
-
return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
|
|
1341
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1387
1342
|
}
|
|
1388
1343
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1389
1344
|
const { luvio, config } = context;
|
|
@@ -1462,13 +1417,12 @@ function createResourceRequest(config) {
|
|
|
1462
1417
|
};
|
|
1463
1418
|
}
|
|
1464
1419
|
|
|
1465
|
-
const
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
};
|
|
1420
|
+
const adapterName = 'getEnablementProgramSummary';
|
|
1421
|
+
const getEnablementProgramSummary_ConfigPropertyMetadata = [
|
|
1422
|
+
generateParamConfigMetadata('enablementProgramId', true),
|
|
1423
|
+
generateParamConfigMetadata('includeProgress', false),
|
|
1424
|
+
];
|
|
1425
|
+
const getEnablementProgramSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1472
1426
|
function createResourceParams(config) {
|
|
1473
1427
|
const resourceParams = {
|
|
1474
1428
|
urlParams: {
|
|
@@ -1538,21 +1492,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1538
1492
|
});
|
|
1539
1493
|
}
|
|
1540
1494
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1541
|
-
|
|
1542
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1543
|
-
const dispatchOptions = {
|
|
1544
|
-
resourceRequestContext: {
|
|
1545
|
-
requestCorrelator,
|
|
1546
|
-
luvioRequestMethod: undefined,
|
|
1547
|
-
},
|
|
1548
|
-
eventObservers
|
|
1549
|
-
};
|
|
1550
|
-
if (networkPriority !== 'normal') {
|
|
1551
|
-
dispatchOptions.overrides = {
|
|
1552
|
-
priority: networkPriority
|
|
1553
|
-
};
|
|
1554
|
-
}
|
|
1555
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
1495
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1556
1496
|
}
|
|
1557
1497
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1558
1498
|
const { luvio, config } = context;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Adapter as $64$luvio_engine_Adapter, Snapshot as $64$luvio_engine_Snapshot, UnfulfilledSnapshot as $64$luvio_engine_UnfulfilledSnapshot } from '@luvio/engine';
|
|
1
|
+
import { Adapter as $64$luvio_engine_Adapter, Snapshot as $64$luvio_engine_Snapshot, UnfulfilledSnapshot as $64$luvio_engine_UnfulfilledSnapshot, AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata } from '@luvio/engine';
|
|
2
2
|
export declare const ObjectPrototypeHasOwnProperty: (v: PropertyKey) => boolean;
|
|
3
3
|
declare const ObjectKeys: {
|
|
4
4
|
(o: object): string[];
|
|
@@ -57,4 +57,6 @@ export declare const snapshotRefreshOptions: {
|
|
|
57
57
|
export declare function stableJSONStringify(node: any): string | undefined;
|
|
58
58
|
export declare function getFetchResponseStatusText(status: number): string;
|
|
59
59
|
export declare function isUnfulfilledSnapshot<T, U>(snapshot: $64$luvio_engine_Snapshot<T, U>): snapshot is $64$luvio_engine_UnfulfilledSnapshot<T, U>;
|
|
60
|
+
export declare function generateParamConfigMetadata(name: string, required: boolean, coerceFn?: (v: unknown) => unknown): $64$luvio_engine_AdapterConfigMetadata;
|
|
61
|
+
export declare function buildAdapterValidationConfig(displayName: string, paramsMeta: $64$luvio_engine_AdapterConfigMetadata[]): AdapterValidationConfig;
|
|
60
62
|
export declare const keyPrefix = "enablement";
|
package/dist/es/es2018/types/src/generated/adapters/getAssignedEnablementProgramSummary.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
2
3
|
import { ResourceRequestConfig as resources_getConnectEnablementProgramSummaryAssigned_ResourceRequestConfig } from '../resources/getConnectEnablementProgramSummaryAssigned';
|
|
3
|
-
import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
4
4
|
import { EnablementProgramSummaryListRepresentation as types_EnablementProgramSummaryListRepresentation_EnablementProgramSummaryListRepresentation } from '../types/EnablementProgramSummaryListRepresentation';
|
|
5
5
|
export declare const adapterName = "getAssignedEnablementProgramSummary";
|
|
6
|
+
export declare const getAssignedEnablementProgramSummary_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getAssignedEnablementProgramSummary_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetAssignedEnablementProgramSummaryConfig {
|
|
8
9
|
filter?: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
2
3
|
import { ResourceRequestConfig as resources_getConnectCommunitiesEnablementProgramSummaryAssignedByCommunityId_ResourceRequestConfig } from '../resources/getConnectCommunitiesEnablementProgramSummaryAssignedByCommunityId';
|
|
3
|
-
import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
4
4
|
import { EnablementProgramSummaryListRepresentation as types_EnablementProgramSummaryListRepresentation_EnablementProgramSummaryListRepresentation } from '../types/EnablementProgramSummaryListRepresentation';
|
|
5
5
|
export declare const adapterName = "getAssignedEnablementProgramSummaryForCommunity";
|
|
6
|
+
export declare const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetAssignedEnablementProgramSummaryForCommunityConfig {
|
|
8
9
|
communityId: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
2
3
|
import { ResourceRequestConfig as resources_getConnectEnablementProgramSummaryByEnablementProgramId_ResourceRequestConfig } from '../resources/getConnectEnablementProgramSummaryByEnablementProgramId';
|
|
3
|
-
import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
4
4
|
import { EnablementProgramSummaryRepresentation as types_EnablementProgramSummaryRepresentation_EnablementProgramSummaryRepresentation } from '../types/EnablementProgramSummaryRepresentation';
|
|
5
5
|
export declare const adapterName = "getEnablementProgramSummary";
|
|
6
|
+
export declare const getEnablementProgramSummary_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getEnablementProgramSummary_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetEnablementProgramSummaryConfig {
|
|
8
9
|
enablementProgramId: string;
|
package/package.json
CHANGED
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap } from 'force/luvioEngine';
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckScalars, StoreKeyMap } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -58,6 +58,24 @@ const snapshotRefreshOptions = {
|
|
|
58
58
|
},
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
62
|
+
return {
|
|
63
|
+
name,
|
|
64
|
+
required,
|
|
65
|
+
coerceFn,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
69
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
70
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
71
|
+
return {
|
|
72
|
+
displayName,
|
|
73
|
+
parameters: {
|
|
74
|
+
required,
|
|
75
|
+
optional,
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
61
79
|
const keyPrefix = 'enablement';
|
|
62
80
|
|
|
63
81
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -937,26 +955,8 @@ const ingest$1 = function EnablementProgramSummaryRepresentationIngest(input, pa
|
|
|
937
955
|
}
|
|
938
956
|
}
|
|
939
957
|
const key = keyBuilderFromType(luvio, input);
|
|
940
|
-
const existingRecord = store.readEntry(key);
|
|
941
958
|
const ttlToUse = TTL;
|
|
942
|
-
|
|
943
|
-
fullPath: key,
|
|
944
|
-
parent: path.parent,
|
|
945
|
-
propertyName: path.propertyName,
|
|
946
|
-
ttl: ttlToUse
|
|
947
|
-
});
|
|
948
|
-
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
949
|
-
luvio.storePublish(key, incomingRecord);
|
|
950
|
-
}
|
|
951
|
-
{
|
|
952
|
-
const storeMetadataParams = {
|
|
953
|
-
ttl: ttlToUse,
|
|
954
|
-
namespace: "enablement",
|
|
955
|
-
version: VERSION$1,
|
|
956
|
-
representationName: RepresentationType$1,
|
|
957
|
-
};
|
|
958
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
959
|
-
}
|
|
959
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "enablement", VERSION$1, RepresentationType$1, equals$1);
|
|
960
960
|
return createLink(key);
|
|
961
961
|
};
|
|
962
962
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -1011,7 +1011,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
1011
1011
|
existing: existing,
|
|
1012
1012
|
},
|
|
1013
1013
|
ttl: path.ttl
|
|
1014
|
-
}, luvio, store);
|
|
1014
|
+
}, luvio, store, timestamp);
|
|
1015
1015
|
}
|
|
1016
1016
|
return input;
|
|
1017
1017
|
}
|
|
@@ -1060,26 +1060,8 @@ const ingest = function EnablementProgramSummaryListRepresentationIngest(input,
|
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
const key = path.fullPath;
|
|
1063
|
-
const existingRecord = store.readEntry(key);
|
|
1064
1063
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 15000;
|
|
1065
|
-
|
|
1066
|
-
fullPath: key,
|
|
1067
|
-
parent: path.parent,
|
|
1068
|
-
propertyName: path.propertyName,
|
|
1069
|
-
ttl: ttlToUse
|
|
1070
|
-
}, luvio, store);
|
|
1071
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
1072
|
-
luvio.storePublish(key, incomingRecord);
|
|
1073
|
-
}
|
|
1074
|
-
if (ttlToUse !== undefined) {
|
|
1075
|
-
const storeMetadataParams = {
|
|
1076
|
-
ttl: ttlToUse,
|
|
1077
|
-
namespace: "enablement",
|
|
1078
|
-
version: VERSION,
|
|
1079
|
-
representationName: RepresentationType,
|
|
1080
|
-
};
|
|
1081
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1082
|
-
}
|
|
1064
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "enablement", VERSION, RepresentationType, equals);
|
|
1083
1065
|
return createLink(key);
|
|
1084
1066
|
};
|
|
1085
1067
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -1142,13 +1124,13 @@ function createResourceRequest$2(config) {
|
|
|
1142
1124
|
};
|
|
1143
1125
|
}
|
|
1144
1126
|
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1127
|
+
const adapterName$2 = 'getAssignedEnablementProgramSummary';
|
|
1128
|
+
const getAssignedEnablementProgramSummary_ConfigPropertyMetadata = [
|
|
1129
|
+
generateParamConfigMetadata('filter', false),
|
|
1130
|
+
generateParamConfigMetadata('limit', false),
|
|
1131
|
+
generateParamConfigMetadata('offset', false),
|
|
1132
|
+
];
|
|
1133
|
+
const getAssignedEnablementProgramSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getAssignedEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1152
1134
|
function createResourceParams$2(config) {
|
|
1153
1135
|
const resourceParams = {
|
|
1154
1136
|
queryParams: {
|
|
@@ -1216,21 +1198,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1216
1198
|
});
|
|
1217
1199
|
}
|
|
1218
1200
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1219
|
-
|
|
1220
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1221
|
-
const dispatchOptions = {
|
|
1222
|
-
resourceRequestContext: {
|
|
1223
|
-
requestCorrelator,
|
|
1224
|
-
luvioRequestMethod: undefined,
|
|
1225
|
-
},
|
|
1226
|
-
eventObservers
|
|
1227
|
-
};
|
|
1228
|
-
if (networkPriority !== 'normal') {
|
|
1229
|
-
dispatchOptions.overrides = {
|
|
1230
|
-
priority: networkPriority
|
|
1231
|
-
};
|
|
1232
|
-
}
|
|
1233
|
-
return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
|
|
1201
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1234
1202
|
}
|
|
1235
1203
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1236
1204
|
const { luvio, config } = context;
|
|
@@ -1301,13 +1269,14 @@ function createResourceRequest$1(config) {
|
|
|
1301
1269
|
};
|
|
1302
1270
|
}
|
|
1303
1271
|
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1272
|
+
const adapterName$1 = 'getAssignedEnablementProgramSummaryForCommunity';
|
|
1273
|
+
const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata = [
|
|
1274
|
+
generateParamConfigMetadata('communityId', true),
|
|
1275
|
+
generateParamConfigMetadata('filter', false),
|
|
1276
|
+
generateParamConfigMetadata('limit', false),
|
|
1277
|
+
generateParamConfigMetadata('offset', false),
|
|
1278
|
+
];
|
|
1279
|
+
const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata);
|
|
1311
1280
|
function createResourceParams$1(config) {
|
|
1312
1281
|
const resourceParams = {
|
|
1313
1282
|
urlParams: {
|
|
@@ -1379,21 +1348,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1379
1348
|
});
|
|
1380
1349
|
}
|
|
1381
1350
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1382
|
-
|
|
1383
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1384
|
-
const dispatchOptions = {
|
|
1385
|
-
resourceRequestContext: {
|
|
1386
|
-
requestCorrelator,
|
|
1387
|
-
luvioRequestMethod: undefined,
|
|
1388
|
-
},
|
|
1389
|
-
eventObservers
|
|
1390
|
-
};
|
|
1391
|
-
if (networkPriority !== 'normal') {
|
|
1392
|
-
dispatchOptions.overrides = {
|
|
1393
|
-
priority: networkPriority
|
|
1394
|
-
};
|
|
1395
|
-
}
|
|
1396
|
-
return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
|
|
1351
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1397
1352
|
}
|
|
1398
1353
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1399
1354
|
const { luvio, config } = context;
|
|
@@ -1472,13 +1427,12 @@ function createResourceRequest(config) {
|
|
|
1472
1427
|
};
|
|
1473
1428
|
}
|
|
1474
1429
|
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
};
|
|
1430
|
+
const adapterName = 'getEnablementProgramSummary';
|
|
1431
|
+
const getEnablementProgramSummary_ConfigPropertyMetadata = [
|
|
1432
|
+
generateParamConfigMetadata('enablementProgramId', true),
|
|
1433
|
+
generateParamConfigMetadata('includeProgress', false),
|
|
1434
|
+
];
|
|
1435
|
+
const getEnablementProgramSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1482
1436
|
function createResourceParams(config) {
|
|
1483
1437
|
const resourceParams = {
|
|
1484
1438
|
urlParams: {
|
|
@@ -1548,21 +1502,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1548
1502
|
});
|
|
1549
1503
|
}
|
|
1550
1504
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1551
|
-
|
|
1552
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1553
|
-
const dispatchOptions = {
|
|
1554
|
-
resourceRequestContext: {
|
|
1555
|
-
requestCorrelator,
|
|
1556
|
-
luvioRequestMethod: undefined,
|
|
1557
|
-
},
|
|
1558
|
-
eventObservers
|
|
1559
|
-
};
|
|
1560
|
-
if (networkPriority !== 'normal') {
|
|
1561
|
-
dispatchOptions.overrides = {
|
|
1562
|
-
priority: networkPriority
|
|
1563
|
-
};
|
|
1564
|
-
}
|
|
1565
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
1505
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1566
1506
|
}
|
|
1567
1507
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1568
1508
|
const { luvio, config } = context;
|
|
@@ -1625,4 +1565,4 @@ withDefaultLuvio((luvio) => {
|
|
|
1625
1565
|
});
|
|
1626
1566
|
|
|
1627
1567
|
export { getAssignedEnablementProgramSummary, getAssignedEnablementProgramSummaryForCommunity, getAssignedEnablementProgramSummaryForCommunity_imperative, getAssignedEnablementProgramSummary_imperative, getEnablementProgramSummary, getEnablementProgramSummary_imperative };
|
|
1628
|
-
// version: 1.213.
|
|
1568
|
+
// version: 1.213.2-1eb996209
|