@twin.org/entity 0.0.3-next.9 → 0.0.4-next.1

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.
Files changed (43) hide show
  1. package/README.md +1 -5
  2. package/dist/es/decorators/entityDecorator.js +2 -1
  3. package/dist/es/decorators/entityDecorator.js.map +1 -1
  4. package/dist/es/decorators/propertyDecorator.js +1 -0
  5. package/dist/es/decorators/propertyDecorator.js.map +1 -1
  6. package/dist/es/index.js +2 -0
  7. package/dist/es/index.js.map +1 -1
  8. package/dist/es/models/IEntitySchemaDiff.js +2 -0
  9. package/dist/es/models/IEntitySchemaDiff.js.map +1 -0
  10. package/dist/es/utils/decoratorHelper.js +1 -0
  11. package/dist/es/utils/decoratorHelper.js.map +1 -1
  12. package/dist/es/utils/entityConditions.js +10 -0
  13. package/dist/es/utils/entityConditions.js.map +1 -1
  14. package/dist/es/utils/entitySchemaDiffHelper.js +139 -0
  15. package/dist/es/utils/entitySchemaDiffHelper.js.map +1 -0
  16. package/dist/types/decorators/entityDecorator.d.ts +1 -0
  17. package/dist/types/decorators/propertyDecorator.d.ts +1 -0
  18. package/dist/types/index.d.ts +2 -0
  19. package/dist/types/models/IEntitySchemaDiff.d.ts +33 -0
  20. package/dist/types/utils/decoratorHelper.d.ts +1 -0
  21. package/dist/types/utils/entitySchemaDiffHelper.d.ts +44 -0
  22. package/docs/changelog.md +885 -98
  23. package/docs/examples.md +70 -1
  24. package/docs/reference/classes/DecoratorHelper.md +2 -2
  25. package/docs/reference/classes/EntityConditions.md +2 -2
  26. package/docs/reference/classes/EntitySchemaDiffHelper.md +147 -0
  27. package/docs/reference/classes/EntitySchemaHelper.md +6 -6
  28. package/docs/reference/classes/EntitySorter.md +4 -4
  29. package/docs/reference/index.md +2 -0
  30. package/docs/reference/interfaces/IComparator.md +3 -3
  31. package/docs/reference/interfaces/IComparatorGroup.md +3 -3
  32. package/docs/reference/interfaces/IEntitySchema.md +5 -5
  33. package/docs/reference/interfaces/IEntitySchemaDiff.md +59 -0
  34. package/docs/reference/interfaces/IEntitySchemaOptions.md +2 -2
  35. package/docs/reference/interfaces/IEntitySchemaProperty.md +20 -20
  36. package/docs/reference/interfaces/IEntitySort.md +3 -3
  37. package/docs/reference/variables/ComparisonOperator.md +9 -9
  38. package/docs/reference/variables/EntitySchemaPropertyFormat.md +17 -17
  39. package/docs/reference/variables/EntitySchemaPropertyType.md +6 -6
  40. package/docs/reference/variables/LogicalOperator.md +2 -2
  41. package/docs/reference/variables/SortDirection.md +2 -2
  42. package/locales/en.json +4 -0
  43. package/package.json +7 -6
package/docs/examples.md CHANGED
@@ -1 +1,70 @@
1
- # @twin.org/entity - Examples
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
 
