@squiz/db-lib 1.68.0 → 1.70.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.70.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0d445ab: Avoid waiting for logging request to complete, parallelize more work when saving a content page.
8
+
9
+ ### Patch Changes
10
+
11
+ - 0d445ab: Added spans to more easily identify different portions of the request which relate to saving a content page
12
+
13
+ ## 1.69.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 0079f07: allow fields to be stored as json string in dynamodb
18
+
3
19
  ## 1.68.0
4
20
 
5
21
  ### Minor Changes
@@ -26,6 +26,7 @@ export type KeysFormat = Record<keyof TableKeys | keyof TableIndexes, string>;
26
26
  export type EntityDefinition = {
27
27
  keys: TableKeys;
28
28
  indexes: TableIndexes;
29
+ fieldsAsJsonString: string[];
29
30
  };
30
31
  export declare abstract class AbstractDynamoDbRepository<SHAPE extends object, DATA_CLASS extends SHAPE> implements Reader<SHAPE>, Writer<SHAPE> {
31
32
  protected tableName: string;
@@ -39,6 +40,7 @@ export declare abstract class AbstractDynamoDbRepository<SHAPE extends object, D
39
40
  protected keys: TableKeys;
40
41
  protected indexes: TableIndexes;
41
42
  protected keysFormat: KeysFormat;
43
+ protected fieldsAsJsonString: string[];
42
44
  constructor(tableName: string, dbManager: DynamoDbManager<Repositories>, entityName: string, entityDefinition: EntityDefinition, classRef: {
43
45
  new (data?: Record<string, unknown>): DATA_CLASS;
44
46
  });
@@ -99,6 +101,7 @@ export declare abstract class AbstractDynamoDbRepository<SHAPE extends object, D
99
101
  * @returns
100
102
  */
101
103
  protected hydrateItem(item: Record<string, unknown>): DATA_CLASS;
104
+ protected convertSelectedValuesToJsonString(item: Record<string, unknown>): void;
102
105
  /**
103
106
  * Evaluate the partition key value from the partial item
104
107
  * @param item
@@ -6,12 +6,14 @@ interface ITestItem {
6
6
  age: number;
7
7
  country: string;
8
8
  data?: object;
9
+ data2?: object;
9
10
  }
10
11
  declare class TestItem implements ITestItem {
11
12
  name: string;
12
13
  age: number;
13
14
  country: string;
14
15
  data: object;
16
+ data2?: object;
15
17
  constructor(data?: Partial<ITestItem>);
16
18
  }
17
19
  export type TestRepositories = {
@@ -0,0 +1,5 @@
1
+ import { InternalServerError } from '@squiz/dx-common-lib';
2
+ export declare class InvalidDataFormatError extends InternalServerError {
3
+ name: string;
4
+ constructor(message: string);
5
+ }