@karmaniverous/entity-manager 0.0.8 → 0.0.10

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.
Files changed (2) hide show
  1. package/README.md +5 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -81,7 +81,7 @@ export const config = {
81
81
 
82
82
  // users GSI RANGE key.
83
83
  userSK: ({ merchantId, timestamp, transactionId }) =>
84
- `timestamp#${timestamp}|merchantId#${merchantId}|transactionId#${transactionId}`,
84
+ sn2u`timestamp#${timestamp}|merchantId#${merchantId}|transactionId#${transactionId}`,
85
85
  },
86
86
 
87
87
  // The sharding configuration for this entity.
@@ -92,7 +92,7 @@ export const config = {
92
92
  // Bits represented by each shard key character. 3 bits means an octal
93
93
  // shard key, so the first character yields 8 shards and the second
94
94
  // yields 64.
95
- nibbleBits: 4,
95
+ nibbleBits: 3,
96
96
 
97
97
  // Scheduled increases in shard key length. Keys are expressed as
98
98
  // millisecond UTC timestamps. In production, these should not be
@@ -110,8 +110,8 @@ export const config = {
110
110
  },
111
111
  },
112
112
  },
113
- // Will be added to every entity object. Pick a value that won't collide with
114
- // entity data!
113
+ // Will be added to every entity object as appropriate. Pick a value that
114
+ // won't collide with entity data!
115
115
  shardKeyToken: 'shardId',
116
116
  };
117
117
  ```
@@ -134,7 +134,7 @@ const entityManager = new EntityManager({ config, logger });
134
134
  const transaction = {
135
135
  methodId: 'methodIdValue',
136
136
  merchantId: 'merchantIdValue',
137
- timestamp: now + 1000,
137
+ timestamp: 1676869312851,
138
138
  transactionId: 'transactionIdValue',
139
139
  userId: 'userIdValue',
140
140
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karmaniverous/entity-manager",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },