@mdbase-dev/sdk 0.2.66 → 0.2.68

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.
@@ -19833,9 +19833,10 @@ var RecordSessionImpl = class {
19833
19833
  "native receipt belongs to another mutation",
19834
19834
  "mutation_identity_mismatch"
19835
19835
  );
19836
- const linked = receipt3.records?.some(
19836
+ const linkedRecord = receipt3.records?.find(
19837
19837
  (record3) => record3.id === original.recordId
19838
- ) ?? false;
19838
+ );
19839
+ const linked = linkedRecord !== void 0;
19839
19840
  if (receipt3.records?.length && !linked || !captured.bound && receipt3.state === "confirmed" && !linked) {
19840
19841
  throw refusal(
19841
19842
  "outcome_unknown",
@@ -19878,7 +19879,8 @@ var RecordSessionImpl = class {
19878
19879
  "unqualified_readback"
19879
19880
  );
19880
19881
  const sameBody = this.body === captured.body;
19881
- const conflict2 = !kept && !sameBody && current2.body !== captured.body && current2.body !== this.body;
19882
+ const acknowledgedOwnRevision = linkedRecord?.revision !== void 0 && current2.revision === linkedRecord.revision;
19883
+ const conflict2 = !kept && !sameBody && !acknowledgedOwnRevision && current2.body !== captured.body && current2.body !== this.body;
19882
19884
  this.charge(this.body, this.patch, current2, conflict2 ? current2 : null, receipt3, null, edits);
19883
19885
  this.pendingEdits = edits;
19884
19886
  for (const [key3, value2] of captured.patch) {
@@ -5589,9 +5589,10 @@ var MdbaseSDK = (() => {
5589
5589
  "native receipt belongs to another mutation",
5590
5590
  "mutation_identity_mismatch"
5591
5591
  );
5592
- const linked = receipt4.records?.some(
5592
+ const linkedRecord = receipt4.records?.find(
5593
5593
  (record5) => record5.id === original.recordId
5594
- ) ?? false;
5594
+ );
5595
+ const linked = linkedRecord !== void 0;
5595
5596
  if (receipt4.records?.length && !linked || !captured.bound && receipt4.state === "confirmed" && !linked) {
5596
5597
  throw refusal(
5597
5598
  "outcome_unknown",
@@ -5634,7 +5635,8 @@ var MdbaseSDK = (() => {
5634
5635
  "unqualified_readback"
5635
5636
  );
5636
5637
  const sameBody = this.body === captured.body;
5637
- const conflict2 = !kept && !sameBody && current3.body !== captured.body && current3.body !== this.body;
5638
+ const acknowledgedOwnRevision = linkedRecord?.revision !== void 0 && current3.revision === linkedRecord.revision;
5639
+ const conflict2 = !kept && !sameBody && !acknowledgedOwnRevision && current3.body !== captured.body && current3.body !== this.body;
5638
5640
  this.charge(this.body, this.patch, current3, conflict2 ? current3 : null, receipt4, null, edits);
5639
5641
  this.pendingEdits = edits;
5640
5642
  for (const [key3, value2] of captured.patch) {