@ronin/compiler 0.6.1 → 0.7.0

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/dist/index.d.ts CHANGED
@@ -1177,14 +1177,34 @@ declare const GetInstructionsSchema: z.ZodObject<Omit<{
1177
1177
  including: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLazy<z.ZodTypeAny>]>>>;
1178
1178
  selecting: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1179
1179
  orderedBy: z.ZodOptional<z.ZodOptional<z.ZodObject<{
1180
- ascending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1181
- descending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1180
+ ascending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1181
+ __RONIN_EXPRESSION: z.ZodString;
1182
+ }, "strip", z.ZodTypeAny, {
1183
+ __RONIN_EXPRESSION: string;
1184
+ }, {
1185
+ __RONIN_EXPRESSION: string;
1186
+ }>]>, "many">>;
1187
+ descending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1188
+ __RONIN_EXPRESSION: z.ZodString;
1189
+ }, "strip", z.ZodTypeAny, {
1190
+ __RONIN_EXPRESSION: string;
1191
+ }, {
1192
+ __RONIN_EXPRESSION: string;
1193
+ }>]>, "many">>;
1182
1194
  }, "strip", z.ZodTypeAny, {
1183
- ascending?: string[] | undefined;
1184
- descending?: string[] | undefined;
1195
+ ascending?: (string | {
1196
+ __RONIN_EXPRESSION: string;
1197
+ })[] | undefined;
1198
+ descending?: (string | {
1199
+ __RONIN_EXPRESSION: string;
1200
+ })[] | undefined;
1185
1201
  }, {
1186
- ascending?: string[] | undefined;
1187
- descending?: string[] | undefined;
1202
+ ascending?: (string | {
1203
+ __RONIN_EXPRESSION: string;
1204
+ })[] | undefined;
1205
+ descending?: (string | {
1206
+ __RONIN_EXPRESSION: string;
1207
+ })[] | undefined;
1188
1208
  }>>>;
1189
1209
  before: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1190
1210
  after: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -1195,8 +1215,12 @@ declare const GetInstructionsSchema: z.ZodObject<Omit<{
1195
1215
  including?: Record<string, any> | undefined;
1196
1216
  selecting?: string[] | undefined;
1197
1217
  orderedBy?: {
1198
- ascending?: string[] | undefined;
1199
- descending?: string[] | undefined;
1218
+ ascending?: (string | {
1219
+ __RONIN_EXPRESSION: string;
1220
+ })[] | undefined;
1221
+ descending?: (string | {
1222
+ __RONIN_EXPRESSION: string;
1223
+ })[] | undefined;
1200
1224
  } | undefined;
1201
1225
  before?: string | null | undefined;
1202
1226
  after?: string | null | undefined;
@@ -1207,8 +1231,12 @@ declare const GetInstructionsSchema: z.ZodObject<Omit<{
1207
1231
  including?: Record<string, any> | undefined;
1208
1232
  selecting?: string[] | undefined;
1209
1233
  orderedBy?: {
1210
- ascending?: string[] | undefined;
1211
- descending?: string[] | undefined;
1234
+ ascending?: (string | {
1235
+ __RONIN_EXPRESSION: string;
1236
+ })[] | undefined;
1237
+ descending?: (string | {
1238
+ __RONIN_EXPRESSION: string;
1239
+ })[] | undefined;
1212
1240
  } | undefined;
1213
1241
  before?: string | null | undefined;
1214
1242
  after?: string | null | undefined;
@@ -2002,14 +2030,34 @@ declare const QuerySchema: z.ZodObject<{
2002
2030
  including: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLazy<z.ZodTypeAny>]>>>;
2003
2031
  selecting: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2004
2032
  orderedBy: z.ZodOptional<z.ZodOptional<z.ZodObject<{
2005
- ascending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2006
- descending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2033
+ ascending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
2034
+ __RONIN_EXPRESSION: z.ZodString;
2035
+ }, "strip", z.ZodTypeAny, {
2036
+ __RONIN_EXPRESSION: string;
2037
+ }, {
2038
+ __RONIN_EXPRESSION: string;
2039
+ }>]>, "many">>;
2040
+ descending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
2041
+ __RONIN_EXPRESSION: z.ZodString;
2042
+ }, "strip", z.ZodTypeAny, {
2043
+ __RONIN_EXPRESSION: string;
2044
+ }, {
2045
+ __RONIN_EXPRESSION: string;
2046
+ }>]>, "many">>;
2007
2047
  }, "strip", z.ZodTypeAny, {
2008
- ascending?: string[] | undefined;
2009
- descending?: string[] | undefined;
2048
+ ascending?: (string | {
2049
+ __RONIN_EXPRESSION: string;
2050
+ })[] | undefined;
2051
+ descending?: (string | {
2052
+ __RONIN_EXPRESSION: string;
2053
+ })[] | undefined;
2010
2054
  }, {
2011
- ascending?: string[] | undefined;
2012
- descending?: string[] | undefined;
2055
+ ascending?: (string | {
2056
+ __RONIN_EXPRESSION: string;
2057
+ })[] | undefined;
2058
+ descending?: (string | {
2059
+ __RONIN_EXPRESSION: string;
2060
+ })[] | undefined;
2013
2061
  }>>>;
