@jaypie/dynamodb 0.4.3 → 0.5.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.
@@ -1,6 +1 @@
1
1
  export { APEX, ARCHIVED_SUFFIX, DELETED_SUFFIX, SEPARATOR, } from "@jaypie/fabric";
2
- export declare const INDEX_ALIAS = "indexAlias";
3
- export declare const INDEX_CATEGORY = "indexCategory";
4
- export declare const INDEX_SCOPE = "indexScope";
5
- export declare const INDEX_TYPE = "indexType";
6
- export declare const INDEX_XID = "indexXid";
@@ -1,24 +1,18 @@
1
1
  import type { StorableEntity } from "./types.js";
2
2
  /**
3
- * Get a single entity by primary key
3
+ * Get a single entity by primary key (id)
4
4
  */
5
5
  export declare const getEntity: import("@jaypie/fabric").Service<Record<string, unknown>, StorableEntity | null, StorableEntity | null>;
6
6
  /**
7
- * Put (create or replace) an entity
8
- * Auto-populates GSI index keys via indexEntity
9
- *
10
- * Note: This is a regular async function (not fabricService) because it accepts
11
- * complex StorableEntity objects that can't be coerced by vocabulary's type system.
7
+ * Put (create or replace) an entity.
8
+ * `indexEntity` auto-bumps `updatedAt` and backfills `createdAt`.
12
9
  */
13
10
  export declare function putEntity({ entity, }: {
14
11
  entity: StorableEntity;
15
12
  }): Promise<StorableEntity>;
16
13
  /**
17
- * Update an existing entity
18
- * Auto-populates GSI index keys and sets updatedAt
19
- *
20
- * Note: This is a regular async function (not fabricService) because it accepts
21
- * complex StorableEntity objects that can't be coerced by vocabulary's type system.
14
+ * Update an existing entity.
15
+ * `indexEntity` auto-bumps `updatedAt` callers never set it manually.
22
16
  */
23
17
  export declare function updateEntity({ entity, }: {
24
18
  entity: StorableEntity;