@twin.org/entity 0.0.3-next.22 → 0.0.3-next.23
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 +1 -5
- package/docs/changelog.md +20 -1
- package/docs/examples.md +70 -1
- package/docs/reference/classes/DecoratorHelper.md +2 -2
- package/docs/reference/classes/EntityConditions.md +2 -2
- package/docs/reference/classes/EntitySchemaHelper.md +6 -6
- package/docs/reference/classes/EntitySorter.md +4 -4
- package/docs/reference/interfaces/IComparator.md +3 -3
- package/docs/reference/interfaces/IComparatorGroup.md +2 -2
- package/docs/reference/interfaces/IEntitySchema.md +3 -3
- package/docs/reference/interfaces/IEntitySchemaOptions.md +1 -1
- package/docs/reference/interfaces/IEntitySchemaProperty.md +11 -11
- package/docs/reference/interfaces/IEntitySort.md +3 -3
- package/docs/reference/variables/ComparisonOperator.md +9 -9
- package/docs/reference/variables/EntitySchemaPropertyFormat.md +17 -17
- package/docs/reference/variables/EntitySchemaPropertyType.md +6 -6
- package/docs/reference/variables/LogicalOperator.md +2 -2
- package/docs/reference/variables/SortDirection.md +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
# TWIN Entity
|
|
2
2
|
|
|
3
|
-
This package
|
|
4
|
-
|
|
5
|
-
- Defining
|
|
6
|
-
- Sorting
|
|
7
|
-
- Comparing
|
|
3
|
+
This package is part of the framework workspace and provides helpers for defining and working with entities to support consistent development workflows across the ecosystem.
|
|
8
4
|
|
|
9
5
|
## Installation
|
|
10
6
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.0.3-next.23](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.22...entity-v0.0.3-next.23) (2026-03-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **entity:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/nameof bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
16
|
+
* @twin.org/core bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
17
|
+
* devDependencies
|
|
18
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
19
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
20
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
2
21
|
|
|
3
22
|
## [0.0.3-next.22](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.21...entity-v0.0.3-next.22) (2026-02-26)
|
|
4
23
|
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,70 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Entity Examples
|
|
2
|
+
|
|
3
|
+
Use these snippets to build schemas, compose conditions and order data for query-style workflows.
|
|
4
|
+
|
|
5
|
+
## EntitySchemaHelper
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { EntitySchemaHelper } from '@twin.org/entity';
|
|
9
|
+
|
|
10
|
+
class Product {
|
|
11
|
+
public id!: string;
|
|
12
|
+
public sku!: string;
|
|
13
|
+
public price!: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const schema = EntitySchemaHelper.getSchema(Product);
|
|
17
|
+
EntitySchemaHelper.getPrimaryKey(schema); // 'id'
|
|
18
|
+
EntitySchemaHelper.getSortProperties(schema); // ['sku', 'price']
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## EntityConditions
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { EntityConditions } from '@twin.org/entity';
|
|
25
|
+
|
|
26
|
+
const product = {
|
|
27
|
+
sku: 'A-100',
|
|
28
|
+
price: 49.99,
|
|
29
|
+
active: true
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
EntityConditions.compare('eq', product.sku, 'A-100'); // true
|
|
33
|
+
EntityConditions.check(product, [{ property: 'price', comparison: 'gt', value: 10 }]); // true
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## EntitySorter
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { EntitySorter } from '@twin.org/entity';
|
|
40
|
+
|
|
41
|
+
const records = [
|
|
42
|
+
{ sku: 'A-300', price: 15 },
|
|
43
|
+
{ sku: 'A-100', price: 20 },
|
|
44
|
+
{ sku: 'A-200', price: 10 }
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
EntitySorter.sort(records, [{ property: 'sku', sortDirection: 'ascending' }]);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## DecoratorHelper
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
import { DecoratorHelper } from '@twin.org/entity';
|
|
54
|
+
|
|
55
|
+
class Customer {
|
|
56
|
+
public id!: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
DecoratorHelper.setSchema(Customer, {
|
|
60
|
+
primaryKey: 'id',
|
|
61
|
+
type: 'customer',
|
|
62
|
+
properties: {
|
|
63
|
+
id: {
|
|
64
|
+
type: 'string'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
DecoratorHelper.getSchema(Customer)?.primaryKey; // 'id'
|
|
70
|
+
```
|
|
@@ -14,7 +14,7 @@ Class to help with decorators.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### getSchema()
|
|
17
|
+
### getSchema() {#getschema}
|
|
18
18
|
|
|
19
19
|
> `static` **getSchema**\<`T`\>(`target`): [`IEntitySchema`](../interfaces/IEntitySchema.md)\<`T`\>
|
|
20
20
|
|
|
@@ -42,7 +42,7 @@ The schema from the metadata if it can be found.
|
|
|
42
42
|
|
|
43
43
|
***
|
|
44
44
|
|
|
45
|
-
### setSchema()
|
|
45
|
+
### setSchema() {#setschema}
|
|
46
46
|
|
|
47
47
|
> `static` **setSchema**\<`T`\>(`target`, `entitySchema`): `void`
|
|
48
48
|
|
|
@@ -14,7 +14,7 @@ Class to perform condition checks.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### check()
|
|
17
|
+
### check() {#check}
|
|
18
18
|
|
|
19
19
|
> `static` **check**\<`T`\>(`entity`, `condition?`): `boolean`
|
|
20
20
|
|
|
@@ -48,7 +48,7 @@ True if the entity matches.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### compare()
|
|
51
|
+
### compare() {#compare}
|
|
52
52
|
|
|
53
53
|
> `static` **compare**\<`T`\>(`entity`, `comparator`): `boolean`
|
|
54
54
|
|
|
@@ -14,7 +14,7 @@ Class to help with entity schema operations.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### CLASS\_NAME
|
|
17
|
+
### CLASS\_NAME {#class_name}
|
|
18
18
|
|
|
19
19
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Runtime name for the class.
|
|
|
22
22
|
|
|
23
23
|
## Methods
|
|
24
24
|
|
|
25
|
-
### getSchema()
|
|
25
|
+
### getSchema() {#getschema}
|
|
26
26
|
|
|
27
27
|
> `static` **getSchema**\<`T`\>(`target`): [`IEntitySchema`](../interfaces/IEntitySchema.md)\<`T`\>
|
|
28
28
|
|
|
@@ -50,7 +50,7 @@ The schema for the object if it can be found.
|
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
53
|
-
### getPrimaryKey()
|
|
53
|
+
### getPrimaryKey() {#getprimarykey}
|
|
54
54
|
|
|
55
55
|
> `static` **getPrimaryKey**\<`T`\>(`entitySchema`): [`IEntitySchemaProperty`](../interfaces/IEntitySchemaProperty.md)\<`T`\>
|
|
56
56
|
|
|
@@ -82,7 +82,7 @@ If no primary key was found, or more than one.
|
|
|
82
82
|
|
|
83
83
|
***
|
|
84
84
|
|
|
85
|
-
### getSortProperties()
|
|
85
|
+
### getSortProperties() {#getsortproperties}
|
|
86
86
|
|
|
87
87
|
> `static` **getSortProperties**\<`T`\>(`entitySchema`): [`IEntitySort`](../interfaces/IEntitySort.md)\<`T`\>[] \| `undefined`
|
|
88
88
|
|
|
@@ -110,7 +110,7 @@ The sort keys from the schema or undefined if there are none.
|
|
|
110
110
|
|
|
111
111
|
***
|
|
112
112
|
|
|
113
|
-
### buildSortProperties()
|
|
113
|
+
### buildSortProperties() {#buildsortproperties}
|
|
114
114
|
|
|
115
115
|
> `static` **buildSortProperties**\<`T`\>(`entitySchema`, `overrideSortKeys?`): [`IEntitySort`](../interfaces/IEntitySort.md)\<`T`\>[] \| `undefined`
|
|
116
116
|
|
|
@@ -144,7 +144,7 @@ The finalised sort keys.
|
|
|
144
144
|
|
|
145
145
|
***
|
|
146
146
|
|
|
147
|
-
### validateEntity()
|
|
147
|
+
### validateEntity() {#validateentity}
|
|
148
148
|
|
|
149
149
|
> `static` **validateEntity**\<`T`\>(`entity`, `entitySchema`): `void`
|
|
150
150
|
|
|
@@ -14,7 +14,7 @@ Class to perform sort operations on entities.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### sort()
|
|
17
|
+
### sort() {#sort}
|
|
18
18
|
|
|
19
19
|
> `static` **sort**\<`T`\>(`entities`, `entitySorters?`): `T`[]
|
|
20
20
|
|
|
@@ -48,9 +48,9 @@ The sorted list.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### compare()
|
|
51
|
+
### compare() {#compare}
|
|
52
52
|
|
|
53
|
-
> `static` **compare**\<`T`\>(`entity1`, `entity2`, `prop`, `type`, `direction
|
|
53
|
+
> `static` **compare**\<`T`\>(`entity1`, `entity2`, `prop`, `type`, `direction?`): `number`
|
|
54
54
|
|
|
55
55
|
Compare two properties.
|
|
56
56
|
|
|
@@ -86,7 +86,7 @@ The property to compare.
|
|
|
86
86
|
|
|
87
87
|
The type of the property.
|
|
88
88
|
|
|
89
|
-
##### direction
|
|
89
|
+
##### direction?
|
|
90
90
|
|
|
91
91
|
[`SortDirection`](../type-aliases/SortDirection.md) = `SortDirection.Ascending`
|
|
92
92
|
|
|
@@ -4,7 +4,7 @@ Interface defining comparator operator.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### property
|
|
7
|
+
### property {#property}
|
|
8
8
|
|
|
9
9
|
> **property**: `string`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ The name of the property in the object to check.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### value
|
|
15
|
+
### value {#value}
|
|
16
16
|
|
|
17
17
|
> **value**: `unknown`
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ The value of the property to check.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### comparison
|
|
23
|
+
### comparison {#comparison}
|
|
24
24
|
|
|
25
25
|
> **comparison**: [`ComparisonOperator`](../type-aliases/ComparisonOperator.md)
|
|
26
26
|
|
|
@@ -10,7 +10,7 @@ Interface defining condition group operator.
|
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
### conditions
|
|
13
|
+
### conditions {#conditions}
|
|
14
14
|
|
|
15
15
|
> **conditions**: [`EntityCondition`](../type-aliases/EntityCondition.md)\<`T`\>[]
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ The conditions to join in a group.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### logicalOperator?
|
|
21
|
+
### logicalOperator? {#logicaloperator}
|
|
22
22
|
|
|
23
23
|
> `optional` **logicalOperator**: [`LogicalOperator`](../type-aliases/LogicalOperator.md)
|
|
24
24
|
|
|
@@ -10,7 +10,7 @@ Definition for an entity schema.
|
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
### type
|
|
13
|
+
### type {#type}
|
|
14
14
|
|
|
15
15
|
> **type**: `string` \| `undefined`
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ The type of the entity.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### options?
|
|
21
|
+
### options? {#options}
|
|
22
22
|
|
|
23
23
|
> `optional` **options**: [`IEntitySchemaOptions`](IEntitySchemaOptions.md)
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ The options for the entity.
|
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### properties?
|
|
29
|
+
### properties? {#properties}
|
|
30
30
|
|
|
31
31
|
> `optional` **properties**: [`IEntitySchemaProperty`](IEntitySchemaProperty.md)\<`T`\>[]
|
|
32
32
|
|
|
@@ -10,7 +10,7 @@ Definition for an entity schema property.
|
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
### property
|
|
13
|
+
### property {#property}
|
|
14
14
|
|
|
15
15
|
> **property**: keyof `T`
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ The property name from the entity.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### type
|
|
21
|
+
### type {#type}
|
|
22
22
|
|
|
23
23
|
> **type**: [`EntitySchemaPropertyType`](../type-aliases/EntitySchemaPropertyType.md)
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ The type of the property.
|
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### format?
|
|
29
|
+
### format? {#format}
|
|
30
30
|
|
|
31
31
|
> `optional` **format**: [`EntitySchemaPropertyFormat`](../type-aliases/EntitySchemaPropertyFormat.md)
|
|
32
32
|
|
|
@@ -34,7 +34,7 @@ The format of the property.
|
|
|
34
34
|
|
|
35
35
|
***
|
|
36
36
|
|
|
37
|
-
### isPrimary?
|
|
37
|
+
### isPrimary? {#isprimary}
|
|
38
38
|
|
|
39
39
|
> `optional` **isPrimary**: `boolean`
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@ Is this the primary index property.
|
|
|
42
42
|
|
|
43
43
|
***
|
|
44
44
|
|
|
45
|
-
### isSecondary?
|
|
45
|
+
### isSecondary? {#issecondary}
|
|
46
46
|
|
|
47
47
|
> `optional` **isSecondary**: `boolean`
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ Is this a secondary index property.
|
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
53
|
-
### sortDirection?
|
|
53
|
+
### sortDirection? {#sortdirection}
|
|
54
54
|
|
|
55
55
|
> `optional` **sortDirection**: [`SortDirection`](../type-aliases/SortDirection.md)
|
|
56
56
|
|
|
@@ -58,7 +58,7 @@ Default sort direction for this field, leave empty if not sortable.
|
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
61
|
-
### optional?
|
|
61
|
+
### optional? {#optional}
|
|
62
62
|
|
|
63
63
|
> `optional` **optional**: `boolean`
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ Is the property optional.
|
|
|
66
66
|
|
|
67
67
|
***
|
|
68
68
|
|
|
69
|
-
### itemType?
|
|
69
|
+
### itemType? {#itemtype}
|
|
70
70
|
|
|
71
71
|
> `optional` **itemType**: [`EntitySchemaPropertyType`](../type-aliases/EntitySchemaPropertyType.md)
|
|
72
72
|
|
|
@@ -74,7 +74,7 @@ The type of the item (only applies when type is `array`).
|
|
|
74
74
|
|
|
75
75
|
***
|
|
76
76
|
|
|
77
|
-
### itemTypeRef?
|
|
77
|
+
### itemTypeRef? {#itemtyperef}
|
|
78
78
|
|
|
79
79
|
> `optional` **itemTypeRef**: `string`
|
|
80
80
|
|
|
@@ -82,7 +82,7 @@ The type ref of the item (only applies when type is either `array` or `object`).
|
|
|
82
82
|
|
|
83
83
|
***
|
|
84
84
|
|
|
85
|
-
### description?
|
|
85
|
+
### description? {#description}
|
|
86
86
|
|
|
87
87
|
> `optional` **description**: `string`
|
|
88
88
|
|
|
@@ -90,7 +90,7 @@ Description of the object.
|
|
|
90
90
|
|
|
91
91
|
***
|
|
92
92
|
|
|
93
|
-
### examples?
|
|
93
|
+
### examples? {#examples}
|
|
94
94
|
|
|
95
95
|
> `optional` **examples**: `unknown`[]
|
|
96
96
|
|
|
@@ -10,7 +10,7 @@ Definition of an entity property sort details.
|
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
### property
|
|
13
|
+
### property {#property}
|
|
14
14
|
|
|
15
15
|
> **property**: keyof `T`
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ The name of the property.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### type
|
|
21
|
+
### type {#type}
|
|
22
22
|
|
|
23
23
|
> **type**: [`EntitySchemaPropertyType`](../type-aliases/EntitySchemaPropertyType.md)
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ The type of the property.
|
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### sortDirection
|
|
29
|
+
### sortDirection {#sortdirection}
|
|
30
30
|
|
|
31
31
|
> **sortDirection**: [`SortDirection`](../type-aliases/SortDirection.md)
|
|
32
32
|
|
|
@@ -6,43 +6,43 @@ The types of comparisons.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### Equals
|
|
9
|
+
### Equals {#equals}
|
|
10
10
|
|
|
11
11
|
> `readonly` **Equals**: `"equals"` = `"equals"`
|
|
12
12
|
|
|
13
13
|
Equals.
|
|
14
14
|
|
|
15
|
-
### NotEquals
|
|
15
|
+
### NotEquals {#notequals}
|
|
16
16
|
|
|
17
17
|
> `readonly` **NotEquals**: `"not-equals"` = `"not-equals"`
|
|
18
18
|
|
|
19
19
|
Not Equals.
|
|
20
20
|
|
|
21
|
-
### GreaterThan
|
|
21
|
+
### GreaterThan {#greaterthan}
|
|
22
22
|
|
|
23
23
|
> `readonly` **GreaterThan**: `"greater-than"` = `"greater-than"`
|
|
24
24
|
|
|
25
25
|
Greater Than.
|
|
26
26
|
|
|
27
|
-
### GreaterThanOrEqual
|
|
27
|
+
### GreaterThanOrEqual {#greaterthanorequal}
|
|
28
28
|
|
|
29
29
|
> `readonly` **GreaterThanOrEqual**: `"greater-than-or-equal"` = `"greater-than-or-equal"`
|
|
30
30
|
|
|
31
31
|
Greater Than Or Equal.
|
|
32
32
|
|
|
33
|
-
### LessThan
|
|
33
|
+
### LessThan {#lessthan}
|
|
34
34
|
|
|
35
35
|
> `readonly` **LessThan**: `"less-than"` = `"less-than"`
|
|
36
36
|
|
|
37
37
|
Less Than.
|
|
38
38
|
|
|
39
|
-
### LessThanOrEqual
|
|
39
|
+
### LessThanOrEqual {#lessthanorequal}
|
|
40
40
|
|
|
41
41
|
> `readonly` **LessThanOrEqual**: `"less-than-or-equal"` = `"less-than-or-equal"`
|
|
42
42
|
|
|
43
43
|
Less Than Or Equal.
|
|
44
44
|
|
|
45
|
-
### Includes
|
|
45
|
+
### Includes {#includes}
|
|
46
46
|
|
|
47
47
|
> `readonly` **Includes**: `"includes"` = `"includes"`
|
|
48
48
|
|
|
@@ -51,7 +51,7 @@ A string in a substring.
|
|
|
51
51
|
A set contains an element.
|
|
52
52
|
A list contains an element.
|
|
53
53
|
|
|
54
|
-
### NotIncludes
|
|
54
|
+
### NotIncludes {#notincludes}
|
|
55
55
|
|
|
56
56
|
> `readonly` **NotIncludes**: `"not-includes"` = `"not-includes"`
|
|
57
57
|
|
|
@@ -60,7 +60,7 @@ A string not in a substring.
|
|
|
60
60
|
A set does not contain an element.
|
|
61
61
|
A list does not contain an element.
|
|
62
62
|
|
|
63
|
-
### In
|
|
63
|
+
### In {#in}
|
|
64
64
|
|
|
65
65
|
> `readonly` **In**: `"in"` = `"in"`
|
|
66
66
|
|
|
@@ -6,103 +6,103 @@ Definition of the entity property format.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### Uuid
|
|
9
|
+
### Uuid {#uuid}
|
|
10
10
|
|
|
11
11
|
> `readonly` **Uuid**: `"uuid"` = `"uuid"`
|
|
12
12
|
|
|
13
13
|
UUID.
|
|
14
14
|
|
|
15
|
-
### Uri
|
|
15
|
+
### Uri {#uri}
|
|
16
16
|
|
|
17
17
|
> `readonly` **Uri**: `"uri"` = `"uri"`
|
|
18
18
|
|
|
19
19
|
URI.
|
|
20
20
|
|
|
21
|
-
### Email
|
|
21
|
+
### Email {#email}
|
|
22
22
|
|
|
23
23
|
> `readonly` **Email**: `"email"` = `"email"`
|
|
24
24
|
|
|
25
25
|
email.
|
|
26
26
|
|
|
27
|
-
### Int8
|
|
27
|
+
### Int8 {#int8}
|
|
28
28
|
|
|
29
29
|
> `readonly` **Int8**: `"int8"` = `"int8"`
|
|
30
30
|
|
|
31
31
|
int8.
|
|
32
32
|
|
|
33
|
-
### Uint8
|
|
33
|
+
### Uint8 {#uint8}
|
|
34
34
|
|
|
35
35
|
> `readonly` **Uint8**: `"uint8"` = `"uint8"`
|
|
36
36
|
|
|
37
37
|
uint8.
|
|
38
38
|
|
|
39
|
-
### Int16
|
|
39
|
+
### Int16 {#int16}
|
|
40
40
|
|
|
41
41
|
> `readonly` **Int16**: `"int16"` = `"int16"`
|
|
42
42
|
|
|
43
43
|
int16.
|
|
44
44
|
|
|
45
|
-
### Uint16
|
|
45
|
+
### Uint16 {#uint16}
|
|
46
46
|
|
|
47
47
|
> `readonly` **Uint16**: `"uint16"` = `"uint16"`
|
|
48
48
|
|
|
49
49
|
uint16.
|
|
50
50
|
|
|
51
|
-
### Int32
|
|
51
|
+
### Int32 {#int32}
|
|
52
52
|
|
|
53
53
|
> `readonly` **Int32**: `"int32"` = `"int32"`
|
|
54
54
|
|
|
55
55
|
int32.
|
|
56
56
|
|
|
57
|
-
### Uint32
|
|
57
|
+
### Uint32 {#uint32}
|
|
58
58
|
|
|
59
59
|
> `readonly` **Uint32**: `"uint32"` = `"uint32"`
|
|
60
60
|
|
|
61
61
|
uint32.
|
|
62
62
|
|
|
63
|
-
### Float
|
|
63
|
+
### Float {#float}
|
|
64
64
|
|
|
65
65
|
> `readonly` **Float**: `"float"` = `"float"`
|
|
66
66
|
|
|
67
67
|
float.
|
|
68
68
|
|
|
69
|
-
### Double
|
|
69
|
+
### Double {#double}
|
|
70
70
|
|
|
71
71
|
> `readonly` **Double**: `"double"` = `"double"`
|
|
72
72
|
|
|
73
73
|
double.
|
|
74
74
|
|
|
75
|
-
### Int64
|
|
75
|
+
### Int64 {#int64}
|
|
76
76
|
|
|
77
77
|
> `readonly` **Int64**: `"int64"` = `"int64"`
|
|
78
78
|
|
|
79
79
|
int64.
|
|
80
80
|
|
|
81
|
-
### Uint64
|
|
81
|
+
### Uint64 {#uint64}
|
|
82
82
|
|
|
83
83
|
> `readonly` **Uint64**: `"uint64"` = `"uint64"`
|
|
84
84
|
|
|
85
85
|
uint64.
|
|
86
86
|
|
|
87
|
-
### Date
|
|
87
|
+
### Date {#date}
|
|
88
88
|
|
|
89
89
|
> `readonly` **Date**: `"date"` = `"date"`
|
|
90
90
|
|
|
91
91
|
date.
|
|
92
92
|
|
|
93
|
-
### Time
|
|
93
|
+
### Time {#time}
|
|
94
94
|
|
|
95
95
|
> `readonly` **Time**: `"time"` = `"time"`
|
|
96
96
|
|
|
97
97
|
time.
|
|
98
98
|
|
|
99
|
-
### DateTime
|
|
99
|
+
### DateTime {#datetime}
|
|
100
100
|
|
|
101
101
|
> `readonly` **DateTime**: `"date-time"` = `"date-time"`
|
|
102
102
|
|
|
103
103
|
date-time.
|
|
104
104
|
|
|
105
|
-
### Json
|
|
105
|
+
### Json {#json}
|
|
106
106
|
|
|
107
107
|
> `readonly` **Json**: `"json"` = `"json"`
|
|
108
108
|
|
|
@@ -6,37 +6,37 @@ Definition of the entity property types.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### String
|
|
9
|
+
### String {#string}
|
|
10
10
|
|
|
11
11
|
> `readonly` **String**: `"string"` = `"string"`
|
|
12
12
|
|
|
13
13
|
String.
|
|
14
14
|
|
|
15
|
-
### Number
|
|
15
|
+
### Number {#number}
|
|
16
16
|
|
|
17
17
|
> `readonly` **Number**: `"number"` = `"number"`
|
|
18
18
|
|
|
19
19
|
Number.
|
|
20
20
|
|
|
21
|
-
### Integer
|
|
21
|
+
### Integer {#integer}
|
|
22
22
|
|
|
23
23
|
> `readonly` **Integer**: `"integer"` = `"integer"`
|
|
24
24
|
|
|
25
25
|
Integer.
|
|
26
26
|
|
|
27
|
-
### Boolean
|
|
27
|
+
### Boolean {#boolean}
|
|
28
28
|
|
|
29
29
|
> `readonly` **Boolean**: `"boolean"` = `"boolean"`
|
|
30
30
|
|
|
31
31
|
Boolean.
|
|
32
32
|
|
|
33
|
-
### Array
|
|
33
|
+
### Array {#array}
|
|
34
34
|
|
|
35
35
|
> `readonly` **Array**: `"array"` = `"array"`
|
|
36
36
|
|
|
37
37
|
Array.
|
|
38
38
|
|
|
39
|
-
### Object
|
|
39
|
+
### Object {#object}
|
|
40
40
|
|
|
41
41
|
> `readonly` **Object**: `"object"` = `"object"`
|
|
42
42
|
|
|
@@ -6,13 +6,13 @@ The logical operators for condition combining.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### And
|
|
9
|
+
### And {#and}
|
|
10
10
|
|
|
11
11
|
> `readonly` **And**: `"and"` = `"and"`
|
|
12
12
|
|
|
13
13
|
Logical operator AND.
|
|
14
14
|
|
|
15
|
-
### Or
|
|
15
|
+
### Or {#or}
|
|
16
16
|
|
|
17
17
|
> `readonly` **Or**: `"or"` = `"or"`
|
|
18
18
|
|
|
@@ -6,13 +6,13 @@ The sort directions.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### Ascending
|
|
9
|
+
### Ascending {#ascending}
|
|
10
10
|
|
|
11
11
|
> `readonly` **Ascending**: `"asc"` = `"asc"`
|
|
12
12
|
|
|
13
13
|
Ascending.
|
|
14
14
|
|
|
15
|
-
### Descending
|
|
15
|
+
### Descending {#descending}
|
|
16
16
|
|
|
17
17
|
> `readonly` **Descending**: `"desc"` = `"desc"`
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/entity",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.23",
|
|
4
4
|
"description": "Helpers for defining and working with entities",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "0.0.3-next.
|
|
18
|
-
"@twin.org/nameof": "0.0.3-next.
|
|
17
|
+
"@twin.org/core": "0.0.3-next.23",
|
|
18
|
+
"@twin.org/nameof": "0.0.3-next.23",
|
|
19
19
|
"reflect-metadata": "0.2.2"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/es/index.js",
|