dyno-table 2.3.1 → 2.3.2

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/entity.d.cts CHANGED
@@ -2,7 +2,7 @@ import { s as Path, t as PathType, a as Condition, b as ConditionOperator, c as
2
2
  import { P as PutBuilder, G as GetBuilder, U as UpdateBuilder, i as UpdateCommandParams, T as TransactionBuilder, D as DeleteBuilder, S as ScanBuilder, Q as QueryBuilder } from './index-DlN8G9hd.cjs';
3
3
  import { StandardSchemaV1 } from './standard-schema.cjs';
4
4
  import { Table } from './table.cjs';
5
- import { DynamoItem, TableConfig, Index } from './types.cjs';
5
+ import { DynamoItem, Index, TableConfig } from './types.cjs';
6
6
  import '@aws-sdk/lib-dynamodb';
7
7
 
8
8
  type SetElementType<T> = T extends Set<infer U> ? U : T extends Array<infer U> ? U : never;
@@ -110,7 +110,7 @@ type QueryFunctionWithSchema<T extends DynamoItem, I, R> = QueryFunction<T, I, R
110
110
  schema?: StandardSchemaV1<I>;
111
111
  };
112
112
  type QueryRecord<T extends DynamoItem> = {
113
- [K: string]: QueryFunctionWithSchema<T, any, ScanBuilder<T> | QueryBuilder<T, TableConfig> | GetBuilder<T>>;
113
+ [K: string]: QueryFunctionWithSchema<T, any, any>;
114
114
  };
115
115
  type QueryEntity<T extends DynamoItem> = {
116
116
  scan: () => ScanBuilder<T>;
@@ -221,7 +221,7 @@ declare function defineEntity<T extends DynamoItem, TInput extends DynamoItem =
221
221
  };
222
222
  declare function createQueries<T extends DynamoItem>(): {
223
223
  input: <I>(schema: StandardSchemaV1<I>) => {
224
- query: <Q extends QueryRecord<T> = QueryRecord<T>, R = ScanBuilder<T, TableConfig> | QueryBuilder<T, TableConfig> | GetBuilder<T>>(handler: (params: {
224
+ query: <R extends ScanBuilder<T> | QueryBuilder<T, TableConfig> | GetBuilder<T>>(handler: (params: {
225
225
  input: I;
226
226
  entity: QueryEntity<T>;
227
227
  }) => R) => QueryFunctionWithSchema<T, I, R>;
package/dist/entity.d.ts CHANGED
@@ -2,7 +2,7 @@ import { s as Path, t as PathType, a as Condition, b as ConditionOperator, c as
2
2
  import { P as PutBuilder, G as GetBuilder, U as UpdateBuilder, i as UpdateCommandParams, T as TransactionBuilder, D as DeleteBuilder, S as ScanBuilder, Q as QueryBuilder } from './index-2cbm07Bi.js';
3
3
  import { StandardSchemaV1 } from './standard-schema.js';
4
4
  import { Table } from './table.js';
5
- import { DynamoItem, TableConfig, Index } from './types.js';
5
+ import { DynamoItem, Index, TableConfig } from './types.js';
6
6
  import '@aws-sdk/lib-dynamodb';
7
7
 
8
8
  type SetElementType<T> = T extends Set<infer U> ? U : T extends Array<infer U> ? U : never;
@@ -110,7 +110,7 @@ type QueryFunctionWithSchema<T extends DynamoItem, I, R> = QueryFunction<T, I, R
110
110
  schema?: StandardSchemaV1<I>;
111
111
  };
112
112
  type QueryRecord<T extends DynamoItem> = {
113
- [K: string]: QueryFunctionWithSchema<T, any, ScanBuilder<T> | QueryBuilder<T, TableConfig> | GetBuilder<T>>;
113
+ [K: string]: QueryFunctionWithSchema<T, any, any>;
114
114
  };
115
115
  type QueryEntity<T extends DynamoItem> = {
116
116
  scan: () => ScanBuilder<T>;
@@ -221,7 +221,7 @@ declare function defineEntity<T extends DynamoItem, TInput extends DynamoItem =
221
221
  };
222
222
  declare function createQueries<T extends DynamoItem>(): {
223
223
  input: <I>(schema: StandardSchemaV1<I>) => {
224
- query: <Q extends QueryRecord<T> = QueryRecord<T>, R = ScanBuilder<T, TableConfig> | QueryBuilder<T, TableConfig> | GetBuilder<T>>(handler: (params: {
224
+ query: <R extends ScanBuilder<T> | QueryBuilder<T, TableConfig> | GetBuilder<T>>(handler: (params: {
225
225
  input: I;
226
226
  entity: QueryEntity<T>;
227
227
  }) => R) => QueryFunctionWithSchema<T, I, R>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dyno-table",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "A TypeScript library to simplify working with DynamoDB",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",