functional-models 3.6.4 → 3.8.0
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/README.md +0 -21
- package/orm/internal-libs.d.ts +2 -0
- package/orm/internal-libs.js +24 -0
- package/orm/internal-libs.js.map +1 -0
- package/orm/properties.d.ts +58 -24
- package/orm/properties.js +43 -3
- package/orm/properties.js.map +1 -1
- package/orm/types.d.ts +69 -37
- package/orm/types.js +1 -2
- package/orm/types.js.map +1 -1
- package/package.json +14 -13
- package/properties.d.ts +24 -24
- package/properties.js +25 -26
- package/properties.js.map +1 -1
- package/types.d.ts +1 -1
- package/types.js.map +1 -1
- package/utils.d.ts +3 -1
- package/utils.js +31 -3
- package/utils.js.map +1 -1
package/README.md
CHANGED
|
@@ -650,24 +650,3 @@ In this situation, the latinName for species is not passed in, but calculated fr
|
|
|
650
650
|
A date property that automatically updates whenever the model instance is saved.
|
|
651
651
|
|
|
652
652
|
[Documentation](https://monolithst.github.io/functional-models/functions/index.orm.properties.LastModifiedDateProperty.html)
|
|
653
|
-
|
|
654
|
-
# MCP Development Server
|
|
655
|
-
|
|
656
|
-
Functional Models has an MCP server for AI based development. It provides knowledge entries for the AI to have specific examples of how to work with and manipulate models in a system. This GREATLY increases the accuracy and understanding of AI working with these systems, making it really easy to add new features, refactor, and make the best use of features.
|
|
657
|
-
|
|
658
|
-
## Quick Start
|
|
659
|
-
|
|
660
|
-
You can setup the server by setting up Cursor (or similar) with this configuration.
|
|
661
|
-
|
|
662
|
-
```json
|
|
663
|
-
{
|
|
664
|
-
"mcpServers": {
|
|
665
|
-
"node-in-layers-core": {
|
|
666
|
-
"command": "npx",
|
|
667
|
-
"args": ["-y", "@functional-models/knowledge-mcp"]
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
```
|
|
672
|
-
|
|
673
|
-
You can learn more about this here [Knowledge MCP](./knowledge-mcp/README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPrimaryKeyGenerator = void 0;
|
|
4
|
+
const types_js_1 = require("../types.js");
|
|
5
|
+
const utils_js_1 = require("../utils.js");
|
|
6
|
+
const _getModelIdPropertyType = (config = {}) => {
|
|
7
|
+
return config.dataType || types_js_1.PropertyType.UniqueId;
|
|
8
|
+
};
|
|
9
|
+
const getPrimaryKeyGenerator = (config = {}) => {
|
|
10
|
+
const custom = config.primaryKeyGenerator;
|
|
11
|
+
if (custom) {
|
|
12
|
+
return custom;
|
|
13
|
+
}
|
|
14
|
+
const idType = _getModelIdPropertyType(config);
|
|
15
|
+
switch (idType) {
|
|
16
|
+
case types_js_1.PropertyType.Integer:
|
|
17
|
+
return () => Promise.resolve((0, utils_js_1.getRandomValues)()[0]);
|
|
18
|
+
default: {
|
|
19
|
+
return () => Promise.resolve((0, utils_js_1.createUuid)());
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.getPrimaryKeyGenerator = getPrimaryKeyGenerator;
|
|
24
|
+
//# sourceMappingURL=internal-libs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-libs.js","sourceRoot":"","sources":["../../src/orm/internal-libs.ts"],"names":[],"mappings":";;;AAAA,0CAA0C;AAC1C,0CAAyD;AAOzD,MAAM,uBAAuB,GAAG,CAC9B,SAAyC,EAAE,EACnB,EAAE;IAC1B,OAAO,MAAM,CAAC,QAAQ,IAAI,uBAAY,CAAC,QAAQ,CAAA;AACjD,CAAC,CAAA;AAEM,MAAM,sBAAsB,GAAG,CACpC,SAA4C,EAAE,EACzB,EAAE;IACvB,MAAM,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAA;IACzC,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAA;IACf,CAAC;IACD,MAAM,MAAM,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAA;IAC9C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,uBAAY,CAAC,OAAO;YACvB,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAA,0BAAe,GAAE,CAAC,CAAC,CAAE,CAAC,CAAA;QACrD,OAAO,CAAC,CAAC,CAAC;YACR,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAA,qBAAU,GAAE,CAAC,CAAA;QAC5C,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAfY,QAAA,sBAAsB,0BAelC"}
|
package/orm/properties.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { DateValueType, PropertyConfig, Arrayable, DataValue, MaybeFunction, ModelType, DataDescription } from '../types';
|
|
2
|
-
import { OrmPropertyConfig } from './types';
|
|
1
|
+
import { DateValueType, PropertyConfig, Arrayable, DataValue, MaybeFunction, ModelType, DataDescription, ModelInstance, PropertyType } from '../types';
|
|
2
|
+
import { OrmPropertyConfig, DatabaseKeyPropertyConfig } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* A property that automatically updates whenever the model instance is saved.
|
|
5
5
|
* @param config
|
|
6
6
|
*/
|
|
7
|
-
declare const LastModifiedDateProperty: (config?: PropertyConfig<DateValueType>) => Readonly<{
|
|
7
|
+
export declare const LastModifiedDateProperty: (config?: PropertyConfig<DateValueType>) => Readonly<{
|
|
8
8
|
getConfig: () => object;
|
|
9
9
|
getChoices: () => readonly import("../types").ChoiceTypes[];
|
|
10
10
|
getDefaultValue: () => DateValueType | undefined;
|
|
11
11
|
getConstantValue: () => DateValueType | undefined;
|
|
12
|
-
getPropertyType: () =>
|
|
12
|
+
getPropertyType: () => PropertyType | string;
|
|
13
13
|
createGetter: (value: DateValueType, modelData: Readonly<{
|
|
14
14
|
[s: string]: any;
|
|
15
|
-
}>, modelInstance:
|
|
15
|
+
}>, modelInstance: ModelInstance<Readonly<{
|
|
16
16
|
[s: string]: any;
|
|
17
17
|
}>, object, object>) => import("../types").ValueGetter<DateValueType, Readonly<{
|
|
18
18
|
[s: string]: any;
|
|
@@ -24,32 +24,21 @@ declare const LastModifiedDateProperty: (config?: PropertyConfig<DateValueType>)
|
|
|
24
24
|
[s: string]: any;
|
|
25
25
|
}>>;
|
|
26
26
|
}>;
|
|
27
|
-
/**
|
|
28
|
-
* A property that represents a foreign key to another model.
|
|
29
|
-
* By default it is a "uuid" type, but if you want to use an arbitrary string, or an integer type you can set the `dataType` property.
|
|
30
|
-
* @interface
|
|
31
|
-
*/
|
|
32
|
-
type ForeignKeyPropertyConfig<TValue extends string | number> = PropertyConfig<TValue> & Readonly<{
|
|
33
|
-
/**
|
|
34
|
-
* Sets the type of the foreign key.
|
|
35
|
-
* @default 'uuid'
|
|
36
|
-
*/
|
|
37
|
-
dataType?: 'uuid' | 'string' | 'integer';
|
|
38
|
-
}>;
|
|
39
27
|
/**
|
|
40
28
|
* A property that represents a foreign key to another model in a database.
|
|
41
29
|
* By default it is a "uuid" type, but if you want to use an arbitrary string, or an integer type you can set the `dataType` property.
|
|
30
|
+
* NOTE: auto is ignored in config.
|
|
42
31
|
* @param config - Additional configurations.
|
|
43
32
|
*/
|
|
44
|
-
declare const ForeignKeyProperty: <TValue extends string | number, TModel extends DataDescription>(model: MaybeFunction<ModelType<TModel>>, config?:
|
|
33
|
+
export declare const ForeignKeyProperty: <TValue extends string | number, TModel extends DataDescription>(model: MaybeFunction<ModelType<TModel>>, config?: Omit<DatabaseKeyPropertyConfig<TValue>, "auto" | "primaryKeyGenerator">) => (Readonly<{
|
|
45
34
|
getConfig: () => object;
|
|
46
35
|
getChoices: () => readonly import("../types").ChoiceTypes[];
|
|
47
36
|
getDefaultValue: () => string | undefined;
|
|
48
37
|
getConstantValue: () => string | undefined;
|
|
49
|
-
getPropertyType: () =>
|
|
38
|
+
getPropertyType: () => PropertyType | string;
|
|
50
39
|
createGetter: (value: string, modelData: Readonly<{
|
|
51
40
|
[s: string]: any;
|
|
52
|
-
}>, modelInstance:
|
|
41
|
+
}>, modelInstance: ModelInstance<Readonly<{
|
|
53
42
|
[s: string]: any;
|
|
54
43
|
}>, object, object>) => import("../types").ValueGetter<string, Readonly<{
|
|
55
44
|
[s: string]: any;
|
|
@@ -65,10 +54,10 @@ declare const ForeignKeyProperty: <TValue extends string | number, TModel extend
|
|
|
65
54
|
getChoices: () => readonly import("../types").ChoiceTypes[];
|
|
66
55
|
getDefaultValue: () => number | undefined;
|
|
67
56
|
getConstantValue: () => number | undefined;
|
|
68
|
-
getPropertyType: () =>
|
|
57
|
+
getPropertyType: () => PropertyType | string;
|
|
69
58
|
createGetter: (value: number, modelData: Readonly<{
|
|
70
59
|
[s: string]: any;
|
|
71
|
-
}>, modelInstance:
|
|
60
|
+
}>, modelInstance: ModelInstance<Readonly<{
|
|
72
61
|
[s: string]: any;
|
|
73
62
|
}>, object, object>) => import("../types").ValueGetter<number, Readonly<{
|
|
74
63
|
[s: string]: any;
|
|
@@ -83,9 +72,54 @@ declare const ForeignKeyProperty: <TValue extends string | number, TModel extend
|
|
|
83
72
|
getReferencedId: (instanceValues: TValue) => TValue;
|
|
84
73
|
getReferencedModel: () => ModelType<TModel>;
|
|
85
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* A property that represents a primary key in a database.
|
|
77
|
+
* By default it is a "uuid" type, but if you want to use an arbitrary string, or an integer type you can set the `dataType` property.
|
|
78
|
+
* Includes an optional primaryKeyGenerator function that can be used to generate a primary key. This can allow primary keys that are generated at runtime, or grabbed from a database.
|
|
79
|
+
* @param config - Additional configurations.
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
export declare const PrimaryKeyProperty: <TValue extends string | number>(config?: DatabaseKeyPropertyConfig<TValue>) => Readonly<{
|
|
83
|
+
getConfig: () => object;
|
|
84
|
+
getChoices: () => readonly import("../types").ChoiceTypes[];
|
|
85
|
+
getDefaultValue: () => string | undefined;
|
|
86
|
+
getConstantValue: () => string | undefined;
|
|
87
|
+
getPropertyType: () => PropertyType | string;
|
|
88
|
+
createGetter: (value: string, modelData: Readonly<{
|
|
89
|
+
[s: string]: any;
|
|
90
|
+
}>, modelInstance: ModelInstance<Readonly<{
|
|
91
|
+
[s: string]: any;
|
|
92
|
+
}>, object, object>) => import("../types").ValueGetter<string, Readonly<{
|
|
93
|
+
[s: string]: any;
|
|
94
|
+
}>, object, object>;
|
|
95
|
+
getZod: () => import("zod").ZodType<string, unknown, import("zod/v4/core").$ZodTypeInternals<string, unknown>>;
|
|
96
|
+
getValidator: (valueGetter: import("../types").ValueGetter<string, Readonly<{
|
|
97
|
+
[s: string]: any;
|
|
98
|
+
}>, object, object>) => import("../types").PropertyValidator<Readonly<{
|
|
99
|
+
[s: string]: any;
|
|
100
|
+
}>>;
|
|
101
|
+
}> | Readonly<{
|
|
102
|
+
getConfig: () => object;
|
|
103
|
+
getChoices: () => readonly import("../types").ChoiceTypes[];
|
|
104
|
+
getDefaultValue: () => number | undefined;
|
|
105
|
+
getConstantValue: () => number | undefined;
|
|
106
|
+
getPropertyType: () => PropertyType | string;
|
|
107
|
+
createGetter: (value: number, modelData: Readonly<{
|
|
108
|
+
[s: string]: any;
|
|
109
|
+
}>, modelInstance: ModelInstance<Readonly<{
|
|
110
|
+
[s: string]: any;
|
|
111
|
+
}>, object, object>) => import("../types").ValueGetter<number, Readonly<{
|
|
112
|
+
[s: string]: any;
|
|
113
|
+
}>, object, object>;
|
|
114
|
+
getZod: () => import("zod").ZodType<number, unknown, import("zod/v4/core").$ZodTypeInternals<number, unknown>>;
|
|
115
|
+
getValidator: (valueGetter: import("../types").ValueGetter<number, Readonly<{
|
|
116
|
+
[s: string]: any;
|
|
117
|
+
}>, object, object>) => import("../types").PropertyValidator<Readonly<{
|
|
118
|
+
[s: string]: any;
|
|
119
|
+
}>>;
|
|
120
|
+
}>;
|
|
86
121
|
/**
|
|
87
122
|
* Creates an orm based property config.
|
|
88
123
|
* @param config - Additional configurations.
|
|
89
124
|
*/
|
|
90
|
-
declare const ormPropertyConfig: <T extends Arrayable<DataValue>>(config?: OrmPropertyConfig<T>) => PropertyConfig<T>;
|
|
91
|
-
export { ormPropertyConfig, LastModifiedDateProperty, ForeignKeyProperty };
|
|
125
|
+
export declare const ormPropertyConfig: <T extends Arrayable<DataValue>>(config?: OrmPropertyConfig<T>) => PropertyConfig<T>;
|
package/orm/properties.js
CHANGED
|
@@ -3,11 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.ormPropertyConfig = exports.PrimaryKeyProperty = exports.ForeignKeyProperty = exports.LastModifiedDateProperty = void 0;
|
|
7
7
|
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
8
|
const identity_1 = __importDefault(require("lodash/identity"));
|
|
9
|
+
const types_1 = require("../types");
|
|
9
10
|
const properties_1 = require("../properties");
|
|
10
11
|
const validation_1 = require("./validation");
|
|
12
|
+
const internal_libs_1 = require("./internal-libs");
|
|
11
13
|
const _defaultPropertyConfig = {
|
|
12
14
|
unique: undefined,
|
|
13
15
|
};
|
|
@@ -23,6 +25,7 @@ exports.LastModifiedDateProperty = LastModifiedDateProperty;
|
|
|
23
25
|
/**
|
|
24
26
|
* A property that represents a foreign key to another model in a database.
|
|
25
27
|
* By default it is a "uuid" type, but if you want to use an arbitrary string, or an integer type you can set the `dataType` property.
|
|
28
|
+
* NOTE: auto is ignored in config.
|
|
26
29
|
* @param config - Additional configurations.
|
|
27
30
|
*/
|
|
28
31
|
const ForeignKeyProperty = (model, config = {}) => {
|
|
@@ -33,12 +36,12 @@ const ForeignKeyProperty = (model, config = {}) => {
|
|
|
33
36
|
return model;
|
|
34
37
|
};
|
|
35
38
|
const _getProperty = () => {
|
|
36
|
-
if (config.dataType ===
|
|
39
|
+
if (config.dataType === types_1.PropertyType.UniqueId) {
|
|
37
40
|
return (0, properties_1.UuidProperty)((0, merge_1.default)(config, {
|
|
38
41
|
autoNow: false,
|
|
39
42
|
}));
|
|
40
43
|
}
|
|
41
|
-
if (config.dataType ===
|
|
44
|
+
if (config.dataType === types_1.PropertyType.Integer) {
|
|
42
45
|
return (0, properties_1.IntegerProperty)(config);
|
|
43
46
|
}
|
|
44
47
|
return (0, properties_1.TextProperty)(config);
|
|
@@ -52,6 +55,43 @@ const ForeignKeyProperty = (model, config = {}) => {
|
|
|
52
55
|
});
|
|
53
56
|
};
|
|
54
57
|
exports.ForeignKeyProperty = ForeignKeyProperty;
|
|
58
|
+
/**
|
|
59
|
+
* A property that represents a primary key in a database.
|
|
60
|
+
* By default it is a "uuid" type, but if you want to use an arbitrary string, or an integer type you can set the `dataType` property.
|
|
61
|
+
* Includes an optional primaryKeyGenerator function that can be used to generate a primary key. This can allow primary keys that are generated at runtime, or grabbed from a database.
|
|
62
|
+
* @param config - Additional configurations.
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
const PrimaryKeyProperty = (config = {}) => {
|
|
66
|
+
const _getProperty = () => {
|
|
67
|
+
const auto = config.auto === undefined ? true : config.auto ? true : false;
|
|
68
|
+
const lazyLoadMethod = (value, modelData, instance) => {
|
|
69
|
+
if (config.primaryKeyGenerator) {
|
|
70
|
+
return config.primaryKeyGenerator(value, modelData, instance);
|
|
71
|
+
}
|
|
72
|
+
if (auto) {
|
|
73
|
+
return (0, internal_libs_1.getPrimaryKeyGenerator)(config)(value, modelData, instance);
|
|
74
|
+
}
|
|
75
|
+
return value;
|
|
76
|
+
};
|
|
77
|
+
if (config.dataType === types_1.PropertyType.UniqueId) {
|
|
78
|
+
return (0, properties_1.UuidProperty)((0, merge_1.default)(config, {
|
|
79
|
+
autoNow: auto,
|
|
80
|
+
lazyLoadMethod,
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
if (config.dataType === types_1.PropertyType.Integer) {
|
|
84
|
+
return (0, properties_1.IntegerProperty)((0, merge_1.default)(config, {
|
|
85
|
+
lazyLoadMethod,
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
return (0, properties_1.TextProperty)((0, merge_1.default)(config, {
|
|
89
|
+
lazyLoadMethod,
|
|
90
|
+
}));
|
|
91
|
+
};
|
|
92
|
+
return _getProperty();
|
|
93
|
+
};
|
|
94
|
+
exports.PrimaryKeyProperty = PrimaryKeyProperty;
|
|
55
95
|
/**
|
|
56
96
|
* Creates an orm based property config.
|
|
57
97
|
* @param config - Additional configurations.
|
package/orm/properties.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../src/orm/properties.ts"],"names":[],"mappings":";;;;;;AAAA,yDAAgC;AAChC,+DAAsC;
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../src/orm/properties.ts"],"names":[],"mappings":"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"}
|
package/orm/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Arrayable, DataValue, Maybe, ModelInstance, ModelType, DataDescription, PrimaryKeyType, MinimalModelDefinition, PropertyConfig, ValidatorContext, ToObjectResult, ModelInstanceFetcher, ModelFactoryOptions } from '../types';
|
|
1
|
+
import { Arrayable, DataValue, Maybe, ModelInstance, ModelType, DataDescription, PrimaryKeyType, MinimalModelDefinition, PropertyConfig, ValidatorContext, ToObjectResult, ModelInstanceFetcher, ModelFactoryOptions, CreateParams, PropertyType } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Equals symbols for doing database matching
|
|
4
4
|
*/
|
|
5
|
-
declare enum EqualitySymbol {
|
|
5
|
+
export declare enum EqualitySymbol {
|
|
6
6
|
eq = "=",
|
|
7
7
|
lt = "<",
|
|
8
8
|
lte = "<=",
|
|
@@ -13,7 +13,7 @@ declare enum EqualitySymbol {
|
|
|
13
13
|
/**
|
|
14
14
|
* The value types that map to database types.
|
|
15
15
|
*/
|
|
16
|
-
declare enum DatastoreValueType {
|
|
16
|
+
export declare enum DatastoreValueType {
|
|
17
17
|
string = "string",
|
|
18
18
|
number = "number",
|
|
19
19
|
date = "date",
|
|
@@ -23,7 +23,7 @@ declare enum DatastoreValueType {
|
|
|
23
23
|
/**
|
|
24
24
|
* A list of allowable equality symbols.
|
|
25
25
|
*/
|
|
26
|
-
declare const AllowableEqualitySymbols: EqualitySymbol[];
|
|
26
|
+
export declare const AllowableEqualitySymbols: EqualitySymbol[];
|
|
27
27
|
/**
|
|
28
28
|
* A function that can save.
|
|
29
29
|
*/
|
|
@@ -39,16 +39,16 @@ type DeleteMethod<TModelExtensions extends object = object, TModelInstanceExtens
|
|
|
39
39
|
/**
|
|
40
40
|
* A function that allows overriding the save functionality for a specific model.
|
|
41
41
|
*/
|
|
42
|
-
type SaveOverride<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = <TData extends DataDescription>(existingSave: SaveMethod<TModelExtensions, TModelInstanceExtensions>, instance: ModelInstance<TData, TModelExtensions, TModelInstanceExtensions>) => Promise<OrmModelInstance<TData, TModelExtensions, TModelInstanceExtensions>>;
|
|
42
|
+
export type SaveOverride<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = <TData extends DataDescription>(existingSave: SaveMethod<TModelExtensions, TModelInstanceExtensions>, instance: ModelInstance<TData, TModelExtensions, TModelInstanceExtensions>) => Promise<OrmModelInstance<TData, TModelExtensions, TModelInstanceExtensions>>;
|
|
43
43
|
/**
|
|
44
44
|
* A function that allows overriding the delete functionality for a specific model.
|
|
45
45
|
*/
|
|
46
|
-
type DeleteOverride<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = <TData extends DataDescription>(existingDelete: DeleteMethod<TModelExtensions, TModelInstanceExtensions>, instance: ModelInstance<TData, TModelExtensions, TModelInstanceExtensions>) => Promise<void>;
|
|
46
|
+
export type DeleteOverride<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = <TData extends DataDescription>(existingDelete: DeleteMethod<TModelExtensions, TModelInstanceExtensions>, instance: ModelInstance<TData, TModelExtensions, TModelInstanceExtensions>) => Promise<void>;
|
|
47
47
|
/**
|
|
48
48
|
* A result of an ORM search.
|
|
49
49
|
* @interface
|
|
50
50
|
*/
|
|
51
|
-
type OrmSearchResult<TData extends DataDescription, TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = Readonly<{
|
|
51
|
+
export type OrmSearchResult<TData extends DataDescription, TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = Readonly<{
|
|
52
52
|
/**
|
|
53
53
|
* A list of instances
|
|
54
54
|
*/
|
|
@@ -62,7 +62,7 @@ type OrmSearchResult<TData extends DataDescription, TModelExtensions extends obj
|
|
|
62
62
|
* ORM based ModelFactory extensions.
|
|
63
63
|
* @interface
|
|
64
64
|
*/
|
|
65
|
-
type OrmModelFactoryOptionsExtensions<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = Readonly<{
|
|
65
|
+
export type OrmModelFactoryOptionsExtensions<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = Readonly<{
|
|
66
66
|
/**
|
|
67
67
|
* Optional: The save function to override.
|
|
68
68
|
*/
|
|
@@ -76,7 +76,7 @@ type OrmModelFactoryOptionsExtensions<TModelExtensions extends object = object,
|
|
|
76
76
|
* Extensions to the Model type
|
|
77
77
|
* @interface
|
|
78
78
|
*/
|
|
79
|
-
type OrmModelExtensions<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = Readonly<{
|
|
79
|
+
export type OrmModelExtensions<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = Readonly<{
|
|
80
80
|
/**
|
|
81
81
|
* Save the model
|
|
82
82
|
* @param instance - The instance to save.
|
|
@@ -126,7 +126,7 @@ type OrmModelExtensions<TModelExtensions extends object = object, TModelInstance
|
|
|
126
126
|
* Instance overrides that give it ORM functions.
|
|
127
127
|
* @interface
|
|
128
128
|
*/
|
|
129
|
-
type OrmModelInstanceExtensions<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = Readonly<{
|
|
129
|
+
export type OrmModelInstanceExtensions<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = Readonly<{
|
|
130
130
|
/**
|
|
131
131
|
* Save this model.
|
|
132
132
|
*/
|
|
@@ -153,12 +153,12 @@ type OrmModelConfigurations = Readonly<{
|
|
|
153
153
|
* A minimum orm model definition
|
|
154
154
|
* @interface
|
|
155
155
|
*/
|
|
156
|
-
type MinimumOrmModelDefinition<TData extends DataDescription> = MinimalModelDefinition<TData> & OrmModelConfigurations;
|
|
156
|
+
export type MinimumOrmModelDefinition<TData extends DataDescription> = MinimalModelDefinition<TData> & OrmModelConfigurations;
|
|
157
157
|
/**
|
|
158
158
|
* A model factory that produces ORM based models.
|
|
159
159
|
*
|
|
160
160
|
*/
|
|
161
|
-
type OrmModelFactory<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object, TModelOptionsExtensions extends object = object> = <TData extends DataDescription>(
|
|
161
|
+
export type OrmModelFactory<TModelExtensions extends object = object, TModelInstanceExtensions extends object = object, TModelOptionsExtensions extends object = object> = <TData extends DataDescription>(
|
|
162
162
|
/**
|
|
163
163
|
* The model definition for the model
|
|
164
164
|
*/
|
|
@@ -171,7 +171,7 @@ options?: ModelFactoryOptions<TData, OrmModelFactoryOptionsExtensions<TModelExte
|
|
|
171
171
|
* A search result from a datastore
|
|
172
172
|
* @interface
|
|
173
173
|
*/
|
|
174
|
-
type DatastoreSearchResult<T extends DataDescription> = Readonly<{
|
|
174
|
+
export type DatastoreSearchResult<T extends DataDescription> = Readonly<{
|
|
175
175
|
/**
|
|
176
176
|
* An array of objects that represent the data from the datastore.
|
|
177
177
|
*/
|
|
@@ -185,17 +185,17 @@ type DatastoreSearchResult<T extends DataDescription> = Readonly<{
|
|
|
185
185
|
* A model that has ORM functions attached.
|
|
186
186
|
* @interface
|
|
187
187
|
*/
|
|
188
|
-
type OrmModel<TData extends DataDescription, TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = ModelType<TData, OrmModelExtensions<TModelExtensions, TModelInstanceExtensions>, OrmModelInstanceExtensions<TModelExtensions, TModelInstanceExtensions>>;
|
|
188
|
+
export type OrmModel<TData extends DataDescription, TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = ModelType<TData, OrmModelExtensions<TModelExtensions, TModelInstanceExtensions>, OrmModelInstanceExtensions<TModelExtensions, TModelInstanceExtensions>>;
|
|
189
189
|
/**
|
|
190
190
|
* A Model Instance with ORM functions attached.
|
|
191
191
|
* @interface
|
|
192
192
|
*/
|
|
193
|
-
type OrmModelInstance<TData extends DataDescription, TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = ModelInstance<TData, OrmModelExtensions<TModelExtensions, TModelInstanceExtensions>, OrmModelInstanceExtensions<TModelExtensions, TModelInstanceExtensions>>;
|
|
193
|
+
export type OrmModelInstance<TData extends DataDescription, TModelExtensions extends object = object, TModelInstanceExtensions extends object = object> = ModelInstance<TData, OrmModelExtensions<TModelExtensions, TModelInstanceExtensions>, OrmModelInstanceExtensions<TModelExtensions, TModelInstanceExtensions>>;
|
|
194
194
|
/**
|
|
195
195
|
* An interface that describes a datastore. By implementing this interface, databases can be swapped.
|
|
196
196
|
* @interface
|
|
197
197
|
*/
|
|
198
|
-
type DatastoreAdapter = Readonly<{
|
|
198
|
+
export type DatastoreAdapter = Readonly<{
|
|
199
199
|
/**
|
|
200
200
|
* Saving a model.
|
|
201
201
|
* @param instance
|
|
@@ -246,7 +246,7 @@ type DatastoreAdapter = Readonly<{
|
|
|
246
246
|
* A search that describes a property and its value.
|
|
247
247
|
* @interface
|
|
248
248
|
*/
|
|
249
|
-
type PropertyQuery = Readonly<{
|
|
249
|
+
export type PropertyQuery = Readonly<{
|
|
250
250
|
/**
|
|
251
251
|
* Distinguishes this as a property query.
|
|
252
252
|
*/
|
|
@@ -275,7 +275,7 @@ type PropertyQuery = Readonly<{
|
|
|
275
275
|
/**
|
|
276
276
|
* A property search for a string value.
|
|
277
277
|
*/
|
|
278
|
-
type StringPropertyQuery = PropertyQuery & {
|
|
278
|
+
export type StringPropertyQuery = PropertyQuery & {
|
|
279
279
|
valueType: DatastoreValueType.string;
|
|
280
280
|
equalitySymbol: EqualitySymbol.eq | EqualitySymbol.ne;
|
|
281
281
|
options: PropertyOptions;
|
|
@@ -284,7 +284,7 @@ type StringPropertyQuery = PropertyQuery & {
|
|
|
284
284
|
* A search that looks at dated objects after the given date.
|
|
285
285
|
* @interface
|
|
286
286
|
*/
|
|
287
|
-
type DatesAfterQuery = Readonly<{
|
|
287
|
+
export type DatesAfterQuery = Readonly<{
|
|
288
288
|
/**
|
|
289
289
|
* Distinguishes this query
|
|
290
290
|
*/
|
|
@@ -315,7 +315,7 @@ type DatesAfterQuery = Readonly<{
|
|
|
315
315
|
* A search query that looks at dates before the given date.
|
|
316
316
|
* @interface
|
|
317
317
|
*/
|
|
318
|
-
type DatesBeforeQuery = Readonly<{
|
|
318
|
+
export type DatesBeforeQuery = Readonly<{
|
|
319
319
|
/**
|
|
320
320
|
* Distinguishes this query
|
|
321
321
|
*/
|
|
@@ -346,7 +346,7 @@ type DatesBeforeQuery = Readonly<{
|
|
|
346
346
|
* Additional configurations for ORM based properties.
|
|
347
347
|
* @interface
|
|
348
348
|
*/
|
|
349
|
-
type OrmPropertyConfig<T extends Arrayable<DataValue>> = PropertyConfig<T> & Readonly<{
|
|
349
|
+
export type OrmPropertyConfig<T extends Arrayable<DataValue>> = PropertyConfig<T> & Readonly<{
|
|
350
350
|
/**
|
|
351
351
|
* Validator: Checks to make sure that there is only one instance in a datastore that has this property's value.
|
|
352
352
|
* NOTE: The value is a property KEY. Not true or false.
|
|
@@ -357,7 +357,7 @@ type OrmPropertyConfig<T extends Arrayable<DataValue>> = PropertyConfig<T> & Rea
|
|
|
357
357
|
* Additional context that is provided for ORM based instance.
|
|
358
358
|
* @interface
|
|
359
359
|
*/
|
|
360
|
-
type OrmValidatorContext = Readonly<{
|
|
360
|
+
export type OrmValidatorContext = Readonly<{
|
|
361
361
|
/**
|
|
362
362
|
* IMPORTANT: Sometimes you do not want to do any ORM based validation because of speed.
|
|
363
363
|
* This disables any orm based validation, and only runs non-orm validation.
|
|
@@ -367,7 +367,7 @@ type OrmValidatorContext = Readonly<{
|
|
|
367
367
|
/**
|
|
368
368
|
* Options for a property query.
|
|
369
369
|
*/
|
|
370
|
-
type PropertyOptions = {
|
|
370
|
+
export type PropertyOptions = {
|
|
371
371
|
/**
|
|
372
372
|
* Is this a case sensitive search?
|
|
373
373
|
*/
|
|
@@ -398,7 +398,7 @@ type PropertyOptions = {
|
|
|
398
398
|
* that can retrieve referenced models as needed. See {@see "functional-models.ModelReference"}
|
|
399
399
|
* @interface
|
|
400
400
|
*/
|
|
401
|
-
type Orm = {
|
|
401
|
+
export type Orm = {
|
|
402
402
|
/**
|
|
403
403
|
* A model factory that can produce {@link OrmModel}
|
|
404
404
|
*/
|
|
@@ -411,19 +411,19 @@ type Orm = {
|
|
|
411
411
|
/**
|
|
412
412
|
* The sort order.
|
|
413
413
|
*/
|
|
414
|
-
declare enum SortOrder {
|
|
414
|
+
export declare enum SortOrder {
|
|
415
415
|
asc = "asc",
|
|
416
416
|
dsc = "dsc"
|
|
417
417
|
}
|
|
418
418
|
/**
|
|
419
419
|
* The number of instances to receive back from a query.
|
|
420
420
|
*/
|
|
421
|
-
type MaxMatchStatement = number;
|
|
421
|
+
export type MaxMatchStatement = number;
|
|
422
422
|
/**
|
|
423
423
|
* Defines how a sort should happen. Which column and what order.
|
|
424
424
|
* @interface
|
|
425
425
|
*/
|
|
426
|
-
type SortStatement = {
|
|
426
|
+
export type SortStatement = {
|
|
427
427
|
/**
|
|
428
428
|
* The property's key/name. Also could be a "column"
|
|
429
429
|
*/
|
|
@@ -436,12 +436,12 @@ type SortStatement = {
|
|
|
436
436
|
/**
|
|
437
437
|
* Pagination can be anything.
|
|
438
438
|
*/
|
|
439
|
-
type PaginationQuery = any;
|
|
439
|
+
export type PaginationQuery = any;
|
|
440
440
|
/**
|
|
441
441
|
* A query to a search function.
|
|
442
442
|
* @interface
|
|
443
443
|
*/
|
|
444
|
-
type OrmSearch = {
|
|
444
|
+
export type OrmSearch = {
|
|
445
445
|
/**
|
|
446
446
|
* Optional: A number of max records to return.
|
|
447
447
|
*/
|
|
@@ -462,15 +462,15 @@ type OrmSearch = {
|
|
|
462
462
|
/**
|
|
463
463
|
* Statements that make up the meat of QueryTokens
|
|
464
464
|
*/
|
|
465
|
-
type Query = PropertyQuery | DatesAfterQuery | DatesBeforeQuery | StringPropertyQuery;
|
|
465
|
+
export type Query = PropertyQuery | DatesAfterQuery | DatesBeforeQuery | StringPropertyQuery;
|
|
466
466
|
/**
|
|
467
467
|
* A token type that links two queries together.
|
|
468
468
|
*/
|
|
469
|
-
type BooleanQuery = 'AND' | 'OR';
|
|
469
|
+
export type BooleanQuery = 'AND' | 'OR';
|
|
470
470
|
/**
|
|
471
471
|
* A generic structure of querys.
|
|
472
472
|
*/
|
|
473
|
-
type QueryTokens = readonly QueryTokens[][] | readonly QueryTokens[] | BooleanQuery | Query;
|
|
473
|
+
export type QueryTokens = readonly QueryTokens[][] | readonly QueryTokens[] | BooleanQuery | Query;
|
|
474
474
|
/**
|
|
475
475
|
* Builder functions that are not property related.
|
|
476
476
|
* @interface
|
|
@@ -501,7 +501,7 @@ type NonQueryBuilder = Readonly<{
|
|
|
501
501
|
* An in between or ending type to a builder creating a SearchQuery
|
|
502
502
|
* @interface
|
|
503
503
|
*/
|
|
504
|
-
type BuilderV2Link = NonQueryBuilder & Readonly<{
|
|
504
|
+
export type BuilderV2Link = NonQueryBuilder & Readonly<{
|
|
505
505
|
/**
|
|
506
506
|
* Links together two or more {@link Query} or complex queries.
|
|
507
507
|
*/
|
|
@@ -515,17 +515,17 @@ type BuilderV2Link = NonQueryBuilder & Readonly<{
|
|
|
515
515
|
* A function that can either take a builder or raw QueryTokens[] and create a sub-query.
|
|
516
516
|
* @param builder - Can be either a BuilderV2 or a hand written Query
|
|
517
517
|
**/
|
|
518
|
-
type SubBuilderFunction = (builder: QueryBuilder) => Omit<OrmSearch, 'take' | 'sort' | 'page'> | (QueryBuilder | BuilderV2Link);
|
|
518
|
+
export type SubBuilderFunction = (builder: QueryBuilder) => Omit<OrmSearch, 'take' | 'sort' | 'page'> | (QueryBuilder | BuilderV2Link);
|
|
519
519
|
/**
|
|
520
520
|
* A search builder is a structured way to create a complex query.
|
|
521
521
|
* @interface
|
|
522
522
|
*/
|
|
523
|
-
type QueryBuilder = InnerBuilderV2 & NonQueryBuilder;
|
|
523
|
+
export type QueryBuilder = InnerBuilderV2 & NonQueryBuilder;
|
|
524
524
|
/**
|
|
525
525
|
* A builder for version 3.0 search queries.
|
|
526
526
|
* @interface
|
|
527
527
|
*/
|
|
528
|
-
type InnerBuilderV2 = {
|
|
528
|
+
export type InnerBuilderV2 = {
|
|
529
529
|
/**
|
|
530
530
|
* Creates a query that has nested property queries.
|
|
531
531
|
* @param subBuilderFunc - A function that can return a Builder
|
|
@@ -561,4 +561,36 @@ type InnerBuilderV2 = {
|
|
|
561
561
|
*/
|
|
562
562
|
property: (key: string, value: any, options?: Partial<PropertyOptions>) => BuilderV2Link;
|
|
563
563
|
};
|
|
564
|
-
|
|
564
|
+
/**
|
|
565
|
+
* The types of primary key properties.
|
|
566
|
+
*/
|
|
567
|
+
export type PrimaryKeyPropertyType = PropertyType.UniqueId | PropertyType.Text | PropertyType.Integer;
|
|
568
|
+
/**
|
|
569
|
+
* A function that can generate a primary key for a model.
|
|
570
|
+
* @param model - The model to generate a primary key for.
|
|
571
|
+
* @returns A promise that resolves to the primary key.
|
|
572
|
+
*/
|
|
573
|
+
export type PrimaryKeyGenerator = <TValue extends string | number, TData extends DataDescription>(value: TValue, modelData: CreateParams<TData>, instance: ModelInstance<TData>) => Promise<PrimaryKeyType>;
|
|
574
|
+
/**
|
|
575
|
+
* A property that represents a key in a database.
|
|
576
|
+
* By default it is a "uuid" type, but if you want to use an arbitrary string, or an integer type you can set the `dataType` property.
|
|
577
|
+
* @interface
|
|
578
|
+
*/
|
|
579
|
+
export type DatabaseKeyPropertyConfig<TValue extends string | number> = PropertyConfig<TValue> & Readonly<{
|
|
580
|
+
/**
|
|
581
|
+
* Sets the type of the key.
|
|
582
|
+
* @default PrimaryKeyDataType.Uuid
|
|
583
|
+
*/
|
|
584
|
+
dataType?: PrimaryKeyPropertyType;
|
|
585
|
+
/**
|
|
586
|
+
* If true, the key will be automatically generated if not provided. Only applies to uuids and integers
|
|
587
|
+
* @default true
|
|
588
|
+
*/
|
|
589
|
+
auto?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* Optional: A custom primary key generator function to use for models. If the property type is UniqueId (default) then this will produce random UUID. If the property type is a number, a random number will be generated.
|
|
592
|
+
* If using a SQL-like database that uses numbers, its HIGHLY recommended to get a number from the database itself.
|
|
593
|
+
*/
|
|
594
|
+
primaryKeyGenerator?: PrimaryKeyGenerator;
|
|
595
|
+
}>;
|
|
596
|
+
export {};
|
package/orm/types.js
CHANGED
|
@@ -33,8 +33,7 @@ var DatastoreValueType;
|
|
|
33
33
|
/**
|
|
34
34
|
* A list of allowable equality symbols.
|
|
35
35
|
*/
|
|
36
|
-
|
|
37
|
-
exports.AllowableEqualitySymbols = AllowableEqualitySymbols;
|
|
36
|
+
exports.AllowableEqualitySymbols = Object.values(EqualitySymbol);
|
|
38
37
|
/**
|
|
39
38
|
* The sort order.
|
|
40
39
|
*/
|
package/orm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/orm/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/orm/types.ts"],"names":[],"mappings":";;;AAkBA;;GAEG;AACH,IAAY,cAaX;AAbD,WAAY,cAAc;IACxB,SAAS;IACT,0BAAQ,CAAA;IACR,YAAY;IACZ,0BAAQ,CAAA;IACR,wBAAwB;IACxB,4BAAU,CAAA;IACV,eAAe;IACf,0BAAQ,CAAA;IACR,2BAA2B;IAC3B,4BAAU,CAAA;IACV,eAAe;IACf,2BAAS,CAAA;AACX,CAAC,EAbW,cAAc,8BAAd,cAAc,QAazB;AAED;;GAEG;AACH,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACrB,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED;;GAEG;AACU,QAAA,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;AAwkBrE;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,wBAAW,CAAA;AACb,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB"}
|