prisma-flare 1.3.0 → 1.3.1

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.
@@ -564,53 +564,53 @@ var FLARE_BUILDER_METHODS = {
564
564
  whereConditions: [
565
565
  {
566
566
  name: "where",
567
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
567
+ signature: "(condition: WhereInput<T>): this"
568
568
  },
569
569
  {
570
570
  name: "andWhere",
571
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
571
+ signature: "(condition: WhereInput<T>): this"
572
572
  },
573
573
  {
574
574
  name: "orWhere",
575
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
575
+ signature: "(condition: WhereInput<T>): this"
576
576
  },
577
577
  {
578
578
  name: "whereGroup",
579
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): FlareBuilder<T, Args & { where: WhereInput<T> }>"
579
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this"
580
580
  },
581
581
  {
582
582
  name: "orWhereGroup",
583
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
583
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this"
584
584
  },
585
585
  {
586
586
  name: "withId",
587
- signature: "(id: number | string): FlareBuilder<T, Args & { where: { id: number | string } }>"
587
+ signature: "(id: number | string): this"
588
588
  }
589
589
  ],
590
590
  orderingAndLimiting: [
591
591
  {
592
592
  name: "order",
593
- signature: "(orderBy: OrderByInput<T>): FlareBuilder<T, Args & { orderBy: OrderByInput<T> }>"
593
+ signature: "(orderBy: OrderByInput<T>): this"
594
594
  },
595
595
  {
596
596
  name: "first",
597
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
597
+ signature: "(key?: keyof RecordType<T> | string): this"
598
598
  },
599
599
  {
600
600
  name: "last",
601
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
601
+ signature: "(key?: keyof RecordType<T> | string): this"
602
602
  },
603
603
  {
604
604
  name: "limit",
605
- signature: "(count: number): FlareBuilder<T, Args & { take: number }>"
605
+ signature: "(count: number): this"
606
606
  },
607
607
  {
608
608
  name: "skip",
609
- signature: "(count: number): FlareBuilder<T, Args & { skip: number }>"
609
+ signature: "(count: number): this"
610
610
  },
611
611
  {
612
612
  name: "distinct",
613
- signature: "(fields: DistinctInput<T>): FlareBuilder<T, Args & { distinct: DistinctInput<T> }>"
613
+ signature: "(fields: DistinctInput<T>): this"
614
614
  }
615
615
  ],
