betterddb 0.4.2 → 0.4.3

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.
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { ZodSchema } from 'zod';
2
2
  import { QueryBuilder } from './builders/query-builder';
3
3
  import { ScanBuilder } from './builders/scan-builder';
4
4
  import { UpdateBuilder } from './builders/update-builder';
@@ -60,7 +60,7 @@ export interface KeysConfig<T> {
60
60
  * Options for initializing BetterDDB.
61
61
  */
62
62
  export interface BetterDDBOptions<T> {
63
- schema: z.AnyZodObject;
63
+ schema: ZodSchema;
64
64
  tableName: string;
65
65
  entityName: string;
66
66
  keys: KeysConfig<T>;
@@ -78,7 +78,7 @@ export interface BetterDDBOptions<T> {
78
78
  * BetterDDB is a definition-based DynamoDB wrapper library.
79
79
  */
80
80
  export declare class BetterDDB<T> {
81
- protected schema: z.AnyZodObject;
81
+ protected schema: ZodSchema;
82
82
  protected tableName: string;
83
83
  protected entityName: string;
84
84
  protected client: DynamoDBDocumentClient;
@@ -88,7 +88,7 @@ export declare class BetterDDB<T> {
88
88
  getKeys(): KeysConfig<T>;
89
89
  getTableName(): string;
90
90
  getClient(): DynamoDBDocumentClient;
91
- getSchema(): z.AnyZodObject;
91
+ getSchema(): ZodSchema;
92
92
  getAutoTimestamps(): boolean;
93
93
  protected getKeyValue(def: KeyDefinition<T>, rawKey: Partial<T>): string;
94
94
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "betterddb",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "A definition-based DynamoDB wrapper library that provides a schema-driven and fully typesafe DAL.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/betterddb.ts CHANGED
@@ -69,7 +69,7 @@ export interface KeysConfig<T> {
69
69
  * Options for initializing BetterDDB.
70
70
  */
71
71
  export interface BetterDDBOptions<T> {
72
- schema: z.AnyZodObject;
72
+ schema: ZodSchema;
73
73
  tableName: string;
74
74
  entityName: string;
75
75
  keys: KeysConfig<T>;
@@ -88,7 +88,7 @@ export interface BetterDDBOptions<T> {
88
88
  * BetterDDB is a definition-based DynamoDB wrapper library.
89
89
  */
90
90
  export class BetterDDB<T> {
91
- protected schema: z.AnyZodObject;
91
+ protected schema: ZodSchema;
92
92
  protected tableName: string;
93
93
  protected entityName: string;
94
94
  protected client: DynamoDBDocumentClient;
@@ -117,7 +117,7 @@ export class BetterDDB<T> {
117
117
  }
118
118
 
119
119
 
120
- public getSchema(): z.AnyZodObject {
120
+ public getSchema(): ZodSchema {
121
121
  return this.schema;
122
122
  }
123
123