@fibery/expression-utils 9.5.3 → 9.5.4

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.
@@ -909,6 +909,41 @@ export const operatorDateTimeIsOnOrAfter: {
909
909
  type: string;
910
910
  };
911
911
  export const operatorsGroupsWithoutMe: {
912
+ ":filter-type/comment-reference-collection": {
913
+ id: string;
914
+ title: string;
915
+ pattern: (string | {
916
+ id: string;
917
+ value: any;
918
+ matchFn: (x: any) => boolean;
919
+ } | (string | {
920
+ id: string;
921
+ matchFn: (expression: any, typeObject: any) => boolean;
922
+ })[])[];
923
+ type: string;
924
+ }[];
925
+ ":filter-type/file-reference": {
926
+ id: string;
927
+ title: string;
928
+ pattern: (string | {
929
+ id: string;
930
+ matchFn: (expression: any, typeObject: any) => boolean;
931
+ })[];
932
+ type: string;
933
+ }[];
934
+ ":filter-type/file-reference-collection": {
935
+ id: string;
936
+ title: string;
937
+ pattern: (string | {
938
+ id: string;
939
+ value: any;
940
+ matchFn: (x: any) => boolean;
941
+ } | (string | {
942
+ id: string;
943
+ matchFn: (expression: any, typeObject: any) => boolean;
944
+ })[])[];
945
+ type: string;
946
+ }[];
912
947
  ":filter-type/reference": {
913
948
  id: string;
914
949
  title: string;
@@ -1194,6 +1229,417 @@ export const operatorsGroupsWithoutMe: {
1194
1229
  }[];
1195
1230
  };
1196
1231
  export const operatorsGroups: {
1232
+ ":filter-type/comment-reference-collection": ({
1233
+ id: string;
1234
+ title: string;
1235
+ customMatch: (where: any, params: any, typeObject: any) => {
1236
+ matchSuccess: true;
1237
+ expression: any[];
1238
+ value: any;
1239
+ } | {
1240
+ matchSuccess: boolean;
1241
+ expression?: undefined;
1242
+ value?: undefined;
1243
+ };
1244
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1245
+ expression: any;
1246
+ params: {};
1247
+ };
1248
+ type: string;
1249
+ } | {
1250
+ id: string;
1251
+ title: string;
1252
+ pattern: (string | {
1253
+ id: string;
1254
+ value: any;
1255
+ matchFn: (x: any) => boolean;
1256
+ } | (string | {
1257
+ id: string;
1258
+ matchFn: (expression: any, typeObject: any) => boolean;
1259
+ })[])[];
1260
+ type: string;
1261
+ })[] | ({
1262
+ id: string;
1263
+ title: string;
1264
+ pattern: (string | {
1265
+ id: string;
1266
+ matchFn: (expression: any, typeObject: any) => any;
1267
+ })[];
1268
+ type: string;
1269
+ } | {
1270
+ id: string;
1271
+ title: string;
1272
+ pattern: (string | {
1273
+ id: string;
1274
+ value: any;
1275
+ matchFn: (x: any) => boolean;
1276
+ } | (string | {
1277
+ id: string;
1278
+ matchFn: (expression: any, typeObject: any) => any;
1279
+ })[])[];
1280
+ type: string;
1281
+ } | {
1282
+ id: string;
1283
+ title: string;
1284
+ customMatch: (where: any, params: any, typeObject: any) => {
1285
+ matchSuccess: true;
1286
+ expression: any;
1287
+ value: {
1288
+ withinRangeStart: any;
1289
+ withinRangeEnd: any;
1290
+ };
1291
+ } | {
1292
+ matchSuccess: boolean;
1293
+ expression?: undefined;
1294
+ value?: undefined;
1295
+ };
1296
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1297
+ expression: (string | any[])[];
1298
+ params: {
1299
+ [x: number]: any;
1300
+ };
1301
+ };
1302
+ type: string;
1303
+ })[] | ({
1304
+ id: any;
1305
+ title: any;
1306
+ customMatch: (where: any, params: any, typeObject: any) => {
1307
+ matchSuccess: true;
1308
+ expression: any;
1309
+ value: any;
1310
+ } | {
1311
+ matchSuccess: boolean;
1312
+ expression?: undefined;
1313
+ value?: undefined;
1314
+ };
1315
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1316
+ expression: any[];
1317
+ params: {
1318
+ [x: number]: any;
1319
+ };
1320
+ };
1321
+ type: string;
1322
+ } | {
1323
+ id: string;
1324
+ title: string;
1325
+ pattern: (string | {
1326
+ id: string;
1327
+ value: any;
1328
+ matchFn: (x: any) => boolean;
1329
+ } | (string | {
1330
+ id: string;
1331
+ matchFn: (expression: any, typeObject: any) => any;
1332
+ })[])[];
1333
+ type: string;
1334
+ })[] | ({
1335
+ id: string;
1336
+ title: string;
1337
+ pattern: (string | {
1338
+ id: string;
1339
+ matchFn: (_x: any) => boolean;
1340
+ } | (string | {
1341
+ id: string;
1342
+ matchFn: (expression: any, typeObject: any) => any;
1343
+ })[])[];
1344
+ type: string;
1345
+ } | {
1346
+ id: string;
1347
+ title: string;
1348
+ pattern: (string | {
1349
+ id: string;
1350
+ matchFn: (expression: any, typeObject: any) => any;
1351
+ })[];
1352
+ type: string;
1353
+ })[] | {
1354
+ type: string;
1355
+ id: any;
1356
+ title: any;
1357
+ customMatch: (where: any, params: any, typeObject: any) => {
1358
+ matchSuccess: true;
1359
+ expression: any;
1360
+ } | {
1361
+ matchSuccess: boolean;
1362
+ expression?: undefined;
1363
+ };
1364
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1365
+ expression: any;
1366
+ params: {};
1367
+ };
1368
+ }[];
1369
+ ":filter-type/file-reference": ({
1370
+ id: string;
1371
+ title: string;
1372
+ customMatch: (where: any, params: any, typeObject: any) => {
1373
+ matchSuccess: true;
1374
+ expression: any[];
1375
+ value: any;
1376
+ } | {
1377
+ matchSuccess: boolean;
1378
+ expression?: undefined;
1379
+ value?: undefined;
1380
+ };
1381
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1382
+ expression: any;
1383
+ params: {};
1384
+ };
1385
+ type: string;
1386
+ } | {
1387
+ id: string;
1388
+ title: string;
1389
+ pattern: (string | {
1390
+ id: string;
1391
+ value: any;
1392
+ matchFn: (x: any) => boolean;
1393
+ } | (string | {
1394
+ id: string;
1395
+ matchFn: (expression: any, typeObject: any) => boolean;
1396
+ })[])[];
1397
+ type: string;
1398
+ })[] | ({
1399
+ id: string;
1400
+ title: string;
1401
+ pattern: (string | {
1402
+ id: string;
1403
+ matchFn: (expression: any, typeObject: any) => any;
1404
+ })[];
1405
+ type: string;
1406
+ } | {
1407
+ id: string;
1408
+ title: string;
1409
+ pattern: (string | {
1410
+ id: string;
1411
+ value: any;
1412
+ matchFn: (x: any) => boolean;
1413
+ } | (string | {
1414
+ id: string;
1415
+ matchFn: (expression: any, typeObject: any) => any;
1416
+ })[])[];
1417
+ type: string;
1418
+ } | {
1419
+ id: string;
1420
+ title: string;
1421
+ customMatch: (where: any, params: any, typeObject: any) => {
1422
+ matchSuccess: true;
1423
+ expression: any;
1424
+ value: {
1425
+ withinRangeStart: any;
1426
+ withinRangeEnd: any;
1427
+ };
1428
+ } | {
1429
+ matchSuccess: boolean;
1430
+ expression?: undefined;
1431
+ value?: undefined;
1432
+ };
1433
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1434
+ expression: (string | any[])[];
1435
+ params: {
1436
+ [x: number]: any;
1437
+ };
1438
+ };
1439
+ type: string;
1440
+ })[] | ({
1441
+ id: any;
1442
+ title: any;
1443
+ customMatch: (where: any, params: any, typeObject: any) => {
1444
+ matchSuccess: true;
1445
+ expression: any;
1446
+ value: any;
1447
+ } | {
1448
+ matchSuccess: boolean;
1449
+ expression?: undefined;
1450
+ value?: undefined;
1451
+ };
1452
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1453
+ expression: any[];
1454
+ params: {
1455
+ [x: number]: any;
1456
+ };
1457
+ };
1458
+ type: string;
1459
+ } | {
1460
+ id: string;
1461
+ title: string;
1462
+ pattern: (string | {
1463
+ id: string;
1464
+ value: any;
1465
+ matchFn: (x: any) => boolean;
1466
+ } | (string | {
1467
+ id: string;
1468
+ matchFn: (expression: any, typeObject: any) => any;
1469
+ })[])[];
1470
+ type: string;
1471
+ })[] | ({
1472
+ id: string;
1473
+ title: string;
1474
+ pattern: (string | {
1475
+ id: string;
1476
+ matchFn: (_x: any) => boolean;
1477
+ } | (string | {
1478
+ id: string;
1479
+ matchFn: (expression: any, typeObject: any) => any;
1480
+ })[])[];
1481
+ type: string;
1482
+ } | {
1483
+ id: string;
1484
+ title: string;
1485
+ pattern: (string | {
1486
+ id: string;
1487
+ matchFn: (expression: any, typeObject: any) => any;
1488
+ })[];
1489
+ type: string;
1490
+ })[] | {
1491
+ type: string;
1492
+ id: any;
1493
+ title: any;
1494
+ customMatch: (where: any, params: any, typeObject: any) => {
1495
+ matchSuccess: true;
1496
+ expression: any;
1497
+ } | {
1498
+ matchSuccess: boolean;
1499
+ expression?: undefined;
1500
+ };
1501
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1502
+ expression: any;
1503
+ params: {};
1504
+ };
1505
+ }[];
1506
+ ":filter-type/file-reference-collection": ({
1507
+ id: string;
1508
+ title: string;
1509
+ customMatch: (where: any, params: any, typeObject: any) => {
1510
+ matchSuccess: true;
1511
+ expression: any[];
1512
+ value: any;
1513
+ } | {
1514
+ matchSuccess: boolean;
1515
+ expression?: undefined;
1516
+ value?: undefined;
1517
+ };
1518
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1519
+ expression: any;
1520
+ params: {};
1521
+ };
1522
+ type: string;
1523
+ } | {
1524
+ id: string;
1525
+ title: string;
1526
+ pattern: (string | {
1527
+ id: string;
1528
+ value: any;
1529
+ matchFn: (x: any) => boolean;
1530
+ } | (string | {
1531
+ id: string;
1532
+ matchFn: (expression: any, typeObject: any) => boolean;
1533
+ })[])[];
1534
+ type: string;
1535
+ })[] | ({
1536
+ id: string;
1537
+ title: string;
1538
+ pattern: (string | {
1539
+ id: string;
1540
+ matchFn: (expression: any, typeObject: any) => any;
1541
+ })[];
1542
+ type: string;
1543
+ } | {
1544
+ id: string;
1545
+ title: string;
1546
+ pattern: (string | {
1547
+ id: string;
1548
+ value: any;
1549
+ matchFn: (x: any) => boolean;
1550
+ } | (string | {
1551
+ id: string;
1552
+ matchFn: (expression: any, typeObject: any) => any;
1553
+ })[])[];
1554
+ type: string;
1555
+ } | {
1556
+ id: string;
1557
+ title: string;
1558
+ customMatch: (where: any, params: any, typeObject: any) => {
1559
+ matchSuccess: true;
1560
+ expression: any;
1561
+ value: {
1562
+ withinRangeStart: any;
1563
+ withinRangeEnd: any;
1564
+ };
1565
+ } | {
1566
+ matchSuccess: boolean;
1567
+ expression?: undefined;
1568
+ value?: undefined;
1569
+ };
1570
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1571
+ expression: (string | any[])[];
1572
+ params: {
1573
+ [x: number]: any;
1574
+ };
1575
+ };
1576
+ type: string;
1577
+ })[] | ({
1578
+ id: any;
1579
+ title: any;
1580
+ customMatch: (where: any, params: any, typeObject: any) => {
1581
+ matchSuccess: true;
1582
+ expression: any;
1583
+ value: any;
1584
+ } | {
1585
+ matchSuccess: boolean;
1586
+ expression?: undefined;
1587
+ value?: undefined;
1588
+ };
1589
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1590
+ expression: any[];
1591
+ params: {
1592
+ [x: number]: any;
1593
+ };
1594
+ };
1595
+ type: string;
1596
+ } | {
1597
+ id: string;
1598
+ title: string;
1599
+ pattern: (string | {
1600
+ id: string;
1601
+ value: any;
1602
+ matchFn: (x: any) => boolean;
1603
+ } | (string | {
1604
+ id: string;
1605
+ matchFn: (expression: any, typeObject: any) => any;
1606
+ })[])[];
1607
+ type: string;
1608
+ })[] | ({
1609
+ id: string;
1610
+ title: string;
1611
+ pattern: (string | {
1612
+ id: string;
1613
+ matchFn: (_x: any) => boolean;
1614
+ } | (string | {
1615
+ id: string;
1616
+ matchFn: (expression: any, typeObject: any) => any;
1617
+ })[])[];
1618
+ type: string;
1619
+ } | {
1620
+ id: string;
1621
+ title: string;
1622
+ pattern: (string | {
1623
+ id: string;
1624
+ matchFn: (expression: any, typeObject: any) => any;
1625
+ })[];
1626
+ type: string;
1627
+ })[] | {
1628
+ type: string;
1629
+ id: any;
1630
+ title: any;
1631
+ customMatch: (where: any, params: any, typeObject: any) => {
1632
+ matchSuccess: true;
1633
+ expression: any;
1634
+ } | {
1635
+ matchSuccess: boolean;
1636
+ expression?: undefined;
1637
+ };
1638
+ customConvertToWhereExpression: (expression: any, value: any, getNextParamName: any) => {
1639
+ expression: any;
1640
+ params: {};
1641
+ };
1642
+ }[];
1197
1643
  ":filter-type/reference": ({
1198
1644
  id: string;
1199
1645
  title: string;
@@ -593,6 +593,9 @@ exports.operatorDateTimeIsAfter = (0, operatorUtils_1.getCompareOperatorForDateT
593
593
  exports.operatorDateTimeIsOnOrBefore = (0, operatorUtils_1.getCompareOperatorForDateTime)(":operator/date-time-is-on-or-before", "is on or earlier than", "<=", false);
594
594
  exports.operatorDateTimeIsOnOrAfter = (0, operatorUtils_1.getCompareOperatorForDateTime)(":operator/date-time-is-on-or-after", "is on or later than", ">=", true);
595
595
  exports.operatorsGroupsWithoutMe = {
596
+ ":filter-type/comment-reference-collection": [exports.operatorCollectionIsEmpty, exports.operatorCollectionIsNotEmpty],
597
+ ":filter-type/file-reference": [exports.operatorReferenceIsEmpty, exports.operatorReferenceIsNotEmpty],
598
+ ":filter-type/file-reference-collection": [exports.operatorCollectionIsEmpty, exports.operatorCollectionIsNotEmpty],
596
599
  ":filter-type/reference": [
597
600
  exports.operatorReferenceIsAnyOf,
598
601
  exports.operatorReferenceIsNoneOf,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/expression-utils",
3
- "version": "9.5.3",
3
+ "version": "9.5.4",
4
4
  "description": "utils for working with fibery api expressions",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -11,55 +11,39 @@
11
11
  "types": "./lib/index.d.ts",
12
12
  "default": "./lib/index.js"
13
13
  },
14
- "./src/visitors": {
15
- "types": "./lib/src/visitors.d.ts",
16
- "default": "./lib/src/visitors.js"
14
+ "./src/*": {
15
+ "types": "./lib/src/*.d.ts",
16
+ "default": "./lib/src/*.js"
17
17
  },
18
- "./src/utils": {
19
- "types": "./lib/src/utils.d.ts",
20
- "default": "./lib/src/utils.js"
21
- },
22
- "./src/params-placeholders": {
23
- "types": "./lib/src/params-placeholders.d.ts",
24
- "default": "./lib/src/params-placeholders.js"
25
- },
26
- "./src/context-variables": {
27
- "types": "./lib/src/context-variables.d.ts",
28
- "default": "./lib/src/context-variables.js"
18
+ "./src/filter-expression": {
19
+ "types": "./lib/src/filter-expression/index.d.ts",
20
+ "default": "./lib/src/filter-expression/index.js"
29
21
  }
30
22
  },
31
23
  "fiberyDevExports": {
32
24
  ".": "./index.ts",
33
- "./src/utils": "./src/utils.ts",
34
- "./src/visitors": "./src/visitors.ts",
35
- "./src/params-placeholders": "./src/params-placeholders.ts",
36
- "./src/context-variables": "./src/context-variables.ts",
37
- "./src/filter-expression": "./src/filter-expression/index.ts",
38
- "./src/filter-expression/pattern-match": "./src/filter-expression/pattern-match.ts",
39
- "./src/filter-expression/operators": "./src/filter-expression/operators.js",
40
- "./src/filter-expression/patternMatchPlaceholders": "./src/filter-expression/patternMatchPlaceholders.js",
41
- "./src/filter-expression/patternToExpression": "./src/filter-expression/patternToExpression.js"
25
+ "./src/*": "./src/*"
42
26
  },
43
27
  "private": false,
44
28
  "dependencies": {
45
29
  "lodash": "4.17.21",
46
30
  "moment": "2.29.4",
47
31
  "uuid": "11.1.0",
48
- "@fibery/helpers": "1.3.3"
32
+ "@fibery/helpers": "1.3.4"
49
33
  },
50
34
  "devDependencies": {
51
- "@babel/core": "7.23.9",
35
+ "@babel/core": "7.28.5",
36
+ "@swc/jest": "0.2.39",
52
37
  "@types/lodash": "4.14.172",
53
- "@swc/jest": "0.2.29",
54
- "jest": "27.5.1",
55
- "jest-junit": "13.0.0",
56
- "typescript": "5.8.3",
57
- "@fibery/babel-preset": "7.4.0",
58
- "@fibery/schema": "10.2.8",
59
- "@fibery/eslint-config": "8.6.1"
38
+ "jest": "30.2.0",
39
+ "jest-junit": "16.0.0",
40
+ "typescript": "5.9.3",
41
+ "@fibery/babel-preset": "7.4.1",
42
+ "@fibery/eslint-config": "8.6.2",
43
+ "@fibery/schema": "10.2.9"
60
44
  },
61
45
  "peerDependencies": {
62
- "@fibery/schema": "10.2.8"
46
+ "@fibery/schema": "10.2.9"
63
47
  },
64
48
  "jest": {
65
49
  "testEnvironment": "node",
@@ -97,7 +81,9 @@
97
81
  }
98
82
  ]
99
83
  },
100
- "testURL": "http://localhost"
84
+ "testEnvironmentOptions": {
85
+ "url": "http://localhost"
86
+ }
101
87
  },
102
88
  "scripts": {
103
89
  "build": "rm -rf lib && pnpm exec tsc --project tsconfig.build.json",