autosync_backend2 1.2.52 → 1.2.55
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 +494 -20
- package/dist/index.js +262 -60
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3119,7 +3119,7 @@ export declare const app: Elysia<"", {
|
|
|
3119
3119
|
oldId?: number | null | undefined;
|
|
3120
3120
|
billingPeriod?: "MONTHLY" | "ANNUAL" | "YEARLY" | undefined;
|
|
3121
3121
|
basePrice?: number | undefined;
|
|
3122
|
-
|
|
3122
|
+
maxCarCount?: number | null | undefined;
|
|
3123
3123
|
active?: boolean | undefined;
|
|
3124
3124
|
note?: string | null | undefined;
|
|
3125
3125
|
pagination: {
|
|
@@ -3137,7 +3137,7 @@ export declare const app: Elysia<"", {
|
|
|
3137
3137
|
companyId: string;
|
|
3138
3138
|
billingPeriod: "MONTHLY" | "ANNUAL" | "YEARLY";
|
|
3139
3139
|
basePrice: number;
|
|
3140
|
-
|
|
3140
|
+
maxCarCount: number | null;
|
|
3141
3141
|
active: boolean;
|
|
3142
3142
|
note: string | null;
|
|
3143
3143
|
id: string;
|
|
@@ -3166,7 +3166,7 @@ export declare const app: Elysia<"", {
|
|
|
3166
3166
|
body: {
|
|
3167
3167
|
oldId?: number | null | undefined;
|
|
3168
3168
|
billingPeriod?: "MONTHLY" | "ANNUAL" | "YEARLY" | undefined;
|
|
3169
|
-
|
|
3169
|
+
maxCarCount?: number | null | undefined;
|
|
3170
3170
|
active?: boolean | undefined;
|
|
3171
3171
|
note?: string | null | undefined;
|
|
3172
3172
|
companyId: string;
|
|
@@ -3185,7 +3185,7 @@ export declare const app: Elysia<"", {
|
|
|
3185
3185
|
oldId: number | null;
|
|
3186
3186
|
billingPeriod: "MONTHLY" | "ANNUAL" | "YEARLY";
|
|
3187
3187
|
basePrice: number;
|
|
3188
|
-
|
|
3188
|
+
maxCarCount: number | null;
|
|
3189
3189
|
active: boolean;
|
|
3190
3190
|
note: string | null;
|
|
3191
3191
|
};
|
|
@@ -3211,7 +3211,7 @@ export declare const app: Elysia<"", {
|
|
|
3211
3211
|
oldId?: number | null | undefined;
|
|
3212
3212
|
billingPeriod?: "MONTHLY" | "ANNUAL" | "YEARLY" | undefined;
|
|
3213
3213
|
basePrice?: number | undefined;
|
|
3214
|
-
|
|
3214
|
+
maxCarCount?: number | null | undefined;
|
|
3215
3215
|
active?: boolean | undefined;
|
|
3216
3216
|
note?: string | null | undefined;
|
|
3217
3217
|
};
|
|
@@ -3225,7 +3225,7 @@ export declare const app: Elysia<"", {
|
|
|
3225
3225
|
companyId: string;
|
|
3226
3226
|
billingPeriod: "MONTHLY" | "ANNUAL" | "YEARLY";
|
|
3227
3227
|
basePrice: number;
|
|
3228
|
-
|
|
3228
|
+
maxCarCount: number | null;
|
|
3229
3229
|
active: boolean;
|
|
3230
3230
|
note: string | null;
|
|
3231
3231
|
id: string;
|
|
@@ -3509,8 +3509,6 @@ export declare const app: Elysia<"", {
|
|
|
3509
3509
|
periodStart?: string | undefined;
|
|
3510
3510
|
periodEnd?: string | undefined;
|
|
3511
3511
|
carCount?: number | undefined;
|
|
3512
|
-
carPrice?: number | undefined;
|
|
3513
|
-
totalPrice?: number | undefined;
|
|
3514
3512
|
status?: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED" | undefined;
|
|
3515
3513
|
issuedAt?: string | undefined;
|
|
3516
3514
|
paidAt?: string | null | undefined;
|
|
@@ -3533,8 +3531,6 @@ export declare const app: Elysia<"", {
|
|
|
3533
3531
|
periodEnd: string;
|
|
3534
3532
|
carCount: number;
|
|
3535
3533
|
basePrice: number;
|
|
3536
|
-
carPrice: number;
|
|
3537
|
-
totalPrice: number;
|
|
3538
3534
|
status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
|
|
3539
3535
|
issuedAt: string;
|
|
3540
3536
|
paidAt: string | null;
|
|
@@ -3587,8 +3583,6 @@ export declare const app: Elysia<"", {
|
|
|
3587
3583
|
periodStart: string;
|
|
3588
3584
|
periodEnd: string;
|
|
3589
3585
|
carCount: number;
|
|
3590
|
-
carPrice: number;
|
|
3591
|
-
totalPrice: number;
|
|
3592
3586
|
status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
|
|
3593
3587
|
issuedAt: string;
|
|
3594
3588
|
paidAt: string | null;
|
|
@@ -3624,8 +3618,6 @@ export declare const app: Elysia<"", {
|
|
|
3624
3618
|
periodStart: string;
|
|
3625
3619
|
periodEnd: string;
|
|
3626
3620
|
carCount: number;
|
|
3627
|
-
carPrice: number;
|
|
3628
|
-
totalPrice: number;
|
|
3629
3621
|
issuedAt: string;
|
|
3630
3622
|
dueAt: string;
|
|
3631
3623
|
};
|
|
@@ -3646,8 +3638,6 @@ export declare const app: Elysia<"", {
|
|
|
3646
3638
|
periodStart: string;
|
|
3647
3639
|
periodEnd: string;
|
|
3648
3640
|
carCount: number;
|
|
3649
|
-
carPrice: number;
|
|
3650
|
-
totalPrice: number;
|
|
3651
3641
|
status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
|
|
3652
3642
|
issuedAt: string;
|
|
3653
3643
|
paidAt: string | null;
|
|
@@ -3680,8 +3670,6 @@ export declare const app: Elysia<"", {
|
|
|
3680
3670
|
periodStart?: string | undefined;
|
|
3681
3671
|
periodEnd?: string | undefined;
|
|
3682
3672
|
carCount?: number | undefined;
|
|
3683
|
-
carPrice?: number | undefined;
|
|
3684
|
-
totalPrice?: number | undefined;
|
|
3685
3673
|
status?: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED" | undefined;
|
|
3686
3674
|
issuedAt?: string | undefined;
|
|
3687
3675
|
paidAt?: string | null | undefined;
|
|
@@ -3700,8 +3688,6 @@ export declare const app: Elysia<"", {
|
|
|
3700
3688
|
periodEnd: string;
|
|
3701
3689
|
carCount: number;
|
|
3702
3690
|
basePrice: number;
|
|
3703
|
-
carPrice: number;
|
|
3704
|
-
totalPrice: number;
|
|
3705
3691
|
status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
|
|
3706
3692
|
issuedAt: string;
|
|
3707
3693
|
paidAt: string | null;
|
|
@@ -10646,6 +10632,494 @@ export declare const app: Elysia<"", {
|
|
|
10646
10632
|
};
|
|
10647
10633
|
};
|
|
10648
10634
|
};
|
|
10635
|
+
} & {
|
|
10636
|
+
pm: {
|
|
10637
|
+
plan: {};
|
|
10638
|
+
} & {
|
|
10639
|
+
plan: {
|
|
10640
|
+
machine: {};
|
|
10641
|
+
} & {
|
|
10642
|
+
machine: {
|
|
10643
|
+
get: {
|
|
10644
|
+
body: unknown;
|
|
10645
|
+
params: {};
|
|
10646
|
+
query: {
|
|
10647
|
+
pagination: {
|
|
10648
|
+
size: number;
|
|
10649
|
+
page: number;
|
|
10650
|
+
};
|
|
10651
|
+
pmPlanId: string;
|
|
10652
|
+
};
|
|
10653
|
+
headers: unknown;
|
|
10654
|
+
response: {
|
|
10655
|
+
200: {
|
|
10656
|
+
totalCount: number;
|
|
10657
|
+
totalPage: number;
|
|
10658
|
+
result: Omit<{
|
|
10659
|
+
totalCount: number;
|
|
10660
|
+
pmPlanId: string;
|
|
10661
|
+
pmTemplateId: string;
|
|
10662
|
+
machineId: string;
|
|
10663
|
+
employeeCreatedId: string;
|
|
10664
|
+
userCreatedId: string;
|
|
10665
|
+
note: string | null;
|
|
10666
|
+
id: string;
|
|
10667
|
+
createdAt: string;
|
|
10668
|
+
updatedAt: string;
|
|
10669
|
+
deletedAt: string | null;
|
|
10670
|
+
oldId: number | null;
|
|
10671
|
+
}, "totalCount">[];
|
|
10672
|
+
};
|
|
10673
|
+
401: "Токен олдсонгүй";
|
|
10674
|
+
422: {
|
|
10675
|
+
type: "validation";
|
|
10676
|
+
on: string;
|
|
10677
|
+
summary?: string;
|
|
10678
|
+
message?: string;
|
|
10679
|
+
found?: unknown;
|
|
10680
|
+
property?: string;
|
|
10681
|
+
expected?: string;
|
|
10682
|
+
};
|
|
10683
|
+
};
|
|
10684
|
+
};
|
|
10685
|
+
};
|
|
10686
|
+
} & {
|
|
10687
|
+
machine: {
|
|
10688
|
+
post: {
|
|
10689
|
+
body: {
|
|
10690
|
+
oldId?: number | null | undefined;
|
|
10691
|
+
note?: string | null | undefined;
|
|
10692
|
+
machineId: string;
|
|
10693
|
+
pmTemplateId: string;
|
|
10694
|
+
pmPlanId: string;
|
|
10695
|
+
employeeCreatedId: string;
|
|
10696
|
+
userCreatedId: string;
|
|
10697
|
+
};
|
|
10698
|
+
params: {};
|
|
10699
|
+
query: unknown;
|
|
10700
|
+
headers: unknown;
|
|
10701
|
+
response: {
|
|
10702
|
+
401: "Токен олдсонгүй";
|
|
10703
|
+
422: {
|
|
10704
|
+
type: "validation";
|
|
10705
|
+
on: string;
|
|
10706
|
+
summary?: string;
|
|
10707
|
+
message?: string;
|
|
10708
|
+
found?: unknown;
|
|
10709
|
+
property?: string;
|
|
10710
|
+
expected?: string;
|
|
10711
|
+
};
|
|
10712
|
+
};
|
|
10713
|
+
};
|
|
10714
|
+
};
|
|
10715
|
+
} & {
|
|
10716
|
+
machine: {
|
|
10717
|
+
many: {
|
|
10718
|
+
post: {
|
|
10719
|
+
body: {
|
|
10720
|
+
oldId?: number | null | undefined;
|
|
10721
|
+
note?: string | null | undefined;
|
|
10722
|
+
machineId: string;
|
|
10723
|
+
pmTemplateId: string;
|
|
10724
|
+
pmPlanId: string;
|
|
10725
|
+
employeeCreatedId: string;
|
|
10726
|
+
userCreatedId: string;
|
|
10727
|
+
}[];
|
|
10728
|
+
params: {};
|
|
10729
|
+
query: unknown;
|
|
10730
|
+
headers: unknown;
|
|
10731
|
+
response: {
|
|
10732
|
+
200: {
|
|
10733
|
+
id: string;
|
|
10734
|
+
createdAt: string;
|
|
10735
|
+
updatedAt: string;
|
|
10736
|
+
deletedAt: string | null;
|
|
10737
|
+
oldId: number | null;
|
|
10738
|
+
note: string | null;
|
|
10739
|
+
machineId: string;
|
|
10740
|
+
pmTemplateId: string;
|
|
10741
|
+
pmPlanId: string;
|
|
10742
|
+
employeeCreatedId: string;
|
|
10743
|
+
userCreatedId: string;
|
|
10744
|
+
}[];
|
|
10745
|
+
400: "Машины мэдээлэл оруулах мэдээлэл байхгүй байна.";
|
|
10746
|
+
401: "Токен олдсонгүй";
|
|
10747
|
+
422: {
|
|
10748
|
+
type: "validation";
|
|
10749
|
+
on: string;
|
|
10750
|
+
summary?: string;
|
|
10751
|
+
message?: string;
|
|
10752
|
+
found?: unknown;
|
|
10753
|
+
property?: string;
|
|
10754
|
+
expected?: string;
|
|
10755
|
+
};
|
|
10756
|
+
};
|
|
10757
|
+
};
|
|
10758
|
+
};
|
|
10759
|
+
};
|
|
10760
|
+
} & {
|
|
10761
|
+
machine: {
|
|
10762
|
+
":id": {
|
|
10763
|
+
put: {
|
|
10764
|
+
body: {
|
|
10765
|
+
oldId?: number | null | undefined;
|
|
10766
|
+
note?: string | null | undefined;
|
|
10767
|
+
machineId?: string | undefined;
|
|
10768
|
+
pmTemplateId?: string | undefined;
|
|
10769
|
+
pmPlanId?: string | undefined;
|
|
10770
|
+
employeeCreatedId?: string | undefined;
|
|
10771
|
+
userCreatedId?: string | undefined;
|
|
10772
|
+
};
|
|
10773
|
+
params: {
|
|
10774
|
+
id: string;
|
|
10775
|
+
};
|
|
10776
|
+
query: unknown;
|
|
10777
|
+
headers: unknown;
|
|
10778
|
+
response: {
|
|
10779
|
+
401: "Токен олдсонгүй";
|
|
10780
|
+
422: {
|
|
10781
|
+
type: "validation";
|
|
10782
|
+
on: string;
|
|
10783
|
+
summary?: string;
|
|
10784
|
+
message?: string;
|
|
10785
|
+
found?: unknown;
|
|
10786
|
+
property?: string;
|
|
10787
|
+
expected?: string;
|
|
10788
|
+
};
|
|
10789
|
+
};
|
|
10790
|
+
};
|
|
10791
|
+
};
|
|
10792
|
+
};
|
|
10793
|
+
} & {
|
|
10794
|
+
machine: {
|
|
10795
|
+
":id": {
|
|
10796
|
+
delete: {
|
|
10797
|
+
body: unknown;
|
|
10798
|
+
params: {
|
|
10799
|
+
id: string;
|
|
10800
|
+
};
|
|
10801
|
+
query: unknown;
|
|
10802
|
+
headers: unknown;
|
|
10803
|
+
response: {
|
|
10804
|
+
401: "Токен олдсонгүй";
|
|
10805
|
+
422: {
|
|
10806
|
+
type: "validation";
|
|
10807
|
+
on: string;
|
|
10808
|
+
summary?: string;
|
|
10809
|
+
message?: string;
|
|
10810
|
+
found?: unknown;
|
|
10811
|
+
property?: string;
|
|
10812
|
+
expected?: string;
|
|
10813
|
+
};
|
|
10814
|
+
};
|
|
10815
|
+
};
|
|
10816
|
+
};
|
|
10817
|
+
};
|
|
10818
|
+
};
|
|
10819
|
+
} & {
|
|
10820
|
+
plan: {
|
|
10821
|
+
product: {};
|
|
10822
|
+
} & {
|
|
10823
|
+
product: {
|
|
10824
|
+
get: {
|
|
10825
|
+
body: unknown;
|
|
10826
|
+
params: {};
|
|
10827
|
+
query: {
|
|
10828
|
+
pagination: {
|
|
10829
|
+
size: number;
|
|
10830
|
+
page: number;
|
|
10831
|
+
};
|
|
10832
|
+
pmPlanId: string;
|
|
10833
|
+
};
|
|
10834
|
+
headers: unknown;
|
|
10835
|
+
response: {
|
|
10836
|
+
200: {
|
|
10837
|
+
totalCount: number;
|
|
10838
|
+
totalPage: number;
|
|
10839
|
+
result: Omit<{
|
|
10840
|
+
totalCount: number;
|
|
10841
|
+
pmPlanId: string;
|
|
10842
|
+
productKindId: string;
|
|
10843
|
+
uomId: string;
|
|
10844
|
+
quantity: number | null;
|
|
10845
|
+
pmQuantity: string;
|
|
10846
|
+
id: string;
|
|
10847
|
+
createdAt: string;
|
|
10848
|
+
updatedAt: string;
|
|
10849
|
+
deletedAt: string | null;
|
|
10850
|
+
oldId: number | null;
|
|
10851
|
+
}, "totalCount">[];
|
|
10852
|
+
};
|
|
10853
|
+
401: "Токен олдсонгүй";
|
|
10854
|
+
422: {
|
|
10855
|
+
type: "validation";
|
|
10856
|
+
on: string;
|
|
10857
|
+
summary?: string;
|
|
10858
|
+
message?: string;
|
|
10859
|
+
found?: unknown;
|
|
10860
|
+
property?: string;
|
|
10861
|
+
expected?: string;
|
|
10862
|
+
};
|
|
10863
|
+
};
|
|
10864
|
+
};
|
|
10865
|
+
};
|
|
10866
|
+
} & {
|
|
10867
|
+
product: {
|
|
10868
|
+
post: {
|
|
10869
|
+
body: {
|
|
10870
|
+
oldId?: number | null | undefined;
|
|
10871
|
+
quantity?: number | null | undefined;
|
|
10872
|
+
uomId: string;
|
|
10873
|
+
productKindId: string;
|
|
10874
|
+
pmPlanId: string;
|
|
10875
|
+
pmQuantity: string;
|
|
10876
|
+
};
|
|
10877
|
+
params: {};
|
|
10878
|
+
query: unknown;
|
|
10879
|
+
headers: unknown;
|
|
10880
|
+
response: {
|
|
10881
|
+
401: "Токен олдсонгүй";
|
|
10882
|
+
422: {
|
|
10883
|
+
type: "validation";
|
|
10884
|
+
on: string;
|
|
10885
|
+
summary?: string;
|
|
10886
|
+
message?: string;
|
|
10887
|
+
found?: unknown;
|
|
10888
|
+
property?: string;
|
|
10889
|
+
expected?: string;
|
|
10890
|
+
};
|
|
10891
|
+
};
|
|
10892
|
+
};
|
|
10893
|
+
};
|
|
10894
|
+
} & {
|
|
10895
|
+
product: {
|
|
10896
|
+
many: {
|
|
10897
|
+
post: {
|
|
10898
|
+
body: {
|
|
10899
|
+
oldId?: number | null | undefined;
|
|
10900
|
+
quantity?: number | null | undefined;
|
|
10901
|
+
uomId: string;
|
|
10902
|
+
productKindId: string;
|
|
10903
|
+
pmPlanId: string;
|
|
10904
|
+
pmQuantity: string;
|
|
10905
|
+
}[];
|
|
10906
|
+
params: {};
|
|
10907
|
+
query: unknown;
|
|
10908
|
+
headers: unknown;
|
|
10909
|
+
response: {
|
|
10910
|
+
200: {
|
|
10911
|
+
id: string;
|
|
10912
|
+
createdAt: string;
|
|
10913
|
+
updatedAt: string;
|
|
10914
|
+
deletedAt: string | null;
|
|
10915
|
+
oldId: number | null;
|
|
10916
|
+
quantity: number | null;
|
|
10917
|
+
uomId: string;
|
|
10918
|
+
productKindId: string;
|
|
10919
|
+
pmPlanId: string;
|
|
10920
|
+
pmQuantity: string;
|
|
10921
|
+
}[];
|
|
10922
|
+
400: "Бүтээгдэхүүний мэдээлэл оруулах мэдээлэл байхгүй байна.";
|
|
10923
|
+
401: "Токен олдсонгүй";
|
|
10924
|
+
422: {
|
|
10925
|
+
type: "validation";
|
|
10926
|
+
on: string;
|
|
10927
|
+
summary?: string;
|
|
10928
|
+
message?: string;
|
|
10929
|
+
found?: unknown;
|
|
10930
|
+
property?: string;
|
|
10931
|
+
expected?: string;
|
|
10932
|
+
};
|
|
10933
|
+
};
|
|
10934
|
+
};
|
|
10935
|
+
};
|
|
10936
|
+
};
|
|
10937
|
+
} & {
|
|
10938
|
+
product: {
|
|
10939
|
+
":id": {
|
|
10940
|
+
put: {
|
|
10941
|
+
body: {
|
|
10942
|
+
oldId?: number | null | undefined;
|
|
10943
|
+
quantity?: number | null | undefined;
|
|
10944
|
+
uomId?: string | undefined;
|
|
10945
|
+
productKindId?: string | undefined;
|
|
10946
|
+
pmPlanId?: string | undefined;
|
|
10947
|
+
pmQuantity?: string | undefined;
|
|
10948
|
+
};
|
|
10949
|
+
params: {
|
|
10950
|
+
id: string;
|
|
10951
|
+
};
|
|
10952
|
+
query: unknown;
|
|
10953
|
+
headers: unknown;
|
|
10954
|
+
response: {
|
|
10955
|
+
401: "Токен олдсонгүй";
|
|
10956
|
+
422: {
|
|
10957
|
+
type: "validation";
|
|
10958
|
+
on: string;
|
|
10959
|
+
summary?: string;
|
|
10960
|
+
message?: string;
|
|
10961
|
+
found?: unknown;
|
|
10962
|
+
property?: string;
|
|
10963
|
+
expected?: string;
|
|
10964
|
+
};
|
|
10965
|
+
};
|
|
10966
|
+
};
|
|
10967
|
+
};
|
|
10968
|
+
};
|
|
10969
|
+
} & {
|
|
10970
|
+
product: {
|
|
10971
|
+
":id": {
|
|
10972
|
+
delete: {
|
|
10973
|
+
body: unknown;
|
|
10974
|
+
params: {
|
|
10975
|
+
id: string;
|
|
10976
|
+
};
|
|
10977
|
+
query: unknown;
|
|
10978
|
+
headers: unknown;
|
|
10979
|
+
response: {
|
|
10980
|
+
401: "Токен олдсонгүй";
|
|
10981
|
+
422: {
|
|
10982
|
+
type: "validation";
|
|
10983
|
+
on: string;
|
|
10984
|
+
summary?: string;
|
|
10985
|
+
message?: string;
|
|
10986
|
+
found?: unknown;
|
|
10987
|
+
property?: string;
|
|
10988
|
+
expected?: string;
|
|
10989
|
+
};
|
|
10990
|
+
};
|
|
10991
|
+
};
|
|
10992
|
+
};
|
|
10993
|
+
};
|
|
10994
|
+
};
|
|
10995
|
+
} & {
|
|
10996
|
+
plan: {
|
|
10997
|
+
get: {
|
|
10998
|
+
body: unknown;
|
|
10999
|
+
params: {};
|
|
11000
|
+
query: {
|
|
11001
|
+
pagination: {
|
|
11002
|
+
size: number;
|
|
11003
|
+
page: number;
|
|
11004
|
+
};
|
|
11005
|
+
};
|
|
11006
|
+
headers: unknown;
|
|
11007
|
+
response: {
|
|
11008
|
+
200: {
|
|
11009
|
+
totalCount: number;
|
|
11010
|
+
totalPage: number;
|
|
11011
|
+
result: Omit<{
|
|
11012
|
+
totalCount: number;
|
|
11013
|
+
companyId: string;
|
|
11014
|
+
name: string;
|
|
11015
|
+
description: string | null;
|
|
11016
|
+
dateStart: Date | null;
|
|
11017
|
+
dateEnd: Date | null;
|
|
11018
|
+
id: string;
|
|
11019
|
+
createdAt: string;
|
|
11020
|
+
updatedAt: string;
|
|
11021
|
+
deletedAt: string | null;
|
|
11022
|
+
oldId: number | null;
|
|
11023
|
+
}, "totalCount">[];
|
|
11024
|
+
};
|
|
11025
|
+
422: {
|
|
11026
|
+
type: "validation";
|
|
11027
|
+
on: string;
|
|
11028
|
+
summary?: string;
|
|
11029
|
+
message?: string;
|
|
11030
|
+
found?: unknown;
|
|
11031
|
+
property?: string;
|
|
11032
|
+
expected?: string;
|
|
11033
|
+
};
|
|
11034
|
+
};
|
|
11035
|
+
};
|
|
11036
|
+
};
|
|
11037
|
+
} & {
|
|
11038
|
+
plan: {
|
|
11039
|
+
post: {
|
|
11040
|
+
body: {
|
|
11041
|
+
oldId?: number | null | undefined;
|
|
11042
|
+
description?: string | null | undefined;
|
|
11043
|
+
dateStart?: Date | null | undefined;
|
|
11044
|
+
dateEnd?: Date | null | undefined;
|
|
11045
|
+
name: string;
|
|
11046
|
+
companyId: string;
|
|
11047
|
+
};
|
|
11048
|
+
params: {};
|
|
11049
|
+
query: unknown;
|
|
11050
|
+
headers: unknown;
|
|
11051
|
+
response: {
|
|
11052
|
+
200: {
|
|
11053
|
+
id: string;
|
|
11054
|
+
};
|
|
11055
|
+
422: {
|
|
11056
|
+
type: "validation";
|
|
11057
|
+
on: string;
|
|
11058
|
+
summary?: string;
|
|
11059
|
+
message?: string;
|
|
11060
|
+
found?: unknown;
|
|
11061
|
+
property?: string;
|
|
11062
|
+
expected?: string;
|
|
11063
|
+
};
|
|
11064
|
+
};
|
|
11065
|
+
};
|
|
11066
|
+
};
|
|
11067
|
+
} & {
|
|
11068
|
+
plan: {
|
|
11069
|
+
":id": {
|
|
11070
|
+
put: {
|
|
11071
|
+
body: {
|
|
11072
|
+
name?: string | undefined;
|
|
11073
|
+
companyId?: string | undefined;
|
|
11074
|
+
oldId?: number | null | undefined;
|
|
11075
|
+
description?: string | null | undefined;
|
|
11076
|
+
dateStart?: Date | null | undefined;
|
|
11077
|
+
dateEnd?: Date | null | undefined;
|
|
11078
|
+
};
|
|
11079
|
+
params: {
|
|
11080
|
+
id: string;
|
|
11081
|
+
};
|
|
11082
|
+
query: unknown;
|
|
11083
|
+
headers: unknown;
|
|
11084
|
+
response: {
|
|
11085
|
+
422: {
|
|
11086
|
+
type: "validation";
|
|
11087
|
+
on: string;
|
|
11088
|
+
summary?: string;
|
|
11089
|
+
message?: string;
|
|
11090
|
+
found?: unknown;
|
|
11091
|
+
property?: string;
|
|
11092
|
+
expected?: string;
|
|
11093
|
+
};
|
|
11094
|
+
};
|
|
11095
|
+
};
|
|
11096
|
+
};
|
|
11097
|
+
};
|
|
11098
|
+
} & {
|
|
11099
|
+
plan: {
|
|
11100
|
+
":id": {
|
|
11101
|
+
delete: {
|
|
11102
|
+
body: unknown;
|
|
11103
|
+
params: {
|
|
11104
|
+
id: string;
|
|
11105
|
+
};
|
|
11106
|
+
query: unknown;
|
|
11107
|
+
headers: unknown;
|
|
11108
|
+
response: {
|
|
11109
|
+
422: {
|
|
11110
|
+
type: "validation";
|
|
11111
|
+
on: string;
|
|
11112
|
+
summary?: string;
|
|
11113
|
+
message?: string;
|
|
11114
|
+
found?: unknown;
|
|
11115
|
+
property?: string;
|
|
11116
|
+
expected?: string;
|
|
11117
|
+
};
|
|
11118
|
+
};
|
|
11119
|
+
};
|
|
11120
|
+
};
|
|
11121
|
+
};
|
|
11122
|
+
};
|
|
10649
11123
|
};
|
|
10650
11124
|
} & {
|
|
10651
11125
|
fleet: {
|
package/dist/index.js
CHANGED
|
@@ -142855,7 +142855,7 @@ var companyBillingPlanTable = companySchema.table("billing_plan", {
|
|
|
142855
142855
|
companyId: uuid5().notNull(),
|
|
142856
142856
|
billingPeriod: companyBillingPeriodEnum().notNull().default("MONTHLY"),
|
|
142857
142857
|
basePrice: numeric({ mode: "number" }).notNull(),
|
|
142858
|
-
|
|
142858
|
+
maxCarCount: integer2(),
|
|
142859
142859
|
active: boolean4().notNull().default(true),
|
|
142860
142860
|
note: text()
|
|
142861
142861
|
});
|
|
@@ -142867,8 +142867,6 @@ var companyInvoiceTable = companySchema.table("invoice", {
|
|
|
142867
142867
|
periodEnd: date7().notNull(),
|
|
142868
142868
|
carCount: integer2().notNull(),
|
|
142869
142869
|
basePrice: numeric({ mode: "number" }).notNull(),
|
|
142870
|
-
carPrice: numeric({ mode: "number" }).notNull(),
|
|
142871
|
-
totalPrice: numeric({ mode: "number" }).notNull(),
|
|
142872
142870
|
status: companyInvoiceStatusEnum().notNull().default("PENDING"),
|
|
142873
142871
|
issuedAt: timestamp({ withTimezone: true, mode: "string" }).notNull(),
|
|
142874
142872
|
paidAt: timestamp({ withTimezone: true, mode: "string" }),
|
|
@@ -147381,10 +147379,6 @@ var CompanyInvoiceLogic;
|
|
|
147381
147379
|
if (!carCount || carCount === 0) {
|
|
147382
147380
|
carCount = await CompanyInvoiceLogic.getCarCount(body.companyId);
|
|
147383
147381
|
}
|
|
147384
|
-
const basePrice = Number(billingPlan.basePrice);
|
|
147385
|
-
const pricePerCar = billingPlan.pricePerCar ? Number(billingPlan.pricePerCar) : 0;
|
|
147386
|
-
const carPrice = pricePerCar * Math.max(0, carCount - 1);
|
|
147387
|
-
const totalPrice = basePrice + carPrice;
|
|
147388
147382
|
const issuedAt = new Date;
|
|
147389
147383
|
const dueAt = new Date(issuedAt);
|
|
147390
147384
|
dueAt.setDate(dueAt.getDate() + 30);
|
|
@@ -147395,8 +147389,6 @@ var CompanyInvoiceLogic;
|
|
|
147395
147389
|
periodStart: body.periodStart,
|
|
147396
147390
|
periodEnd: periodEnd.toISOString().split("T")[0],
|
|
147397
147391
|
carCount,
|
|
147398
|
-
carPrice,
|
|
147399
|
-
totalPrice,
|
|
147400
147392
|
status: "PENDING",
|
|
147401
147393
|
issuedAt: issuedAt.toISOString(),
|
|
147402
147394
|
dueAt: dueAt.toISOString()
|
|
@@ -147481,13 +147473,12 @@ var CompanyInvoicePaymentLogic;
|
|
|
147481
147473
|
}).from(companyInvoicePaymentTable).where(eq(companyInvoicePaymentTable.invoiceId, body.invoiceId));
|
|
147482
147474
|
const totalPaid = paidAmountResult[0]?.totalPaid ?? 0;
|
|
147483
147475
|
const newPaymentAmount = Number(body.amount);
|
|
147484
|
-
const invoiceTotal = Number(invoice.totalPrice);
|
|
147485
147476
|
const newTotalPaid = totalPaid + newPaymentAmount;
|
|
147486
147477
|
const [payment] = await db_default.insert(companyInvoicePaymentTable).values({
|
|
147487
147478
|
...body,
|
|
147488
147479
|
paidAt: body.paidAt || new Date().toISOString()
|
|
147489
147480
|
}).returning();
|
|
147490
|
-
if (newTotalPaid >=
|
|
147481
|
+
if (newTotalPaid >= invoice.basePrice) {
|
|
147491
147482
|
await db_default.update(companyInvoiceTable).set({
|
|
147492
147483
|
status: "PAID",
|
|
147493
147484
|
paidAt: new Date().toISOString()
|
|
@@ -155479,6 +155470,217 @@ var msRoutes = new Elysia({
|
|
|
155479
155470
|
}).use(record_default);
|
|
155480
155471
|
var ms_default = msRoutes;
|
|
155481
155472
|
|
|
155473
|
+
// src/routes/fleet/pm/plan/logic.ts
|
|
155474
|
+
var PmPlanLogic;
|
|
155475
|
+
((PmPlanLogic) => {
|
|
155476
|
+
PmPlanLogic.select = async (query, user2) => {
|
|
155477
|
+
const filter = and(eq(pmPlanTable.companyId, user2.companyId), softDeletedFilter(pmPlanTable));
|
|
155478
|
+
const columns = getTableColumns(pmPlanTable);
|
|
155479
|
+
const baseQuery = db_default.select({
|
|
155480
|
+
...columns,
|
|
155481
|
+
totalCount: totalCountSql
|
|
155482
|
+
}).from(pmPlanTable).where(filter).$dynamic();
|
|
155483
|
+
const result = await pagination_helper_default(baseQuery, query.pagination);
|
|
155484
|
+
return getPaginationContent(result, query.pagination.size);
|
|
155485
|
+
};
|
|
155486
|
+
PmPlanLogic.create = async (body, user2) => {
|
|
155487
|
+
const [result] = await db_default.insert(pmPlanTable).values({
|
|
155488
|
+
...body,
|
|
155489
|
+
companyId: user2.companyId
|
|
155490
|
+
}).returning({
|
|
155491
|
+
id: pmPlanTable.id
|
|
155492
|
+
});
|
|
155493
|
+
return result;
|
|
155494
|
+
};
|
|
155495
|
+
PmPlanLogic.update = async (id, body, user2) => {
|
|
155496
|
+
await db_default.update(pmPlanTable).set({
|
|
155497
|
+
...body
|
|
155498
|
+
}).where(and(eq(pmPlanTable.id, id), eq(pmPlanTable.companyId, user2.companyId)));
|
|
155499
|
+
};
|
|
155500
|
+
PmPlanLogic.remove = async (id, user2) => {
|
|
155501
|
+
await db_default.update(pmPlanTable).set({
|
|
155502
|
+
deletedAt: nowSql_helper_default
|
|
155503
|
+
}).where(and(eq(pmPlanTable.id, id), eq(pmPlanTable.companyId, user2.companyId)));
|
|
155504
|
+
};
|
|
155505
|
+
})(PmPlanLogic ||= {});
|
|
155506
|
+
var logic_default40 = PmPlanLogic;
|
|
155507
|
+
|
|
155508
|
+
// src/routes/fleet/pm/plan/machine/logic.ts
|
|
155509
|
+
var PmPlanLogic2;
|
|
155510
|
+
((PmPlanLogic) => {
|
|
155511
|
+
PmPlanLogic.select = async (query) => {
|
|
155512
|
+
const filter = and(eq(pmPlanMachineTable.pmPlanId, query.pmPlanId), softDeletedFilter(pmPlanMachineTable));
|
|
155513
|
+
const columns = getTableColumns(pmPlanMachineTable);
|
|
155514
|
+
const baseQuery = db_default.select({
|
|
155515
|
+
...columns,
|
|
155516
|
+
totalCount: totalCountSql
|
|
155517
|
+
}).from(pmPlanMachineTable).where(filter).$dynamic();
|
|
155518
|
+
const result = await pagination_helper_default(baseQuery, query.pagination);
|
|
155519
|
+
return getPaginationContent(result, query.pagination.size);
|
|
155520
|
+
};
|
|
155521
|
+
PmPlanLogic.create = async (body) => {
|
|
155522
|
+
await db_default.insert(pmPlanMachineTable).values({
|
|
155523
|
+
...body
|
|
155524
|
+
});
|
|
155525
|
+
};
|
|
155526
|
+
PmPlanLogic.createMany = async (body) => {
|
|
155527
|
+
if (body.length === 0) {
|
|
155528
|
+
return status("Bad Request", "\u041C\u0430\u0448\u0438\u043D\u044B \u043C\u044D\u0434\u044D\u044D\u043B\u044D\u043B \u043E\u0440\u0443\u0443\u043B\u0430\u0445 \u043C\u044D\u0434\u044D\u044D\u043B\u044D\u043B \u0431\u0430\u0439\u0445\u0433\u04AF\u0439 \u0431\u0430\u0439\u043D\u0430.");
|
|
155529
|
+
}
|
|
155530
|
+
const result = await db_default.insert(pmPlanMachineTable).values(body).returning();
|
|
155531
|
+
return result;
|
|
155532
|
+
};
|
|
155533
|
+
PmPlanLogic.update = async (id, body) => {
|
|
155534
|
+
await db_default.update(pmPlanMachineTable).set({
|
|
155535
|
+
...body
|
|
155536
|
+
}).where(and(eq(pmPlanMachineTable.id, id)));
|
|
155537
|
+
};
|
|
155538
|
+
PmPlanLogic.remove = async (id) => {
|
|
155539
|
+
await db_default.update(pmPlanMachineTable).set({
|
|
155540
|
+
deletedAt: nowSql_helper_default
|
|
155541
|
+
}).where(and(eq(pmPlanMachineTable.id, id)));
|
|
155542
|
+
};
|
|
155543
|
+
})(PmPlanLogic2 ||= {});
|
|
155544
|
+
var logic_default41 = PmPlanLogic2;
|
|
155545
|
+
|
|
155546
|
+
// src/routes/fleet/pm/plan/machine/model.ts
|
|
155547
|
+
var PmPlanMachineModel;
|
|
155548
|
+
((PmPlanMachineModel) => {
|
|
155549
|
+
const createSchema = createInsertSchema2(pmPlanMachineTable);
|
|
155550
|
+
const updateSchema = createUpdateSchema(pmPlanMachineTable);
|
|
155551
|
+
PmPlanMachineModel.create = OmitBaseSchema(createSchema);
|
|
155552
|
+
PmPlanMachineModel.update = OmitBaseSchema(updateSchema);
|
|
155553
|
+
PmPlanMachineModel.select = t.Composite([
|
|
155554
|
+
PaginationSchema,
|
|
155555
|
+
t.Object({
|
|
155556
|
+
pmPlanId: t.String({ format: "uuid" })
|
|
155557
|
+
})
|
|
155558
|
+
]);
|
|
155559
|
+
PmPlanMachineModel.createMany = t.Array(OmitBaseSchema(createSchema));
|
|
155560
|
+
})(PmPlanMachineModel ||= {});
|
|
155561
|
+
var model_default40 = PmPlanMachineModel;
|
|
155562
|
+
|
|
155563
|
+
// src/routes/fleet/pm/plan/machine/index.ts
|
|
155564
|
+
var machineRoutes2 = new Elysia({
|
|
155565
|
+
prefix: "/machine",
|
|
155566
|
+
tags: ["PmPlanMachine"]
|
|
155567
|
+
}).use(better_auth_default).guard({
|
|
155568
|
+
auth: true
|
|
155569
|
+
}).get("/", async ({ query }) => logic_default41.select(query), {
|
|
155570
|
+
query: model_default40.select
|
|
155571
|
+
}).post("/", async ({ body }) => logic_default41.create(body), {
|
|
155572
|
+
body: model_default40.create
|
|
155573
|
+
}).post("/many", async ({ body }) => logic_default41.createMany(body), {
|
|
155574
|
+
body: model_default40.createMany
|
|
155575
|
+
}).guard({
|
|
155576
|
+
params: IdSchema
|
|
155577
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default41.update(id, body), {
|
|
155578
|
+
body: model_default40.update
|
|
155579
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default41.remove(id));
|
|
155580
|
+
var machine_default2 = machineRoutes2;
|
|
155581
|
+
|
|
155582
|
+
// src/routes/fleet/pm/plan/product/logic.ts
|
|
155583
|
+
var PmPlanProductLogic;
|
|
155584
|
+
((PmPlanProductLogic) => {
|
|
155585
|
+
PmPlanProductLogic.select = async (query) => {
|
|
155586
|
+
const filter = and(eq(pmPlanProductTable.pmPlanId, query.pmPlanId), softDeletedFilter(pmPlanProductTable));
|
|
155587
|
+
const columns = getTableColumns(pmPlanProductTable);
|
|
155588
|
+
const baseQuery = db_default.select({
|
|
155589
|
+
...columns,
|
|
155590
|
+
totalCount: totalCountSql
|
|
155591
|
+
}).from(pmPlanProductTable).where(filter).$dynamic();
|
|
155592
|
+
const result = await pagination_helper_default(baseQuery, query.pagination);
|
|
155593
|
+
return getPaginationContent(result, query.pagination.size);
|
|
155594
|
+
};
|
|
155595
|
+
PmPlanProductLogic.create = async (body) => {
|
|
155596
|
+
await db_default.insert(pmPlanProductTable).values({
|
|
155597
|
+
...body
|
|
155598
|
+
});
|
|
155599
|
+
};
|
|
155600
|
+
PmPlanProductLogic.createMany = async (body) => {
|
|
155601
|
+
if (body.length === 0) {
|
|
155602
|
+
return status("Bad Request", "\u0411\u04AF\u0442\u044D\u044D\u0433\u0434\u044D\u0445\u04AF\u04AF\u043D\u0438\u0439 \u043C\u044D\u0434\u044D\u044D\u043B\u044D\u043B \u043E\u0440\u0443\u0443\u043B\u0430\u0445 \u043C\u044D\u0434\u044D\u044D\u043B\u044D\u043B \u0431\u0430\u0439\u0445\u0433\u04AF\u0439 \u0431\u0430\u0439\u043D\u0430.");
|
|
155603
|
+
}
|
|
155604
|
+
const result = await db_default.insert(pmPlanProductTable).values(body).returning();
|
|
155605
|
+
return result;
|
|
155606
|
+
};
|
|
155607
|
+
PmPlanProductLogic.update = async (id, body) => {
|
|
155608
|
+
await db_default.update(pmPlanProductTable).set({
|
|
155609
|
+
...body
|
|
155610
|
+
}).where(and(eq(pmPlanProductTable.id, id)));
|
|
155611
|
+
};
|
|
155612
|
+
PmPlanProductLogic.remove = async (id) => {
|
|
155613
|
+
await db_default.update(pmPlanProductTable).set({
|
|
155614
|
+
deletedAt: nowSql_helper_default
|
|
155615
|
+
}).where(and(eq(pmPlanProductTable.id, id)));
|
|
155616
|
+
};
|
|
155617
|
+
})(PmPlanProductLogic ||= {});
|
|
155618
|
+
var logic_default42 = PmPlanProductLogic;
|
|
155619
|
+
|
|
155620
|
+
// src/routes/fleet/pm/plan/product/model.ts
|
|
155621
|
+
var PmPlanProductModel;
|
|
155622
|
+
((PmPlanProductModel) => {
|
|
155623
|
+
const createSchema = createInsertSchema2(pmPlanProductTable);
|
|
155624
|
+
const updateSchema = createUpdateSchema(pmPlanProductTable);
|
|
155625
|
+
PmPlanProductModel.create = OmitBaseSchema(createSchema);
|
|
155626
|
+
PmPlanProductModel.update = OmitBaseSchema(updateSchema);
|
|
155627
|
+
PmPlanProductModel.select = t.Composite([
|
|
155628
|
+
PaginationSchema,
|
|
155629
|
+
t.Object({
|
|
155630
|
+
pmPlanId: t.String({ format: "uuid" })
|
|
155631
|
+
})
|
|
155632
|
+
]);
|
|
155633
|
+
PmPlanProductModel.createMany = t.Array(OmitBaseSchema(createSchema));
|
|
155634
|
+
})(PmPlanProductModel ||= {});
|
|
155635
|
+
var model_default41 = PmPlanProductModel;
|
|
155636
|
+
|
|
155637
|
+
// src/routes/fleet/pm/plan/product/index.ts
|
|
155638
|
+
var productRoutes5 = new Elysia({
|
|
155639
|
+
prefix: "/product",
|
|
155640
|
+
tags: ["PmPlanProduct"]
|
|
155641
|
+
}).use(better_auth_default).guard({
|
|
155642
|
+
auth: true
|
|
155643
|
+
}).get("/", async ({ query }) => logic_default42.select(query), {
|
|
155644
|
+
query: model_default41.select
|
|
155645
|
+
}).post("/", async ({ body }) => logic_default42.create(body), {
|
|
155646
|
+
body: model_default41.create
|
|
155647
|
+
}).post("/many", async ({ body }) => logic_default42.createMany(body), {
|
|
155648
|
+
body: model_default41.createMany
|
|
155649
|
+
}).guard({
|
|
155650
|
+
params: IdSchema
|
|
155651
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default42.update(id, body), {
|
|
155652
|
+
body: model_default41.update
|
|
155653
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default42.remove(id));
|
|
155654
|
+
var product_default5 = productRoutes5;
|
|
155655
|
+
|
|
155656
|
+
// src/routes/fleet/pm/plan/model.ts
|
|
155657
|
+
var PmPlanModel;
|
|
155658
|
+
((PmPlanModel) => {
|
|
155659
|
+
const createSchema = createInsertSchema2(pmPlanTable);
|
|
155660
|
+
const updateSchema = createUpdateSchema(pmPlanTable);
|
|
155661
|
+
PmPlanModel.create = OmitBaseSchema(createSchema);
|
|
155662
|
+
PmPlanModel.update = OmitBaseSchema(updateSchema);
|
|
155663
|
+
PmPlanModel.select = t.Composite([PaginationSchema]);
|
|
155664
|
+
})(PmPlanModel ||= {});
|
|
155665
|
+
var model_default42 = PmPlanModel;
|
|
155666
|
+
|
|
155667
|
+
// src/routes/fleet/pm/plan/index.ts
|
|
155668
|
+
var planRoutes = new Elysia({
|
|
155669
|
+
prefix: "/plan",
|
|
155670
|
+
tags: ["PmPlan"]
|
|
155671
|
+
}).use(better_auth_default).use(machine_default2).use(product_default5).guard({
|
|
155672
|
+
userKind: "COMPANY_ADMIN"
|
|
155673
|
+
}).get("/", async ({ query, user: user2 }) => logic_default40.select(query, user2), {
|
|
155674
|
+
query: model_default42.select
|
|
155675
|
+
}).post("/", async ({ body, user: user2 }) => logic_default40.create(body, user2), {
|
|
155676
|
+
body: model_default42.create
|
|
155677
|
+
}).guard({
|
|
155678
|
+
params: IdSchema
|
|
155679
|
+
}).put("/:id", async ({ body, params: { id }, user: user2 }) => logic_default40.update(id, body, user2), {
|
|
155680
|
+
body: model_default42.update
|
|
155681
|
+
}).delete("/:id", async ({ params: { id }, user: user2 }) => logic_default40.remove(id, user2));
|
|
155682
|
+
var plan_default = planRoutes;
|
|
155683
|
+
|
|
155482
155684
|
// src/routes/fleet/pm/template/logic.ts
|
|
155483
155685
|
var PmTemplateLogic;
|
|
155484
155686
|
((PmTemplateLogic) => {
|
|
@@ -155511,7 +155713,7 @@ var PmTemplateLogic;
|
|
|
155511
155713
|
}).where(and(eq(pmTemplateTable.id, id), eq(pmTemplateTable.companyId, user2.companyId).if(user2.kind !== "ADMIN")));
|
|
155512
155714
|
};
|
|
155513
155715
|
})(PmTemplateLogic ||= {});
|
|
155514
|
-
var
|
|
155716
|
+
var logic_default43 = PmTemplateLogic;
|
|
155515
155717
|
|
|
155516
155718
|
// src/routes/fleet/pm/template/model.ts
|
|
155517
155719
|
var PmTemplateModel;
|
|
@@ -155522,7 +155724,7 @@ var PmTemplateModel;
|
|
|
155522
155724
|
PmTemplateModel.update = OmitBaseSchema(updateSchema);
|
|
155523
155725
|
PmTemplateModel.select = t.Composite([PaginationSchema]);
|
|
155524
155726
|
})(PmTemplateModel ||= {});
|
|
155525
|
-
var
|
|
155727
|
+
var model_default43 = PmTemplateModel;
|
|
155526
155728
|
|
|
155527
155729
|
// src/routes/fleet/pm/template/product/logic.ts
|
|
155528
155730
|
var PmTemplateProductLogic;
|
|
@@ -155554,7 +155756,7 @@ var PmTemplateProductLogic;
|
|
|
155554
155756
|
}).where(and(eq(pmTemplateProductTable.id, id)));
|
|
155555
155757
|
};
|
|
155556
155758
|
})(PmTemplateProductLogic ||= {});
|
|
155557
|
-
var
|
|
155759
|
+
var logic_default44 = PmTemplateProductLogic;
|
|
155558
155760
|
|
|
155559
155761
|
// src/routes/fleet/pm/template/product/model.ts
|
|
155560
155762
|
var PmTemplateProductModel;
|
|
@@ -155570,46 +155772,46 @@ var PmTemplateProductModel;
|
|
|
155570
155772
|
})
|
|
155571
155773
|
]);
|
|
155572
155774
|
})(PmTemplateProductModel ||= {});
|
|
155573
|
-
var
|
|
155775
|
+
var model_default44 = PmTemplateProductModel;
|
|
155574
155776
|
|
|
155575
155777
|
// src/routes/fleet/pm/template/product/index.ts
|
|
155576
|
-
var
|
|
155778
|
+
var productRoutes6 = new Elysia({
|
|
155577
155779
|
prefix: "/product",
|
|
155578
155780
|
tags: ["PmTemplateProduct"]
|
|
155579
155781
|
}).use(better_auth_default).guard({
|
|
155580
155782
|
userKind: "COMPANY_ADMIN"
|
|
155581
|
-
}).get("/", async ({ query }) =>
|
|
155582
|
-
query:
|
|
155583
|
-
}).post("/", async ({ body }) =>
|
|
155584
|
-
body:
|
|
155783
|
+
}).get("/", async ({ query }) => logic_default44.select(query), {
|
|
155784
|
+
query: model_default44.select
|
|
155785
|
+
}).post("/", async ({ body }) => logic_default44.create(body), {
|
|
155786
|
+
body: model_default44.create
|
|
155585
155787
|
}).guard({
|
|
155586
155788
|
params: IdSchema
|
|
155587
|
-
}).put("/:id", async ({ body, params: { id } }) =>
|
|
155588
|
-
body:
|
|
155589
|
-
}).delete("/:id", async ({ params: { id } }) =>
|
|
155590
|
-
var
|
|
155789
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default44.update(id, body), {
|
|
155790
|
+
body: model_default44.update
|
|
155791
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default44.remove(id));
|
|
155792
|
+
var product_default6 = productRoutes6;
|
|
155591
155793
|
|
|
155592
155794
|
// src/routes/fleet/pm/template/index.ts
|
|
155593
155795
|
var templateRoutes2 = new Elysia({
|
|
155594
155796
|
prefix: "/template",
|
|
155595
155797
|
tags: ["PmTemplate"]
|
|
155596
|
-
}).use(better_auth_default).use(
|
|
155798
|
+
}).use(better_auth_default).use(product_default6).guard({
|
|
155597
155799
|
userKind: "COMPANY_ADMIN"
|
|
155598
|
-
}).get("/", async ({ query, user: user2 }) =>
|
|
155599
|
-
query:
|
|
155600
|
-
}).post("/", async ({ body, user: user2 }) =>
|
|
155601
|
-
body:
|
|
155800
|
+
}).get("/", async ({ query, user: user2 }) => logic_default43.select(query, user2), {
|
|
155801
|
+
query: model_default43.select
|
|
155802
|
+
}).post("/", async ({ body, user: user2 }) => logic_default43.create(body, user2), {
|
|
155803
|
+
body: model_default43.create
|
|
155602
155804
|
}).guard({
|
|
155603
155805
|
params: IdSchema
|
|
155604
|
-
}).put("/:id", async ({ body, params: { id }, user: user2 }) =>
|
|
155605
|
-
body:
|
|
155606
|
-
}).delete("/:id", async ({ params: { id }, user: user2 }) =>
|
|
155806
|
+
}).put("/:id", async ({ body, params: { id }, user: user2 }) => logic_default43.update(id, body, user2), {
|
|
155807
|
+
body: model_default43.update
|
|
155808
|
+
}).delete("/:id", async ({ params: { id }, user: user2 }) => logic_default43.remove(id, user2));
|
|
155607
155809
|
var template_default2 = templateRoutes2;
|
|
155608
155810
|
|
|
155609
155811
|
// src/routes/fleet/pm/index.ts
|
|
155610
155812
|
var pmRoutes = new Elysia({
|
|
155611
155813
|
prefix: "/pm"
|
|
155612
|
-
}).use(template_default2);
|
|
155814
|
+
}).use(template_default2).use(plan_default);
|
|
155613
155815
|
var pm_default = pmRoutes;
|
|
155614
155816
|
|
|
155615
155817
|
// src/routes/fleet/index.ts
|
|
@@ -155647,7 +155849,7 @@ var UomCategoryLogic;
|
|
|
155647
155849
|
}).where(and(eq(uomCategoryTable.id, id)));
|
|
155648
155850
|
};
|
|
155649
155851
|
})(UomCategoryLogic ||= {});
|
|
155650
|
-
var
|
|
155852
|
+
var logic_default45 = UomCategoryLogic;
|
|
155651
155853
|
|
|
155652
155854
|
// src/routes/uom/category/model.ts
|
|
155653
155855
|
var UomCategoryModel;
|
|
@@ -155658,7 +155860,7 @@ var UomCategoryModel;
|
|
|
155658
155860
|
UomCategoryModel.update = OmitBaseSchema(updateSchema);
|
|
155659
155861
|
UomCategoryModel.select = t.Composite([PaginationSchema]);
|
|
155660
155862
|
})(UomCategoryModel ||= {});
|
|
155661
|
-
var
|
|
155863
|
+
var model_default45 = UomCategoryModel;
|
|
155662
155864
|
|
|
155663
155865
|
// src/routes/uom/category/index.ts
|
|
155664
155866
|
var categoryRoutes = new Elysia({
|
|
@@ -155666,15 +155868,15 @@ var categoryRoutes = new Elysia({
|
|
|
155666
155868
|
tags: ["UomCategory"]
|
|
155667
155869
|
}).use(better_auth_default).guard({
|
|
155668
155870
|
auth: true
|
|
155669
|
-
}).get("/", async ({ query }) =>
|
|
155670
|
-
query:
|
|
155671
|
-
}).post("/", async ({ body }) =>
|
|
155672
|
-
body:
|
|
155871
|
+
}).get("/", async ({ query }) => logic_default45.select(query), {
|
|
155872
|
+
query: model_default45.select
|
|
155873
|
+
}).post("/", async ({ body }) => logic_default45.create(body), {
|
|
155874
|
+
body: model_default45.create
|
|
155673
155875
|
}).guard({
|
|
155674
155876
|
params: IdSchema
|
|
155675
|
-
}).put("/:id", async ({ body, params: { id } }) =>
|
|
155676
|
-
body:
|
|
155677
|
-
}).delete("/:id", async ({ params: { id } }) =>
|
|
155877
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default45.update(id, body), {
|
|
155878
|
+
body: model_default45.update
|
|
155879
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default45.remove(id));
|
|
155678
155880
|
var category_default = categoryRoutes;
|
|
155679
155881
|
|
|
155680
155882
|
// src/routes/uom/conversion/logic.ts
|
|
@@ -155708,7 +155910,7 @@ var UomConversionLogic;
|
|
|
155708
155910
|
}).where(and(eq(uomConversionTable.id, id)));
|
|
155709
155911
|
};
|
|
155710
155912
|
})(UomConversionLogic ||= {});
|
|
155711
|
-
var
|
|
155913
|
+
var logic_default46 = UomConversionLogic;
|
|
155712
155914
|
|
|
155713
155915
|
// src/routes/uom/conversion/model.ts
|
|
155714
155916
|
var UomConversionModel;
|
|
@@ -155725,7 +155927,7 @@ var UomConversionModel;
|
|
|
155725
155927
|
})
|
|
155726
155928
|
]);
|
|
155727
155929
|
})(UomConversionModel ||= {});
|
|
155728
|
-
var
|
|
155930
|
+
var model_default46 = UomConversionModel;
|
|
155729
155931
|
|
|
155730
155932
|
// src/routes/uom/conversion/index.ts
|
|
155731
155933
|
var conversionRoutes = new Elysia({
|
|
@@ -155733,15 +155935,15 @@ var conversionRoutes = new Elysia({
|
|
|
155733
155935
|
tags: ["UomConversion"]
|
|
155734
155936
|
}).use(better_auth_default).guard({
|
|
155735
155937
|
auth: true
|
|
155736
|
-
}).get("/", async ({ query }) =>
|
|
155737
|
-
query:
|
|
155738
|
-
}).post("/", async ({ body }) =>
|
|
155739
|
-
body:
|
|
155938
|
+
}).get("/", async ({ query }) => logic_default46.select(query), {
|
|
155939
|
+
query: model_default46.select
|
|
155940
|
+
}).post("/", async ({ body }) => logic_default46.create(body), {
|
|
155941
|
+
body: model_default46.create
|
|
155740
155942
|
}).guard({
|
|
155741
155943
|
params: IdSchema
|
|
155742
|
-
}).put("/:id", async ({ body, params: { id } }) =>
|
|
155743
|
-
body:
|
|
155744
|
-
}).delete("/:id", async ({ params: { id } }) =>
|
|
155944
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default46.update(id, body), {
|
|
155945
|
+
body: model_default46.update
|
|
155946
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default46.remove(id));
|
|
155745
155947
|
var conversion_default = conversionRoutes;
|
|
155746
155948
|
|
|
155747
155949
|
// src/routes/uom/logic.ts
|
|
@@ -155775,7 +155977,7 @@ var UomLogic;
|
|
|
155775
155977
|
}).where(and(eq(uomTable.id, id)));
|
|
155776
155978
|
};
|
|
155777
155979
|
})(UomLogic ||= {});
|
|
155778
|
-
var
|
|
155980
|
+
var logic_default47 = UomLogic;
|
|
155779
155981
|
|
|
155780
155982
|
// src/routes/uom/model.ts
|
|
155781
155983
|
var UomModel;
|
|
@@ -155791,25 +155993,25 @@ var UomModel;
|
|
|
155791
155993
|
})
|
|
155792
155994
|
]);
|
|
155793
155995
|
})(UomModel ||= {});
|
|
155794
|
-
var
|
|
155996
|
+
var model_default47 = UomModel;
|
|
155795
155997
|
|
|
155796
155998
|
// src/routes/uom/index.ts
|
|
155797
155999
|
var uomSchemaRoutes = new Elysia({
|
|
155798
156000
|
prefix: "/uom"
|
|
155799
156001
|
}).use(better_auth_default).use(category_default).use(conversion_default).guard({
|
|
155800
156002
|
userKind: "ADMIN"
|
|
155801
|
-
}).get("/", async ({ query }) =>
|
|
155802
|
-
query:
|
|
156003
|
+
}).get("/", async ({ query }) => logic_default47.select(query), {
|
|
156004
|
+
query: model_default47.select,
|
|
155803
156005
|
tags: ["Uom"]
|
|
155804
|
-
}).post("/", async ({ body }) =>
|
|
155805
|
-
body:
|
|
156006
|
+
}).post("/", async ({ body }) => logic_default47.create(body), {
|
|
156007
|
+
body: model_default47.create,
|
|
155806
156008
|
tags: ["Uom"]
|
|
155807
156009
|
}).guard({
|
|
155808
156010
|
params: IdSchema
|
|
155809
|
-
}).put("/:id", async ({ body, params: { id } }) =>
|
|
155810
|
-
body:
|
|
156011
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default47.update(id, body), {
|
|
156012
|
+
body: model_default47.update,
|
|
155811
156013
|
tags: ["Uom"]
|
|
155812
|
-
}).delete("/:id", async ({ params: { id } }) =>
|
|
156014
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default47.remove(id), {
|
|
155813
156015
|
tags: ["Uom"]
|
|
155814
156016
|
});
|
|
155815
156017
|
var uom_default = uomSchemaRoutes;
|