forked from Northgate-Systems/RemitX
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRate.ts
More file actions
1155 lines (1070 loc) · 37 KB
/
Copy pathRate.ts
File metadata and controls
1155 lines (1070 loc) · 37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file exports the `Rate` model and its related types.
*
* 🟢 You can import this file directly.
*/
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums"
import type * as Prisma from "../internal/prismaNamespace"
/**
* Model Rate
*
*/
export type RateModel = runtime.Types.Result.DefaultSelection<Prisma.$RatePayload>
export type AggregateRate = {
_count: RateCountAggregateOutputType | null
_min: RateMinAggregateOutputType | null
_max: RateMaxAggregateOutputType | null
}
export type RateMinAggregateOutputType = {
id: string | null
fromAsset: string | null
toAsset: string | null
rate: string | null
fetchedAt: Date | null
}
export type RateMaxAggregateOutputType = {
id: string | null
fromAsset: string | null
toAsset: string | null
rate: string | null
fetchedAt: Date | null
}
export type RateCountAggregateOutputType = {
id: number
fromAsset: number
toAsset: number
rate: number
fetchedAt: number
_all: number
}
export type RateMinAggregateInputType = {
id?: true
fromAsset?: true
toAsset?: true
rate?: true
fetchedAt?: true
}
export type RateMaxAggregateInputType = {
id?: true
fromAsset?: true
toAsset?: true
rate?: true
fetchedAt?: true
}
export type RateCountAggregateInputType = {
id?: true
fromAsset?: true
toAsset?: true
rate?: true
fetchedAt?: true
_all?: true
}
export type RateAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Rate to aggregate.
*/
where?: Prisma.RateWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Rates to fetch.
*/
orderBy?: Prisma.RateOrderByWithRelationInput | Prisma.RateOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.RateWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Rates from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Rates.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Rates
**/
_count?: true | RateCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: RateMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: RateMaxAggregateInputType
}
export type GetRateAggregateType<T extends RateAggregateArgs> = {
[P in keyof T & keyof AggregateRate]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateRate[P]>
: Prisma.GetScalarType<T[P], AggregateRate[P]>
}
export type RateGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.RateWhereInput
orderBy?: Prisma.RateOrderByWithAggregationInput | Prisma.RateOrderByWithAggregationInput[]
by: Prisma.RateScalarFieldEnum[] | Prisma.RateScalarFieldEnum
having?: Prisma.RateScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: RateCountAggregateInputType | true
_min?: RateMinAggregateInputType
_max?: RateMaxAggregateInputType
}
export type RateGroupByOutputType = {
id: string
fromAsset: string
toAsset: string
rate: string
fetchedAt: Date
_count: RateCountAggregateOutputType | null
_min: RateMinAggregateOutputType | null
_max: RateMaxAggregateOutputType | null
}
export type GetRateGroupByPayload<T extends RateGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<RateGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof RateGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], RateGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], RateGroupByOutputType[P]>
}
>
>
export type RateWhereInput = {
AND?: Prisma.RateWhereInput | Prisma.RateWhereInput[]
OR?: Prisma.RateWhereInput[]
NOT?: Prisma.RateWhereInput | Prisma.RateWhereInput[]
id?: Prisma.StringFilter<"Rate"> | string
fromAsset?: Prisma.StringFilter<"Rate"> | string
toAsset?: Prisma.StringFilter<"Rate"> | string
rate?: Prisma.StringFilter<"Rate"> | string
fetchedAt?: Prisma.DateTimeFilter<"Rate"> | Date | string
}
export type RateOrderByWithRelationInput = {
id?: Prisma.SortOrder
fromAsset?: Prisma.SortOrder
toAsset?: Prisma.SortOrder
rate?: Prisma.SortOrder
fetchedAt?: Prisma.SortOrder
}
export type RateWhereUniqueInput = Prisma.AtLeast<{
id?: string
fromAsset_toAsset?: Prisma.RateFromAssetToAssetCompoundUniqueInput
AND?: Prisma.RateWhereInput | Prisma.RateWhereInput[]
OR?: Prisma.RateWhereInput[]
NOT?: Prisma.RateWhereInput | Prisma.RateWhereInput[]
fromAsset?: Prisma.StringFilter<"Rate"> | string
toAsset?: Prisma.StringFilter<"Rate"> | string
rate?: Prisma.StringFilter<"Rate"> | string
fetchedAt?: Prisma.DateTimeFilter<"Rate"> | Date | string
}, "id" | "fromAsset_toAsset">
export type RateOrderByWithAggregationInput = {
id?: Prisma.SortOrder
fromAsset?: Prisma.SortOrder
toAsset?: Prisma.SortOrder
rate?: Prisma.SortOrder
fetchedAt?: Prisma.SortOrder
_count?: Prisma.RateCountOrderByAggregateInput
_max?: Prisma.RateMaxOrderByAggregateInput
_min?: Prisma.RateMinOrderByAggregateInput
}
export type RateScalarWhereWithAggregatesInput = {
AND?: Prisma.RateScalarWhereWithAggregatesInput | Prisma.RateScalarWhereWithAggregatesInput[]
OR?: Prisma.RateScalarWhereWithAggregatesInput[]
NOT?: Prisma.RateScalarWhereWithAggregatesInput | Prisma.RateScalarWhereWithAggregatesInput[]
id?: Prisma.StringWithAggregatesFilter<"Rate"> | string
fromAsset?: Prisma.StringWithAggregatesFilter<"Rate"> | string
toAsset?: Prisma.StringWithAggregatesFilter<"Rate"> | string
rate?: Prisma.StringWithAggregatesFilter<"Rate"> | string
fetchedAt?: Prisma.DateTimeWithAggregatesFilter<"Rate"> | Date | string
}
export type RateCreateInput = {
id?: string
fromAsset: string
toAsset: string
rate: string
fetchedAt?: Date | string
}
export type RateUncheckedCreateInput = {
id?: string
fromAsset: string
toAsset: string
rate: string
fetchedAt?: Date | string
}
export type RateUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
fromAsset?: Prisma.StringFieldUpdateOperationsInput | string
toAsset?: Prisma.StringFieldUpdateOperationsInput | string
rate?: Prisma.StringFieldUpdateOperationsInput | string
fetchedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type RateUncheckedUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
fromAsset?: Prisma.StringFieldUpdateOperationsInput | string
toAsset?: Prisma.StringFieldUpdateOperationsInput | string
rate?: Prisma.StringFieldUpdateOperationsInput | string
fetchedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type RateCreateManyInput = {
id?: string
fromAsset: string
toAsset: string
rate: string
fetchedAt?: Date | string
}
export type RateUpdateManyMutationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
fromAsset?: Prisma.StringFieldUpdateOperationsInput | string
toAsset?: Prisma.StringFieldUpdateOperationsInput | string
rate?: Prisma.StringFieldUpdateOperationsInput | string
fetchedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type RateUncheckedUpdateManyInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
fromAsset?: Prisma.StringFieldUpdateOperationsInput | string
toAsset?: Prisma.StringFieldUpdateOperationsInput | string
rate?: Prisma.StringFieldUpdateOperationsInput | string
fetchedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type RateFromAssetToAssetCompoundUniqueInput = {
fromAsset: string
toAsset: string
}
export type RateCountOrderByAggregateInput = {
id?: Prisma.SortOrder
fromAsset?: Prisma.SortOrder
toAsset?: Prisma.SortOrder
rate?: Prisma.SortOrder
fetchedAt?: Prisma.SortOrder
}
export type RateMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
fromAsset?: Prisma.SortOrder
toAsset?: Prisma.SortOrder
rate?: Prisma.SortOrder
fetchedAt?: Prisma.SortOrder
}
export type RateMinOrderByAggregateInput = {
id?: Prisma.SortOrder
fromAsset?: Prisma.SortOrder
toAsset?: Prisma.SortOrder
rate?: Prisma.SortOrder
fetchedAt?: Prisma.SortOrder
}
export type RateSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
fromAsset?: boolean
toAsset?: boolean
rate?: boolean
fetchedAt?: boolean
}, ExtArgs["result"]["rate"]>
export type RateSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
fromAsset?: boolean
toAsset?: boolean
rate?: boolean
fetchedAt?: boolean
}, ExtArgs["result"]["rate"]>
export type RateSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
fromAsset?: boolean
toAsset?: boolean
rate?: boolean
fetchedAt?: boolean
}, ExtArgs["result"]["rate"]>
export type RateSelectScalar = {
id?: boolean
fromAsset?: boolean
toAsset?: boolean
rate?: boolean
fetchedAt?: boolean
}
export type RateOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "fromAsset" | "toAsset" | "rate" | "fetchedAt", ExtArgs["result"]["rate"]>
export type $RatePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "Rate"
objects: {}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
fromAsset: string
toAsset: string
rate: string
fetchedAt: Date
}, ExtArgs["result"]["rate"]>
composites: {}
}
export type RateGetPayload<S extends boolean | null | undefined | RateDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$RatePayload, S>
export type RateCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<RateFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: RateCountAggregateInputType | true
}
export interface RateDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Rate'], meta: { name: 'Rate' } }
/**
* Find zero or one Rate that matches the filter.
* @param {RateFindUniqueArgs} args - Arguments to find a Rate
* @example
* // Get one Rate
* const rate = await prisma.rate.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends RateFindUniqueArgs>(args: Prisma.SelectSubset<T, RateFindUniqueArgs<ExtArgs>>): Prisma.Prisma__RateClient<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one Rate that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {RateFindUniqueOrThrowArgs} args - Arguments to find a Rate
* @example
* // Get one Rate
* const rate = await prisma.rate.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends RateFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, RateFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__RateClient<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first Rate that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {RateFindFirstArgs} args - Arguments to find a Rate
* @example
* // Get one Rate
* const rate = await prisma.rate.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends RateFindFirstArgs>(args?: Prisma.SelectSubset<T, RateFindFirstArgs<ExtArgs>>): Prisma.Prisma__RateClient<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first Rate that matches the filter or
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {RateFindFirstOrThrowArgs} args - Arguments to find a Rate
* @example
* // Get one Rate
* const rate = await prisma.rate.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends RateFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, RateFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__RateClient<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more Rates that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {RateFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Rates
* const rates = await prisma.rate.findMany()
*
* // Get first 10 Rates
* const rates = await prisma.rate.findMany({ take: 10 })
*
* // Only select the `id`
* const rateWithIdOnly = await prisma.rate.findMany({ select: { id: true } })
*
*/
findMany<T extends RateFindManyArgs>(args?: Prisma.SelectSubset<T, RateFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a Rate.
* @param {RateCreateArgs} args - Arguments to create a Rate.
* @example
* // Create one Rate
* const Rate = await prisma.rate.create({
* data: {
* // ... data to create a Rate
* }
* })
*
*/
create<T extends RateCreateArgs>(args: Prisma.SelectSubset<T, RateCreateArgs<ExtArgs>>): Prisma.Prisma__RateClient<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many Rates.
* @param {RateCreateManyArgs} args - Arguments to create many Rates.
* @example
* // Create many Rates
* const rate = await prisma.rate.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends RateCreateManyArgs>(args?: Prisma.SelectSubset<T, RateCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many Rates and returns the data saved in the database.
* @param {RateCreateManyAndReturnArgs} args - Arguments to create many Rates.
* @example
* // Create many Rates
* const rate = await prisma.rate.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Rates and only return the `id`
* const rateWithIdOnly = await prisma.rate.createManyAndReturn({
* select: { id: true },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
createManyAndReturn<T extends RateCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, RateCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a Rate.
* @param {RateDeleteArgs} args - Arguments to delete one Rate.
* @example
* // Delete one Rate
* const Rate = await prisma.rate.delete({
* where: {
* // ... filter to delete one Rate
* }
* })
*
*/
delete<T extends RateDeleteArgs>(args: Prisma.SelectSubset<T, RateDeleteArgs<ExtArgs>>): Prisma.Prisma__RateClient<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one Rate.
* @param {RateUpdateArgs} args - Arguments to update one Rate.
* @example
* // Update one Rate
* const rate = await prisma.rate.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends RateUpdateArgs>(args: Prisma.SelectSubset<T, RateUpdateArgs<ExtArgs>>): Prisma.Prisma__RateClient<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more Rates.
* @param {RateDeleteManyArgs} args - Arguments to filter Rates to delete.
* @example
* // Delete a few Rates
* const { count } = await prisma.rate.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends RateDeleteManyArgs>(args?: Prisma.SelectSubset<T, RateDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Rates.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {RateUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Rates
* const rate = await prisma.rate.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends RateUpdateManyArgs>(args: Prisma.SelectSubset<T, RateUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Rates and returns the data updated in the database.
* @param {RateUpdateManyAndReturnArgs} args - Arguments to update many Rates.
* @example
* // Update many Rates
* const rate = await prisma.rate.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more Rates and only return the `id`
* const rateWithIdOnly = await prisma.rate.updateManyAndReturn({
* select: { id: true },
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
updateManyAndReturn<T extends RateUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, RateUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one Rate.
* @param {RateUpsertArgs} args - Arguments to update or create a Rate.
* @example
* // Update or create a Rate
* const rate = await prisma.rate.upsert({
* create: {
* // ... data to create a Rate
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Rate we want to update
* }
* })
*/
upsert<T extends RateUpsertArgs>(args: Prisma.SelectSubset<T, RateUpsertArgs<ExtArgs>>): Prisma.Prisma__RateClient<runtime.Types.Result.GetResult<Prisma.$RatePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of Rates.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {RateCountArgs} args - Arguments to filter Rates to count.
* @example
* // Count the number of Rates
* const count = await prisma.rate.count({
* where: {
* // ... the filter for the Rates we want to count
* }
* })
**/
count<T extends RateCountArgs>(
args?: Prisma.Subset<T, RateCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], RateCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Rate.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {RateAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
* @example
* // Ordered by age ascending
* // Where email contains prisma.io
* // Limited to the 10 users
* const aggregations = await prisma.user.aggregate({
* _avg: {
* age: true,
* },
* where: {
* email: {
* contains: "prisma.io",
* },
* },
* orderBy: {
* age: "asc",
* },
* take: 10,
* })
**/
aggregate<T extends RateAggregateArgs>(args: Prisma.Subset<T, RateAggregateArgs>): Prisma.PrismaPromise<GetRateAggregateType<T>>
/**
* Group by Rate.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {RateGroupByArgs} args - Group by arguments.
* @example
* // Group by city, order by createdAt, get count
* const result = await prisma.user.groupBy({
* by: ['city', 'createdAt'],
* orderBy: {
* createdAt: true
* },
* _count: {
* _all: true
* },
* })
*
**/
groupBy<
T extends RateGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: RateGroupByArgs['orderBy'] }
: { orderBy?: RateGroupByArgs['orderBy'] },
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
ByValid extends Prisma.Has<ByFields, OrderFields>,
HavingFields extends Prisma.GetHavingFields<T['having']>,
HavingValid extends Prisma.Has<ByFields, HavingFields>,
ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
InputErrors extends ByEmpty extends Prisma.True
? `Error: "by" must not be empty.`
: HavingValid extends Prisma.False
? {
[P in HavingFields]: P extends ByFields
? never
: P extends string
? `Error: Field "${P}" used in "having" needs to be provided in "by".`
: [
Error,
'Field ',
P,
` in "having" needs to be provided in "by"`,
]
}[HavingFields]
: 'take' extends Prisma.Keys<T>
? 'orderBy' extends Prisma.Keys<T>
? ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "take", you also need to provide "orderBy"'
: 'skip' extends Prisma.Keys<T>
? 'orderBy' extends Prisma.Keys<T>
? ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "skip", you also need to provide "orderBy"'
: ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
>(args: Prisma.SubsetIntersection<T, RateGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRateGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Rate model
*/
readonly fields: RateFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Rate.
* Why is this prefixed with `Prisma__`?
* Because we want to prevent naming conflicts as mentioned in
* https://github.com/prisma/prisma-client-js/issues/707
*/
export interface Prisma__RateClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}
/**
* Fields of the Rate model
*/
export interface RateFieldRefs {
readonly id: Prisma.FieldRef<"Rate", 'String'>
readonly fromAsset: Prisma.FieldRef<"Rate", 'String'>
readonly toAsset: Prisma.FieldRef<"Rate", 'String'>
readonly rate: Prisma.FieldRef<"Rate", 'String'>
readonly fetchedAt: Prisma.FieldRef<"Rate", 'DateTime'>
}
// Custom InputTypes
/**
* Rate findUnique
*/
export type RateFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Rate
*/
select?: Prisma.RateSelect<ExtArgs> | null
/**
* Omit specific fields from the Rate
*/
omit?: Prisma.RateOmit<ExtArgs> | null
/**
* Filter, which Rate to fetch.
*/
where: Prisma.RateWhereUniqueInput
}
/**
* Rate findUniqueOrThrow
*/
export type RateFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Rate
*/
select?: Prisma.RateSelect<ExtArgs> | null
/**
* Omit specific fields from the Rate
*/
omit?: Prisma.RateOmit<ExtArgs> | null
/**
* Filter, which Rate to fetch.
*/
where: Prisma.RateWhereUniqueInput
}
/**
* Rate findFirst
*/
export type RateFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Rate
*/
select?: Prisma.RateSelect<ExtArgs> | null
/**
* Omit specific fields from the Rate
*/
omit?: Prisma.RateOmit<ExtArgs> | null
/**
* Filter, which Rate to fetch.
*/
where?: Prisma.RateWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Rates to fetch.
*/
orderBy?: Prisma.RateOrderByWithRelationInput | Prisma.RateOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Rates.
*/
cursor?: Prisma.RateWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Rates from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Rates.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Rates.
*/
distinct?: Prisma.RateScalarFieldEnum | Prisma.RateScalarFieldEnum[]
}
/**
* Rate findFirstOrThrow
*/
export type RateFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Rate
*/
select?: Prisma.RateSelect<ExtArgs> | null
/**
* Omit specific fields from the Rate
*/
omit?: Prisma.RateOmit<ExtArgs> | null
/**
* Filter, which Rate to fetch.
*/
where?: Prisma.RateWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Rates to fetch.
*/
orderBy?: Prisma.RateOrderByWithRelationInput | Prisma.RateOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Rates.
*/
cursor?: Prisma.RateWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Rates from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Rates.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Rates.
*/
distinct?: Prisma.RateScalarFieldEnum | Prisma.RateScalarFieldEnum[]
}
/**
* Rate findMany
*/
export type RateFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Rate
*/
select?: Prisma.RateSelect<ExtArgs> | null
/**
* Omit specific fields from the Rate
*/
omit?: Prisma.RateOmit<ExtArgs> | null
/**
* Filter, which Rates to fetch.
*/
where?: Prisma.RateWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Rates to fetch.
*/
orderBy?: Prisma.RateOrderByWithRelationInput | Prisma.RateOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Rates.
*/
cursor?: Prisma.RateWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Rates from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Rates.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Rates.
*/
distinct?: Prisma.RateScalarFieldEnum | Prisma.RateScalarFieldEnum[]
}
/**
* Rate create
*/
export type RateCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Rate
*/
select?: Prisma.RateSelect<ExtArgs> | null
/**
* Omit specific fields from the Rate
*/
omit?: Prisma.RateOmit<ExtArgs> | null
/**
* The data needed to create a Rate.
*/
data: Prisma.XOR<Prisma.RateCreateInput, Prisma.RateUncheckedCreateInput>
}
/**
* Rate createMany
*/
export type RateCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many Rates.
*/
data: Prisma.RateCreateManyInput | Prisma.RateCreateManyInput[]
skipDuplicates?: boolean
}
/**