@api-client/core 0.18.23 → 0.18.24
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/definitions/Email.d.ts +0 -4
- package/build/src/modeling/definitions/Email.d.ts.map +1 -1
- package/build/src/modeling/definitions/Email.js +0 -1
- package/build/src/modeling/definitions/Email.js.map +1 -1
- package/build/src/modeling/helpers/database.js +2 -2
- package/build/src/modeling/helpers/database.js.map +1 -1
- package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.js +3 -3
- package/build/src/modeling/templates/verticals/business-services/ecommerce-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/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +26 -26
- package/package.json +1 -1
- package/src/modeling/definitions/Email.ts +0 -5
- package/src/modeling/helpers/database.ts +2 -2
- package/src/modeling/templates/verticals/business-services/ecommerce-domain.ts +3 -3
- package/src/modeling/templates/verticals/technology-media/blog-domain.ts +5 -5
- package/tests/unit/modeling/definitions/email.spec.ts +0 -1
- package/tests/unit/modeling/semantic-configs.spec.ts +0 -1
|
@@ -42062,22 +42062,22 @@
|
|
|
42062
42062
|
"@id": "#209"
|
|
42063
42063
|
},
|
|
42064
42064
|
{
|
|
42065
|
-
"@id": "#197"
|
|
42066
|
-
},
|
|
42067
|
-
{
|
|
42068
42065
|
"@id": "#191"
|
|
42069
42066
|
},
|
|
42070
42067
|
{
|
|
42071
42068
|
"@id": "#194"
|
|
42072
42069
|
},
|
|
42073
42070
|
{
|
|
42074
|
-
"@id": "#
|
|
42071
|
+
"@id": "#197"
|
|
42075
42072
|
},
|
|
42076
42073
|
{
|
|
42077
|
-
"@id": "#
|
|
42074
|
+
"@id": "#203"
|
|
42078
42075
|
},
|
|
42079
42076
|
{
|
|
42080
|
-
"@id": "#
|
|
42077
|
+
"@id": "#200"
|
|
42078
|
+
},
|
|
42079
|
+
{
|
|
42080
|
+
"@id": "#206"
|
|
42081
42081
|
},
|
|
42082
42082
|
{
|
|
42083
42083
|
"@id": "#209"
|
|
@@ -42810,15 +42810,15 @@
|
|
|
42810
42810
|
"@id": "#219"
|
|
42811
42811
|
},
|
|
42812
42812
|
{
|
|
42813
|
-
"@id": "#216"
|
|
42814
|
-
},
|
|
42815
|
-
{
|
|
42816
42813
|
"@id": "#210"
|
|
42817
42814
|
},
|
|
42818
42815
|
{
|
|
42819
42816
|
"@id": "#213"
|
|
42820
42817
|
},
|
|
42821
42818
|
{
|
|
42819
|
+
"@id": "#216"
|
|
42820
|
+
},
|
|
42821
|
+
{
|
|
42822
42822
|
"@id": "#219"
|
|
42823
42823
|
}
|
|
42824
42824
|
],
|
|
@@ -43436,7 +43436,7 @@
|
|
|
43436
43436
|
"doc:ExternalDomainElement",
|
|
43437
43437
|
"doc:DomainElement"
|
|
43438
43438
|
],
|
|
43439
|
-
"doc:raw": "
|
|
43439
|
+
"doc:raw": "countryCode: \"BE\"\ngraydonEnterpriseId: 1057155523\nregistrationId: \"0422319093\"\nvatNumber: \"BE0422319093\"\ngraydonCompanyId: \"0422319093\"\nisBranchOffice: false\n",
|
|
43440
43440
|
"core:mediaType": "application/yaml",
|
|
43441
43441
|
"sourcemaps:sources": [
|
|
43442
43442
|
{
|
|
@@ -43457,7 +43457,7 @@
|
|
|
43457
43457
|
"doc:ExternalDomainElement",
|
|
43458
43458
|
"doc:DomainElement"
|
|
43459
43459
|
],
|
|
43460
|
-
"doc:raw": "
|
|
43460
|
+
"doc:raw": "addressType: 'REGISTERED-OFFICE-ADDRESS'\nstreetName: 'UITBREIDINGSTRAAT'\nhouseNumber: '84'\nhouseNumberAddition: '/1'\npostalCode: '2600'\ncity: 'BERCHEM (ANTWERPEN)'\ncountry: 'Belgium'\ncountryCode: 'BE'\nfullFormatedAddress: \"UITBREIDINGSTRAAT 84 /1, 2600 BERCHEM (ANTWERPEN), BELIUM\"\n",
|
|
43461
43461
|
"core:mediaType": "application/yaml",
|
|
43462
43462
|
"sourcemaps:sources": [
|
|
43463
43463
|
{
|
|
@@ -43478,7 +43478,7 @@
|
|
|
43478
43478
|
"doc:ExternalDomainElement",
|
|
43479
43479
|
"doc:DomainElement"
|
|
43480
43480
|
],
|
|
43481
|
-
"doc:raw": "
|
|
43481
|
+
"doc:raw": "code: '5'\ndescription: 'Limited company'\n",
|
|
43482
43482
|
"core:mediaType": "application/yaml",
|
|
43483
43483
|
"sourcemaps:sources": [
|
|
43484
43484
|
{
|
|
@@ -43499,7 +43499,7 @@
|
|
|
43499
43499
|
"doc:ExternalDomainElement",
|
|
43500
43500
|
"doc:DomainElement"
|
|
43501
43501
|
],
|
|
43502
|
-
"doc:raw": "
|
|
43502
|
+
"doc:raw": "code: 'J'\ndescription: 'Information and communication'\n",
|
|
43503
43503
|
"core:mediaType": "application/yaml",
|
|
43504
43504
|
"sourcemaps:sources": [
|
|
43505
43505
|
{
|
|
@@ -43520,7 +43520,7 @@
|
|
|
43520
43520
|
"doc:ExternalDomainElement",
|
|
43521
43521
|
"doc:DomainElement"
|
|
43522
43522
|
],
|
|
43523
|
-
"doc:raw": "
|
|
43523
|
+
"doc:raw": "class: '3'\ndescription: '150 - 300'\nnumberOfFte: 5500\nnumberOfEmployees: 5232\n",
|
|
43524
43524
|
"core:mediaType": "application/yaml",
|
|
43525
43525
|
"sourcemaps:sources": [
|
|
43526
43526
|
{
|
|
@@ -43541,7 +43541,7 @@
|
|
|
43541
43541
|
"doc:ExternalDomainElement",
|
|
43542
43542
|
"doc:DomainElement"
|
|
43543
43543
|
],
|
|
43544
|
-
"doc:raw": "code: '
|
|
43544
|
+
"doc:raw": "code: '7487'\ndescription: 'Financial and insurance activities'\ntype: \"PRIMARY\"\nclassificationCode: 'BE_NACEBEL2008'\nactivityGroupCode: 'ABCDE'\n",
|
|
43545
43545
|
"core:mediaType": "application/yaml",
|
|
43546
43546
|
"sourcemaps:sources": [
|
|
43547
43547
|
{
|
|
@@ -44232,7 +44232,7 @@
|
|
|
44232
44232
|
"doc:ExternalDomainElement",
|
|
44233
44233
|
"doc:DomainElement"
|
|
44234
44234
|
],
|
|
44235
|
-
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '
|
|
44235
|
+
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '22'\nsubscriberNumber: '12.87.00'\nformatted: '+32-(0)22 000000'\n",
|
|
44236
44236
|
"core:mediaType": "application/yaml",
|
|
44237
44237
|
"sourcemaps:sources": [
|
|
44238
44238
|
{
|
|
@@ -44253,7 +44253,7 @@
|
|
|
44253
44253
|
"doc:ExternalDomainElement",
|
|
44254
44254
|
"doc:DomainElement"
|
|
44255
44255
|
],
|
|
44256
|
-
"doc:raw": "
|
|
44256
|
+
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '21'\nsubscriberNumber: '12.87.00'\nformatted: '+32-(0)21 302099'\n",
|
|
44257
44257
|
"core:mediaType": "application/yaml",
|
|
44258
44258
|
"sourcemaps:sources": [
|
|
44259
44259
|
{
|
|
@@ -44274,7 +44274,7 @@
|
|
|
44274
44274
|
"doc:ExternalDomainElement",
|
|
44275
44275
|
"doc:DomainElement"
|
|
44276
44276
|
],
|
|
44277
|
-
"doc:raw": "type: 'GENERAL'\
|
|
44277
|
+
"doc:raw": "-\n type: 'GENERAL'\n value: 'info@company.be'\n-\n type: 'IT_DEPT'\n value: 'it-service@company.be'\n",
|
|
44278
44278
|
"core:mediaType": "application/yaml",
|
|
44279
44279
|
"sourcemaps:sources": [
|
|
44280
44280
|
{
|
|
@@ -44756,32 +44756,32 @@
|
|
|
44756
44756
|
{
|
|
44757
44757
|
"@id": "#193/source-map/lexical/element_0",
|
|
44758
44758
|
"sourcemaps:element": "amf://id#193",
|
|
44759
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44759
|
+
"sourcemaps:value": "[(1,0)-(7,0)]"
|
|
44760
44760
|
},
|
|
44761
44761
|
{
|
|
44762
44762
|
"@id": "#196/source-map/lexical/element_0",
|
|
44763
44763
|
"sourcemaps:element": "amf://id#196",
|
|
44764
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44764
|
+
"sourcemaps:value": "[(1,0)-(10,0)]"
|
|
44765
44765
|
},
|
|
44766
44766
|
{
|
|
44767
44767
|
"@id": "#199/source-map/lexical/element_0",
|
|
44768
44768
|
"sourcemaps:element": "amf://id#199",
|
|
44769
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44769
|
+
"sourcemaps:value": "[(1,0)-(3,0)]"
|
|
44770
44770
|
},
|
|
44771
44771
|
{
|
|
44772
44772
|
"@id": "#202/source-map/lexical/element_0",
|
|
44773
44773
|
"sourcemaps:element": "amf://id#202",
|
|
44774
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44774
|
+
"sourcemaps:value": "[(1,0)-(3,0)]"
|
|
44775
44775
|
},
|
|
44776
44776
|
{
|
|
44777
44777
|
"@id": "#205/source-map/lexical/element_0",
|
|
44778
44778
|
"sourcemaps:element": "amf://id#205",
|
|
44779
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44779
|
+
"sourcemaps:value": "[(1,0)-(5,0)]"
|
|
44780
44780
|
},
|
|
44781
44781
|
{
|
|
44782
44782
|
"@id": "#208/source-map/lexical/element_0",
|
|
44783
44783
|
"sourcemaps:element": "amf://id#208",
|
|
44784
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44784
|
+
"sourcemaps:value": "[(1,0)-(6,0)]"
|
|
44785
44785
|
},
|
|
44786
44786
|
{
|
|
44787
44787
|
"@id": "#223/source-map/lexical/element_0",
|
|
@@ -45121,12 +45121,12 @@
|
|
|
45121
45121
|
{
|
|
45122
45122
|
"@id": "#215/source-map/lexical/element_0",
|
|
45123
45123
|
"sourcemaps:element": "amf://id#215",
|
|
45124
|
-
"sourcemaps:value": "[(1,0)-(
|
|
45124
|
+
"sourcemaps:value": "[(1,0)-(6,0)]"
|
|
45125
45125
|
},
|
|
45126
45126
|
{
|
|
45127
45127
|
"@id": "#218/source-map/lexical/element_0",
|
|
45128
45128
|
"sourcemaps:element": "amf://id#218",
|
|
45129
|
-
"sourcemaps:value": "[(1,0)-(
|
|
45129
|
+
"sourcemaps:value": "[(1,0)-(7,0)]"
|
|
45130
45130
|
},
|
|
45131
45131
|
{
|
|
45132
45132
|
"@id": "#221/source-map/lexical/element_0",
|
package/package.json
CHANGED
|
@@ -14,10 +14,6 @@ export interface EmailConfig {
|
|
|
14
14
|
* Whether email verification is required.
|
|
15
15
|
*/
|
|
16
16
|
requireVerification?: boolean
|
|
17
|
-
/**
|
|
18
|
-
* Method to use for verification: 'email' or 'sms'.
|
|
19
|
-
*/
|
|
20
|
-
verificationMethod?: 'email' | 'sms'
|
|
21
17
|
/**
|
|
22
18
|
* Whether to allow subaddressing (user+tag@domain.com).
|
|
23
19
|
*/
|
|
@@ -84,7 +80,6 @@ export const createEmailSemantic = (config: EmailConfig = {}): AppliedEmailSeman
|
|
|
84
80
|
*/
|
|
85
81
|
export const DEFAULT_EMAIL_CONFIG: EmailConfig = {
|
|
86
82
|
requireVerification: false,
|
|
87
|
-
verificationMethod: 'email',
|
|
88
83
|
allowSubaddressing: true,
|
|
89
84
|
allowInternational: true,
|
|
90
85
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SNAKE_CASE } from '@pawel-up/jexl/string.js'
|
|
2
2
|
import DOMPurify from '../../lib/dom_purify.js'
|
|
3
3
|
|
|
4
4
|
export function sanitizeInput(input: string): string {
|
|
@@ -20,7 +20,7 @@ export function toDatabaseColumnName(inputName: string, defaultName = 'untitled_
|
|
|
20
20
|
let name = sanitizeInput(inputName)
|
|
21
21
|
|
|
22
22
|
// 2. Convert to lowercase
|
|
23
|
-
name =
|
|
23
|
+
name = SNAKE_CASE(name)
|
|
24
24
|
|
|
25
25
|
// 3. Replace spaces and multiple hyphens/underscores with a single underscore
|
|
26
26
|
name = name.replace(/[\s-]+/g, '_')
|
|
@@ -549,7 +549,7 @@ export default function createEcommerceDomain(options: CreateTemplateOptions = {
|
|
|
549
549
|
allowNegative: false,
|
|
550
550
|
}),
|
|
551
551
|
createCalculatedSemantic({
|
|
552
|
-
formula:
|
|
552
|
+
formula: `{{${cartUnitPrice.key}}} * {{${cartItemQuantity.key}}}`,
|
|
553
553
|
dependencies: [cartUnitPrice.key, cartItemQuantity.key],
|
|
554
554
|
recalculateOnUpdate: true,
|
|
555
555
|
}),
|
|
@@ -637,7 +637,7 @@ export default function createEcommerceDomain(options: CreateTemplateOptions = {
|
|
|
637
637
|
allowNegative: false,
|
|
638
638
|
}),
|
|
639
639
|
createCalculatedSemantic({
|
|
640
|
-
formula:
|
|
640
|
+
formula: `{{${subtotal.key}}} + {{${taxAmount.key}}} + {{${shippingAmount.key}}}`,
|
|
641
641
|
dependencies: [subtotal.key, taxAmount.key, shippingAmount.key],
|
|
642
642
|
recalculateOnUpdate: true,
|
|
643
643
|
}),
|
|
@@ -711,7 +711,7 @@ export default function createEcommerceDomain(options: CreateTemplateOptions = {
|
|
|
711
711
|
allowNegative: false,
|
|
712
712
|
}),
|
|
713
713
|
createCalculatedSemantic({
|
|
714
|
-
formula:
|
|
714
|
+
formula: `{{${quantity.key}}} * {{${unitPrice.key}}}`,
|
|
715
715
|
dependencies: [quantity.key, unitPrice.key],
|
|
716
716
|
recalculateOnUpdate: true,
|
|
717
717
|
}),
|
|
@@ -251,7 +251,7 @@ export default function createBlogDomain(options: CreateTemplateOptions = {}): D
|
|
|
251
251
|
semantics: [{ id: SemanticType.Summary }],
|
|
252
252
|
})
|
|
253
253
|
|
|
254
|
-
postEntity.addProperty({
|
|
254
|
+
const postContent = postEntity.addProperty({
|
|
255
255
|
info: { name: 'content', displayName: 'Content', description: 'Full content of the post in HTML or Markdown' },
|
|
256
256
|
type: 'string',
|
|
257
257
|
required: true,
|
|
@@ -310,8 +310,8 @@ export default function createBlogDomain(options: CreateTemplateOptions = {}): D
|
|
|
310
310
|
readOnly: true,
|
|
311
311
|
semantics: [
|
|
312
312
|
createCalculatedSemantic({
|
|
313
|
-
formula:
|
|
314
|
-
dependencies: [],
|
|
313
|
+
formula: `CEIL(LENGTH(REPLACE({{${postContent.key}}}, " ", "")) / 250)`,
|
|
314
|
+
dependencies: [postContent.key],
|
|
315
315
|
recalculateOnUpdate: true,
|
|
316
316
|
}),
|
|
317
317
|
],
|
|
@@ -323,8 +323,8 @@ export default function createBlogDomain(options: CreateTemplateOptions = {}): D
|
|
|
323
323
|
readOnly: true,
|
|
324
324
|
semantics: [
|
|
325
325
|
createCalculatedSemantic({
|
|
326
|
-
formula:
|
|
327
|
-
dependencies: [],
|
|
326
|
+
formula: `LENGTH({{${postContent.key}}}) - LENGTH(REPLACE({{${postContent.key}}}, " ", "")) + 1`,
|
|
327
|
+
dependencies: [postContent.key],
|
|
328
328
|
recalculateOnUpdate: true,
|
|
329
329
|
}),
|
|
330
330
|
],
|
|
@@ -18,7 +18,6 @@ test.group('Email Semantic Configuration', () => {
|
|
|
18
18
|
const config: EmailConfig = {
|
|
19
19
|
allowedDomains: ['example.com'],
|
|
20
20
|
requireVerification: true,
|
|
21
|
-
verificationMethod: 'email',
|
|
22
21
|
}
|
|
23
22
|
const semantic = createEmailSemantic(config)
|
|
24
23
|
assert.equal(semantic.id, SemanticType.Email)
|
|
@@ -266,7 +266,6 @@ test.group('Semantic Configurations', () => {
|
|
|
266
266
|
const config: EmailConfig = {
|
|
267
267
|
allowedDomains: ['example.com'],
|
|
268
268
|
requireVerification: true,
|
|
269
|
-
verificationMethod: 'email',
|
|
270
269
|
}
|
|
271
270
|
const semantic = createEmailSemantic(config)
|
|
272
271
|
assert.equal(semantic.id, SemanticType.Email)
|