@loomcore/common 0.0.47 → 0.0.48
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.
|
@@ -18,7 +18,7 @@ export declare const personSchema: import("@sinclair/typebox").TObject<{
|
|
|
18
18
|
isAgent: import("@sinclair/typebox").TBoolean;
|
|
19
19
|
isClient: import("@sinclair/typebox").TBoolean;
|
|
20
20
|
isEmployee: import("@sinclair/typebox").TBoolean;
|
|
21
|
-
dateOfBirth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString
|
|
21
|
+
dateOfBirth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TString, Date>>;
|
|
22
22
|
extendedTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
23
23
|
}>;
|
|
24
24
|
export declare const personModelSpec: import("@loomcore/common/models").IModelSpec<import("@sinclair/typebox").TSchema>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { entityUtils } from "@loomcore/common/utils";
|
|
2
2
|
import { Type } from "@sinclair/typebox";
|
|
3
|
+
import { TypeboxIsoDate } from "../validation/typebox-extensions.js";
|
|
3
4
|
export const personSchema = Type.Object({
|
|
4
5
|
externalId: Type.Optional(Type.String()),
|
|
5
6
|
firstName: Type.String(),
|
|
@@ -8,7 +9,7 @@ export const personSchema = Type.Object({
|
|
|
8
9
|
isAgent: Type.Boolean(),
|
|
9
10
|
isClient: Type.Boolean(),
|
|
10
11
|
isEmployee: Type.Boolean(),
|
|
11
|
-
dateOfBirth: Type.Optional(
|
|
12
|
+
dateOfBirth: Type.Optional(TypeboxIsoDate({ title: 'Date of Birth' })),
|
|
12
13
|
extendedTypes: Type.Optional(Type.Number()),
|
|
13
14
|
});
|
|
14
15
|
export const personModelSpec = entityUtils.getModelSpec(personSchema, { isAuditable: true });
|
|
@@ -2,7 +2,7 @@ import { IAuditable } from './auditable.model.js';
|
|
|
2
2
|
import { IEntity } from './entity.model.js';
|
|
3
3
|
import { AppIdType } from '../types/app.types.js';
|
|
4
4
|
export interface IUser extends IEntity, IAuditable {
|
|
5
|
-
externalId
|
|
5
|
+
externalId?: string;
|
|
6
6
|
email: string;
|
|
7
7
|
displayName?: string;
|
|
8
8
|
password: string;
|
|
@@ -29,8 +29,8 @@ export declare const UserSpec: import("./model-spec.interface.js").IModelSpec<im
|
|
|
29
29
|
export declare const PublicUserSchema: import("@sinclair/typebox").TObject<{
|
|
30
30
|
externalId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
31
31
|
email: import("@sinclair/typebox").TString;
|
|
32
|
-
personId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TSchema>;
|
|
33
32
|
displayName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
33
|
+
personId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TSchema>;
|
|
34
34
|
_lastLoggedIn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TString, Date>>;
|
|
35
35
|
_lastPasswordChange: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TString, Date>>;
|
|
36
36
|
}>;
|
package/package.json
CHANGED