@@ -0,0 +1,147 @@
1
+ # Class: EntitySchemaDiffHelper
2
+
3
+ Helper class for comparing entity schemas and generating diffs.
4
+
5
+ ## Constructors
6
+
7
+ ### Constructor
8
+
9
+ > **new EntitySchemaDiffHelper**(): `EntitySchemaDiffHelper`
10
+
11
+ #### Returns
12
+
13
+ `EntitySchemaDiffHelper`
14
+
15
+ ## Properties
16
+
17
+ ### CLASS\_NAME {#class_name}
18
+
19
+ > `readonly` `static` **CLASS\_NAME**: `string`
20
+
21
+ Runtime name for the class.
22
+
23
+ ## Methods
24
+
25
+ ### diff() {#diff}
26
+
27
+ > `static` **diff**\<`T`, `U`\>(`oldProperties`, `newProperties`, `renames?`): [`IEntitySchemaDiff`](../interfaces/IEntitySchemaDiff.md)\<`T`, `U`\>
28
+
29
+ Compare two arrays of entity schema properties and return a structured diff.
30
+
31
+ Properties are matched by their `property` key name. A property is considered modified when any structural field differs: `type`, `format`, `isPrimary`, `isSecondary`, `sortDirection`, `optional`, `itemType`, or `itemTypeRef`.
32
+ Documentation-only fields (`description`, `examples`) are intentionally excluded from the comparison to avoid spurious diffs.
33
+
34
+ Because a pure name change cannot be detected automatically, callers may supply a `renames` list mapping old names to new names. Renamed properties appear in `modified` (never in `added` or `removed`) even when no other fields changed. Rename lookups take priority over direct same-name matches, which allows swap renames to work correctly and prevents a renamed source from silently disappearing when the target name already existed in the old schema. Self-renames (`from === to`) are ignored and the property is classified normally.
35
+
36
+ When `renames` contains duplicate entries: if two entries share the same target, the last definition wins and the first source is treated as removed; if two entries share the same source, the first target wins and the second target is treated as added. Both cases are deterministic but callers should avoid them.
37
+
38
+ #### Type Parameters
39
+
40
+ ##### T
41
+
42
+ `T`
43
+
44
+ ##### U
45
+
46
+ `U` = `T`
47
+
48
+ #### Parameters
49
+
50
+ ##### oldProperties
51
+
52
+ [`IEntitySchemaProperty`](../interfaces/IEntitySchemaProperty.md)\<`T`\>[]
53
+
54
+ The property descriptors from the current (live) schema.
55
+
56
+ ##### newProperties
57
+
58
+ [`IEntitySchemaProperty`](../interfaces/IEntitySchemaProperty.md)\<`U`\>[]
59
+
60
+ The property descriptors from the target (new) schema.
61
+
62
+ ##### renames?
63
+
64
+ `object`[]
65
+
66
+ Optional list of property renames `{ from, to }` where `from` is the old name and `to` is the new name.
67
+
68
+ #### Returns
69
+
70
+ [`IEntitySchemaDiff`](../interfaces/IEntitySchemaDiff.md)\<`T`, `U`\>
71
+
72
+ A diff object with `added`, `removed`, `modified`, and `unchanged` arrays, each containing full `IEntitySchemaProperty` descriptors.
73
+
74
+ #### Throws
75
+
76
+ `GeneralError` if either input array contains duplicate property keys.
77
+
78
+ ***
79
+
80
+ ### hasChanges() {#haschanges}
81
+
82
+ > `static` **hasChanges**\<`T`, `U`\>(`diff`): `boolean`
83
+
84
+ Returns true when the diff contains at least one added, removed, or modified property.
85
+
86
+ #### Type Parameters
87
+
88
+ ##### T
89
+
90
+ `T`
91
+
92
+ ##### U
93
+
94
+ `U`
95
+
96
+ #### Parameters
97
+
98
+ ##### diff
99
+
100
+ [`IEntitySchemaDiff`](../interfaces/IEntitySchemaDiff.md)\<`T`, `U`\>
101
+
102
+ The diff to check.
103
+
104
+ #### Returns
105
+
106
+ `boolean`
107
+
108
+ True if the diff has any structural changes.
109
+
110
+ ***
111
+
112
+ ### schemaPropertiesEqual() {#schemapropertiesequal}
113
+
114
+ > `static` **schemaPropertiesEqual**\<`T`, `U`\>(`schema1`, `schema2`): `boolean`
115
+
116
+ Compare two property descriptors for structural equality.
117
+ The `property` name field and documentation fields (`description`, `examples`) are intentionally excluded — callers match by name before invoking this method.
118
+
119
+ #### Type Parameters
120
+
121
+ ##### T
122
+
123
+ `T`
124
+
125
+ ##### U
126
+
127
+ `U`
128
+
129
+ #### Parameters
130
+
131
+ ##### schema1
132
+
133
+ [`IEntitySchemaProperty`](../interfaces/IEntitySchemaProperty.md)\<`T`\>
134
+
135
+ The first property descriptor.
136
+
137
+ ##### schema2
138
+
139
+ [`IEntitySchemaProperty`](../interfaces/IEntitySchemaProperty.md)\<`U`\>
140
+
141
+ The second property descriptor.
142
+
143
+ #### Returns
144
+
145
+ `boolean`
146
+
147
+ True if all structural fields are equal.
@@ -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`): `number`
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,6 +4,7 @@
4
4
 
5
5
  - [DecoratorHelper](classes/DecoratorHelper.md)
6
6
  - [EntityConditions](classes/EntityConditions.md)
7
+ - [EntitySchemaDiffHelper](classes/EntitySchemaDiffHelper.md)
7
8
  - [EntitySchemaHelper](classes/EntitySchemaHelper.md)
8
9
  - [EntitySorter](classes/EntitySorter.md)
9
10
 
@@ -12,6 +13,7 @@
12
13
  - [IComparator](interfaces/IComparator.md)
13
14
  - [IComparatorGroup](interfaces/IComparatorGroup.md)
14
15
  - [IEntitySchema](interfaces/IEntitySchema.md)
16
+ - [IEntitySchemaDiff](interfaces/IEntitySchemaDiff.md)
15
17
  - [IEntitySchemaOptions](interfaces/IEntitySchemaOptions.md)
16
18
  - [IEntitySchemaProperty](interfaces/IEntitySchemaProperty.md)
17
19
  - [IEntitySort](interfaces/IEntitySort.md)
@@ -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,8 +18,8 @@ The conditions to join in a group.
18
18
 
19
19
  ***
20
20
 
21
- ### logicalOperator?
21
+ ### logicalOperator? {#logicaloperator}
22
22
 
23
- > `optional` **logicalOperator**: [`LogicalOperator`](../type-aliases/LogicalOperator.md)
23
+ > `optional` **logicalOperator?**: [`LogicalOperator`](../type-aliases/LogicalOperator.md)
24
24
 
25
25
  The logical operator to use.
@@ -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,16 +18,16 @@ The type of the entity.
18
18
 
19
19
  ***
20
20
 
21
- ### options?
21
+ ### options? {#options}
22
22
 
23
- > `optional` **options**: [`IEntitySchemaOptions`](IEntitySchemaOptions.md)
23
+ > `optional` **options?**: [`IEntitySchemaOptions`](IEntitySchemaOptions.md)
24
24
 
25
25
  The options for the entity.
26
26
 
27
27
  ***
28
28
 
29
- ### properties?
29
+ ### properties? {#properties}
30
30
 
31
- > `optional` **properties**: [`IEntitySchemaProperty`](IEntitySchemaProperty.md)\<`T`\>[]
31
+ > `optional` **properties?**: [`IEntitySchemaProperty`](IEntitySchemaProperty.md)\<`T`\>[]
32
32
 
33
33
  The properties of the entity.
@@ -0,0 +1,59 @@
1
+ # Interface: IEntitySchemaDiff\<T, U\>
2
+
3
+ The result of comparing two sets of entity schema properties.
4
+
5
+ ## Type Parameters
6
+
7
+ ### T
8
+
9
+ `T` = `unknown`
10
+
11
+ ### U
12
+
13
+ `U` = `unknown`
14
+
15
+ ## Properties
16
+
17
+ ### unchanged {#unchanged}
18
+
19
+ > **unchanged**: [`IEntitySchemaProperty`](IEntitySchemaProperty.md)\<`T` \| `U`\>[]
20
+
21
+ Properties that are structurally identical between the old and new schemas.
22
+
23
+ ***
24
+
25
+ ### added {#added}
26
+
27
+ > **added**: [`IEntitySchemaProperty`](IEntitySchemaProperty.md)\<`U`\>[]
28
+
29
+ Properties present in the new schema but absent from the old one.
30
+
31
+ ***
32
+
33
+ ### removed {#removed}
34
+
35
+ > **removed**: [`IEntitySchemaProperty`](IEntitySchemaProperty.md)\<`T`\>[]
36
+
37
+ Properties present in the old schema but absent from the new one.
38
+
39
+ ***
40
+
41
+ ### modified {#modified}
42
+
43
+ > **modified**: `object`[]
44
+
45
+ Properties that exist in both schemas but differ in at least one structural
46
+ field (property, type, format, isPrimary, isSecondary, sortDirection, optional, itemType, itemTypeRef).
47
+ `from` is the old descriptor; `to` is the new one.
48
+
49
+ #### from
50
+
51
+ > **from**: [`IEntitySchemaProperty`](IEntitySchemaProperty.md)\<`T`\>
52
+
53
+ The old property descriptor.
54
+
55
+ #### to
56
+
57
+ > **to**: [`IEntitySchemaProperty`](IEntitySchemaProperty.md)\<`U`\>
58
+
59
+ The new property descriptor.
@@ -4,8 +4,8 @@ Definition for an entity schema options.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### description?
7
+ ### description? {#description}
8
8
 
9
- > `optional` **description**: `string`
9
+ > `optional` **description?**: `string`
10
10
 
11
11
  Description of the object.
@@ -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,72 +26,72 @@ The type of the property.
26
26
 
27
27
  ***
28
28
 
29
- ### format?
29
+ ### format? {#format}
30
30
 
31
- > `optional` **format**: [`EntitySchemaPropertyFormat`](../type-aliases/EntitySchemaPropertyFormat.md)
31
+ > `optional` **format?**: [`EntitySchemaPropertyFormat`](../type-aliases/EntitySchemaPropertyFormat.md)
32
32
 
33
33
  The format of the property.
34
34
 
35
35
  ***
36
36
 
37
- ### isPrimary?
37
+ ### isPrimary? {#isprimary}
38
38
 
39
- > `optional` **isPrimary**: `boolean`
39
+ > `optional` **isPrimary?**: `boolean`
40
40
 
41
41
  Is this the primary index property.
42
42
 
43
43
  ***
44
44
 
45
- ### isSecondary?
45
+ ### isSecondary? {#issecondary}
46
46
 
47
- > `optional` **isSecondary**: `boolean`
47
+ > `optional` **isSecondary?**: `boolean`
48
48
 
49
49
  Is this a secondary index property.
50
50
 
51
51
  ***
52
52
 
53
- ### sortDirection?
53
+ ### sortDirection? {#sortdirection}
54
54
 
55
- > `optional` **sortDirection**: [`SortDirection`](../type-aliases/SortDirection.md)
55
+ > `optional` **sortDirection?**: [`SortDirection`](../type-aliases/SortDirection.md)
56
56
 
57
57
  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
- > `optional` **optional**: `boolean`
63
+ > `optional` **optional?**: `boolean`
64
64
 
65
65
  Is the property optional.
66
66
 
67
67
  ***
68
68
 
69
- ### itemType?
69
+ ### itemType? {#itemtype}
70
70
 
71
- > `optional` **itemType**: [`EntitySchemaPropertyType`](../type-aliases/EntitySchemaPropertyType.md)
71
+ > `optional` **itemType?**: [`EntitySchemaPropertyType`](../type-aliases/EntitySchemaPropertyType.md)
72
72
 
73
73
  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
- > `optional` **itemTypeRef**: `string`
79
+ > `optional` **itemTypeRef?**: `string`
80
80
 
81
81
  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
- > `optional` **description**: `string`
87
+ > `optional` **description?**: `string`
88
88
 
89
89
  Description of the object.
90
90
 
91
91
  ***
92
92
 
93
- ### examples?
93
+ ### examples? {#examples}
94
94
 
95
- > `optional` **examples**: `unknown`[]
95
+ > `optional` **examples?**: `unknown`[]
96
96
 
97
97
  Examples of the property values.
@@ -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