2014
2062
  before: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
2015
2063
  after: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -2020,8 +2068,12 @@ declare const QuerySchema: z.ZodObject<{
2020
2068
  including?: Record<string, any> | undefined;
2021
2069
  selecting?: string[] | undefined;
2022
2070
  orderedBy?: {
2023
- ascending?: string[] | undefined;
2024
- descending?: string[] | undefined;
2071
+ ascending?: (string | {
2072
+ __RONIN_EXPRESSION: string;
2073
+ })[] | undefined;
2074
+ descending?: (string | {
2075
+ __RONIN_EXPRESSION: string;
2076
+ })[] | undefined;
2025
2077
  } | undefined;
2026
2078
  before?: string | null | undefined;
2027
2079
  after?: string | null | undefined;
@@ -2032,8 +2084,12 @@ declare const QuerySchema: z.ZodObject<{
2032
2084
  including?: Record<string, any> | undefined;
2033
2085
  selecting?: string[] | undefined;
2034
2086
  orderedBy?: {
2035
- ascending?: string[] | undefined;
2036
- descending?: string[] | undefined;
2087
+ ascending?: (string | {
2088
+ __RONIN_EXPRESSION: string;
2089
+ })[] | undefined;
2090
+ descending?: (string | {
2091
+ __RONIN_EXPRESSION: string;
2092
+ })[] | undefined;
2037
2093
  } | undefined;
2038
2094
  before?: string | null | undefined;
2039
2095
  after?: string | null | undefined;
@@ -2826,14 +2882,34 @@ declare const QuerySchema: z.ZodObject<{
2826
2882
  including: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLazy<z.ZodTypeAny>]>>>;
2827
2883
  selecting: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2828
2884
  orderedBy: z.ZodOptional<z.ZodOptional<z.ZodObject<{
2829
- ascending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2830
- descending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2885
+ ascending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
2886
+ __RONIN_EXPRESSION: z.ZodString;
2887
+ }, "strip", z.ZodTypeAny, {
2888
+ __RONIN_EXPRESSION: string;
2889
+ }, {
2890
+ __RONIN_EXPRESSION: string;
2891
+ }>]>, "many">>;
2892
+ descending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
2893
+ __RONIN_EXPRESSION: z.ZodString;
2894
+ }, "strip", z.ZodTypeAny, {
2895
+ __RONIN_EXPRESSION: string;
2896
+ }, {
2897
+ __RONIN_EXPRESSION: string;
2898
+ }>]>, "many">>;
2831
2899
  }, "strip", z.ZodTypeAny, {
2832
- ascending?: string[] | undefined;
2833
- descending?: string[] | undefined;
2900
+ ascending?: (string | {
2901
+ __RONIN_EXPRESSION: string;
2902
+ })[] | undefined;
2903
+ descending?: (string | {
2904
+ __RONIN_EXPRESSION: string;
2905
+ })[] | undefined;
2834
2906
  }, {
2835
- ascending?: string[] | undefined;
2836
- descending?: string[] | undefined;
2907
+ ascending?: (string | {
2908
+ __RONIN_EXPRESSION: string;
2909
+ })[] | undefined;
2910
+ descending?: (string | {
2911
+ __RONIN_EXPRESSION: string;
2912
+ })[] | undefined;
2837
2913
  }>>>;
2838
2914
  before: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
