@hf-chimera/store 0.0.12 → 0.0.14
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/CHANGELOG.md +12 -0
- package/README.md +14 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -269,10 +269,16 @@ const store = new ChimeraStore<EntityMap>(config)
|
|
|
269
269
|
#### Methods
|
|
270
270
|
|
|
271
271
|
- `from<EntityName>(entityName: EntityName)`: Get repository for specific entity
|
|
272
|
-
- `updateOne<EntityName>(entityName: EntityName, item: EntityMap[EntityName])`:
|
|
273
|
-
|
|
274
|
-
-
|
|
275
|
-
|
|
272
|
+
- `updateOne<EntityName>(entityName: EntityName, item: EntityMap[EntityName])`:
|
|
273
|
+
Update single item
|
|
274
|
+
-
|
|
275
|
+
`updateMany<EntityName>(entityName: EntityName, items: Iterable<EntityMap[EntityName]>)`:
|
|
276
|
+
Update multiple items
|
|
277
|
+
- `deleteOne<EntityName>(entityName: EntityName, id: ChimeraEntityId)`: Delete
|
|
278
|
+
single item
|
|
279
|
+
-
|
|
280
|
+
`deleteMany<EntityName>(entityName: EntityName, ids: Iterable<ChimeraEntityId>)`:
|
|
281
|
+
Delete multiple items
|
|
276
282
|
|
|
277
283
|
### ChimeraEntityRepository
|
|
278
284
|
|
|
@@ -282,7 +288,8 @@ Entity-specific repository with query capabilities.
|
|
|
282
288
|
|
|
283
289
|
- `createItem(item: DeepPartial<Item>, meta?: any)`: Create new item
|
|
284
290
|
- `getItem(id: ChimeraEntityId, meta?: any)`: Get single item
|
|
285
|
-
- `getCollection(params: ChimeraCollectionParams)`: Get filtered/sorted
|
|
291
|
+
- `getCollection(params: ChimeraCollectionParams)`: Get filtered/sorted
|
|
292
|
+
collection
|
|
286
293
|
|
|
287
294
|
### ChimeraItemQuery
|
|
288
295
|
|
|
@@ -300,7 +307,8 @@ Represents a single item query with full CRUD operations.
|
|
|
300
307
|
|
|
301
308
|
- `refetch(force?: boolean)`: Refetch data
|
|
302
309
|
- `update(item: Item, force?: boolean)`: Update item
|
|
303
|
-
- `mutate(mutator: (draft: Item) => Item, force?: boolean)`: Update using
|
|
310
|
+
- `mutate(mutator: (draft: Item) => Item, force?: boolean)`: Update using
|
|
311
|
+
mutator function
|
|
304
312
|
- `commit(force?: boolean)`: Commit mutable changes
|
|
305
313
|
- `delete(force?: boolean)`: Delete item
|
|
306
314
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "hewston",
|
|
3
3
|
"name": "@hf-chimera/store",
|
|
4
4
|
"description": "Cross-end reactivity API",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.14",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"state-management",
|
|
@@ -78,6 +78,6 @@
|
|
|
78
78
|
"lint": "tsc && pnpm biome check --write",
|
|
79
79
|
"test": "vitest run --passWithNoTests",
|
|
80
80
|
"test:coverage": "vitest --ui --coverage.enabled --coverage.all",
|
|
81
|
-
"release": "pnpm run build &&
|
|
81
|
+
"release": "pnpm run build && pnpm publish --provenance --access public"
|
|
82
82
|
}
|
|
83
83
|
}
|