@transcommerce/cwm-shared 1.1.64 → 1.1.65
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/fesm2022/transcommerce-cwm-shared.mjs +97 -87
- package/fesm2022/transcommerce-cwm-shared.mjs.map +1 -1
- package/lib/models/config/api-config.d.ts +1 -6
- package/lib/models/config/auth-config.d.ts +1 -11
- package/lib/models/config/carousel-config.d.ts +1 -8
- package/lib/models/config/configuration.d.ts +7 -40
- package/lib/models/config/menu-board-config.d.ts +1 -3
- package/lib/models/config/subscription-config.d.ts +1 -4
- package/lib/models/slide.d.ts +1 -6
- package/package.json +1 -1
|
@@ -1215,45 +1215,47 @@ const API_CONFIG_SCHEMA = {
|
|
|
1215
1215
|
type: "string",
|
|
1216
1216
|
title: "API Base URL", // Custom display name
|
|
1217
1217
|
description: "The base URL of that API",
|
|
1218
|
-
default: "https://api.cheapweedmenu.com"
|
|
1219
|
-
required: true
|
|
1218
|
+
default: "https://api.cheapweedmenu.com"
|
|
1220
1219
|
},
|
|
1221
1220
|
createSubscriptionApiRoute: {
|
|
1222
1221
|
type: "string",
|
|
1223
1222
|
title: "CreateSubscription Route",
|
|
1224
1223
|
description: "The route to the CreateSubscription Function",
|
|
1225
|
-
default: "/CreateSubscription"
|
|
1226
|
-
required: true
|
|
1224
|
+
default: "/CreateSubscription"
|
|
1227
1225
|
},
|
|
1228
1226
|
getInventoryApiRoute: {
|
|
1229
1227
|
type: "string",
|
|
1230
1228
|
title: "GetInventory Route",
|
|
1231
1229
|
description: "The route to the GetInventory Function",
|
|
1232
|
-
default: "/GetInventoryApiRoute"
|
|
1233
|
-
required: true
|
|
1230
|
+
default: "/GetInventoryApiRoute"
|
|
1234
1231
|
},
|
|
1235
1232
|
apiKey: {
|
|
1236
1233
|
type: "string",
|
|
1237
1234
|
title: "API Access Key",
|
|
1238
1235
|
description: "The key used for access the API",
|
|
1239
|
-
default: "8b66d117-523-4b81-8c2f-52142c67d0cd"
|
|
1240
|
-
required: true
|
|
1236
|
+
default: "8b66d117-523-4b81-8c2f-52142c67d0cd"
|
|
1241
1237
|
},
|
|
1242
1238
|
clientId: {
|
|
1243
1239
|
type: "string",
|
|
1244
1240
|
title: "Client ID",
|
|
1245
1241
|
description: "The client ID used to access the API",
|
|
1246
|
-
default: ""
|
|
1247
|
-
required: true
|
|
1242
|
+
default: ""
|
|
1248
1243
|
},
|
|
1249
1244
|
locationId: {
|
|
1250
1245
|
type: "string",
|
|
1251
1246
|
title: "Location ID",
|
|
1252
1247
|
description: "The location ID used to access the API",
|
|
1253
|
-
default: ""
|
|
1254
|
-
required: true
|
|
1248
|
+
default: ""
|
|
1255
1249
|
}
|
|
1256
|
-
}
|
|
1250
|
+
},
|
|
1251
|
+
required: [
|
|
1252
|
+
"apiBaseUrl",
|
|
1253
|
+
"createSubscriptionApiRoute",
|
|
1254
|
+
"getInventoryApiRoute",
|
|
1255
|
+
"apiKey",
|
|
1256
|
+
"clientId",
|
|
1257
|
+
"locationId"
|
|
1258
|
+
]
|
|
1257
1259
|
};
|
|
1258
1260
|
|
|
1259
1261
|
const DEFAULT_AUTH_CONFIG = {
|
|
@@ -1278,74 +1280,76 @@ const AUTH_CONFIG_SCHEMA = {
|
|
|
1278
1280
|
title: "Log Level", // Custom display name
|
|
1279
1281
|
description: "The verbosity in which the system will log messages",
|
|
1280
1282
|
enum: ["None", "Error", "Warn", "Info", "Debug", "Trace"],
|
|
1281
|
-
default: "Info"
|
|
1282
|
-
required: true
|
|
1283
|
+
default: "Info"
|
|
1283
1284
|
},
|
|
1284
1285
|
clientId: {
|
|
1285
1286
|
type: "string",
|
|
1286
1287
|
title: "Client ID",
|
|
1287
|
-
description: "Azure AD application client identifier"
|
|
1288
|
-
required: true
|
|
1288
|
+
description: "Azure AD application client identifier"
|
|
1289
1289
|
},
|
|
1290
1290
|
tenantId: {
|
|
1291
1291
|
type: "string",
|
|
1292
1292
|
title: "Tenant ID",
|
|
1293
|
-
description: "Azure AD tenant identifier"
|
|
1294
|
-
required: true
|
|
1293
|
+
description: "Azure AD tenant identifier"
|
|
1295
1294
|
},
|
|
1296
1295
|
authority: {
|
|
1297
1296
|
type: "string",
|
|
1298
1297
|
title: "Authority URL",
|
|
1299
|
-
description: "Azure AD authentication endpoint"
|
|
1300
|
-
required: true
|
|
1298
|
+
description: "Azure AD authentication endpoint"
|
|
1301
1299
|
},
|
|
1302
1300
|
scopes: {
|
|
1303
1301
|
type: "string",
|
|
1304
1302
|
title: "OAuth Scopes",
|
|
1305
|
-
description: "Comma-separated list of permission scopes"
|
|
1306
|
-
required: true
|
|
1303
|
+
description: "Comma-separated list of permission scopes"
|
|
1307
1304
|
},
|
|
1308
1305
|
redirect_uri: {
|
|
1309
1306
|
type: "string",
|
|
1310
1307
|
title: "Redirect URI",
|
|
1311
|
-
description: "URL to redirect to after successful login"
|
|
1312
|
-
required: true
|
|
1308
|
+
description: "URL to redirect to after successful login"
|
|
1313
1309
|
},
|
|
1314
1310
|
logout_redirect_uri: {
|
|
1315
1311
|
type: "string",
|
|
1316
1312
|
title: "Logout Redirect URI",
|
|
1317
|
-
description: "URL to redirect to after logout"
|
|
1318
|
-
required: true
|
|
1313
|
+
description: "URL to redirect to after logout"
|
|
1319
1314
|
},
|
|
1320
1315
|
prompt: {
|
|
1321
1316
|
type: "string",
|
|
1322
1317
|
title: "Login Prompt Behavior",
|
|
1323
1318
|
description: "Controls how the login prompt is displayed",
|
|
1324
1319
|
enum: ["none", "login", "select_account", "consent", "create"],
|
|
1325
|
-
default: "login"
|
|
1326
|
-
required: true
|
|
1320
|
+
default: "login"
|
|
1327
1321
|
},
|
|
1328
1322
|
msalDiagnosticsEnabled: {
|
|
1329
1323
|
type: "boolean",
|
|
1330
1324
|
title: "Enable MSAL Diagnostics",
|
|
1331
1325
|
description: "Show detailed MSAL authentication diagnostics",
|
|
1332
|
-
default: false
|
|
1333
|
-
required: true
|
|
1326
|
+
default: false
|
|
1334
1327
|
},
|
|
1335
1328
|
showPii: {
|
|
1336
1329
|
type: "boolean",
|
|
1337
1330
|
title: "Show Personal Information",
|
|
1338
1331
|
description: "Include personally identifiable information in logs",
|
|
1339
|
-
default: false
|
|
1340
|
-
required: true
|
|
1332
|
+
default: false
|
|
1341
1333
|
},
|
|
1342
1334
|
configConnectString: {
|
|
1343
1335
|
type: "string",
|
|
1344
1336
|
title: "App Configuration Connect String",
|
|
1345
|
-
description: "Connection string to the Azure App Configuration instance"
|
|
1346
|
-
required: true
|
|
1337
|
+
description: "Connection string to the Azure App Configuration instance"
|
|
1347
1338
|
}
|
|
1348
|
-
}
|
|
1339
|
+
},
|
|
1340
|
+
required: [
|
|
1341
|
+
"logLevel",
|
|
1342
|
+
"clientId",
|
|
1343
|
+
"tenantId",
|
|
1344
|
+
"authority",
|
|
1345
|
+
"scopes",
|
|
1346
|
+
"redirect_uri",
|
|
1347
|
+
"logout_redirect_uri",
|
|
1348
|
+
"prompt",
|
|
1349
|
+
"msalDiagnosticsEnabled",
|
|
1350
|
+
"showPii",
|
|
1351
|
+
"configConnectString"
|
|
1352
|
+
]
|
|
1349
1353
|
};
|
|
1350
1354
|
const AUTH_CONFIG = new InjectionToken('AUTH_CONFIG');
|
|
1351
1355
|
|
|
@@ -1367,59 +1371,61 @@ const CAROUSEL_CONFIG_SCHEMA = {
|
|
|
1367
1371
|
type: "number",
|
|
1368
1372
|
title: "Slides to show", // Custom display name
|
|
1369
1373
|
description: "The number of slides that will be visible",
|
|
1370
|
-
default: 3
|
|
1371
|
-
required: true
|
|
1374
|
+
default: 3
|
|
1372
1375
|
},
|
|
1373
1376
|
slidesToScroll: {
|
|
1374
1377
|
type: "number",
|
|
1375
1378
|
title: "Slides to scroll",
|
|
1376
1379
|
description: "The number of slides that will scroll on each scroll event",
|
|
1377
|
-
default: 1
|
|
1378
|
-
required: true
|
|
1380
|
+
default: 1
|
|
1379
1381
|
},
|
|
1380
1382
|
dots: {
|
|
1381
1383
|
type: "boolean",
|
|
1382
1384
|
title: "Display dots",
|
|
1383
1385
|
description: "Determines if dots are visible to represent the number of slides",
|
|
1384
|
-
default: false
|
|
1385
|
-
required: true
|
|
1386
|
+
default: false
|
|
1386
1387
|
},
|
|
1387
1388
|
infinite: {
|
|
1388
1389
|
type: "boolean",
|
|
1389
1390
|
title: "Infinite loop",
|
|
1390
1391
|
description: "Determines if slides rotate on an infinite loop",
|
|
1391
|
-
default: true
|
|
1392
|
-
required: true
|
|
1392
|
+
default: true
|
|
1393
1393
|
},
|
|
1394
1394
|
autoplay: {
|
|
1395
1395
|
type: "boolean",
|
|
1396
1396
|
title: "Autoplay",
|
|
1397
1397
|
description: "Determines if slides will rotate automatically",
|
|
1398
|
-
default: true
|
|
1399
|
-
required: true
|
|
1398
|
+
default: true
|
|
1400
1399
|
},
|
|
1401
1400
|
autoplaySpeed: {
|
|
1402
1401
|
type: "number",
|
|
1403
1402
|
title: "Autoplay Speed",
|
|
1404
1403
|
description: "The delay between each slide transition in milliseconds",
|
|
1405
|
-
default: 10000
|
|
1406
|
-
required: true
|
|
1404
|
+
default: 10000
|
|
1407
1405
|
},
|
|
1408
1406
|
speed: {
|
|
1409
1407
|
type: "number",
|
|
1410
1408
|
title: "Transition Speed",
|
|
1411
1409
|
description: "The speed of the slide transition in milliseconds",
|
|
1412
|
-
default: 500
|
|
1413
|
-
required: true
|
|
1410
|
+
default: 500
|
|
1414
1411
|
},
|
|
1415
1412
|
arrows: {
|
|
1416
1413
|
type: "boolean",
|
|
1417
1414
|
title: "Display Arrows",
|
|
1418
1415
|
description: "Determines if navigation arrows are visible",
|
|
1419
|
-
default: false
|
|
1420
|
-
required: true
|
|
1416
|
+
default: false
|
|
1421
1417
|
}
|
|
1422
|
-
}
|
|
1418
|
+
},
|
|
1419
|
+
required: [
|
|
1420
|
+
"slidesToShow",
|
|
1421
|
+
"slidesToScroll",
|
|
1422
|
+
"dots",
|
|
1423
|
+
"infinite",
|
|
1424
|
+
"autoplay",
|
|
1425
|
+
"autoplaySpeed",
|
|
1426
|
+
"speed",
|
|
1427
|
+
"arrows"
|
|
1428
|
+
]
|
|
1423
1429
|
};
|
|
1424
1430
|
|
|
1425
1431
|
const DEFAULT_MENU_BOARD_CONFIG = {
|
|
@@ -1435,24 +1441,22 @@ const MENU_BOARD_CONFIG_SCHEMA = {
|
|
|
1435
1441
|
type: "number",
|
|
1436
1442
|
title: "Number of pixels", // Custom display name
|
|
1437
1443
|
description: "Number of pixels to scroll each cycle",
|
|
1438
|
-
default: 1
|
|
1439
|
-
required: true
|
|
1444
|
+
default: 1
|
|
1440
1445
|
},
|
|
1441
1446
|
autoScrollTimeout: {
|
|
1442
1447
|
type: "number",
|
|
1443
1448
|
title: "Auto Scroll Timeout",
|
|
1444
1449
|
description: "The timeout duration for auto scroll cycle in seconds",
|
|
1445
|
-
default: 20
|
|
1446
|
-
required: true
|
|
1450
|
+
default: 20
|
|
1447
1451
|
},
|
|
1448
1452
|
dataAgeThreshold: {
|
|
1449
1453
|
type: "number",
|
|
1450
1454
|
title: "Data Age Threshold",
|
|
1451
1455
|
description: "The maximum age of data in milliseconds before the data is refreshed from the API",
|
|
1452
|
-
default: 300000
|
|
1453
|
-
required: true
|
|
1456
|
+
default: 300000
|
|
1454
1457
|
}
|
|
1455
|
-
}
|
|
1458
|
+
},
|
|
1459
|
+
required: ["amountToScroll", "autoScrollTimeout", "dataAgeThreshold"]
|
|
1456
1460
|
};
|
|
1457
1461
|
|
|
1458
1462
|
const DEFAULT_SLIDE = {
|
|
@@ -1471,47 +1475,49 @@ const SLIDE_SCHEMA = {
|
|
|
1471
1475
|
type: "string",
|
|
1472
1476
|
title: "Image URL", // Custom display name
|
|
1473
1477
|
description: "The URL of background image for the slide",
|
|
1474
|
-
default: "../../../assets/images/tuesday.png"
|
|
1475
|
-
required: true
|
|
1478
|
+
default: "../../../assets/images/tuesday.png"
|
|
1476
1479
|
},
|
|
1477
1480
|
title: {
|
|
1478
1481
|
type: "string",
|
|
1479
1482
|
title: "Title",
|
|
1480
1483
|
description: "The title text displayed on the slide",
|
|
1481
|
-
default: "Doobie Tuesday"
|
|
1482
|
-
required: true
|
|
1484
|
+
default: "Doobie Tuesday"
|
|
1483
1485
|
},
|
|
1484
1486
|
description: {
|
|
1485
1487
|
type: "string",
|
|
1486
1488
|
title: "Description",
|
|
1487
1489
|
description: "The description text displayed on the slide",
|
|
1488
|
-
default: "10% off all pre-rolls & packs<"
|
|
1489
|
-
required: true
|
|
1490
|
+
default: "10% off all pre-rolls & packs<"
|
|
1490
1491
|
},
|
|
1491
1492
|
highlighted: {
|
|
1492
1493
|
type: "boolean",
|
|
1493
1494
|
title: "Highlighted",
|
|
1494
1495
|
description: "Determines if the slide is highlighted",
|
|
1495
|
-
default: false
|
|
1496
|
-
required: true
|
|
1496
|
+
default: false
|
|
1497
1497
|
},
|
|
1498
1498
|
textColor: {
|
|
1499
1499
|
type: "string",
|
|
1500
1500
|
title: "Text Color",
|
|
1501
1501
|
description: "The color of the text on the slide",
|
|
1502
1502
|
enum: ['red', 'green', 'blue', 'yellow', 'black', 'white'],
|
|
1503
|
-
default: "black"
|
|
1504
|
-
required: true
|
|
1503
|
+
default: "black"
|
|
1505
1504
|
},
|
|
1506
1505
|
backgroundColor: {
|
|
1507
1506
|
type: "string",
|
|
1508
1507
|
title: "Background Color",
|
|
1509
1508
|
description: "The background color of the slide",
|
|
1510
1509
|
enum: ['red', 'green', 'blue', 'yellow', 'black', 'white'],
|
|
1511
|
-
default: "white"
|
|
1512
|
-
required: true
|
|
1510
|
+
default: "white"
|
|
1513
1511
|
}
|
|
1514
|
-
}
|
|
1512
|
+
},
|
|
1513
|
+
required: [
|
|
1514
|
+
"image",
|
|
1515
|
+
"title",
|
|
1516
|
+
"description",
|
|
1517
|
+
"highlighted",
|
|
1518
|
+
"textColor",
|
|
1519
|
+
"backgroundColor"
|
|
1520
|
+
]
|
|
1515
1521
|
};
|
|
1516
1522
|
|
|
1517
1523
|
const DEFAULT_SUBSCRIPTION_CONFIG = {
|
|
@@ -1528,31 +1534,28 @@ const SUBSCRIPTION_CONFIG_SCHEMA = {
|
|
|
1528
1534
|
type: "number",
|
|
1529
1535
|
title: "Cost per occurrence", // Custom display name
|
|
1530
1536
|
description: "The amount to charge for each subscription occurrence",
|
|
1531
|
-
default: 1
|
|
1532
|
-
required: true
|
|
1537
|
+
default: 1
|
|
1533
1538
|
},
|
|
1534
1539
|
days: {
|
|
1535
1540
|
type: "number",
|
|
1536
1541
|
title: "Days between occurrences",
|
|
1537
1542
|
description: "The number of days between each subscription occurrence",
|
|
1538
|
-
default: 30
|
|
1539
|
-
required: true
|
|
1543
|
+
default: 30
|
|
1540
1544
|
},
|
|
1541
1545
|
totalOccurrences: {
|
|
1542
1546
|
type: "number",
|
|
1543
1547
|
title: "Total occurrences",
|
|
1544
1548
|
description: "The total number of occurrences for the subscription",
|
|
1545
|
-
default: 12
|
|
1546
|
-
required: true
|
|
1549
|
+
default: 12
|
|
1547
1550
|
},
|
|
1548
1551
|
trialOccurrences: {
|
|
1549
1552
|
type: "number",
|
|
1550
1553
|
title: "Trial occurrences",
|
|
1551
1554
|
description: "The number of trial occurrences (free)",
|
|
1552
|
-
default: 0
|
|
1553
|
-
required: true
|
|
1555
|
+
default: 0
|
|
1554
1556
|
}
|
|
1555
|
-
}
|
|
1557
|
+
},
|
|
1558
|
+
required: ["amount", "days", "totalOccurrences", "trialOccurrences"]
|
|
1556
1559
|
};
|
|
1557
1560
|
|
|
1558
1561
|
const DEFAULT_COMPANY_NAME = 'Test Weed Dispensary';
|
|
@@ -1629,8 +1632,7 @@ const CONFIGURATION_SCHEMA = {
|
|
|
1629
1632
|
companyName: {
|
|
1630
1633
|
type: "string",
|
|
1631
1634
|
title: "Company Name",
|
|
1632
|
-
default: DEFAULT_COMPANY_NAME
|
|
1633
|
-
required: true
|
|
1635
|
+
default: DEFAULT_COMPANY_NAME
|
|
1634
1636
|
},
|
|
1635
1637
|
authConfig: {
|
|
1636
1638
|
...AUTH_CONFIG_SCHEMA
|
|
@@ -1652,10 +1654,18 @@ const CONFIGURATION_SCHEMA = {
|
|
|
1652
1654
|
title: "Footer Carousel Slides Collection",
|
|
1653
1655
|
description: "Configuration for each slide in the footer carousel",
|
|
1654
1656
|
items: SLIDE_SCHEMA,
|
|
1655
|
-
default: DEFAULT_CONFIGURATION.footerCarouselSlideConfig
|
|
1656
|
-
required: true
|
|
1657
|
+
default: DEFAULT_CONFIGURATION.footerCarouselSlideConfig
|
|
1657
1658
|
}
|
|
1658
|
-
}
|
|
1659
|
+
},
|
|
1660
|
+
required: [
|
|
1661
|
+
"companyName",
|
|
1662
|
+
"authConfig",
|
|
1663
|
+
"apiConfig",
|
|
1664
|
+
"subscriptionConfig",
|
|
1665
|
+
"menuBoardConfig",
|
|
1666
|
+
"footerCarouselConfig",
|
|
1667
|
+
"footerCarouselSlideConfig"
|
|
1668
|
+
]
|
|
1659
1669
|
};
|
|
1660
1670
|
|
|
1661
1671
|
const EXAMPLE_CREATE_SUBSCRIPTION_REQUEST = {
|