2839
2915
  after: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -2846,8 +2922,12 @@ declare const QuerySchema: z.ZodObject<{
2846
2922
  including?: Record<string, any> | undefined;
2847
2923
  selecting?: string[] | undefined;
2848
2924
  orderedBy?: {
2849
- ascending?: string[] | undefined;
2850
- descending?: string[] | undefined;
2925
+ ascending?: (string | {
2926
+ __RONIN_EXPRESSION: string;
2927
+ })[] | undefined;
2928
+ descending?: (string | {
2929
+ __RONIN_EXPRESSION: string;
2930
+ })[] | undefined;
2851
2931
  } | undefined;
2852
2932
  before?: string | null | undefined;
2853
2933
  after?: string | null | undefined;
@@ -2857,8 +2937,12 @@ declare const QuerySchema: z.ZodObject<{
2857
2937
  including?: Record<string, any> | undefined;
2858
2938
  selecting?: string[] | undefined;
2859
2939
  orderedBy?: {
2860
- ascending?: string[] | undefined;
2861
- descending?: string[] | undefined;
2940
+ ascending?: (string | {
2941
+ __RONIN_EXPRESSION: string;
2942
+ })[] | undefined;
2943
+ descending?: (string | {
2944
+ __RONIN_EXPRESSION: string;
2945
+ })[] | undefined;
2862
2946
  } | undefined;
2863
2947
  before?: string | null | undefined;
2864
2948
  after?: string | null | undefined;
@@ -3650,14 +3734,34 @@ declare const QuerySchema: z.ZodObject<{
3650
3734
  including: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLazy<z.ZodTypeAny>]>>>;
3651
3735
  selecting: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3652
3736
  orderedBy: z.ZodOptional<z.ZodOptional<z.ZodObject<{
3653
- ascending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3654
- descending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3737
+ ascending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
3738
+ __RONIN_EXPRESSION: z.ZodString;
3739
+ }, "strip", z.ZodTypeAny, {
3740
+ __RONIN_EXPRESSION: string;
3741
+ }, {
3742
+ __RONIN_EXPRESSION: string;
3743
+ }>]>, "many">>;
3744
+ descending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
3745
+ __RONIN_EXPRESSION: z.ZodString;
3746
+ }, "strip", z.ZodTypeAny, {
3747
+ __RONIN_EXPRESSION: string;
3748
+ }, {
3749
+ __RONIN_EXPRESSION: string;
3750
+ }>]>, "many">>;
3655
3751
  }, "strip", z.ZodTypeAny, {
3656
- ascending?: string[] | undefined;
3657
- descending?: string[] | undefined;
3752
+ ascending?: (string | {
3753
+ __RONIN_EXPRESSION: string;
3754
+ })[] | undefined;
3755
+ descending?: (string | {
3756
+ __RONIN_EXPRESSION: string;
3757
+ })[] | undefined;
3658
3758
  }, {
3659
- ascending?: string[] | undefined;
3660
- descending?: string[] | undefined;
3759
+ ascending?: (string | {
3760
+ __RONIN_EXPRESSION: string;
3761
+ })[] | undefined;
3762
+ descending?: (string | {
3763
+ __RONIN_EXPRESSION: string;
3764
+ })[] | undefined;
3661
3765
  }>>>;
3662
3766
  before: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
