@alwaysmeticulous/api 2.184.0 → 2.185.1

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.
@@ -108,6 +108,13 @@ export interface IDBObjectStoreMetadata {
108
108
  objectStoreName: string;
109
109
  serialize?: (value: any) => string;
110
110
  deserialize?: (value: string) => any;
111
+ /**
112
+ * For object stores with known data structures, we can estimate the length more efficiently
113
+ * than our standard estimateLength() function by looking at specific fields. If the value
114
+ * returned by this method exceeds the recording environment's maximum IDB entry length,
115
+ * we will not attempt to serialize or record the value.
116
+ */
117
+ estimateLength?: (value: any) => number;
111
118
  }
112
119
  /**
113
120
  * Currently we only support string keys, but we may support other types in the future.
@@ -122,7 +129,7 @@ interface StringKey {
122
129
  type: "string";
123
130
  serializedKey: string;
124
131
  }
125
- export type IDBObjectStoreSnapshot = Omit<IDBObjectStoreMetadata, "serialize" | "deserialize"> & {
132
+ export type IDBObjectStoreSnapshot = Pick<IDBObjectStoreMetadata, "databaseName" | "objectStoreName"> & {
126
133
  createObjectStoreOptions: IDBObjectStoreParameters;
127
134
  /**
128
135
  * Entry values are JSON stringified by default. JSON representable objects, arrays and primitives are supported.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/api",
3
- "version": "2.184.0",
3
+ "version": "2.185.1",
4
4
  "description": "Meticulous API types",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -35,5 +35,5 @@
35
35
  "bugs": {
36
36
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
37
37
  },
38
- "gitHead": "bd151de38526521436e599a40f474b2f0beba59e"
38
+ "gitHead": "31fd9518a85bb75e2a5fcb2b108a9d8d177eb087"
39
39
  }