@balena/sbvr-types
Advanced tools
Comparing version 4.0.1 to 4.0.2-build-typings-a5fd4a319cd0336afc5a765af9e1a1eec851f2c3-1
@@ -7,2 +7,7 @@ # Change Log | ||
# v4.0.2 | ||
## (2023-05-03) | ||
* Improve typings [Pagan Gazzard] | ||
# v4.0.1 | ||
@@ -9,0 +14,0 @@ ## (2023-05-02) |
@@ -1,12 +0,43 @@ | ||
import type { SbvrType } from './type-utils'; | ||
import * as BigInteger from './types/big-integer'; | ||
import * as BigSerial from './types/big-serial'; | ||
import * as Boolean from './types/boolean'; | ||
import * as CaseInsensitiveText from './types/case-insensitive-text'; | ||
import * as Color from './types/color'; | ||
import * as ConceptType from './types/concept-type'; | ||
import * as Date from './types/date'; | ||
import * as DateTime from './types/date-time'; | ||
import * as File from './types/file'; | ||
import * as ForeignKey from './types/foreign-key'; | ||
import * as Hashed from './types/hashed'; | ||
import * as Integer from './types/integer'; | ||
import * as Interval from './types/interval'; | ||
import * as JSON from './types/json'; | ||
import * as Real from './types/real'; | ||
import * as Serial from './types/serial'; | ||
import * as SHA from './types/sha'; | ||
import * as ShortText from './types/short-text'; | ||
import * as Text from './types/text'; | ||
import * as Time from './types/time'; | ||
declare const _default: { | ||
[fieldType: string]: SbvrType; | ||
Hashed: SbvrType & { | ||
compare: (str: string, hash: string) => Promise<boolean>; | ||
}; | ||
SHA: SbvrType & { | ||
validateSync: (value: string) => string; | ||
compare: (str: string, hash: string) => Promise<boolean>; | ||
}; | ||
'Big Integer': typeof BigInteger; | ||
'Big Serial': typeof BigSerial; | ||
Boolean: typeof Boolean; | ||
'Case Insensitive Text': typeof CaseInsensitiveText; | ||
Color: typeof Color; | ||
ConceptType: typeof ConceptType; | ||
'Date Time': typeof DateTime; | ||
Date: typeof Date; | ||
File: typeof File; | ||
ForeignKey: typeof ForeignKey; | ||
Hashed: typeof Hashed; | ||
Integer: typeof Integer; | ||
Interval: typeof Interval; | ||
JSON: typeof JSON; | ||
Real: typeof Real; | ||
Serial: typeof Serial; | ||
SHA: typeof SHA; | ||
'Short Text': typeof ShortText; | ||
Text: typeof Text; | ||
Time: typeof Time; | ||
}; | ||
export = _default; |
@@ -17,3 +17,3 @@ export interface DatabaseTypeFn { | ||
fetchProcessing?: (field: any) => any; | ||
validate: (value: any, required?: boolean) => Promise<any>; | ||
validate: (value: any, required: boolean) => Promise<any>; | ||
} | ||
@@ -34,3 +34,3 @@ export declare const nativeFactTypeTemplates: { | ||
(value: undefined | null, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<T | null>; | ||
(value: any, required: boolean): Promise<T | null>; | ||
}; | ||
@@ -40,3 +40,3 @@ integer: { | ||
(value: undefined | null, required: false): Promise<null>; | ||
<U_1>(value: U_1, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; | ||
@@ -46,3 +46,3 @@ text: (length?: number) => { | ||
(value: undefined | null, required: false): Promise<null>; | ||
<U_2>(value: U_2, required: boolean): Promise<string | null>; | ||
(value: any, required: boolean): Promise<string | null>; | ||
}; | ||
@@ -52,4 +52,4 @@ date: { | ||
(value: undefined | null, required: false): Promise<null>; | ||
<U_3>(value: U_3, required: boolean): Promise<Date | null>; | ||
(value: any, required: boolean): Promise<Date | null>; | ||
}; | ||
}; |
@@ -24,3 +24,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -13,3 +13,3 @@ import * as TypeUtils from '../type-utils'; | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -14,3 +14,3 @@ import * as TypeUtils from '../type-utils'; | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<boolean | null>; | ||
(value: any, required: boolean): Promise<boolean | null>; | ||
}; |
@@ -12,3 +12,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<string | null>; | ||
(value: any, required: boolean): Promise<string | null>; | ||
}; |
@@ -27,3 +27,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -24,3 +24,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -22,3 +22,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<Date | null>; | ||
(value: any, required: boolean): Promise<Date | null>; | ||
}; |
@@ -19,3 +19,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<Date | null>; | ||
(value: any, required: boolean): Promise<Date | null>; | ||
}; |
@@ -13,3 +13,3 @@ /// <reference types="node" /> | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<Buffer | null>; | ||
(value: any, required: boolean): Promise<Buffer | null>; | ||
}; |
@@ -24,3 +24,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -13,4 +13,4 @@ import type * as Bcrypt from 'bcrypt'; | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<Promise<string> | null>; | ||
(value: any, required: boolean): Promise<Promise<string> | null>; | ||
}; | ||
export declare const compare: typeof Bcrypt.compare; |
@@ -24,3 +24,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -12,3 +12,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -13,3 +13,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<string | null>; | ||
(value: any, required: boolean): Promise<string | null>; | ||
}; |
@@ -24,3 +24,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -13,3 +13,3 @@ import * as TypeUtils from '../type-utils'; | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<number | null>; | ||
(value: any, required: boolean): Promise<number | null>; | ||
}; |
@@ -13,4 +13,4 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<string | null>; | ||
(value: any, required: boolean): Promise<string | null>; | ||
}; | ||
export declare const compare: (value: string, result: string) => Promise<boolean>; |
@@ -12,3 +12,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<string | null>; | ||
(value: any, required: boolean): Promise<string | null>; | ||
}; |
@@ -25,3 +25,3 @@ export declare const types: { | ||
(value: null | undefined, required: false): Promise<null>; | ||
<U>(value: U, required: boolean): Promise<string | null>; | ||
(value: any, required: boolean): Promise<string | null>; | ||
}; |
{ | ||
"name": "@balena/sbvr-types", | ||
"version": "4.0.1", | ||
"version": "4.0.2-build-typings-a5fd4a319cd0336afc5a765af9e1a1eec851f2c3-1", | ||
"description": "SBVR type definitions.", | ||
@@ -57,4 +57,4 @@ "main": "out", | ||
"versionist": { | ||
"publishedAt": "2023-05-02T09:44:46.264Z" | ||
"publishedAt": "2023-05-03T11:37:17.824Z" | ||
} | ||
} |
@@ -45,3 +45,3 @@ import type { SbvrType } from './type-utils'; | ||
Time, | ||
} as { | ||
} satisfies { | ||
Hashed: SbvrType & { | ||
@@ -48,0 +48,0 @@ compare: (str: string, hash: string) => Promise<boolean>; |
@@ -17,3 +17,3 @@ export interface DatabaseTypeFn { | ||
fetchProcessing?: (field: any) => any; | ||
validate: (value: any, required?: boolean) => Promise<any>; | ||
validate: (value: any, required: boolean) => Promise<any>; | ||
} | ||
@@ -24,4 +24,4 @@ | ||
function runCheck(value: undefined | null, required: false): Promise<null>; | ||
function runCheck<U>(value: U, required: boolean): Promise<T | null>; | ||
async function runCheck<U>(value: U, required: boolean): Promise<T | null> { | ||
function runCheck(value: any, required: boolean): Promise<T | null>; | ||
async function runCheck(value: any, required: boolean): Promise<T | null> { | ||
if (value == null) { | ||
@@ -28,0 +28,0 @@ if (required) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
117155
1742
2