3663
3767
  after: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -3668,8 +3772,12 @@ declare const QuerySchema: z.ZodObject<{
3668
3772
  including?: Record<string, any> | undefined;
3669
3773
  selecting?: string[] | undefined;
3670
3774
  orderedBy?: {
3671
- ascending?: string[] | undefined;
3672
- descending?: string[] | undefined;
3775
+ ascending?: (string | {
3776
+ __RONIN_EXPRESSION: string;
3777
+ })[] | undefined;
3778
+ descending?: (string | {
3779
+ __RONIN_EXPRESSION: string;
3780
+ })[] | undefined;
3673
3781
  } | undefined;
3674
3782
  before?: string | null | undefined;
3675
3783
  after?: string | null | undefined;
@@ -3680,8 +3788,12 @@ declare const QuerySchema: z.ZodObject<{
3680
3788
  including?: Record<string, any> | undefined;
3681
3789
  selecting?: string[] | undefined;
3682
3790
  orderedBy?: {
3683
- ascending?: string[] | undefined;
3684
- descending?: string[] | undefined;
3791
+ ascending?: (string | {
3792
+ __RONIN_EXPRESSION: string;
3793
+ })[] | undefined;
3794
+ descending?: (string | {
3795
+ __RONIN_EXPRESSION: string;
3796
+ })[] | undefined;
3685
3797
  } | undefined;
3686
3798
  before?: string | null | undefined;
3687
3799
  after?: string | null | undefined;
@@ -4474,14 +4586,34 @@ declare const QuerySchema: z.ZodObject<{
4474
4586
  including: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLazy<z.ZodTypeAny>]>>>;
4475
4587
  selecting: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4476
4588
  orderedBy: z.ZodOptional<z.ZodOptional<z.ZodObject<{
4477
- ascending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4478
- descending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4589
+ ascending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
4590
+ __RONIN_EXPRESSION: z.ZodString;
4591
+ }, "strip", z.ZodTypeAny, {
4592
+ __RONIN_EXPRESSION: string;
4593
+ }, {
4594
+ __RONIN_EXPRESSION: string;
4595
+ }>]>, "many">>;
4596
+ descending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
4597
+ __RONIN_EXPRESSION: z.ZodString;
4598
+ }, "strip", z.ZodTypeAny, {
4599
+ __RONIN_EXPRESSION: string;
4600
+ }, {
4601
+ __RONIN_EXPRESSION: string;
4602
+ }>]>, "many">>;
4479
4603
  }, "strip", z.ZodTypeAny, {
4480
- ascending?: string[] | undefined;
4481
- descending?: string[] | undefined;
4604
+ ascending?: (string | {
4605
+ __RONIN_EXPRESSION: string;
4606
+ })[] | undefined;
4607
+ descending?: (string | {
4608
+ __RONIN_EXPRESSION: string;
4609
+ })[] | undefined;
4482
4610
  }, {
4483
- ascending?: string[] | undefined;
4484
- descending?: string[] | undefined;
4611
+ ascending?: (string | {
4612
+ __RONIN_EXPRESSION: string;
4613
+ })[] | undefined;
4614
+ descending?: (string | {
4615
+ __RONIN_EXPRESSION: string;
4616
+ })[] | undefined;
4485
4617
  }>>>;
4486
4618
  before: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
4487
4619
  after: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -4492,8 +4624,12 @@ declare const QuerySchema: z.ZodObject<{
4492
4624
  including?: Record<string, any> | undefined;
4493
4625
  selecting?: string[] | undefined;
4494
4626
  orderedBy?: {
4495
- ascending?: string[] | undefined;
4496
- descending?: string[] | undefined;
4627
+ ascending?: (string | {
4628
+ __RONIN_EXPRESSION: string;
4629
+ })[] | undefined;
4630
+ descending?: (string | {
4631
+ __RONIN_EXPRESSION: string;
4632
+ })[] | undefined;
4497
4633
  } | undefined;
4498
4634
  before?: string | null | undefined;
4499
4635
  after?: string | null | undefined;
@@ -4504,8 +4640,12 @@ declare const QuerySchema: z.ZodObject<{
4504
4640
  including?: Record<string, any> | undefined;
4505
4641
  selecting?: string[] | undefined;
4506
4642
  orderedBy?: {
4507
- ascending?: string[] | undefined;
4508
- descending?: string[] | undefined;
4643
+ ascending?: (string | {
4644
+ __RONIN_EXPRESSION: string;
4645
+ })[] | undefined;
4646
+ descending?: (string | {
4647
+ __RONIN_EXPRESSION: string;
4648
+ })[] | undefined;
4509
4649
  } | undefined;
4510
4650
  before?: string | null | undefined;
4511
4651
  after?: string | null | undefined;
@@ -5298,14 +5438,34 @@ declare const QuerySchema: z.ZodObject<{
5298
5438
  including: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLazy<z.ZodTypeAny>]>>>;
5299
5439
  selecting: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5300
5440
  orderedBy: z.ZodOptional<z.ZodOptional<z.ZodObject<{
5301
- ascending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5302
- descending: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5441
+ ascending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
5442
+ __RONIN_EXPRESSION: z.ZodString;
5443
+ }, "strip", z.ZodTypeAny, {
5444
+ __RONIN_EXPRESSION: string;
5445
+ }, {
5446
+ __RONIN_EXPRESSION: string;
5447
+ }>]>, "many">>;
5448
+ descending: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
5449
+ __RONIN_EXPRESSION: z.ZodString;
5450
+ }, "strip", z.ZodTypeAny, {
5451
+ __RONIN_EXPRESSION: string;
5452
+ }, {
5453
+ __RONIN_EXPRESSION: string;
5454
+ }>]>, "many">>;
5303
5455
  }, "strip", z.ZodTypeAny, {
5304
- ascending?: string[] | undefined;
5305
- descending?: string[] | undefined;
5456
+ ascending?: (string | {
5457
+ __RONIN_EXPRESSION: string;
5458
+ })[] | undefined;
5459
+ descending?: (string | {
5460
+ __RONIN_EXPRESSION: string;
5461
+ })[] | undefined;
5306
5462
  }, {
5307
- ascending?: string[] | undefined;
5308
- descending?: string[] | undefined;
5463
+ ascending?: (string | {
5464
+ __RONIN_EXPRESSION: string;
5465
+ })[] | undefined;
5466
+ descending?: (string | {
5467
+ __RONIN_EXPRESSION: string;
5468
+ })[] | undefined;
5309
5469
  }>>>;
