@api-client/core 0.18.22 → 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/meta/index.d.ts +10 -2
- package/build/src/modeling/templates/meta/index.d.ts.map +1 -1
- package/build/src/modeling/templates/meta/index.js +31 -1
- package/build/src/modeling/templates/meta/index.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 +6 -6
- 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
|
@@ -42071,10 +42071,10 @@
|
|
|
42071
42071
|
"@id": "#197"
|
|
42072
42072
|
},
|
|
42073
42073
|
{
|
|
42074
|
-
"@id": "#
|
|
42074
|
+
"@id": "#203"
|
|
42075
42075
|
},
|
|
42076
42076
|
{
|
|
42077
|
-
"@id": "#
|
|
42077
|
+
"@id": "#200"
|
|
42078
42078
|
},
|
|
42079
42079
|
{
|
|
42080
42080
|
"@id": "#206"
|
|
@@ -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
|
{
|
|
@@ -44771,12 +44771,12 @@
|
|
|
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",
|
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)
|