@api-client/core 0.18.24 → 0.18.26
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/build/src/modeling/DomainEntity.d.ts +6 -1
- package/build/src/modeling/DomainEntity.d.ts.map +1 -1
- package/build/src/modeling/DomainEntity.js +24 -5
- package/build/src/modeling/DomainEntity.js.map +1 -1
- package/build/src/modeling/Semantics.d.ts +254 -0
- package/build/src/modeling/Semantics.d.ts.map +1 -1
- package/build/src/modeling/Semantics.js +328 -0
- package/build/src/modeling/Semantics.js.map +1 -1
- package/build/src/modeling/definitions/Email.js +1 -1
- package/build/src/modeling/definitions/Email.js.map +1 -1
- package/build/src/modeling/definitions/Password.d.ts.map +1 -1
- package/build/src/modeling/definitions/Password.js +1 -3
- package/build/src/modeling/definitions/Password.js.map +1 -1
- package/build/src/modeling/helpers/Intelisense.d.ts +7 -7
- package/build/src/modeling/helpers/Intelisense.d.ts.map +1 -1
- package/build/src/modeling/helpers/Intelisense.js +24 -58
- package/build/src/modeling/helpers/Intelisense.js.map +1 -1
- package/build/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
- package/build/src/modeling/templates/meta/financial-services-platform.json +1 -1
- package/build/src/modeling/templates/meta/index.d.ts +1 -1
- package/build/src/modeling/templates/meta/index.js +1 -1
- package/build/src/modeling/templates/meta/index.js.map +1 -1
- package/build/src/modeling/templates/meta/iot-smart-home-platform.json +1 -1
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map +1 -1
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js +248 -63
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js.map +1 -1
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.js +5 -5
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.js.map +1 -1
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts.map +1 -1
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js +2 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js.map +1 -1
- package/build/src/modeling/validation/postgresql.d.ts.map +1 -1
- package/build/src/modeling/validation/postgresql.js +0 -1
- package/build/src/modeling/validation/postgresql.js.map +1 -1
- package/build/src/runtime/modeling/Semantics.d.ts +84 -0
- package/build/src/runtime/modeling/Semantics.d.ts.map +1 -0
- package/build/src/runtime/modeling/Semantics.js +124 -0
- package/build/src/runtime/modeling/Semantics.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +8 -8
- package/package.json +1 -1
- package/src/modeling/DomainEntity.ts +27 -5
- package/src/modeling/Semantics.ts +493 -0
- package/src/modeling/definitions/Email.ts +1 -1
- package/src/modeling/definitions/Password.ts +1 -3
- package/src/modeling/helpers/Intelisense.ts +33 -65
- package/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
- package/src/modeling/templates/meta/financial-services-platform.json +1 -1
- package/src/modeling/templates/meta/iot-smart-home-platform.json +1 -1
- package/src/modeling/templates/verticals/business-services/financial-services-domain.ts +285 -65
- package/src/modeling/templates/verticals/technology-media/blog-domain.ts +5 -5
- package/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.ts +2 -0
- package/src/modeling/validation/postgresql.ts +0 -1
- package/src/runtime/modeling/Semantics.ts +196 -0
- package/tests/unit/modeling/client_ip_address_semantic.spec.ts +71 -0
- package/tests/unit/modeling/definitions/password.spec.ts +0 -2
- package/tests/unit/modeling/domain_entity_parents.spec.ts +243 -0
- package/tests/unit/modeling/semantic_runtime.spec.ts +113 -0
- package/tests/unit/modeling/semantics.spec.ts +68 -0
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
SemanticType,
|
|
4
4
|
SemanticScope,
|
|
5
5
|
SemanticCategory,
|
|
6
|
+
SemanticTiming,
|
|
7
|
+
SemanticOperation,
|
|
6
8
|
isEntitySemantic,
|
|
7
9
|
isPropertySemantic,
|
|
8
10
|
isAssociationSemantic,
|
|
@@ -50,6 +52,10 @@ test.group('Semantics', () => {
|
|
|
50
52
|
scope: SemanticScope.Entity,
|
|
51
53
|
category: SemanticCategory.Identity,
|
|
52
54
|
hasConfig: false,
|
|
55
|
+
runtime: {
|
|
56
|
+
timing: SemanticTiming.None,
|
|
57
|
+
operations: [],
|
|
58
|
+
},
|
|
53
59
|
}
|
|
54
60
|
const propertySemantic: PropertySemantic = {
|
|
55
61
|
id: SemanticType.CreatedTimestamp,
|
|
@@ -58,6 +64,12 @@ test.group('Semantics', () => {
|
|
|
58
64
|
scope: SemanticScope.Property,
|
|
59
65
|
category: SemanticCategory.Lifecycle,
|
|
60
66
|
hasConfig: false,
|
|
67
|
+
applicableDataTypes: ['datetime'],
|
|
68
|
+
runtime: {
|
|
69
|
+
timing: SemanticTiming.Before,
|
|
70
|
+
operations: [SemanticOperation.Create],
|
|
71
|
+
priority: 90,
|
|
72
|
+
},
|
|
61
73
|
}
|
|
62
74
|
const associationSemantic: AssociationSemantic = {
|
|
63
75
|
id: SemanticType.ResourceOwnerIdentifier,
|
|
@@ -66,6 +78,18 @@ test.group('Semantics', () => {
|
|
|
66
78
|
scope: SemanticScope.Association,
|
|
67
79
|
category: SemanticCategory.Identity,
|
|
68
80
|
hasConfig: false,
|
|
81
|
+
runtime: {
|
|
82
|
+
timing: SemanticTiming.Before,
|
|
83
|
+
operations: [
|
|
84
|
+
SemanticOperation.Create,
|
|
85
|
+
SemanticOperation.Read,
|
|
86
|
+
SemanticOperation.Update,
|
|
87
|
+
SemanticOperation.Delete,
|
|
88
|
+
SemanticOperation.List,
|
|
89
|
+
],
|
|
90
|
+
priority: 5,
|
|
91
|
+
canDisable: false,
|
|
92
|
+
},
|
|
69
93
|
}
|
|
70
94
|
|
|
71
95
|
assert.isTrue(isEntitySemantic(entitySemantic))
|
|
@@ -81,6 +105,10 @@ test.group('Semantics', () => {
|
|
|
81
105
|
scope: SemanticScope.Entity,
|
|
82
106
|
category: SemanticCategory.Identity,
|
|
83
107
|
hasConfig: false,
|
|
108
|
+
runtime: {
|
|
109
|
+
timing: SemanticTiming.None,
|
|
110
|
+
operations: [],
|
|
111
|
+
},
|
|
84
112
|
}
|
|
85
113
|
const propertySemantic: PropertySemantic = {
|
|
86
114
|
id: SemanticType.CreatedTimestamp,
|
|
@@ -89,6 +117,12 @@ test.group('Semantics', () => {
|
|
|
89
117
|
scope: SemanticScope.Property,
|
|
90
118
|
category: SemanticCategory.Lifecycle,
|
|
91
119
|
hasConfig: false,
|
|
120
|
+
applicableDataTypes: ['datetime'],
|
|
121
|
+
runtime: {
|
|
122
|
+
timing: SemanticTiming.Before,
|
|
123
|
+
operations: [SemanticOperation.Create],
|
|
124
|
+
priority: 90,
|
|
125
|
+
},
|
|
92
126
|
}
|
|
93
127
|
const associationSemantic: AssociationSemantic = {
|
|
94
128
|
id: SemanticType.ResourceOwnerIdentifier,
|
|
@@ -97,6 +131,18 @@ test.group('Semantics', () => {
|
|
|
97
131
|
scope: SemanticScope.Association,
|
|
98
132
|
category: SemanticCategory.Identity,
|
|
99
133
|
hasConfig: false,
|
|
134
|
+
runtime: {
|
|
135
|
+
timing: SemanticTiming.Before,
|
|
136
|
+
operations: [
|
|
137
|
+
SemanticOperation.Create,
|
|
138
|
+
SemanticOperation.Read,
|
|
139
|
+
SemanticOperation.Update,
|
|
140
|
+
SemanticOperation.Delete,
|
|
141
|
+
SemanticOperation.List,
|
|
142
|
+
],
|
|
143
|
+
priority: 5,
|
|
144
|
+
canDisable: false,
|
|
145
|
+
},
|
|
100
146
|
}
|
|
101
147
|
|
|
102
148
|
assert.isFalse(isPropertySemantic(entitySemantic))
|
|
@@ -112,6 +158,10 @@ test.group('Semantics', () => {
|
|
|
112
158
|
scope: SemanticScope.Entity,
|
|
113
159
|
category: SemanticCategory.Identity,
|
|
114
160
|
hasConfig: false,
|
|
161
|
+
runtime: {
|
|
162
|
+
timing: SemanticTiming.None,
|
|
163
|
+
operations: [],
|
|
164
|
+
},
|
|
115
165
|
}
|
|
116
166
|
const propertySemantic: PropertySemantic = {
|
|
117
167
|
id: SemanticType.CreatedTimestamp,
|
|
@@ -120,6 +170,12 @@ test.group('Semantics', () => {
|
|
|
120
170
|
scope: SemanticScope.Property,
|
|
121
171
|
category: SemanticCategory.Lifecycle,
|
|
122
172
|
hasConfig: false,
|
|
173
|
+
applicableDataTypes: ['datetime'],
|
|
174
|
+
runtime: {
|
|
175
|
+
timing: SemanticTiming.Before,
|
|
176
|
+
operations: [SemanticOperation.Create],
|
|
177
|
+
priority: 90,
|
|
178
|
+
},
|
|
123
179
|
}
|
|
124
180
|
const associationSemantic: AssociationSemantic = {
|
|
125
181
|
id: SemanticType.ResourceOwnerIdentifier,
|
|
@@ -128,6 +184,18 @@ test.group('Semantics', () => {
|
|
|
128
184
|
scope: SemanticScope.Association,
|
|
129
185
|
category: SemanticCategory.Identity,
|
|
130
186
|
hasConfig: false,
|
|
187
|
+
runtime: {
|
|
188
|
+
timing: SemanticTiming.Before,
|
|
189
|
+
operations: [
|
|
190
|
+
SemanticOperation.Create,
|
|
191
|
+
SemanticOperation.Read,
|
|
192
|
+
SemanticOperation.Update,
|
|
193
|
+
SemanticOperation.Delete,
|
|
194
|
+
SemanticOperation.List,
|
|
195
|
+
],
|
|
196
|
+
priority: 5,
|
|
197
|
+
canDisable: false,
|
|
198
|
+
},
|
|
131
199
|
}
|
|
132
200
|
|
|
133
201
|
assert.isFalse(isAssociationSemantic(entitySemantic))
|