@api-client/core 0.17.5 → 0.17.6
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/Semantics.d.ts +8 -4
- package/build/src/modeling/Semantics.d.ts.map +1 -1
- package/build/src/modeling/Semantics.js +8 -4
- package/build/src/modeling/Semantics.js.map +1 -1
- package/build/src/modeling/definitions/Email.d.ts +2 -2
- package/build/src/modeling/definitions/Email.d.ts.map +1 -1
- package/build/src/modeling/definitions/Email.js.map +1 -1
- package/build/src/modeling/definitions/GeospatialCoordinates.d.ts +46 -1
- package/build/src/modeling/definitions/GeospatialCoordinates.d.ts.map +1 -1
- package/build/src/modeling/definitions/GeospatialCoordinates.js.map +1 -1
- package/build/src/modeling/definitions/Phone.d.ts +5 -7
- package/build/src/modeling/definitions/Phone.d.ts.map +1 -1
- package/build/src/modeling/definitions/Phone.js +2 -2
- package/build/src/modeling/definitions/Phone.js.map +1 -1
- package/build/src/modeling/definitions/PublicUniqueName.d.ts +1 -9
- package/build/src/modeling/definitions/PublicUniqueName.d.ts.map +1 -1
- package/build/src/modeling/definitions/PublicUniqueName.js +0 -1
- package/build/src/modeling/definitions/PublicUniqueName.js.map +1 -1
- package/build/src/modeling/definitions/SKU.d.ts +4 -1
- package/build/src/modeling/definitions/SKU.d.ts.map +1 -1
- package/build/src/modeling/definitions/SKU.js.map +1 -1
- package/build/src/modeling/definitions/URL.d.ts +1 -4
- package/build/src/modeling/definitions/URL.d.ts.map +1 -1
- package/build/src/modeling/definitions/URL.js +0 -1
- package/build/src/modeling/definitions/URL.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +10 -10
- package/package.json +1 -1
- package/src/modeling/Semantics.ts +8 -4
- package/src/modeling/definitions/Email.ts +2 -2
- package/src/modeling/definitions/GeospatialCoordinates.ts +46 -1
- package/src/modeling/definitions/Phone.ts +6 -8
- package/src/modeling/definitions/PublicUniqueName.ts +1 -10
- package/src/modeling/definitions/SKU.ts +4 -1
- package/src/modeling/definitions/URL.ts +1 -5
- package/tests/unit/modeling/definitions/derived.spec.ts +1 -2
- package/tests/unit/modeling/definitions/url.spec.ts +0 -1
- package/tests/unit/modeling/semantic-configs.spec.ts +1 -2
|
@@ -42810,6 +42810,9 @@
|
|
|
42810
42810
|
"@id": "#219"
|
|
42811
42811
|
},
|
|
42812
42812
|
{
|
|
42813
|
+
"@id": "#219"
|
|
42814
|
+
},
|
|
42815
|
+
{
|
|
42813
42816
|
"@id": "#210"
|
|
42814
42817
|
},
|
|
42815
42818
|
{
|
|
@@ -42817,9 +42820,6 @@
|
|
|
42817
42820
|
},
|
|
42818
42821
|
{
|
|
42819
42822
|
"@id": "#216"
|
|
42820
|
-
},
|
|
42821
|
-
{
|
|
42822
|
-
"@id": "#219"
|
|
42823
42823
|
}
|
|
42824
42824
|
],
|
|
42825
42825
|
"doc:root": false,
|
|
@@ -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 : '21'\nsubscriberNumber: '12.87.00'\nformatted: '+32-(0)21 302099'\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": "type: 'GENERAL'\
|
|
44256
|
+
"doc:raw": "-\n type: 'GENERAL'\n value: 'info@company.be'\n-\n type: 'IT_DEPT'\n value: 'it-service@company.be'\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": "
|
|
44277
|
+
"doc:raw": "type: \"GENERAL\"\nvalue: \"www.company.be\"\n",
|
|
44278
44278
|
"core:mediaType": "application/yaml",
|
|
44279
44279
|
"sourcemaps:sources": [
|
|
44280
44280
|
{
|
|
@@ -44295,7 +44295,7 @@
|
|
|
44295
44295
|
"doc:ExternalDomainElement",
|
|
44296
44296
|
"doc:DomainElement"
|
|
44297
44297
|
],
|
|
44298
|
-
"doc:raw": "type:
|
|
44298
|
+
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '22'\nsubscriberNumber: '12.87.00'\nformatted: '+32-(0)22 000000'\n",
|
|
44299
44299
|
"core:mediaType": "application/yaml",
|
|
44300
44300
|
"sourcemaps:sources": [
|
|
44301
44301
|
{
|
|
@@ -45121,17 +45121,17 @@
|
|
|
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)-(7,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)-(3,0)]"
|
|
45130
45130
|
},
|
|
45131
45131
|
{
|
|
45132
45132
|
"@id": "#221/source-map/lexical/element_0",
|
|
45133
45133
|
"sourcemaps:element": "amf://id#221",
|
|
45134
|
-
"sourcemaps:value": "[(1,0)-(
|
|
45134
|
+
"sourcemaps:value": "[(1,0)-(6,0)]"
|
|
45135
45135
|
},
|
|
45136
45136
|
{
|
|
45137
45137
|
"@id": "#338/source-map/synthesized-field/element_1",
|
package/package.json
CHANGED
|
@@ -50,11 +50,12 @@ export enum SemanticType {
|
|
|
50
50
|
*/
|
|
51
51
|
DeletedFlag = 'Semantic#DeletedFlag',
|
|
52
52
|
/**
|
|
53
|
-
* Designates a Data Property as a
|
|
53
|
+
* Designates a Data Property as a public identifier for a resource (the slug).
|
|
54
54
|
* This is often used in URLs to provide a user-friendly way to access the resource.
|
|
55
55
|
* For example, a blog post might have a public unique name like "my-first-post".
|
|
56
|
-
*
|
|
57
|
-
* the
|
|
56
|
+
* The runtime automatically generates a URL-safe string from another field (like a title).
|
|
57
|
+
* By default, slugs are generated to be unique, but the configuration allows for duplicates
|
|
58
|
+
* in scenarios where uniqueness is handled by a combination of fields (e.g., year and slug).
|
|
58
59
|
*/
|
|
59
60
|
PublicUniqueName = 'Semantic#PublicUniqueName',
|
|
60
61
|
/**
|
|
@@ -149,7 +150,10 @@ export enum SemanticType {
|
|
|
149
150
|
/**
|
|
150
151
|
* Annotates a field as a monetary value with currency support and precision control.
|
|
151
152
|
* Can store simple decimal amounts or complex objects with amount and currency.
|
|
152
|
-
*
|
|
153
|
+
*
|
|
154
|
+
* As a semantic, it provides flexibility by annotating a base `number` or `string` type,
|
|
155
|
+
* allowing for different storage strategies (e.g., decimal, integer cents, or a JSON object)
|
|
156
|
+
* while maintaining a consistent API for currency operations.
|
|
153
157
|
*/
|
|
154
158
|
Currency = 'Semantic#Currency',
|
|
155
159
|
/**
|
|
@@ -15,9 +15,9 @@ export interface EmailConfig {
|
|
|
15
15
|
*/
|
|
16
16
|
requireVerification?: boolean
|
|
17
17
|
/**
|
|
18
|
-
* Method to use for verification: 'email'
|
|
18
|
+
* Method to use for verification: 'email' or 'sms'.
|
|
19
19
|
*/
|
|
20
|
-
verificationMethod?: 'email' | 'sms'
|
|
20
|
+
verificationMethod?: 'email' | 'sms'
|
|
21
21
|
/**
|
|
22
22
|
* Whether to allow subaddressing (user+tag@domain.com).
|
|
23
23
|
*/
|
|
@@ -97,12 +97,16 @@ export interface GeospatialCoordinatesConfig {
|
|
|
97
97
|
/**
|
|
98
98
|
* The spatial reference system (SRS) for the coordinates.
|
|
99
99
|
* Defaults to WGS84 (EPSG:4326) if not specified.
|
|
100
|
+
*
|
|
101
|
+
* Note: If `format` is set to `GeoJSON`, this value is automatically locked to `WGS84`
|
|
102
|
+
* as per the GeoJSON specification (RFC 7946).
|
|
100
103
|
*/
|
|
101
104
|
spatialReferenceSystem?: GeospatialSpatialReferenceSystem
|
|
102
105
|
|
|
103
106
|
/**
|
|
104
107
|
* The default distance unit for spatial queries.
|
|
105
108
|
* Defaults to 'meters' if not specified.
|
|
109
|
+
* Only applicable when `enableDistanceQueries` is true.
|
|
106
110
|
*/
|
|
107
111
|
defaultDistanceUnit?: GeospatialDistanceUnit
|
|
108
112
|
|
|
@@ -120,7 +124,8 @@ export interface GeospatialCoordinatesConfig {
|
|
|
120
124
|
|
|
121
125
|
/**
|
|
122
126
|
* Custom validation rules for coordinate bounds.
|
|
123
|
-
*
|
|
127
|
+
* Values are in decimal degrees.
|
|
128
|
+
* If not specified, uses standard latitude (-90.0 to 90.0) and longitude (-180.0 to 180.0) bounds.
|
|
124
129
|
*/
|
|
125
130
|
validationBounds?: {
|
|
126
131
|
/**
|
|
@@ -144,35 +149,55 @@ export interface GeospatialCoordinatesConfig {
|
|
|
144
149
|
/**
|
|
145
150
|
* Whether to enable automatic PostGIS integration when using PostgreSQL.
|
|
146
151
|
* Defaults to true if not specified.
|
|
152
|
+
*
|
|
153
|
+
* This is an advanced setting. For UIs targeting non-technical users,
|
|
154
|
+
* it is safe to hide this option and keep it enabled. The backend should
|
|
155
|
+
* gracefully handle cases where the database is not PostgreSQL.
|
|
147
156
|
*/
|
|
148
157
|
enablePostGISIntegration?: boolean
|
|
149
158
|
|
|
150
159
|
/**
|
|
151
160
|
* The PostGIS geometry type to use for storage.
|
|
152
161
|
* Defaults to 'POINT' if not specified.
|
|
162
|
+
* This choice fundamentally defines the shape of the data and the types of queries that can be performed.
|
|
163
|
+
*
|
|
164
|
+
* - **POINT**: For single locations (e.g., a store, a user's location).
|
|
165
|
+
* - **LINESTRING**: For paths or routes (e.g., a delivery route, a hiking trail).
|
|
166
|
+
* - **POLYGON**: For defined areas (e.g., a delivery zone, a sales territory, a city boundary).
|
|
167
|
+
* - **MULTI***: For collections of the above types (e.g., all stores in a chain as a MULTIPOINT).
|
|
153
168
|
*/
|
|
154
169
|
postGISGeometryType?: 'POINT' | 'LINESTRING' | 'POLYGON' | 'MULTIPOINT' | 'MULTILINESTRING' | 'MULTIPOLYGON'
|
|
155
170
|
|
|
156
171
|
/**
|
|
157
172
|
* Whether to enable distance-based query endpoints.
|
|
173
|
+
* This is not mutually exclusive with other query types and is useful for all geometry types.
|
|
158
174
|
* Defaults to true if not specified.
|
|
175
|
+
*
|
|
176
|
+
* - For **POINT**: Finds points within a certain radius.
|
|
177
|
+
* - For **POLYGON**: Finds polygons that are within a certain distance of a point
|
|
178
|
+
* (e.g., "find all parks within 5 miles").
|
|
179
|
+
* - For **LINESTRING**: Finds paths/routes within a certain distance of a point
|
|
180
|
+
* (e.g., "find all subway lines near me").
|
|
159
181
|
*/
|
|
160
182
|
enableDistanceQueries?: boolean
|
|
161
183
|
|
|
162
184
|
/**
|
|
163
185
|
* Maximum distance allowed in distance queries (in the default distance unit).
|
|
164
186
|
* Defaults to 100000 (100km) if not specified.
|
|
187
|
+
* Only applicable when `enableDistanceQueries` is true.
|
|
165
188
|
*/
|
|
166
189
|
maxQueryDistance?: number
|
|
167
190
|
|
|
168
191
|
/**
|
|
169
192
|
* Whether to enable bounding box query endpoints.
|
|
193
|
+
* This is not mutually exclusive with other query types.
|
|
170
194
|
* Defaults to true if not specified.
|
|
171
195
|
*/
|
|
172
196
|
enableBoundingBoxQueries?: boolean
|
|
173
197
|
|
|
174
198
|
/**
|
|
175
199
|
* Whether to enable polygon intersection query endpoints.
|
|
200
|
+
* This is not mutually exclusive with other query types.
|
|
176
201
|
* Defaults to false if not specified.
|
|
177
202
|
*/
|
|
178
203
|
enablePolygonQueries?: boolean
|
|
@@ -180,12 +205,26 @@ export interface GeospatialCoordinatesConfig {
|
|
|
180
205
|
/**
|
|
181
206
|
* Custom API endpoint prefix for geospatial queries.
|
|
182
207
|
* Defaults to '/nearby' if not specified.
|
|
208
|
+
* Only applicable if `enableDistanceQueries`, `enableBoundingBoxQueries`,
|
|
209
|
+
* or `enablePolygonQueries` is true.
|
|
210
|
+
*
|
|
211
|
+
* The generated endpoints would be:
|
|
212
|
+
* - **Distance Query**: `GET {apiEndpointPrefix}`
|
|
213
|
+
* - **Bounding Box Query**: `GET {apiEndpointPrefix}/bbox`
|
|
214
|
+
* - **Polygon Query**: `POST {apiEndpointPrefix}/polygon`
|
|
183
215
|
*/
|
|
184
216
|
apiEndpointPrefix?: string
|
|
185
217
|
|
|
186
218
|
/**
|
|
187
219
|
* Whether to include elevation data in coordinates (3D coordinates).
|
|
188
220
|
* Defaults to false if not specified.
|
|
221
|
+
* When true, a third value for elevation is expected in the coordinate data.
|
|
222
|
+
*
|
|
223
|
+
* - **LatLon**: `"40.7128,-74.0060,10"` (latitude, longitude, elevation)
|
|
224
|
+
* - **PostGIS/WKT**: `"POINT Z (-74.0060 40.7128 10)"`
|
|
225
|
+
* - **GeoJSON**: `{"type": "Point", "coordinates": [-74.0060, 40.7128, 10]}`
|
|
226
|
+
*
|
|
227
|
+
* The unit for elevation is determined by `defaultDistanceUnit`.
|
|
189
228
|
*/
|
|
190
229
|
includeElevation?: boolean
|
|
191
230
|
|
|
@@ -198,6 +237,12 @@ export interface GeospatialCoordinatesConfig {
|
|
|
198
237
|
/**
|
|
199
238
|
* Whether to enable reverse geocoding capabilities.
|
|
200
239
|
* Defaults to false if not specified.
|
|
240
|
+
*
|
|
241
|
+
* When enabled, the system can convert geographic coordinates (e.g., `40.7128, -74.0060`)
|
|
242
|
+
* into a human-readable address (e.g., "New York, NY, USA").
|
|
243
|
+
*
|
|
244
|
+
* This often requires integration with an external geocoding service and may have
|
|
245
|
+
* associated costs or usage limits.
|
|
201
246
|
*/
|
|
202
247
|
enableReverseGeocoding?: boolean
|
|
203
248
|
|
|
@@ -15,18 +15,17 @@ export interface PhoneConfig {
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Whether the phone number must include a country code.
|
|
18
|
-
* Defaults to true for
|
|
18
|
+
* Defaults to true for international format.
|
|
19
19
|
*/
|
|
20
20
|
requireCountryCode?: boolean
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Format for phone number validation and display.
|
|
24
|
-
* - 'E.164': International format with + prefix (e.g., +1234567890)
|
|
25
24
|
* - 'national': Country-specific format without country code
|
|
26
|
-
* - 'international':
|
|
25
|
+
* - 'international': E.164 international format with + prefix (e.g., +1234567890)
|
|
27
26
|
* - 'custom': Use customFormat pattern
|
|
28
27
|
*/
|
|
29
|
-
format?: '
|
|
28
|
+
format?: 'national' | 'international' | 'custom'
|
|
30
29
|
|
|
31
30
|
/**
|
|
32
31
|
* Custom format pattern for phone number validation.
|
|
@@ -51,9 +50,8 @@ export interface PhoneConfig {
|
|
|
51
50
|
* Method to use for phone verification.
|
|
52
51
|
* - 'sms': Send verification code via SMS
|
|
53
52
|
* - 'call': Make verification call
|
|
54
|
-
* - 'none': No verification required
|
|
55
53
|
*/
|
|
56
|
-
verificationMethod?: 'sms' | 'call'
|
|
54
|
+
verificationMethod?: 'sms' | 'call'
|
|
57
55
|
|
|
58
56
|
/**
|
|
59
57
|
* Custom metadata for the phone field.
|
|
@@ -105,11 +103,11 @@ export const createPhoneSemantic = (config: PhoneConfig = {}): AppliedPhoneSeman
|
|
|
105
103
|
|
|
106
104
|
/**
|
|
107
105
|
* Default configuration for Phone semantic.
|
|
108
|
-
* Uses
|
|
106
|
+
* Uses international format with country code required and SMS verification.
|
|
109
107
|
*/
|
|
110
108
|
export const DEFAULT_PHONE_CONFIG: PhoneConfig = {
|
|
111
109
|
requireCountryCode: true,
|
|
112
|
-
format: '
|
|
110
|
+
format: 'international',
|
|
113
111
|
allowExtension: false,
|
|
114
112
|
requireVerification: false,
|
|
115
113
|
verificationMethod: 'sms',
|
|
@@ -7,7 +7,7 @@ import { SemanticType } from '../Semantics.js'
|
|
|
7
7
|
*/
|
|
8
8
|
export interface PublicUniqueNameConfig {
|
|
9
9
|
/**
|
|
10
|
-
* The source field to generate the slug from
|
|
10
|
+
* The key of the source field to generate the slug from.
|
|
11
11
|
* Default to the field that is annotated with the Title semantic.
|
|
12
12
|
*/
|
|
13
13
|
sourceField?: string
|
|
@@ -15,10 +15,6 @@ export interface PublicUniqueNameConfig {
|
|
|
15
15
|
* Separator character to use in the slug (default: '-').
|
|
16
16
|
*/
|
|
17
17
|
separator?: string
|
|
18
|
-
/**
|
|
19
|
-
* Maximum length of the slug (default: 64).
|
|
20
|
-
*/
|
|
21
|
-
maxLength?: number
|
|
22
18
|
/**
|
|
23
19
|
* Whether the slug is case sensitive (default: false).
|
|
24
20
|
*/
|
|
@@ -27,10 +23,6 @@ export interface PublicUniqueNameConfig {
|
|
|
27
23
|
* Whether to allow Unicode characters in the slug (default: false).
|
|
28
24
|
*/
|
|
29
25
|
allowUnicode?: boolean
|
|
30
|
-
/**
|
|
31
|
-
* Name of a custom generator function to use for slug creation.
|
|
32
|
-
*/
|
|
33
|
-
customGenerator?: string
|
|
34
26
|
/**
|
|
35
27
|
* Whether to allow duplicate slugs (default: false).
|
|
36
28
|
*/
|
|
@@ -91,7 +83,6 @@ export const createPublicUniqueNameSemantic = (
|
|
|
91
83
|
*/
|
|
92
84
|
export const DEFAULT_PUBLIC_UNIQUE_NAME_CONFIG: PublicUniqueNameConfig = {
|
|
93
85
|
separator: '-',
|
|
94
|
-
maxLength: 64,
|
|
95
86
|
caseSensitive: false,
|
|
96
87
|
allowUnicode: false,
|
|
97
88
|
allowDuplicates: false,
|
|
@@ -60,9 +60,12 @@ export interface SKUConfig {
|
|
|
60
60
|
autoGenerate?: boolean
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* Field
|
|
63
|
+
* Field key to use as source for auto-generation.
|
|
64
64
|
* Only used when autoGenerate is true.
|
|
65
65
|
* If not specified, uses random generation.
|
|
66
|
+
*
|
|
67
|
+
* The kay can be any field that provides a meaningful value for the SKU. It can also be a key of
|
|
68
|
+
* a property in one of the parent entities.
|
|
66
69
|
*/
|
|
67
70
|
autoGenerateSource?: string
|
|
68
71
|
|
|
@@ -6,12 +6,9 @@ import { SemanticType } from '../Semantics.js'
|
|
|
6
6
|
* Controls validation, allowed protocols, and formatting.
|
|
7
7
|
*/
|
|
8
8
|
export interface URLConfig {
|
|
9
|
-
/**
|
|
10
|
-
* List of allowed protocols (e.g., ['http', 'https']).
|
|
11
|
-
*/
|
|
12
|
-
allowedProtocols?: string[]
|
|
13
9
|
/**
|
|
14
10
|
* Whether to require HTTPS protocol (default: false).
|
|
11
|
+
* When not set, both HTTP and HTTPS are allowed.
|
|
15
12
|
*/
|
|
16
13
|
requireHttps?: boolean
|
|
17
14
|
/**
|
|
@@ -85,7 +82,6 @@ export const createURLSemantic = (config: URLConfig = {}): AppliedURLSemantic =>
|
|
|
85
82
|
* Default configuration for URL semantic.
|
|
86
83
|
*/
|
|
87
84
|
export const DEFAULT_URL_CONFIG: URLConfig = {
|
|
88
|
-
allowedProtocols: ['http', 'https'],
|
|
89
85
|
requireHttps: false,
|
|
90
86
|
allowQueryParams: true,
|
|
91
87
|
allowFragments: true,
|
|
@@ -10,8 +10,7 @@ test.group('Derived Semantic Configuration', () => {
|
|
|
10
10
|
test('should create semantic with custom config', ({ assert }) => {
|
|
11
11
|
const config: DerivedConfig = {
|
|
12
12
|
sourceFields: ['firstName', 'lastName'],
|
|
13
|
-
|
|
14
|
-
updateOnChange: true,
|
|
13
|
+
transformation: 'concat',
|
|
15
14
|
allowManualOverride: true,
|
|
16
15
|
recalculateOnUpdate: false,
|
|
17
16
|
}
|
|
@@ -287,7 +287,7 @@ test.group('Semantic Configurations', () => {
|
|
|
287
287
|
test('Phone: should create semantic with custom config', ({ assert }) => {
|
|
288
288
|
const config: PhoneConfig = {
|
|
289
289
|
allowedCountries: ['US', 'CA'],
|
|
290
|
-
format: '
|
|
290
|
+
format: 'international',
|
|
291
291
|
requireVerification: true,
|
|
292
292
|
}
|
|
293
293
|
const semantic = createPhoneSemantic(config)
|
|
@@ -308,7 +308,6 @@ test.group('Semantic Configurations', () => {
|
|
|
308
308
|
|
|
309
309
|
test('URL: should create semantic with custom config', ({ assert }) => {
|
|
310
310
|
const config: URLConfig = {
|
|
311
|
-
allowedProtocols: ['https'],
|
|
312
311
|
allowedDomains: ['example.com'],
|
|
313
312
|
requireHTTPS: true,
|
|
314
313
|
}
|