@salesforce/lds-worker-api 1.108.0 → 1.108.1
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.
|
@@ -743,4 +743,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
743
743
|
}
|
|
744
744
|
|
|
745
745
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
746
|
-
// version: 1.108.
|
|
746
|
+
// version: 1.108.1-582a74bf0
|
|
@@ -3776,7 +3776,7 @@ function withDefaultLuvio(callback) {
|
|
|
3776
3776
|
}
|
|
3777
3777
|
callbacks.push(callback);
|
|
3778
3778
|
}
|
|
3779
|
-
// version: 1.108.
|
|
3779
|
+
// version: 1.108.1-582a74bf0
|
|
3780
3780
|
|
|
3781
3781
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3782
3782
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15200,7 +15200,7 @@ function parseAndVisit(source) {
|
|
|
15200
15200
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15201
15201
|
return luvioDocumentNode;
|
|
15202
15202
|
}
|
|
15203
|
-
// version: 1.108.
|
|
15203
|
+
// version: 1.108.1-582a74bf0
|
|
15204
15204
|
|
|
15205
15205
|
function unwrap(data) {
|
|
15206
15206
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16081,7 +16081,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16081
16081
|
const { apiFamily, name } = metadata;
|
|
16082
16082
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16083
16083
|
}
|
|
16084
|
-
// version: 1.108.
|
|
16084
|
+
// version: 1.108.1-582a74bf0
|
|
16085
16085
|
|
|
16086
16086
|
/**
|
|
16087
16087
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44024,7 +44024,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44024
44024
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44025
44025
|
});
|
|
44026
44026
|
});
|
|
44027
|
-
// version: 1.108.
|
|
44027
|
+
// version: 1.108.1-582a74bf0
|
|
44028
44028
|
|
|
44029
44029
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44030
44030
|
|
|
@@ -50086,7 +50086,7 @@ class DraftManager {
|
|
|
50086
50086
|
}
|
|
50087
50087
|
|
|
50088
50088
|
function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueue) {
|
|
50089
|
-
|
|
50089
|
+
const draftMetadata = {};
|
|
50090
50090
|
// setup existing store redirects when bootstrapping the environment
|
|
50091
50091
|
(async () => {
|
|
50092
50092
|
const mappings = await getDraftIdMappings(durableStore);
|
|
@@ -50116,7 +50116,6 @@ function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueu
|
|
|
50116
50116
|
if (queue.length === 0) {
|
|
50117
50117
|
return env.handleSuccessResponse(ingestAndBroadcastFunc, getResponseCacheKeysFunc);
|
|
50118
50118
|
}
|
|
50119
|
-
const ingestMetadata = {};
|
|
50120
50119
|
const cacheKeySet = getResponseCacheKeysFunc();
|
|
50121
50120
|
for (const possibleKey of cacheKeySet.keys()) {
|
|
50122
50121
|
const key = typeof possibleKey === 'string' ? possibleKey : '';
|
|
@@ -50129,37 +50128,44 @@ function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueu
|
|
|
50129
50128
|
// if this key is related to a draft then mark it mergeable so
|
|
50130
50129
|
// base environment revives it to staging store before ingestion
|
|
50131
50130
|
cacheKey.mergeable = true;
|
|
50132
|
-
|
|
50131
|
+
const existing = draftMetadata[key];
|
|
50132
|
+
if (existing === undefined) {
|
|
50133
|
+
draftMetadata[key] = { metadata, refCount: 1 };
|
|
50134
|
+
}
|
|
50135
|
+
else {
|
|
50136
|
+
draftMetadata[key] = { metadata, refCount: existing.refCount + 1 };
|
|
50137
|
+
}
|
|
50133
50138
|
}
|
|
50134
50139
|
break;
|
|
50135
50140
|
}
|
|
50136
50141
|
}
|
|
50137
50142
|
}
|
|
50138
|
-
draftMetadata = keys$4(ingestMetadata).length > 0 ? ingestMetadata : null;
|
|
50139
50143
|
return env.handleSuccessResponse(ingestAndBroadcastFunc, () => cacheKeySet);
|
|
50140
50144
|
};
|
|
50141
50145
|
const storePublish = function (key, data) {
|
|
50142
|
-
|
|
50143
|
-
// no drafts for this response
|
|
50144
|
-
return env.storePublish(key, data);
|
|
50145
|
-
}
|
|
50146
|
+
const draftMetadataForKey = draftMetadata[key];
|
|
50146
50147
|
for (const handler of handlers) {
|
|
50147
50148
|
if (handler.canHandlePublish(key)) {
|
|
50148
|
-
handler.applyDraftsToIncomingData(key, data,
|
|
50149
|
+
handler.applyDraftsToIncomingData(key, data, draftMetadataForKey && draftMetadataForKey.metadata, env.storePublish);
|
|
50149
50150
|
return;
|
|
50150
50151
|
}
|
|
50151
50152
|
}
|
|
50153
|
+
if (draftMetadataForKey !== undefined) {
|
|
50154
|
+
// WARNING: this code depends on the fact that RecordRepresentation
|
|
50155
|
+
// fields get published before the root record.
|
|
50156
|
+
if (draftMetadataForKey.refCount === 1) {
|
|
50157
|
+
delete draftMetadata[key];
|
|
50158
|
+
}
|
|
50159
|
+
else {
|
|
50160
|
+
draftMetadataForKey.refCount--;
|
|
50161
|
+
}
|
|
50162
|
+
}
|
|
50152
50163
|
// no handler could handle it so publish
|
|
50153
50164
|
env.storePublish(key, data);
|
|
50154
50165
|
};
|
|
50155
|
-
const storeBroadcast = function (rebuildSnapshot, snapshotAvailable) {
|
|
50156
|
-
draftMetadata = create$4(null);
|
|
50157
|
-
return env.storeBroadcast(rebuildSnapshot, snapshotAvailable);
|
|
50158
|
-
};
|
|
50159
50166
|
// note the makeEnvironmentUiApiRecordDraftAware will eventually go away once the adapters become draft aware
|
|
50160
50167
|
return create$4(env, {
|
|
50161
50168
|
storePublish: { value: storePublish },
|
|
50162
|
-
storeBroadcast: { value: storeBroadcast },
|
|
50163
50169
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
50164
50170
|
});
|
|
50165
50171
|
}
|
|
@@ -55249,6 +55255,9 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
55249
55255
|
}
|
|
55250
55256
|
// assert that object infos and references exist
|
|
55251
55257
|
const metaDataResult = await this.recordService.getRecordDraftMetadata(targetId, pendingAction);
|
|
55258
|
+
if (metaDataResult === undefined) {
|
|
55259
|
+
throw Error('No metadata for draft');
|
|
55260
|
+
}
|
|
55252
55261
|
if (metaDataResult.ok === false) {
|
|
55253
55262
|
switch (metaDataResult.status) {
|
|
55254
55263
|
case 'missing-object-info':
|
|
@@ -55326,7 +55335,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
55326
55335
|
return undefined;
|
|
55327
55336
|
}
|
|
55328
55337
|
const status = await this.recordService.getRecordDraftMetadata(recordId, undefined);
|
|
55329
|
-
return status.data;
|
|
55338
|
+
return status && status.data;
|
|
55330
55339
|
}
|
|
55331
55340
|
isActionRecordAction(action) {
|
|
55332
55341
|
return action.handler === this.handlerId;
|
|
@@ -55877,6 +55886,9 @@ class UiApiDraftRecordService {
|
|
|
55877
55886
|
async getRecordDraftMetadata(recordId, incomingAction) {
|
|
55878
55887
|
var _a;
|
|
55879
55888
|
const recordOperations = (await this.queueToRecordOperations(incomingAction)).filter((x) => x.id === recordId);
|
|
55889
|
+
if (recordOperations.length === 0) {
|
|
55890
|
+
return undefined;
|
|
55891
|
+
}
|
|
55880
55892
|
const objectInfoMap = new Map();
|
|
55881
55893
|
const referenceMap = new Map();
|
|
55882
55894
|
const missingReferenceKeys = new Set();
|
|
@@ -55911,7 +55923,7 @@ class UiApiDraftRecordService {
|
|
|
55911
55923
|
continue;
|
|
55912
55924
|
}
|
|
55913
55925
|
// relax the check for record type ids as they will
|
|
55914
|
-
//
|
|
55926
|
+
// unlikely to be cached
|
|
55915
55927
|
if (fieldInfo.dataType !== 'Reference' || field === 'RecordTypeId') {
|
|
55916
55928
|
continue;
|
|
55917
55929
|
}
|
|
@@ -55973,6 +55985,9 @@ class UiApiDraftRecordService {
|
|
|
55973
55985
|
}
|
|
55974
55986
|
async synthesizeDraftRecord(recordId) {
|
|
55975
55987
|
const metadata = await this.getRecordDraftMetadata(recordId, undefined);
|
|
55988
|
+
if (metadata === undefined) {
|
|
55989
|
+
return undefined;
|
|
55990
|
+
}
|
|
55976
55991
|
const record = replayDraftsOnRecord(undefined, metadata.data);
|
|
55977
55992
|
return record;
|
|
55978
55993
|
}
|
|
@@ -56494,6 +56509,9 @@ class ContentDocumentCompositeRepresentationActionHandler extends AbstractResour
|
|
|
56494
56509
|
pendingAction.metadata[CONTENT_DOCUMENT_LINK_DRAFT_ID_KEY] = contentDocumentLinkId;
|
|
56495
56510
|
// assert that object infos and references exist
|
|
56496
56511
|
const metaDataResult = await this.draftRecordService.getRecordDraftMetadata(targetId, pendingAction);
|
|
56512
|
+
if (metaDataResult === undefined) {
|
|
56513
|
+
throw Error('No metadata for draft');
|
|
56514
|
+
}
|
|
56497
56515
|
if (metaDataResult.ok === false) {
|
|
56498
56516
|
switch (metaDataResult.status) {
|
|
56499
56517
|
case 'missing-object-info':
|
|
@@ -56540,18 +56558,27 @@ class ContentDocumentCompositeRepresentationActionHandler extends AbstractResour
|
|
|
56540
56558
|
}
|
|
56541
56559
|
// get the content doc
|
|
56542
56560
|
const contentDocMetadata = await this.draftRecordService.getRecordDraftMetadata(contentDocumentId, undefined);
|
|
56561
|
+
if (contentDocMetadata === undefined) {
|
|
56562
|
+
return undefined;
|
|
56563
|
+
}
|
|
56543
56564
|
const contentDocRecord = replayDraftsOnRecord(undefined, contentDocMetadata.data);
|
|
56544
56565
|
if (contentDocRecord === undefined) {
|
|
56545
56566
|
return undefined;
|
|
56546
56567
|
}
|
|
56547
56568
|
// get the contentDocLink to the user
|
|
56548
56569
|
const contentDocLinkMetadata = await this.draftRecordService.getRecordDraftMetadata(contentDocumentLinkId, undefined);
|
|
56570
|
+
if (contentDocLinkMetadata === undefined) {
|
|
56571
|
+
return undefined;
|
|
56572
|
+
}
|
|
56549
56573
|
const contentDocLink = replayDraftsOnRecord(undefined, contentDocLinkMetadata.data);
|
|
56550
56574
|
if (contentDocLink === undefined) {
|
|
56551
56575
|
return undefined;
|
|
56552
56576
|
}
|
|
56553
56577
|
// get the content version
|
|
56554
56578
|
const contentVersionMetadata = await this.draftRecordService.getRecordDraftMetadata(contentVersionId, undefined);
|
|
56579
|
+
if (contentVersionMetadata === undefined) {
|
|
56580
|
+
return undefined;
|
|
56581
|
+
}
|
|
56555
56582
|
const contentVersion = replayDraftsOnRecord(undefined, contentVersionMetadata.data);
|
|
56556
56583
|
if (contentVersion === undefined) {
|
|
56557
56584
|
return undefined;
|
|
@@ -59278,7 +59305,7 @@ register({
|
|
|
59278
59305
|
id: '@salesforce/lds-network-adapter',
|
|
59279
59306
|
instrument: instrument$1,
|
|
59280
59307
|
});
|
|
59281
|
-
// version: 1.108.
|
|
59308
|
+
// version: 1.108.1-582a74bf0
|
|
59282
59309
|
|
|
59283
59310
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59284
59311
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -76931,7 +76958,7 @@ register({
|
|
|
76931
76958
|
configuration: { ...configurationForGraphQLAdapters },
|
|
76932
76959
|
instrument,
|
|
76933
76960
|
});
|
|
76934
|
-
// version: 1.108.
|
|
76961
|
+
// version: 1.108.1-582a74bf0
|
|
76935
76962
|
|
|
76936
76963
|
// On core the unstable adapters are re-exported with different names,
|
|
76937
76964
|
|
|
@@ -79060,7 +79087,7 @@ withDefaultLuvio((luvio) => {
|
|
|
79060
79087
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
79061
79088
|
graphQLImperative = ldsAdapter;
|
|
79062
79089
|
});
|
|
79063
|
-
// version: 1.108.
|
|
79090
|
+
// version: 1.108.1-582a74bf0
|
|
79064
79091
|
|
|
79065
79092
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
79066
79093
|
__proto__: null,
|
|
@@ -79734,4 +79761,4 @@ const { luvio } = getRuntime();
|
|
|
79734
79761
|
setDefaultLuvio({ luvio });
|
|
79735
79762
|
|
|
79736
79763
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
79737
|
-
// version: 1.108.
|
|
79764
|
+
// version: 1.108.1-582a74bf0
|
|
@@ -3782,7 +3782,7 @@
|
|
|
3782
3782
|
}
|
|
3783
3783
|
callbacks.push(callback);
|
|
3784
3784
|
}
|
|
3785
|
-
// version: 1.108.
|
|
3785
|
+
// version: 1.108.1-582a74bf0
|
|
3786
3786
|
|
|
3787
3787
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3788
3788
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15206,7 +15206,7 @@
|
|
|
15206
15206
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15207
15207
|
return luvioDocumentNode;
|
|
15208
15208
|
}
|
|
15209
|
-
// version: 1.108.
|
|
15209
|
+
// version: 1.108.1-582a74bf0
|
|
15210
15210
|
|
|
15211
15211
|
function unwrap(data) {
|
|
15212
15212
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16087,7 +16087,7 @@
|
|
|
16087
16087
|
const { apiFamily, name } = metadata;
|
|
16088
16088
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16089
16089
|
}
|
|
16090
|
-
// version: 1.108.
|
|
16090
|
+
// version: 1.108.1-582a74bf0
|
|
16091
16091
|
|
|
16092
16092
|
/**
|
|
16093
16093
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44030,7 +44030,7 @@
|
|
|
44030
44030
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44031
44031
|
});
|
|
44032
44032
|
});
|
|
44033
|
-
// version: 1.108.
|
|
44033
|
+
// version: 1.108.1-582a74bf0
|
|
44034
44034
|
|
|
44035
44035
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44036
44036
|
|
|
@@ -50092,7 +50092,7 @@
|
|
|
50092
50092
|
}
|
|
50093
50093
|
|
|
50094
50094
|
function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueue) {
|
|
50095
|
-
|
|
50095
|
+
const draftMetadata = {};
|
|
50096
50096
|
// setup existing store redirects when bootstrapping the environment
|
|
50097
50097
|
(async () => {
|
|
50098
50098
|
const mappings = await getDraftIdMappings(durableStore);
|
|
@@ -50122,7 +50122,6 @@
|
|
|
50122
50122
|
if (queue.length === 0) {
|
|
50123
50123
|
return env.handleSuccessResponse(ingestAndBroadcastFunc, getResponseCacheKeysFunc);
|
|
50124
50124
|
}
|
|
50125
|
-
const ingestMetadata = {};
|
|
50126
50125
|
const cacheKeySet = getResponseCacheKeysFunc();
|
|
50127
50126
|
for (const possibleKey of cacheKeySet.keys()) {
|
|
50128
50127
|
const key = typeof possibleKey === 'string' ? possibleKey : '';
|
|
@@ -50135,37 +50134,44 @@
|
|
|
50135
50134
|
// if this key is related to a draft then mark it mergeable so
|
|
50136
50135
|
// base environment revives it to staging store before ingestion
|
|
50137
50136
|
cacheKey.mergeable = true;
|
|
50138
|
-
|
|
50137
|
+
const existing = draftMetadata[key];
|
|
50138
|
+
if (existing === undefined) {
|
|
50139
|
+
draftMetadata[key] = { metadata, refCount: 1 };
|
|
50140
|
+
}
|
|
50141
|
+
else {
|
|
50142
|
+
draftMetadata[key] = { metadata, refCount: existing.refCount + 1 };
|
|
50143
|
+
}
|
|
50139
50144
|
}
|
|
50140
50145
|
break;
|
|
50141
50146
|
}
|
|
50142
50147
|
}
|
|
50143
50148
|
}
|
|
50144
|
-
draftMetadata = keys$4(ingestMetadata).length > 0 ? ingestMetadata : null;
|
|
50145
50149
|
return env.handleSuccessResponse(ingestAndBroadcastFunc, () => cacheKeySet);
|
|
50146
50150
|
};
|
|
50147
50151
|
const storePublish = function (key, data) {
|
|
50148
|
-
|
|
50149
|
-
// no drafts for this response
|
|
50150
|
-
return env.storePublish(key, data);
|
|
50151
|
-
}
|
|
50152
|
+
const draftMetadataForKey = draftMetadata[key];
|
|
50152
50153
|
for (const handler of handlers) {
|
|
50153
50154
|
if (handler.canHandlePublish(key)) {
|
|
50154
|
-
handler.applyDraftsToIncomingData(key, data,
|
|
50155
|
+
handler.applyDraftsToIncomingData(key, data, draftMetadataForKey && draftMetadataForKey.metadata, env.storePublish);
|
|
50155
50156
|
return;
|
|
50156
50157
|
}
|
|
50157
50158
|
}
|
|
50159
|
+
if (draftMetadataForKey !== undefined) {
|
|
50160
|
+
// WARNING: this code depends on the fact that RecordRepresentation
|
|
50161
|
+
// fields get published before the root record.
|
|
50162
|
+
if (draftMetadataForKey.refCount === 1) {
|
|
50163
|
+
delete draftMetadata[key];
|
|
50164
|
+
}
|
|
50165
|
+
else {
|
|
50166
|
+
draftMetadataForKey.refCount--;
|
|
50167
|
+
}
|
|
50168
|
+
}
|
|
50158
50169
|
// no handler could handle it so publish
|
|
50159
50170
|
env.storePublish(key, data);
|
|
50160
50171
|
};
|
|
50161
|
-
const storeBroadcast = function (rebuildSnapshot, snapshotAvailable) {
|
|
50162
|
-
draftMetadata = create$4(null);
|
|
50163
|
-
return env.storeBroadcast(rebuildSnapshot, snapshotAvailable);
|
|
50164
|
-
};
|
|
50165
50172
|
// note the makeEnvironmentUiApiRecordDraftAware will eventually go away once the adapters become draft aware
|
|
50166
50173
|
return create$4(env, {
|
|
50167
50174
|
storePublish: { value: storePublish },
|
|
50168
|
-
storeBroadcast: { value: storeBroadcast },
|
|
50169
50175
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
50170
50176
|
});
|
|
50171
50177
|
}
|
|
@@ -55255,6 +55261,9 @@
|
|
|
55255
55261
|
}
|
|
55256
55262
|
// assert that object infos and references exist
|
|
55257
55263
|
const metaDataResult = await this.recordService.getRecordDraftMetadata(targetId, pendingAction);
|
|
55264
|
+
if (metaDataResult === undefined) {
|
|
55265
|
+
throw Error('No metadata for draft');
|
|
55266
|
+
}
|
|
55258
55267
|
if (metaDataResult.ok === false) {
|
|
55259
55268
|
switch (metaDataResult.status) {
|
|
55260
55269
|
case 'missing-object-info':
|
|
@@ -55332,7 +55341,7 @@
|
|
|
55332
55341
|
return undefined;
|
|
55333
55342
|
}
|
|
55334
55343
|
const status = await this.recordService.getRecordDraftMetadata(recordId, undefined);
|
|
55335
|
-
return status.data;
|
|
55344
|
+
return status && status.data;
|
|
55336
55345
|
}
|
|
55337
55346
|
isActionRecordAction(action) {
|
|
55338
55347
|
return action.handler === this.handlerId;
|
|
@@ -55883,6 +55892,9 @@
|
|
|
55883
55892
|
async getRecordDraftMetadata(recordId, incomingAction) {
|
|
55884
55893
|
var _a;
|
|
55885
55894
|
const recordOperations = (await this.queueToRecordOperations(incomingAction)).filter((x) => x.id === recordId);
|
|
55895
|
+
if (recordOperations.length === 0) {
|
|
55896
|
+
return undefined;
|
|
55897
|
+
}
|
|
55886
55898
|
const objectInfoMap = new Map();
|
|
55887
55899
|
const referenceMap = new Map();
|
|
55888
55900
|
const missingReferenceKeys = new Set();
|
|
@@ -55917,7 +55929,7 @@
|
|
|
55917
55929
|
continue;
|
|
55918
55930
|
}
|
|
55919
55931
|
// relax the check for record type ids as they will
|
|
55920
|
-
//
|
|
55932
|
+
// unlikely to be cached
|
|
55921
55933
|
if (fieldInfo.dataType !== 'Reference' || field === 'RecordTypeId') {
|
|
55922
55934
|
continue;
|
|
55923
55935
|
}
|
|
@@ -55979,6 +55991,9 @@
|
|
|
55979
55991
|
}
|
|
55980
55992
|
async synthesizeDraftRecord(recordId) {
|
|
55981
55993
|
const metadata = await this.getRecordDraftMetadata(recordId, undefined);
|
|
55994
|
+
if (metadata === undefined) {
|
|
55995
|
+
return undefined;
|
|
55996
|
+
}
|
|
55982
55997
|
const record = replayDraftsOnRecord(undefined, metadata.data);
|
|
55983
55998
|
return record;
|
|
55984
55999
|
}
|
|
@@ -56500,6 +56515,9 @@
|
|
|
56500
56515
|
pendingAction.metadata[CONTENT_DOCUMENT_LINK_DRAFT_ID_KEY] = contentDocumentLinkId;
|
|
56501
56516
|
// assert that object infos and references exist
|
|
56502
56517
|
const metaDataResult = await this.draftRecordService.getRecordDraftMetadata(targetId, pendingAction);
|
|
56518
|
+
if (metaDataResult === undefined) {
|
|
56519
|
+
throw Error('No metadata for draft');
|
|
56520
|
+
}
|
|
56503
56521
|
if (metaDataResult.ok === false) {
|
|
56504
56522
|
switch (metaDataResult.status) {
|
|
56505
56523
|
case 'missing-object-info':
|
|
@@ -56546,18 +56564,27 @@
|
|
|
56546
56564
|
}
|
|
56547
56565
|
// get the content doc
|
|
56548
56566
|
const contentDocMetadata = await this.draftRecordService.getRecordDraftMetadata(contentDocumentId, undefined);
|
|
56567
|
+
if (contentDocMetadata === undefined) {
|
|
56568
|
+
return undefined;
|
|
56569
|
+
}
|
|
56549
56570
|
const contentDocRecord = replayDraftsOnRecord(undefined, contentDocMetadata.data);
|
|
56550
56571
|
if (contentDocRecord === undefined) {
|
|
56551
56572
|
return undefined;
|
|
56552
56573
|
}
|
|
56553
56574
|
// get the contentDocLink to the user
|
|
56554
56575
|
const contentDocLinkMetadata = await this.draftRecordService.getRecordDraftMetadata(contentDocumentLinkId, undefined);
|
|
56576
|
+
if (contentDocLinkMetadata === undefined) {
|
|
56577
|
+
return undefined;
|
|
56578
|
+
}
|
|
56555
56579
|
const contentDocLink = replayDraftsOnRecord(undefined, contentDocLinkMetadata.data);
|
|
56556
56580
|
if (contentDocLink === undefined) {
|
|
56557
56581
|
return undefined;
|
|
56558
56582
|
}
|
|
56559
56583
|
// get the content version
|
|
56560
56584
|
const contentVersionMetadata = await this.draftRecordService.getRecordDraftMetadata(contentVersionId, undefined);
|
|
56585
|
+
if (contentVersionMetadata === undefined) {
|
|
56586
|
+
return undefined;
|
|
56587
|
+
}
|
|
56561
56588
|
const contentVersion = replayDraftsOnRecord(undefined, contentVersionMetadata.data);
|
|
56562
56589
|
if (contentVersion === undefined) {
|
|
56563
56590
|
return undefined;
|
|
@@ -59284,7 +59311,7 @@
|
|
|
59284
59311
|
id: '@salesforce/lds-network-adapter',
|
|
59285
59312
|
instrument: instrument$1,
|
|
59286
59313
|
});
|
|
59287
|
-
// version: 1.108.
|
|
59314
|
+
// version: 1.108.1-582a74bf0
|
|
59288
59315
|
|
|
59289
59316
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59290
59317
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -76937,7 +76964,7 @@
|
|
|
76937
76964
|
configuration: { ...configurationForGraphQLAdapters },
|
|
76938
76965
|
instrument,
|
|
76939
76966
|
});
|
|
76940
|
-
// version: 1.108.
|
|
76967
|
+
// version: 1.108.1-582a74bf0
|
|
76941
76968
|
|
|
76942
76969
|
// On core the unstable adapters are re-exported with different names,
|
|
76943
76970
|
|
|
@@ -79066,7 +79093,7 @@
|
|
|
79066
79093
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
79067
79094
|
graphQLImperative = ldsAdapter;
|
|
79068
79095
|
});
|
|
79069
|
-
// version: 1.108.
|
|
79096
|
+
// version: 1.108.1-582a74bf0
|
|
79070
79097
|
|
|
79071
79098
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
79072
79099
|
__proto__: null,
|
|
@@ -79757,4 +79784,4 @@
|
|
|
79757
79784
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
79758
79785
|
|
|
79759
79786
|
}));
|
|
79760
|
-
// version: 1.108.
|
|
79787
|
+
// version: 1.108.1-582a74bf0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.108.
|
|
3
|
+
"version": "1.108.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/umd/lds-worker-api.js",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"@luvio/engine": "0.135.4",
|
|
38
38
|
"@luvio/environments": "0.135.4",
|
|
39
39
|
"@oat-sa/rollup-plugin-wildcard-external": "^0.1.0",
|
|
40
|
-
"@salesforce/lds-adapters-graphql": "^1.108.
|
|
41
|
-
"@salesforce/lds-adapters-uiapi": "^1.108.
|
|
42
|
-
"@salesforce/lds-default-luvio": "^1.108.
|
|
43
|
-
"@salesforce/lds-drafts": "^1.108.
|
|
44
|
-
"@salesforce/lds-graphql-parser": "^1.108.
|
|
45
|
-
"@salesforce/lds-luvio-engine": "^1.108.
|
|
46
|
-
"@salesforce/lds-priming": "^1.108.
|
|
47
|
-
"@salesforce/lds-runtime-mobile": "^1.108.
|
|
48
|
-
"@salesforce/nimbus-plugin-lds": "^1.108.
|
|
40
|
+
"@salesforce/lds-adapters-graphql": "^1.108.1",
|
|
41
|
+
"@salesforce/lds-adapters-uiapi": "^1.108.1",
|
|
42
|
+
"@salesforce/lds-default-luvio": "^1.108.1",
|
|
43
|
+
"@salesforce/lds-drafts": "^1.108.1",
|
|
44
|
+
"@salesforce/lds-graphql-parser": "^1.108.1",
|
|
45
|
+
"@salesforce/lds-luvio-engine": "^1.108.1",
|
|
46
|
+
"@salesforce/lds-priming": "^1.108.1",
|
|
47
|
+
"@salesforce/lds-runtime-mobile": "^1.108.1",
|
|
48
|
+
"@salesforce/nimbus-plugin-lds": "^1.108.1",
|
|
49
49
|
"ajv": "^8.11.0",
|
|
50
50
|
"glob": "^7.1.5",
|
|
51
51
|
"nimbus-types": "^2.0.0-alpha1",
|