5310
5470
  before: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
5311
5471
  after: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -5319,8 +5479,12 @@ declare const QuerySchema: z.ZodObject<{
5319
5479
  including?: Record<string, any> | undefined;
5320
5480
  selecting?: string[] | undefined;
5321
5481
  orderedBy?: {
5322
- ascending?: string[] | undefined;
5323
- descending?: string[] | undefined;
5482
+ ascending?: (string | {
5483
+ __RONIN_EXPRESSION: string;
5484
+ })[] | undefined;
5485
+ descending?: (string | {
5486
+ __RONIN_EXPRESSION: string;
5487
+ })[] | undefined;
5324
5488
  } | undefined;
5325
5489
  before?: string | null | undefined;
5326
5490
  after?: string | null | undefined;
@@ -5332,8 +5496,12 @@ declare const QuerySchema: z.ZodObject<{
5332
5496
  including?: Record<string, any> | undefined;
5333
5497
  selecting?: string[] | undefined;
5334
5498
  orderedBy?: {
5335
- ascending?: string[] | undefined;
5336
- descending?: string[] | undefined;
5499
+ ascending?: (string | {
5500
+ __RONIN_EXPRESSION: string;
5501
+ })[] | undefined;
5502
+ descending?: (string | {
5503
+ __RONIN_EXPRESSION: string;
5504
+ })[] | undefined;
5337
5505
  } | undefined;
5338
5506
  before?: string | null | undefined;
5339
5507
  after?: string | null | undefined;
@@ -5346,8 +5514,12 @@ declare const QuerySchema: z.ZodObject<{
5346
5514
  including?: Record<string, any> | undefined;
5347
5515
  selecting?: string[] | undefined;
5348
5516
  orderedBy?: {
5349
- ascending?: string[] | undefined;
5350
- descending?: string[] | undefined;
5517
+ ascending?: (string | {
5518
+ __RONIN_EXPRESSION: string;
5519
+ })[] | undefined;
5520
+ descending?: (string | {
5521
+ __RONIN_EXPRESSION: string;
5522
+ })[] | undefined;
5351
5523
  } | undefined;
5352
5524
  before?: string | null | undefined;
5353
5525
  after?: string | null | undefined;
@@ -5360,8 +5532,12 @@ declare const QuerySchema: z.ZodObject<{
5360
5532
  including?: Record<string, any> | undefined;
5361
5533
  selecting?: string[] | undefined;
5362
5534
  orderedBy?: {
5363
- ascending?: string[] | undefined;
5364
- descending?: string[] | undefined;
5535
+ ascending?: (string | {
5536
+ __RONIN_EXPRESSION: string;
5537
+ })[] | undefined;
5538
+ descending?: (string | {
5539
+ __RONIN_EXPRESSION: string;
5540
+ })[] | undefined;
5365
5541
  } | undefined;
5366
5542
  before?: string | null | undefined;
5367
5543
  after?: string | null | undefined;
@@ -5373,8 +5549,12 @@ declare const QuerySchema: z.ZodObject<{
5373
5549
  including?: Record<string, any> | undefined;
5374
5550
  selecting?: string[] | undefined;
5375
5551
  orderedBy?: {
5376
- ascending?: string[] | undefined;
5377
- descending?: string[] | undefined;
5552
+ ascending?: (string | {
5553
+ __RONIN_EXPRESSION: string;
5554
+ })[] | undefined;
5555
+ descending?: (string | {
5556
+ __RONIN_EXPRESSION: string;
5557
+ })[] | undefined;
5378
5558
  } | undefined;
5379
5559
  before?: string | null | undefined;
5380
5560
  after?: string | null | undefined;
@@ -5386,8 +5566,12 @@ declare const QuerySchema: z.ZodObject<{
5386
5566
  including?: Record<string, any> | undefined;
5387
5567
  selecting?: string[] | undefined;
5388
5568
  orderedBy?: {
5389
- ascending?: string[] | undefined;
5390
- descending?: string[] | undefined;
5569
+ ascending?: (string | {
5570
+ __RONIN_EXPRESSION: string;
5571
+ })[] | undefined;
5572
+ descending?: (string | {
5573
+ __RONIN_EXPRESSION: string;
5574
+ })[] | undefined;
5391
5575
  } | undefined;
5392
5576
  before?: string | null | undefined;
5393
5577
  after?: string | null | undefined;
@@ -5398,8 +5582,12 @@ declare const QuerySchema: z.ZodObject<{
5398
5582
  including?: Record<string, any> | undefined;
5399
5583
  selecting?: string[] | undefined;
5400
5584
  orderedBy?: {
5401
- ascending?: string[] | undefined;
5402
- descending?: string[] | undefined;
5585
+ ascending?: (string | {
5586
+ __RONIN_EXPRESSION: string;
5587
+ })[] | undefined;
5588
+ descending?: (string | {
5589
+ __RONIN_EXPRESSION: string;
5590
+ })[] | undefined;
5403
5591
  } | undefined;
5404
5592
  before?: string | null | undefined;
5405
5593
  after?: string | null | undefined;
@@ -5412,8 +5600,12 @@ declare const QuerySchema: z.ZodObject<{
5412
5600
  including?: Record<string, any> | undefined;
5413
5601
  selecting?: string[] | undefined;
5414
5602
  orderedBy?: {
5415
- ascending?: string[] | undefined;
5416
- descending?: string[] | undefined;
5603
+ ascending?: (string | {
5604
+ __RONIN_EXPRESSION: string;
5605
+ })[] | undefined;
5606
+ descending?: (string | {
5607
+ __RONIN_EXPRESSION: string;
5608
+ })[] | undefined;
5417
5609
  } | undefined;
5418
5610
  before?: string | null | undefined;
5419
5611
  after?: string | null | undefined;
@@ -5426,8 +5618,12 @@ declare const QuerySchema: z.ZodObject<{
5426
5618
  including?: Record<string, any> | undefined;
5427
5619
  selecting?: string[] | undefined;
5428
5620
  orderedBy?: {
5429
- ascending?: string[] | undefined;
5430
- descending?: string[] | undefined;
5621
+ ascending?: (string | {
5622
+ __RONIN_EXPRESSION: string;
5623
+ })[] | undefined;
5624
+ descending?: (string | {
5625
+ __RONIN_EXPRESSION: string;
5626
+ })[] | undefined;
5431
5627
  } | undefined;
5432
5628
  before?: string | null | undefined;
5433
5629
  after?: string | null | undefined;
@@ -5439,8 +5635,12 @@ declare const QuerySchema: z.ZodObject<{
5439
5635
  including?: Record<string, any> | undefined;
5440
5636
  selecting?: string[] | undefined;
5441
5637
  orderedBy?: {
5442
- ascending?: string[] | undefined;
5443
- descending?: string[] | undefined;
5638
+ ascending?: (string | {
5639
+ __RONIN_EXPRESSION: string;
5640
+ })[] | undefined;
5641
+ descending?: (string | {
5642
+ __RONIN_EXPRESSION: string;
5643
+ })[] | undefined;
5444
5644
  } | undefined;
5445
5645
  before?: string | null | undefined;
5446
5646
  after?: string | null | undefined;
@@ -5452,8 +5652,12 @@ declare const QuerySchema: z.ZodObject<{
5452
5652
  including?: Record<string, any> | undefined;
5453
5653
  selecting?: string[] | undefined;
5454
5654
  orderedBy?: {
5455
- ascending?: string[] | undefined;
5456
- descending?: string[] | undefined;
5655
+ ascending?: (string | {
5656
+ __RONIN_EXPRESSION: string;
5657
+ })[] | undefined;
5658
+ descending?: (string | {
5659
+ __RONIN_EXPRESSION: string;
5660
+ })[] | undefined;
5457
5661
  } | undefined;
5458
5662
  before?: string | null | undefined;
5459
5663
  after?: string | null | undefined;
@@ -5464,8 +5668,12 @@ declare const QuerySchema: z.ZodObject<{
5464
5668
  including?: Record<string, any> | undefined;
5465
5669
  selecting?: string[] | undefined;
5466
5670
  orderedBy?: {
5467
- ascending?: string[] | undefined;
5468
- descending?: string[] | undefined;
5671
+ ascending?: (string | {
5672
+ __RONIN_EXPRESSION: string;
5673
+ })[] | undefined;
5674
+ descending?: (string | {
5675
+ __RONIN_EXPRESSION: string;
5676
+ })[] | undefined;
5469
5677
  } | undefined;
5470
5678
  before?: string | null | undefined;
5471
5679
  after?: string | null | undefined;
@@ -5483,7 +5691,7 @@ interface Statement {
5483
5691
  returning?: boolean;
5484
5692
  }
5485
5693
 
5486
- type SchemaFieldBasics = {
5694
+ type ModelFieldBasics = {
5487
5695
  name?: string;
5488
5696
  slug: string;
5489
5697
  displayAs?: string;
@@ -5491,21 +5699,21 @@ type SchemaFieldBasics = {
5491
5699
  required?: boolean;
5492
5700
  defaultValue?: unknown;
5493
5701
  };
5494
- type SchemaFieldNormal = SchemaFieldBasics & {
5702
+ type ModelFieldNormal = ModelFieldBasics & {
5495
5703
  type: 'string' | 'number' | 'boolean' | 'date' | 'json' | 'group';
5496
5704
  };
5497
- type SchemaFieldReferenceAction = 'CASCADE' | 'RESTRICT' | 'SET NULL' | 'SET DEFAULT' | 'NO ACTION';
5498
- type SchemaFieldReference = SchemaFieldBasics & {
5705
+ type ModelFieldReferenceAction = 'CASCADE' | 'RESTRICT' | 'SET NULL' | 'SET DEFAULT' | 'NO ACTION';
5706
+ type ModelFieldReference = ModelFieldBasics & {
5499
5707
  type: 'reference';
5500
- target: Omit<Partial<Schema>, 'slug'> & Pick<Schema, 'slug'>;
5708
+ target: Omit<Partial<Model>, 'slug'> & Pick<Model, 'slug'>;
5501
5709
  kind?: 'one' | 'many';
5502
5710
  actions?: {
5503
- onDelete?: SchemaFieldReferenceAction;
5504
- onUpdate?: SchemaFieldReferenceAction;
5711
+ onDelete?: ModelFieldReferenceAction;
5712
+ onUpdate?: ModelFieldReferenceAction;
5505
5713
  };
5506
5714
  };
5507
- type SchemaField = SchemaFieldNormal | SchemaFieldReference;
5508
- type SchemaIndexField = {
5715
+ type ModelField = ModelFieldNormal | ModelFieldReference;
5716
+ type ModelIndexField = {
5509
5717
  /** The collating sequence used for text placed inside the field. */
5510
5718
  collation?: 'BINARY' | 'NOCASE' | 'RTRIM';
5511
5719
  /** How the records in the index should be ordered. */
@@ -5517,11 +5725,11 @@ type SchemaIndexField = {
5517
5725
  /** The field expression for which the index should be created. */
5518
5726
  expression: string;
5519
5727
  });
5520
- type SchemaIndex = {
5728
+ type ModelIndex = {
5521
5729
  /**
5522
- * The list of fields in the schema for which the index should be created.
5730
+ * The list of fields in the model for which the index should be created.
5523
5731
  */
5524
- fields: Array<SchemaIndexField>;
5732
+ fields: Array<ModelIndexField>;
5525
5733
  /**
5526
5734
  * Whether only one record with a unique value for the provided fields will be allowed.
5527
5735
  */
@@ -5532,14 +5740,14 @@ type SchemaIndex = {
5532
5740
  */
5533
5741
  filter?: WithInstruction;
5534
5742
  };
5535
- type SchemaTriggerField = {
5743
+ type ModelTriggerField = {
5536
5744
  /**
5537
5745
  * The slug of the field that should cause the trigger to fire if the value of the
5538
5746
  * field has changed.
5539
5747
  */
5540
5748
  slug: string;
5541
5749
  };
5542
- type SchemaTrigger = {
5750
+ type ModelTrigger = {
5543
5751
  /** The type of query for which the trigger should fire. */
5544
5752
  action: 'INSERT' | 'UPDATE' | 'DELETE';
5545
5753
  /** When the trigger should fire in the case that a maching query is executed. */
@@ -5547,50 +5755,63 @@ type SchemaTrigger = {
5547
5755
  /** A list of queries that should be executed when the trigger fires. */
5548
5756
  effects: Array<Query>;
5549
5757
  /** A list of field slugs for which the trigger should fire. */
5550
- fields?: Array<SchemaTriggerField>;
5758
+ fields?: Array<ModelTriggerField>;
5551
5759
  /**
5552
5760
  * An object containing query instructions used to determine whether the trigger should
5553
5761
  * fire, or not.
5554
5762
  */
5555
5763
  filter?: WithInstruction;
5556
5764
  };
5557
- type SchemaPreset = {
5765
+ type ModelPreset = {
5558
5766
  /** The identifier that can be used for adding the preset to a query. */
5559
5767
  slug: string;
5560
5768
  /** The query instructions that should be applied when the preset is used. */
5561
5769
  instructions: GetInstructions;
5562
5770
  };
5563
- interface Schema {
5564
- name?: string;
5565
- pluralName?: string;
5771
+ interface Model {
5772
+ name: string;
5773
+ pluralName: string;
5566
5774
  slug: string;
5567
- pluralSlug?: string;
5775
+ pluralSlug: string;
5568
5776
  identifiers: {
5569
5777
  name: string;
5570
5778
  slug: string;
5571
5779
  };
5572
- idPrefix?: string;
5573
- fields?: Array<SchemaField>;
5574
- indexes?: Array<SchemaIndex>;
5575
- triggers?: Array<SchemaTrigger>;
5576
- presets?: Array<SchemaPreset>;
5780
+ idPrefix: string;
5781
+ /** The name of the table in SQLite. */
5782
+ table: string;
5783
+ /**
5784
+ * The table name to which the model was aliased. This will be set in the case that
5785
+ * multiple tables are being joined into one SQL statement.
5786
+ */
5787
+ tableAlias?: string;
5788
+ /**
5789
+ * If the model is used to associate two models with each other (in the case of
5790
+ * many-cardinality reference fields), this property should contain the field to which
5791
+ * the associative model should be mounted.
5792
+ */
5793
+ associationSlug?: string;
5794
+ fields?: Array<ModelField>;
5795
+ indexes?: Array<ModelIndex>;
5796
+ triggers?: Array<ModelTrigger>;
5797
+ presets?: Array<ModelPreset>;
5577
5798
  }
5578
- type PublicSchema = Omit<Partial<Schema>, 'slug' | 'identifiers'> & {
5579
- slug: Required<Schema['slug']>;
5580
- identifiers?: Partial<Schema['identifiers']>;
5799
+ type PublicModel = Omit<Partial<Model>, 'slug' | 'identifiers' | 'associationSlug' | 'table' | 'tableAlias'> & {
5800
+ slug: Required<Model['slug']>;
5801
+ identifiers?: Partial<Model['identifiers']>;
5581
5802
  };
5582
5803
 
5583
5804
  /**
5584
5805
  * Composes SQL statements for the provided RONIN queries.
5585
5806
  *
5586
5807
  * @param queries - The RONIN queries for which SQL statements should be composed.
5587
- * @param schemas - A list of schemas.
5808
+ * @param models - A list of models.
5588
5809
  * @param options - Additional options to adjust the behavior of the statement generation.
5589
5810
  *
5590
5811
  * @returns The composed SQL statements.
5591
5812
  */
5592
- declare const compileQueries: (queries: Array<Query>, schemas: Array<PublicSchema>, options?: {
5813
+ declare const compileQueries: (queries: Array<Query>, models: Array<PublicModel>, options?: {
5593
5814
  inlineParams?: boolean;
5594
5815
  }) => Array<Statement>;
5595
5816
 
5596
- export { type Query, type PublicSchema as Schema, type SchemaField, type SchemaIndex, type SchemaTrigger, type Statement, compileQueries };
5817
+ export { type PublicModel as Model, type ModelField, type ModelIndex, type ModelTrigger, type Query, type Statement, compileQueries };