616
616
  selection: [
@@ -734,7 +734,7 @@ var FLARE_BUILDER_METHODS = {
734
734
  utilities: [
735
735
  {
736
736
  name: "when",
737
- signature: "(condition: boolean | (() => boolean), callback: (qb: FlareBuilder<T, Args>) => void): FlareBuilder<T, Args>"
737
+ signature: "(condition: boolean | (() => boolean), callback: (qb: this) => void): this"
738
738
  },
739
739
  {
740
740
  name: "chunk",
@@ -541,53 +541,53 @@ var FLARE_BUILDER_METHODS = {
541
541
  whereConditions: [
542
542
  {
543
543
  name: "where",
544
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
544
+ signature: "(condition: WhereInput<T>): this"
545
545
  },
546
546
  {
547
547
  name: "andWhere",
548
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
548
+ signature: "(condition: WhereInput<T>): this"
549
549
  },
550
550
  {
551
551
  name: "orWhere",
552
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
552
+ signature: "(condition: WhereInput<T>): this"
553
553
  },
554
554
  {
555
555
  name: "whereGroup",
556
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): FlareBuilder<T, Args & { where: WhereInput<T> }>"
556
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this"
557
557
  },
558
558
  {
559
559
  name: "orWhereGroup",
560
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
560
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this"
561
561
  },
562
562
  {
563
563
  name: "withId",
564
- signature: "(id: number | string): FlareBuilder<T, Args & { where: { id: number | string } }>"
564
+ signature: "(id: number | string): this"
565
565
  }
566
566
  ],
567
567
  orderingAndLimiting: [
568
568
  {
569
569
  name: "order",
570
- signature: "(orderBy: OrderByInput<T>): FlareBuilder<T, Args & { orderBy: OrderByInput<T> }>"
570
+ signature: "(orderBy: OrderByInput<T>): this"
571
571
  },
572
572
  {
573
573
  name: "first",
574
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
574
+ signature: "(key?: keyof RecordType<T> | string): this"
575
575
  },
576
576
  {
577
577
  name: "last",
578
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
578
+ signature: "(key?: keyof RecordType<T> | string): this"
579
579
  },
580
580
  {
581
581
  name: "limit",
582
- signature: "(count: number): FlareBuilder<T, Args & { take: number }>"
582
+ signature: "(count: number): this"
583
583
  },
584
584
  {
585
585
  name: "skip",
586
- signature: "(count: number): FlareBuilder<T, Args & { skip: number }>"
586
+ signature: "(count: number): this"
587
587
  },
588
588
  {
589
589
  name: "distinct",
590
- signature: "(fields: DistinctInput<T>): FlareBuilder<T, Args & { distinct: DistinctInput<T> }>"
590
+ signature: "(fields: DistinctInput<T>): this"
591
591
  }
592
592
  ],
593
593
  selection: [
@@ -711,7 +711,7 @@ var FLARE_BUILDER_METHODS = {
711
711
  utilities: [
712
712
  {
713
713
  name: "when",
714
- signature: "(condition: boolean | (() => boolean), callback: (qb: FlareBuilder<T, Args>) => void): FlareBuilder<T, Args>"
714
+ signature: "(condition: boolean | (() => boolean), callback: (qb: this) => void): this"
715
715
  },
716
716
  {
717
717
  name: "chunk",
@@ -565,53 +565,53 @@ var FLARE_BUILDER_METHODS = {
565
565
  whereConditions: [
566
566
  {
567
567
  name: "where",
568
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
568
+ signature: "(condition: WhereInput<T>): this"
569
569
  },
570
570
  {
571
571
  name: "andWhere",
572
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
572
+ signature: "(condition: WhereInput<T>): this"
573
573
  },
574
574
  {
575
575
  name: "orWhere",
576
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
576
+ signature: "(condition: WhereInput<T>): this"
577
577
  },
578
578
  {
579
579
  name: "whereGroup",
580
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): FlareBuilder<T, Args & { where: WhereInput<T> }>"
580
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this"
581
581
  },
582
582
  {
583
583
  name: "orWhereGroup",
584
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
584
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this"
585
585
  },
586
586
  {
587
587
  name: "withId",
588
- signature: "(id: number | string): FlareBuilder<T, Args & { where: { id: number | string } }>"
588
+ signature: "(id: number | string): this"
589
589
  }
590
590
  ],
591
591
  orderingAndLimiting: [
592
592
  {
593
593
  name: "order",
594
- signature: "(orderBy: OrderByInput<T>): FlareBuilder<T, Args & { orderBy: OrderByInput<T> }>"
594
+ signature: "(orderBy: OrderByInput<T>): this"
595
595
  },
596
596
  {
597
597
  name: "first",
598
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
598
+ signature: "(key?: keyof RecordType<T> | string): this"
599
599
  },
600
600
  {
601
601
  name: "last",
602
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
602
+ signature: "(key?: keyof RecordType<T> | string): this"
603
603
  },
604
604
  {
605
605
  name: "limit",
606
- signature: "(count: number): FlareBuilder<T, Args & { take: number }>"
606
+ signature: "(count: number): this"
607
607
  },
608
608
  {
609
609
  name: "skip",
610
- signature: "(count: number): FlareBuilder<T, Args & { skip: number }>"
610
+ signature: "(count: number): this"
611
611
  },
612
612
  {
613
613
  name: "distinct",
614
- signature: "(fields: DistinctInput<T>): FlareBuilder<T, Args & { distinct: DistinctInput<T> }>"
614
+ signature: "(fields: DistinctInput<T>): this"
615
615
  }
616
616
  ],
617
617
  selection: [
@@ -735,7 +735,7 @@ var FLARE_BUILDER_METHODS = {
735
735
  utilities: [
736
736
  {
737
737
  name: "when",
738
- signature: "(condition: boolean | (() => boolean), callback: (qb: FlareBuilder<T, Args>) => void): FlareBuilder<T, Args>"
738
+ signature: "(condition: boolean | (() => boolean), callback: (qb: this) => void): this"
739
739
  },
740
740
  {
741
741
  name: "chunk",
@@ -542,53 +542,53 @@ var FLARE_BUILDER_METHODS = {
542
542
  whereConditions: [
543
543
  {
544
544
  name: "where",
545
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
545
+ signature: "(condition: WhereInput<T>): this"
546
546
  },
547
547
  {
548
548
  name: "andWhere",
549
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
549
+ signature: "(condition: WhereInput<T>): this"
550
550
  },
551
551
  {
552
552
  name: "orWhere",
553
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
553
+ signature: "(condition: WhereInput<T>): this"
554
554
  },
555
555
  {
556
556
  name: "whereGroup",
557
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): FlareBuilder<T, Args & { where: WhereInput<T> }>"
557
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this"
558
558
  },
559
559
  {
560
560
  name: "orWhereGroup",
561
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
561
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this"
562
562
  },
563
563
  {
564
564
  name: "withId",
565
- signature: "(id: number | string): FlareBuilder<T, Args & { where: { id: number | string } }>"
565
+ signature: "(id: number | string): this"
566
566
  }
567
567
  ],
568
568
  orderingAndLimiting: [
569
569
  {
570
570
  name: "order",
571
- signature: "(orderBy: OrderByInput<T>): FlareBuilder<T, Args & { orderBy: OrderByInput<T> }>"
571
+ signature: "(orderBy: OrderByInput<T>): this"
572
572
  },
573
573
  {
574
574
  name: "first",
575
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
575
+ signature: "(key?: keyof RecordType<T> | string): this"
576
576
  },
577
577
  {
578
578
  name: "last",
579
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
579
+ signature: "(key?: keyof RecordType<T> | string): this"
580
580
  },
581
581
  {
582
582
  name: "limit",
583
- signature: "(count: number): FlareBuilder<T, Args & { take: number }>"
583
+ signature: "(count: number): this"
584
584
  },
585
585
  {
586
586
  name: "skip",
587
- signature: "(count: number): FlareBuilder<T, Args & { skip: number }>"
587
+ signature: "(count: number): this"
588
588
  },
589
589
  {
590
590
  name: "distinct",
591
- signature: "(fields: DistinctInput<T>): FlareBuilder<T, Args & { distinct: DistinctInput<T> }>"
591
+ signature: "(fields: DistinctInput<T>): this"
592
592
  }
593
593
  ],
594
594
  selection: [
@@ -712,7 +712,7 @@ var FLARE_BUILDER_METHODS = {
712
712
  utilities: [
713
713
  {
714
714
  name: "when",
715
- signature: "(condition: boolean | (() => boolean), callback: (qb: FlareBuilder<T, Args>) => void): FlareBuilder<T, Args>"
715
+ signature: "(condition: boolean | (() => boolean), callback: (qb: this) => void): this"
716
716
  },
717
717
  {
718
718
  name: "chunk",
@@ -827,53 +827,53 @@ var FLARE_BUILDER_METHODS = {
827
827
  whereConditions: [
828
828
  {
829
829
  name: "where",
830
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
830
+ signature: "(condition: WhereInput<T>): this"
831
831
  },
832
832
  {
833
833
  name: "andWhere",
834
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
834
+ signature: "(condition: WhereInput<T>): this"
835
835
  },
836
836
  {
837
837
  name: "orWhere",
838
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
838
+ signature: "(condition: WhereInput<T>): this"
839
839
  },
840
840
  {
841
841
  name: "whereGroup",
842
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): FlareBuilder<T, Args & { where: WhereInput<T> }>"
842
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this"
843
843
  },
844
844
  {
845
845
  name: "orWhereGroup",
846
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
846
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this"
847
847
  },
848
848
  {
849
849
  name: "withId",
850
- signature: "(id: number | string): FlareBuilder<T, Args & { where: { id: number | string } }>"
850
+ signature: "(id: number | string): this"
851
851
  }
852
852
  ],
853
853
  orderingAndLimiting: [
854
854
  {
855
855
  name: "order",
856
- signature: "(orderBy: OrderByInput<T>): FlareBuilder<T, Args & { orderBy: OrderByInput<T> }>"
856
+ signature: "(orderBy: OrderByInput<T>): this"
857
857
  },
858
858
  {
859
859
  name: "first",
860
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
860
+ signature: "(key?: keyof RecordType<T> | string): this"
861
861
  },
862
862
  {
863
863
  name: "last",
864
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
864
+ signature: "(key?: keyof RecordType<T> | string): this"
865
865
  },
866
866
  {
867
867
  name: "limit",
868
- signature: "(count: number): FlareBuilder<T, Args & { take: number }>"
868
+ signature: "(count: number): this"
869
869
  },
870
870
  {
871
871
  name: "skip",
872
- signature: "(count: number): FlareBuilder<T, Args & { skip: number }>"
872
+ signature: "(count: number): this"
873
873
  },
874
874
  {
875
875
  name: "distinct",
876
- signature: "(fields: DistinctInput<T>): FlareBuilder<T, Args & { distinct: DistinctInput<T> }>"
876
+ signature: "(fields: DistinctInput<T>): this"
877
877
  }
878
878
  ],
879
879
  selection: [
@@ -997,7 +997,7 @@ var FLARE_BUILDER_METHODS = {
997
997
  utilities: [
998
998
  {
999
999
  name: "when",
1000
- signature: "(condition: boolean | (() => boolean), callback: (qb: FlareBuilder<T, Args>) => void): FlareBuilder<T, Args>"
1000
+ signature: "(condition: boolean | (() => boolean), callback: (qb: this) => void): this"
1001
1001
  },
1002
1002
  {
1003
1003
  name: "chunk",
package/dist/cli/index.js CHANGED
@@ -804,53 +804,53 @@ var FLARE_BUILDER_METHODS = {
804
804
  whereConditions: [
805
805
  {
806
806
  name: "where",
807
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
807
+ signature: "(condition: WhereInput<T>): this"
808
808
  },
809
809
  {
810
810
  name: "andWhere",
811
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
811
+ signature: "(condition: WhereInput<T>): this"
812
812
  },
813
813
  {
814
814
  name: "orWhere",
815
- signature: "(condition: WhereInput<T>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
815
+ signature: "(condition: WhereInput<T>): this"
816
816
  },
817
817
  {
818
818
  name: "whereGroup",
819
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): FlareBuilder<T, Args & { where: WhereInput<T> }>"
819
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this"
820
820
  },
821
821
  {
822
822
  name: "orWhereGroup",
823
- signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): FlareBuilder<T, Args & { where: WhereInput<T> }>"
823
+ signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this"
824
824
  },
825
825
  {
826
826
  name: "withId",
827
- signature: "(id: number | string): FlareBuilder<T, Args & { where: { id: number | string } }>"
827
+ signature: "(id: number | string): this"
828
828
  }
829
829
  ],
830
830
  orderingAndLimiting: [
831
831
  {
832
832
  name: "order",
833
- signature: "(orderBy: OrderByInput<T>): FlareBuilder<T, Args & { orderBy: OrderByInput<T> }>"
833
+ signature: "(orderBy: OrderByInput<T>): this"
834
834
  },
835
835
  {
836
836
  name: "first",
837
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
837
+ signature: "(key?: keyof RecordType<T> | string): this"
838
838
  },
839
839
  {
840
840
  name: "last",
841
- signature: "(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & { orderBy: any; take: number }>"
841
+ signature: "(key?: keyof RecordType<T> | string): this"
842
842
  },
843
843
  {
844
844
  name: "limit",
845
- signature: "(count: number): FlareBuilder<T, Args & { take: number }>"
845
+ signature: "(count: number): this"
846
846
  },
847
847
  {
848
848
  name: "skip",
849
- signature: "(count: number): FlareBuilder<T, Args & { skip: number }>"
849
+ signature: "(count: number): this"
850
850
  },
851
851
  {
852
852
  name: "distinct",
853
- signature: "(fields: DistinctInput<T>): FlareBuilder<T, Args & { distinct: DistinctInput<T> }>"
853
+ signature: "(fields: DistinctInput<T>): this"
854
854
  }
855
855
  ],
856
856
  selection: [
@@ -974,7 +974,7 @@ var FLARE_BUILDER_METHODS = {
974
974
  utilities: [
975
975
  {
976
976
  name: "when",
977
- signature: "(condition: boolean | (() => boolean), callback: (qb: FlareBuilder<T, Args>) => void): FlareBuilder<T, Args>"
977
+ signature: "(condition: boolean | (() => boolean), callback: (qb: this) => void): this"
978
978
  },
979
979
  {
980
980
  name: "chunk",
@@ -42,9 +42,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
42
42
  * .findMany()
43
43
  * // Equivalent to: { AND: [{ published: true }, { authorId: 1 }] }
44
44
  */
45
- where(condition: WhereInput<T>): FlareBuilder<T, Args & {
46
- where: WhereInput<T>;
47
- }>;
45
+ where(condition: WhereInput<T>): this;
48
46
  /**
49
47
  * Adds a where condition using AND logic (explicit alias for where())
50
48
  * @param condition - Where filter matching your Prisma model
@@ -55,9 +53,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
55
53
  * .andWhere({ createdAt: { gte: new Date('2024-01-01') } })
56
54
  * .findMany()
57
55
  */
58
- andWhere(condition: WhereInput<T>): FlareBuilder<T, Args & {
59
- where: WhereInput<T>;
60
- }>;
56
+ andWhere(condition: WhereInput<T>): this;
61
57
  /**
62
58
  * Adds a where condition using OR logic.
63
59
  *
@@ -91,9 +87,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
91
87
  * .findMany()
92
88
  * // Result: published AND (category='news' OR category='tech')
93
89
  */
94
- orWhere(condition: WhereInput<T>): FlareBuilder<T, Args & {
95
- where: WhereInput<T>;
96
- }>;
90
+ orWhere(condition: WhereInput<T>): this;
97
91
  /**
98
92
  * Creates a grouped where condition using a callback.
99
93
  * Use this for explicit control over boolean logic grouping.
@@ -122,9 +116,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
122
116
  * , 'OR')
123
117
  * .findMany()
124
118
  */
125
- whereGroup(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): FlareBuilder<T, Args & {
126
- where: WhereInput<T>;
127
- }>;
119
+ whereGroup(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this;
128
120
  /**
129
121
  * Alias for whereGroup with OR mode.
130
122
  * Creates a grouped condition that's OR-ed with existing where.
@@ -141,56 +133,38 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
141
133
  * )
142
134
  * .findMany()
143
135
  */
144
- orWhereGroup(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): FlareBuilder<T, Args & {
145
- where: WhereInput<T>;
146
- }>;
136
+ orWhereGroup(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this;
147
137
  /**
148
138
  * Adds a where condition to the query for the specified id.
149
139
  * Uses the same AND composition as where() for consistency.
150
140
  * @param id - The id to search for
151
141
  */
152
- withId(id: number | string): FlareBuilder<T, Args & {
153
- where: {
154
- id: number | string;
155
- };
156
- }>;
142
+ withId(id: number | string): this;
157
143
  /**
158
144
  * Adds an order by condition to the query
159
145
  * @param orderBy - OrderBy object matching your Prisma model
160
146
  */
161
- order(orderBy: OrderByInput<T>): FlareBuilder<T, Args & {
162
- orderBy: OrderByInput<T>;
163
- }>;
147
+ order(orderBy: OrderByInput<T>): this;
164
148
  /**
165
149
  * Gets the last record sorted by the specified field
166
150
  * @param key - Field to sort by (defaults to 'createdAt')
167
151
  */
168
- last(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & {
169
- orderBy: any;
170
- take: number;
171
- }>;
152
+ last(key?: keyof RecordType<T> | string): this;
172
153
  /**
173
154
  * Gets the first record sorted by the specified field
174
155
  * @param key - Field to sort by (defaults to 'createdAt')
175
156
  */
176
- first(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & {
177
- orderBy: any;
178
- take: number;
179
- }>;
157
+ first(key?: keyof RecordType<T> | string): this;
180
158
  /**
181
159
  * Sets a limit on the number of records to retrieve
182
160
  * @param limit - Maximum number of records
183
161
  */
184
- limit(limit: number): FlareBuilder<T, Args & {
185
- take: number;
186
- }>;
162
+ limit(limit: number): this;
187
163
  /**
188
164
  * Sets distinct fields for the query
189
165
  * @param distinct - Fields to be distinct
190
166
  */
191
- distinct(distinct: DistinctInput<T>): FlareBuilder<T, Args & {
192
- distinct: DistinctInput<T>;
193
- }>;
167
+ distinct(distinct: DistinctInput<T>): this;
194
168
  /**
195
169
  * Selects specific fields to retrieve
196
170
  * @param fields - Select object matching your Prisma model
@@ -248,9 +222,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
248
222
  * Skips the specified number of records
249
223
  * @param offset - Number of records to skip
250
224
  */
251
- skip(offset: number): FlareBuilder<T, Args & {
252
- skip: number;
253
- }>;
225
+ skip(offset: number): this;
254
226
  /**
255
227
  * Checks if any record exists matching the current query
256
228
  * @param existenceKey - Key to check for existence (defaults to 'id')
@@ -42,9 +42,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
42
42
  * .findMany()
43
43
  * // Equivalent to: { AND: [{ published: true }, { authorId: 1 }] }
44
44
  */
45
- where(condition: WhereInput<T>): FlareBuilder<T, Args & {
46
- where: WhereInput<T>;
47
- }>;
45
+ where(condition: WhereInput<T>): this;
48
46
  /**
49
47
  * Adds a where condition using AND logic (explicit alias for where())
50
48
  * @param condition - Where filter matching your Prisma model
@@ -55,9 +53,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
55
53
  * .andWhere({ createdAt: { gte: new Date('2024-01-01') } })
56
54
  * .findMany()
57
55
  */
58
- andWhere(condition: WhereInput<T>): FlareBuilder<T, Args & {
59
- where: WhereInput<T>;
60
- }>;
56
+ andWhere(condition: WhereInput<T>): this;
61
57
  /**
62
58
  * Adds a where condition using OR logic.
63
59
  *
@@ -91,9 +87,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
91
87
  * .findMany()
92
88
  * // Result: published AND (category='news' OR category='tech')
93
89
  */
94
- orWhere(condition: WhereInput<T>): FlareBuilder<T, Args & {
95
- where: WhereInput<T>;
96
- }>;
90
+ orWhere(condition: WhereInput<T>): this;
97
91
  /**
98
92
  * Creates a grouped where condition using a callback.
99
93
  * Use this for explicit control over boolean logic grouping.
@@ -122,9 +116,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
122
116
  * , 'OR')
123
117
  * .findMany()
124
118
  */
125
- whereGroup(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): FlareBuilder<T, Args & {
126
- where: WhereInput<T>;
127
- }>;
119
+ whereGroup(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this;
128
120
  /**
129
121
  * Alias for whereGroup with OR mode.
130
122
  * Creates a grouped condition that's OR-ed with existing where.
@@ -141,56 +133,38 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
141
133
  * )
142
134
  * .findMany()
143
135
  */
144
- orWhereGroup(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): FlareBuilder<T, Args & {
145
- where: WhereInput<T>;
146
- }>;
136
+ orWhereGroup(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this;
147
137
  /**
148
138
  * Adds a where condition to the query for the specified id.
149
139
  * Uses the same AND composition as where() for consistency.
150
140
  * @param id - The id to search for
151
141
  */
152
- withId(id: number | string): FlareBuilder<T, Args & {
153
- where: {
154
- id: number | string;
155
- };
156
- }>;
142
+ withId(id: number | string): this;
157
143
  /**
158
144
  * Adds an order by condition to the query
159
145
  * @param orderBy - OrderBy object matching your Prisma model
160
146
  */
161
- order(orderBy: OrderByInput<T>): FlareBuilder<T, Args & {
162
- orderBy: OrderByInput<T>;
163
- }>;
147
+ order(orderBy: OrderByInput<T>): this;
164
148
  /**
165
149
  * Gets the last record sorted by the specified field
166
150
  * @param key - Field to sort by (defaults to 'createdAt')
167
151
  */
168
- last(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & {
169
- orderBy: any;
170
- take: number;
171
- }>;
152
+ last(key?: keyof RecordType<T> | string): this;
172
153
  /**
173
154
  * Gets the first record sorted by the specified field
174
155
  * @param key - Field to sort by (defaults to 'createdAt')
175
156
  */
176
- first(key?: keyof RecordType<T> | string): FlareBuilder<T, Args & {
177
- orderBy: any;
178
- take: number;
179
- }>;
157
+ first(key?: keyof RecordType<T> | string): this;
180
158
  /**
181
159
  * Sets a limit on the number of records to retrieve
182
160
  * @param limit - Maximum number of records
183
161
  */
184
- limit(limit: number): FlareBuilder<T, Args & {
185
- take: number;
186
- }>;
162
+ limit(limit: number): this;
187
163
  /**
188
164
  * Sets distinct fields for the query
189
165
  * @param distinct - Fields to be distinct
190
166
  */
191
- distinct(distinct: DistinctInput<T>): FlareBuilder<T, Args & {
192
- distinct: DistinctInput<T>;
193
- }>;
167
+ distinct(distinct: DistinctInput<T>): this;
194
168
  /**
195
169
  * Selects specific fields to retrieve
196
170
  * @param fields - Select object matching your Prisma model
@@ -248,9 +222,7 @@ declare class FlareBuilder<T extends ModelName, Args extends Record<string, any>
248
222
  * Skips the specified number of records
249
223
  * @param offset - Number of records to skip
250
224
  */
251
- skip(offset: number): FlareBuilder<T, Args & {
252
- skip: number;
253
- }>;
225
+ skip(offset: number): this;
254
226
  /**
255
227
  * Checks if any record exists matching the current query
256
228
  * @param existenceKey - Key to check for existence (defaults to 'id')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prisma-flare",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Prisma utilities package with callback system and query builder for chained operations",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -108,4 +108,4 @@
108
108
  "dist",
109
109
  "README.md"
110
110
  ]
111
- }
111
+ }