@openhi/constructs 0.0.90 → 0.0.91

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/lib/index.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  __commonJS,
9
9
  __toESM
10
- } from "./chunk-LZOMFHX3.mjs";
10
+ } from "./chunk-3QS3WKRC.mjs";
11
11
 
12
12
  // ../config/lib/open-hi-config.js
13
13
  var require_open_hi_config = __commonJS({
@@ -860,13 +860,20 @@ var DynamoDbDataStore = class extends Table {
860
860
  },
861
861
  projectionType: ProjectionType.INCLUDE,
862
862
  nonKeyAttributes: [
863
+ "id",
863
864
  "summary",
864
865
  "vid",
865
866
  "lastUpdated",
866
867
  "createdDate",
867
868
  "modifiedDate",
868
869
  "createdById",
869
- "modifiedById"
870
+ "modifiedById",
871
+ // ElectroDB filters every query result through `ownsItem`, which
872
+ // verifies `__edb_e__` (entity name) and `__edb_v__` (version) match
873
+ // the entity. Without these projected, every GSI1 query returns 0
874
+ // results — list endpoints silently return empty bundles.
875
+ "__edb_e__",
876
+ "__edb_v__"
870
877
  ]
871
878
  });
872
879
  this.addGlobalSecondaryIndex({
@@ -884,7 +891,12 @@ var DynamoDbDataStore = class extends Table {
884
891
  "id",
885
892
  "currentTenant",
886
893
  "currentWorkspace",
887
- "displayName"
894
+ "displayName",
895
+ // See GSI1 above: ElectroDB's `ownsItem` filter rejects items
896
+ // without these, so any query against GSI2 returns 0 results
897
+ // unless they're projected.
898
+ "__edb_e__",
899
+ "__edb_v__"
888
900
  ]
889
901
  });
890
902
  }