@naturalcycles/js-lib 14.205.1 → 14.206.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.
package/dist/types.d.ts CHANGED
@@ -47,9 +47,13 @@ export type BaseDBEntity = {
47
47
  updated?: UnixTimestampNumber;
48
48
  };
49
49
  export type Saved<T> = T & {
50
+ id: string;
50
51
  created: UnixTimestampNumber;
51
52
  updated: UnixTimestampNumber;
52
53
  };
54
+ export type SavedId<T> = T & {
55
+ id: string;
56
+ };
53
57
  export type Unsaved<T> = T extends AnyObject ? Omit<T, 'id' | 'created' | 'updated'> & {
54
58
  id?: string;
55
59
  created?: UnixTimestampNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
- "version": "14.205.1",
3
+ "version": "14.206.0",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "build-prod": "build-prod-esm-cjs",
package/src/types.ts CHANGED
@@ -62,10 +62,15 @@ export type BaseDBEntity = {
62
62
  }
63
63
 
64
64
  export type Saved<T> = T & {
65
+ id: string
65
66
  created: UnixTimestampNumber
66
67
  updated: UnixTimestampNumber
67
68
  }
68
69
 
70
+ export type SavedId<T> = T & {
71
+ id: string
72
+ }
73
+
69
74
  export type Unsaved<T> = T extends AnyObject
70
75
  ? Omit<T, 'id' | 'created' | 'updated'> & {
71
76
  id?: string