electrodb
Advanced tools
Comparing version 0.10.4 to 0.10.5
@@ -7,2 +7,3 @@ declare const WhereSymbol: unique symbol; | ||
readonly hidden?: boolean; | ||
readonly readOnly?: boolean; | ||
readonly get?: (val: boolean, item: any) => boolean | undefined; | ||
@@ -21,2 +22,3 @@ readonly set?: (val: boolean | undefined, item: any) => boolean | undefined; | ||
readonly hidden?: boolean; | ||
readonly readOnly?: boolean; | ||
readonly get?: (val: number, item: any) => number | undefined; | ||
@@ -35,2 +37,3 @@ readonly set?: (val: number | undefined, item: any) => number | undefined; | ||
readonly hidden?: boolean; | ||
readonly readOnly?: boolean; | ||
readonly get?: (val: string, item: any) => string | undefined; | ||
@@ -49,2 +52,3 @@ readonly set?: (val: string | undefined, item: any) => string | undefined; | ||
readonly hidden?: boolean; | ||
readonly readOnly?: boolean; | ||
readonly get?: (val: string, item: any) => string | undefined; | ||
@@ -63,2 +67,3 @@ readonly set?: (val: string | undefined, item: any) => string | undefined; | ||
readonly hidden?: boolean; | ||
readonly readOnly?: boolean; | ||
readonly get?: (val: any, item: any) => any | undefined; | ||
@@ -150,2 +155,10 @@ readonly set?: (val: any | undefined, item: any) => any | undefined; | ||
type ReadOnlyAttributes<A extends string, F extends A, C extends string, S extends Schema<A,F,C>> = ExtractKeysOfValueType<{ | ||
[a in keyof S["attributes"]]: S["attributes"][a]["readOnly"] extends infer R | ||
? R extends true | ||
? true | ||
: false | ||
: never; | ||
}, true> | ||
type ExtractKeysOfValueType<T, K> = { | ||
@@ -258,3 +271,6 @@ [I in keyof T]: T[I] extends K ? I : never | ||
type SetItem<A extends string, F extends A, C extends string, S extends Schema<A,F,C>> = | ||
Omit<Partial<TableItem<A,F,C,S>>, keyof AllTableIndexFacets<A,F,C,S>> | ||
Omit< | ||
Omit<Partial<TableItem<A,F,C,S>>, keyof AllTableIndexFacets<A,F,C,S>>, | ||
ReadOnlyAttributes<A,F,C,S> | ||
> | ||
@@ -572,2 +588,7 @@ export interface WhereAttributeSymbol<T> { | ||
? PutItem<A, F, C, S> | ||
: never; | ||
export type UpdateEntityItem<E extends Entity<any, any, any, any>> = | ||
E extends Entity<infer A, infer F, infer C, infer S> | ||
? SetItem<A, F, C, S> | ||
: never; |
{ | ||
"name": "electrodb", | ||
"version": "0.10.4", | ||
"version": "0.10.5", | ||
"description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
379775
6511
3398