autosync_backend2 1.2.57 → 1.2.63
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 +425 -87
- package/dist/index.js +208 -51
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1141,9 +1141,9 @@ export declare const app: Elysia<"", {
|
|
|
1141
1141
|
oldId?: number | null | undefined;
|
|
1142
1142
|
description?: string | null | undefined;
|
|
1143
1143
|
quantity?: number | undefined;
|
|
1144
|
+
order?: number | undefined;
|
|
1144
1145
|
shelfNumber?: string | null | undefined;
|
|
1145
1146
|
isOrdered?: boolean | undefined;
|
|
1146
|
-
order?: number | undefined;
|
|
1147
1147
|
productId: string;
|
|
1148
1148
|
warehouseId: string;
|
|
1149
1149
|
safetyStock: number;
|
|
@@ -1160,12 +1160,12 @@ export declare const app: Elysia<"", {
|
|
|
1160
1160
|
oldId: number | null;
|
|
1161
1161
|
description: string | null;
|
|
1162
1162
|
quantity: number;
|
|
1163
|
+
order: number;
|
|
1163
1164
|
productId: string;
|
|
1164
1165
|
warehouseId: string;
|
|
1165
1166
|
safetyStock: number;
|
|
1166
1167
|
shelfNumber: string | null;
|
|
1167
1168
|
isOrdered: boolean;
|
|
1168
|
-
order: number;
|
|
1169
1169
|
};
|
|
1170
1170
|
401: "Токен олдсонгүй";
|
|
1171
1171
|
403: "Хандах эрхгүй байна.";
|
|
@@ -1189,9 +1189,9 @@ export declare const app: Elysia<"", {
|
|
|
1189
1189
|
oldId?: number | null | undefined;
|
|
1190
1190
|
description?: string | null | undefined;
|
|
1191
1191
|
quantity?: number | undefined;
|
|
1192
|
+
order?: number | undefined;
|
|
1192
1193
|
shelfNumber?: string | null | undefined;
|
|
1193
1194
|
isOrdered?: boolean | undefined;
|
|
1194
|
-
order?: number | undefined;
|
|
1195
1195
|
productId: string;
|
|
1196
1196
|
warehouseId: string;
|
|
1197
1197
|
safetyStock: number;
|
|
@@ -1412,12 +1412,12 @@ export declare const app: Elysia<"", {
|
|
|
1412
1412
|
deletedAt?: string | null | undefined;
|
|
1413
1413
|
oldId?: number | null | undefined;
|
|
1414
1414
|
description?: string | null | undefined;
|
|
1415
|
+
order?: number | undefined;
|
|
1415
1416
|
productId?: string | undefined;
|
|
1416
1417
|
warehouseId?: string | undefined;
|
|
1417
1418
|
safetyStock?: number | undefined;
|
|
1418
1419
|
shelfNumber?: string | null | undefined;
|
|
1419
1420
|
isOrdered?: boolean | undefined;
|
|
1420
|
-
order?: number | undefined;
|
|
1421
1421
|
};
|
|
1422
1422
|
params: {
|
|
1423
1423
|
id: string;
|
|
@@ -3088,23 +3088,65 @@ export declare const app: Elysia<"", {
|
|
|
3088
3088
|
totalCount: number;
|
|
3089
3089
|
totalPage: number;
|
|
3090
3090
|
result: Omit<{
|
|
3091
|
+
invoice: {
|
|
3092
|
+
companyId: string;
|
|
3093
|
+
billingPlanId: string;
|
|
3094
|
+
periodStart: string;
|
|
3095
|
+
periodEnd: string;
|
|
3096
|
+
carCount: number;
|
|
3097
|
+
basePrice: number;
|
|
3098
|
+
status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
|
|
3099
|
+
issuedAt: string;
|
|
3100
|
+
paidAt: string | null;
|
|
3101
|
+
dueAt: string;
|
|
3102
|
+
note: string | null;
|
|
3103
|
+
id: string;
|
|
3104
|
+
createdAt: string;
|
|
3105
|
+
updatedAt: string;
|
|
3106
|
+
deletedAt: string | null;
|
|
3107
|
+
oldId: number | null;
|
|
3108
|
+
};
|
|
3109
|
+
billingPlan: {
|
|
3110
|
+
companyId: string;
|
|
3111
|
+
billingPeriod: "MONTHLY" | "ANNUAL" | "YEARLY";
|
|
3112
|
+
basePrice: number;
|
|
3113
|
+
maxCarCount: number | null;
|
|
3114
|
+
active: boolean;
|
|
3115
|
+
note: string | null;
|
|
3116
|
+
id: string;
|
|
3117
|
+
createdAt: string;
|
|
3118
|
+
updatedAt: string;
|
|
3119
|
+
deletedAt: string | null;
|
|
3120
|
+
oldId: number | null;
|
|
3121
|
+
} | null;
|
|
3122
|
+
company: {
|
|
3123
|
+
name: string;
|
|
3124
|
+
regNumber: string;
|
|
3125
|
+
phone: string;
|
|
3126
|
+
email: string;
|
|
3127
|
+
serviceName: string;
|
|
3128
|
+
logoUrl: string;
|
|
3129
|
+
province: string | null;
|
|
3130
|
+
district: string | null;
|
|
3131
|
+
khoroo: string | null;
|
|
3132
|
+
street: string | null;
|
|
3133
|
+
socialUrls: string[] | null;
|
|
3134
|
+
ceoName: string | null;
|
|
3135
|
+
webUrl: string | null;
|
|
3136
|
+
googleMapUrl: string | null;
|
|
3137
|
+
isContract: boolean;
|
|
3138
|
+
isNoat: boolean;
|
|
3139
|
+
isNexus: boolean;
|
|
3140
|
+
isActive: boolean;
|
|
3141
|
+
branchCount: number;
|
|
3142
|
+
type: "AutoService" | "MiningFleet" | "UrbanTransportFleet" | "Long-haul/Logistics" | "Emergency/Medical/Police" | "CorporateFleet";
|
|
3143
|
+
id: string;
|
|
3144
|
+
createdAt: string;
|
|
3145
|
+
updatedAt: string;
|
|
3146
|
+
deletedAt: string | null;
|
|
3147
|
+
oldId: number | null;
|
|
3148
|
+
} | null;
|
|
3091
3149
|
totalCount: number;
|
|
3092
|
-
companyId: string;
|
|
3093
|
-
billingPlanId: string;
|
|
3094
|
-
periodStart: string;
|
|
3095
|
-
periodEnd: string;
|
|
3096
|
-
carCount: number;
|
|
3097
|
-
basePrice: number;
|
|
3098
|
-
status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
|
|
3099
|
-
issuedAt: string;
|
|
3100
|
-
paidAt: string | null;
|
|
3101
|
-
dueAt: string;
|
|
3102
|
-
note: string | null;
|
|
3103
|
-
id: string;
|
|
3104
|
-
createdAt: string;
|
|
3105
|
-
updatedAt: string;
|
|
3106
|
-
deletedAt: string | null;
|
|
3107
|
-
oldId: number | null;
|
|
3108
3150
|
}, "totalCount">[];
|
|
3109
3151
|
};
|
|
3110
3152
|
401: "Токен олдсонгүй";
|
|
@@ -3168,59 +3210,6 @@ export declare const app: Elysia<"", {
|
|
|
3168
3210
|
};
|
|
3169
3211
|
};
|
|
3170
3212
|
};
|
|
3171
|
-
} & {
|
|
3172
|
-
invoice: {
|
|
3173
|
-
post: {
|
|
3174
|
-
body: {
|
|
3175
|
-
oldId?: number | null | undefined;
|
|
3176
|
-
note?: string | null | undefined;
|
|
3177
|
-
status?: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED" | undefined;
|
|
3178
|
-
paidAt?: string | null | undefined;
|
|
3179
|
-
companyId: string;
|
|
3180
|
-
basePrice: number;
|
|
3181
|
-
billingPlanId: string;
|
|
3182
|
-
periodStart: string;
|
|
3183
|
-
periodEnd: string;
|
|
3184
|
-
carCount: number;
|
|
3185
|
-
issuedAt: string;
|
|
3186
|
-
dueAt: string;
|
|
3187
|
-
};
|
|
3188
|
-
params: {};
|
|
3189
|
-
query: {};
|
|
3190
|
-
headers: {};
|
|
3191
|
-
response: {
|
|
3192
|
-
200: {
|
|
3193
|
-
id: string;
|
|
3194
|
-
createdAt: string;
|
|
3195
|
-
updatedAt: string;
|
|
3196
|
-
companyId: string;
|
|
3197
|
-
deletedAt: string | null;
|
|
3198
|
-
oldId: number | null;
|
|
3199
|
-
basePrice: number;
|
|
3200
|
-
note: string | null;
|
|
3201
|
-
billingPlanId: string;
|
|
3202
|
-
periodStart: string;
|
|
3203
|
-
periodEnd: string;
|
|
3204
|
-
carCount: number;
|
|
3205
|
-
status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
|
|
3206
|
-
issuedAt: string;
|
|
3207
|
-
paidAt: string | null;
|
|
3208
|
-
dueAt: string;
|
|
3209
|
-
};
|
|
3210
|
-
401: "Токен олдсонгүй";
|
|
3211
|
-
403: "Хандах эрхгүй байна." | "Төлбөрийн баримт үүсгэх эрхгүй байна.";
|
|
3212
|
-
422: {
|
|
3213
|
-
type: "validation";
|
|
3214
|
-
on: string;
|
|
3215
|
-
summary?: string;
|
|
3216
|
-
message?: string;
|
|
3217
|
-
found?: unknown;
|
|
3218
|
-
property?: string;
|
|
3219
|
-
expected?: string;
|
|
3220
|
-
};
|
|
3221
|
-
};
|
|
3222
|
-
};
|
|
3223
|
-
};
|
|
3224
3213
|
} & {
|
|
3225
3214
|
invoice: {
|
|
3226
3215
|
":id": {
|
|
@@ -10484,17 +10473,43 @@ export declare const app: Elysia<"", {
|
|
|
10484
10473
|
totalCount: number;
|
|
10485
10474
|
totalPage: number;
|
|
10486
10475
|
result: Omit<{
|
|
10476
|
+
product: {
|
|
10477
|
+
pmPlanId: string;
|
|
10478
|
+
productKindId: string;
|
|
10479
|
+
uomId: string;
|
|
10480
|
+
quantity: number | null;
|
|
10481
|
+
pmQuantity: string | null;
|
|
10482
|
+
id: string;
|
|
10483
|
+
createdAt: string;
|
|
10484
|
+
updatedAt: string;
|
|
10485
|
+
deletedAt: string | null;
|
|
10486
|
+
oldId: number | null;
|
|
10487
|
+
};
|
|
10488
|
+
productKind: {
|
|
10489
|
+
productCategoryId: string;
|
|
10490
|
+
name: string;
|
|
10491
|
+
description: string | null;
|
|
10492
|
+
id: string;
|
|
10493
|
+
createdAt: string;
|
|
10494
|
+
updatedAt: string;
|
|
10495
|
+
deletedAt: string | null;
|
|
10496
|
+
oldId: number | null;
|
|
10497
|
+
} | null;
|
|
10498
|
+
uom: {
|
|
10499
|
+
uomCategoryId: string;
|
|
10500
|
+
code: string | null;
|
|
10501
|
+
name: string;
|
|
10502
|
+
description: string | null;
|
|
10503
|
+
symbol: string | null;
|
|
10504
|
+
isBaseUnit: boolean;
|
|
10505
|
+
baseFactor: number | null;
|
|
10506
|
+
id: string;
|
|
10507
|
+
createdAt: string;
|
|
10508
|
+
updatedAt: string;
|
|
10509
|
+
deletedAt: string | null;
|
|
10510
|
+
oldId: number | null;
|
|
10511
|
+
} | null;
|
|
10487
10512
|
totalCount: number;
|
|
10488
|
-
pmPlanId: string;
|
|
10489
|
-
productKindId: string;
|
|
10490
|
-
uomId: string;
|
|
10491
|
-
quantity: number | null;
|
|
10492
|
-
pmQuantity: string;
|
|
10493
|
-
id: string;
|
|
10494
|
-
createdAt: string;
|
|
10495
|
-
updatedAt: string;
|
|
10496
|
-
deletedAt: string | null;
|
|
10497
|
-
oldId: number | null;
|
|
10498
10513
|
}, "totalCount">[];
|
|
10499
10514
|
};
|
|
10500
10515
|
401: "Токен олдсонгүй";
|
|
@@ -10516,10 +10531,10 @@ export declare const app: Elysia<"", {
|
|
|
10516
10531
|
body: {
|
|
10517
10532
|
oldId?: number | null | undefined;
|
|
10518
10533
|
quantity?: number | null | undefined;
|
|
10534
|
+
pmQuantity?: string | null | undefined;
|
|
10519
10535
|
uomId: string;
|
|
10520
10536
|
productKindId: string;
|
|
10521
10537
|
pmPlanId: string;
|
|
10522
|
-
pmQuantity: string;
|
|
10523
10538
|
};
|
|
10524
10539
|
params: {};
|
|
10525
10540
|
query: unknown;
|
|
@@ -10545,10 +10560,10 @@ export declare const app: Elysia<"", {
|
|
|
10545
10560
|
body: {
|
|
10546
10561
|
oldId?: number | null | undefined;
|
|
10547
10562
|
quantity?: number | null | undefined;
|
|
10563
|
+
pmQuantity?: string | null | undefined;
|
|
10548
10564
|
uomId: string;
|
|
10549
10565
|
productKindId: string;
|
|
10550
10566
|
pmPlanId: string;
|
|
10551
|
-
pmQuantity: string;
|
|
10552
10567
|
}[];
|
|
10553
10568
|
params: {};
|
|
10554
10569
|
query: unknown;
|
|
@@ -10564,7 +10579,7 @@ export declare const app: Elysia<"", {
|
|
|
10564
10579
|
uomId: string;
|
|
10565
10580
|
productKindId: string;
|
|
10566
10581
|
pmPlanId: string;
|
|
10567
|
-
pmQuantity: string;
|
|
10582
|
+
pmQuantity: string | null;
|
|
10568
10583
|
}[];
|
|
10569
10584
|
400: "Бүтээгдэхүүний мэдээлэл оруулах мэдээлэл байхгүй байна.";
|
|
10570
10585
|
401: "Токен олдсонгүй";
|
|
@@ -10591,7 +10606,7 @@ export declare const app: Elysia<"", {
|
|
|
10591
10606
|
uomId?: string | undefined;
|
|
10592
10607
|
productKindId?: string | undefined;
|
|
10593
10608
|
pmPlanId?: string | undefined;
|
|
10594
|
-
pmQuantity?: string | undefined;
|
|
10609
|
+
pmQuantity?: string | null | undefined;
|
|
10595
10610
|
};
|
|
10596
10611
|
params: {
|
|
10597
10612
|
id: string;
|
|
@@ -10912,6 +10927,34 @@ export declare const app: Elysia<"", {
|
|
|
10912
10927
|
query: unknown;
|
|
10913
10928
|
headers: unknown;
|
|
10914
10929
|
response: {
|
|
10930
|
+
200: {
|
|
10931
|
+
companyId: string | null;
|
|
10932
|
+
machineKindId: string;
|
|
10933
|
+
customerId: string | null;
|
|
10934
|
+
name: string | null;
|
|
10935
|
+
assetCode: string | null;
|
|
10936
|
+
vin: string | null;
|
|
10937
|
+
licensePlate: string | null;
|
|
10938
|
+
color: string | null;
|
|
10939
|
+
engineCc: string | null;
|
|
10940
|
+
cylinder: string | null;
|
|
10941
|
+
gasType: string | null;
|
|
10942
|
+
transmissionType: string | null;
|
|
10943
|
+
vehicleType: string | null;
|
|
10944
|
+
yearManufacture: number | null;
|
|
10945
|
+
yearImport: number | null;
|
|
10946
|
+
steering: string | null;
|
|
10947
|
+
engineCode: string | null;
|
|
10948
|
+
transmissionCode: string | null;
|
|
10949
|
+
driveTrain: string | null;
|
|
10950
|
+
km: number;
|
|
10951
|
+
customData: unknown;
|
|
10952
|
+
id: string;
|
|
10953
|
+
createdAt: string;
|
|
10954
|
+
updatedAt: string;
|
|
10955
|
+
deletedAt: string | null;
|
|
10956
|
+
oldId: number | null;
|
|
10957
|
+
};
|
|
10915
10958
|
401: "Токен олдсонгүй";
|
|
10916
10959
|
422: {
|
|
10917
10960
|
type: "validation";
|
|
@@ -11195,6 +11238,301 @@ export declare const app: Elysia<"", {
|
|
|
11195
11238
|
};
|
|
11196
11239
|
};
|
|
11197
11240
|
};
|
|
11241
|
+
} & {
|
|
11242
|
+
fleet: {
|
|
11243
|
+
"work-order": {};
|
|
11244
|
+
} & {
|
|
11245
|
+
"work-order": {
|
|
11246
|
+
task: {};
|
|
11247
|
+
} & {
|
|
11248
|
+
task: {
|
|
11249
|
+
get: {
|
|
11250
|
+
body: unknown;
|
|
11251
|
+
params: {};
|
|
11252
|
+
query: {
|
|
11253
|
+
pagination: {
|
|
11254
|
+
size: number;
|
|
11255
|
+
page: number;
|
|
11256
|
+
};
|
|
11257
|
+
};
|
|
11258
|
+
headers: unknown;
|
|
11259
|
+
response: {
|
|
11260
|
+
200: {
|
|
11261
|
+
totalCount: number;
|
|
11262
|
+
totalPage: number;
|
|
11263
|
+
result: Omit<{
|
|
11264
|
+
totalCount: number;
|
|
11265
|
+
workOrderId: string;
|
|
11266
|
+
templateId: string;
|
|
11267
|
+
serviceKindId: string;
|
|
11268
|
+
description: string | null;
|
|
11269
|
+
manHour: number | null;
|
|
11270
|
+
state: "IN_PROGRESS" | "COMPLETED" | "OPEN" | "CLOSED";
|
|
11271
|
+
id: string;
|
|
11272
|
+
createdAt: string;
|
|
11273
|
+
updatedAt: string;
|
|
11274
|
+
deletedAt: string | null;
|
|
11275
|
+
oldId: number | null;
|
|
11276
|
+
}, "totalCount">[];
|
|
11277
|
+
};
|
|
11278
|
+
401: "Токен олдсонгүй";
|
|
11279
|
+
422: {
|
|
11280
|
+
type: "validation";
|
|
11281
|
+
on: string;
|
|
11282
|
+
summary?: string;
|
|
11283
|
+
message?: string;
|
|
11284
|
+
found?: unknown;
|
|
11285
|
+
property?: string;
|
|
11286
|
+
expected?: string;
|
|
11287
|
+
};
|
|
11288
|
+
};
|
|
11289
|
+
};
|
|
11290
|
+
};
|
|
11291
|
+
} & {
|
|
11292
|
+
task: {
|
|
11293
|
+
post: {
|
|
11294
|
+
body: {
|
|
11295
|
+
description?: string | undefined;
|
|
11296
|
+
state?: "IN_PROGRESS" | "COMPLETED" | "OPEN" | "CLOSED" | undefined;
|
|
11297
|
+
manHour?: number | undefined;
|
|
11298
|
+
serviceKindId: string;
|
|
11299
|
+
templateId: string;
|
|
11300
|
+
workOrderId: string;
|
|
11301
|
+
};
|
|
11302
|
+
params: {};
|
|
11303
|
+
query: unknown;
|
|
11304
|
+
headers: unknown;
|
|
11305
|
+
response: {
|
|
11306
|
+
200: {
|
|
11307
|
+
id: string;
|
|
11308
|
+
createdAt: string;
|
|
11309
|
+
updatedAt: string;
|
|
11310
|
+
deletedAt: string | null;
|
|
11311
|
+
oldId: number | null;
|
|
11312
|
+
description: string | null;
|
|
11313
|
+
serviceKindId: string;
|
|
11314
|
+
state: "IN_PROGRESS" | "COMPLETED" | "OPEN" | "CLOSED";
|
|
11315
|
+
templateId: string;
|
|
11316
|
+
workOrderId: string;
|
|
11317
|
+
manHour: number | null;
|
|
11318
|
+
};
|
|
11319
|
+
401: "Токен олдсонгүй";
|
|
11320
|
+
422: {
|
|
11321
|
+
type: "validation";
|
|
11322
|
+
on: string;
|
|
11323
|
+
summary?: string;
|
|
11324
|
+
message?: string;
|
|
11325
|
+
found?: unknown;
|
|
11326
|
+
property?: string;
|
|
11327
|
+
expected?: string;
|
|
11328
|
+
};
|
|
11329
|
+
};
|
|
11330
|
+
};
|
|
11331
|
+
};
|
|
11332
|
+
} & {
|
|
11333
|
+
task: {
|
|
11334
|
+
":id": {
|
|
11335
|
+
put: {
|
|
11336
|
+
body: {
|
|
11337
|
+
oldId?: number | null | undefined;
|
|
11338
|
+
description?: string | null | undefined;
|
|
11339
|
+
serviceKindId?: string | undefined;
|
|
11340
|
+
state?: "IN_PROGRESS" | "COMPLETED" | "OPEN" | "CLOSED" | undefined;
|
|
11341
|
+
templateId?: string | undefined;
|
|
11342
|
+
workOrderId?: string | undefined;
|
|
11343
|
+
manHour?: number | null | undefined;
|
|
11344
|
+
};
|
|
11345
|
+
params: {
|
|
11346
|
+
id: string;
|
|
11347
|
+
};
|
|
11348
|
+
query: unknown;
|
|
11349
|
+
headers: unknown;
|
|
11350
|
+
response: {
|
|
11351
|
+
401: "Токен олдсонгүй";
|
|
11352
|
+
422: {
|
|
11353
|
+
type: "validation";
|
|
11354
|
+
on: string;
|
|
11355
|
+
summary?: string;
|
|
11356
|
+
message?: string;
|
|
11357
|
+
found?: unknown;
|
|
11358
|
+
property?: string;
|
|
11359
|
+
expected?: string;
|
|
11360
|
+
};
|
|
11361
|
+
};
|
|
11362
|
+
};
|
|
11363
|
+
};
|
|
11364
|
+
};
|
|
11365
|
+
} & {
|
|
11366
|
+
task: {
|
|
11367
|
+
":id": {
|
|
11368
|
+
delete: {
|
|
11369
|
+
body: unknown;
|
|
11370
|
+
params: {
|
|
11371
|
+
id: string;
|
|
11372
|
+
};
|
|
11373
|
+
query: unknown;
|
|
11374
|
+
headers: unknown;
|
|
11375
|
+
response: {
|
|
11376
|
+
401: "Токен олдсонгүй";
|
|
11377
|
+
422: {
|
|
11378
|
+
type: "validation";
|
|
11379
|
+
on: string;
|
|
11380
|
+
summary?: string;
|
|
11381
|
+
message?: string;
|
|
11382
|
+
found?: unknown;
|
|
11383
|
+
property?: string;
|
|
11384
|
+
expected?: string;
|
|
11385
|
+
};
|
|
11386
|
+
};
|
|
11387
|
+
};
|
|
11388
|
+
};
|
|
11389
|
+
};
|
|
11390
|
+
};
|
|
11391
|
+
} & {
|
|
11392
|
+
"work-order": {
|
|
11393
|
+
get: {
|
|
11394
|
+
body: unknown;
|
|
11395
|
+
params: {};
|
|
11396
|
+
query: {
|
|
11397
|
+
pagination: {
|
|
11398
|
+
size: number;
|
|
11399
|
+
page: number;
|
|
11400
|
+
};
|
|
11401
|
+
};
|
|
11402
|
+
headers: unknown;
|
|
11403
|
+
response: {
|
|
11404
|
+
200: {
|
|
11405
|
+
totalCount: number;
|
|
11406
|
+
totalPage: number;
|
|
11407
|
+
result: Omit<{
|
|
11408
|
+
totalCount: number;
|
|
11409
|
+
machineId: string;
|
|
11410
|
+
sourceType: string | null;
|
|
11411
|
+
type: "CORRECTIVE" | "PREVENTIVE";
|
|
11412
|
+
piority: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "PLANNED";
|
|
11413
|
+
state: "IN_PROGRESS" | "COMPLETED" | "OPEN" | "CLOSED";
|
|
11414
|
+
dateClosed: Date | null;
|
|
11415
|
+
id: string;
|
|
11416
|
+
createdAt: string;
|
|
11417
|
+
updatedAt: string;
|
|
11418
|
+
deletedAt: string | null;
|
|
11419
|
+
oldId: number | null;
|
|
11420
|
+
}, "totalCount">[];
|
|
11421
|
+
};
|
|
11422
|
+
401: "Токен олдсонгүй";
|
|
11423
|
+
422: {
|
|
11424
|
+
type: "validation";
|
|
11425
|
+
on: string;
|
|
11426
|
+
summary?: string;
|
|
11427
|
+
message?: string;
|
|
11428
|
+
found?: unknown;
|
|
11429
|
+
property?: string;
|
|
11430
|
+
expected?: string;
|
|
11431
|
+
};
|
|
11432
|
+
};
|
|
11433
|
+
};
|
|
11434
|
+
};
|
|
11435
|
+
} & {
|
|
11436
|
+
"work-order": {
|
|
11437
|
+
post: {
|
|
11438
|
+
body: {
|
|
11439
|
+
oldId?: number | null | undefined;
|
|
11440
|
+
state?: "IN_PROGRESS" | "COMPLETED" | "OPEN" | "CLOSED" | undefined;
|
|
11441
|
+
sourceType?: string | null | undefined;
|
|
11442
|
+
dateClosed?: Date | null | undefined;
|
|
11443
|
+
type: "CORRECTIVE" | "PREVENTIVE";
|
|
11444
|
+
machineId: string;
|
|
11445
|
+
piority: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "PLANNED";
|
|
11446
|
+
};
|
|
11447
|
+
params: {};
|
|
11448
|
+
query: unknown;
|
|
11449
|
+
headers: unknown;
|
|
11450
|
+
response: {
|
|
11451
|
+
200: {
|
|
11452
|
+
type: "CORRECTIVE" | "PREVENTIVE";
|
|
11453
|
+
id: string;
|
|
11454
|
+
createdAt: string;
|
|
11455
|
+
updatedAt: string;
|
|
11456
|
+
deletedAt: string | null;
|
|
11457
|
+
oldId: number | null;
|
|
11458
|
+
state: "IN_PROGRESS" | "COMPLETED" | "OPEN" | "CLOSED";
|
|
11459
|
+
machineId: string;
|
|
11460
|
+
piority: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "PLANNED";
|
|
11461
|
+
sourceType: string | null;
|
|
11462
|
+
dateClosed: Date | null;
|
|
11463
|
+
};
|
|
11464
|
+
401: "Токен олдсонгүй";
|
|
11465
|
+
422: {
|
|
11466
|
+
type: "validation";
|
|
11467
|
+
on: string;
|
|
11468
|
+
summary?: string;
|
|
11469
|
+
message?: string;
|
|
11470
|
+
found?: unknown;
|
|
11471
|
+
property?: string;
|
|
11472
|
+
expected?: string;
|
|
11473
|
+
};
|
|
11474
|
+
};
|
|
11475
|
+
};
|
|
11476
|
+
};
|
|
11477
|
+
} & {
|
|
11478
|
+
"work-order": {
|
|
11479
|
+
":id": {
|
|
11480
|
+
put: {
|
|
11481
|
+
body: {
|
|
11482
|
+
type?: "CORRECTIVE" | "PREVENTIVE" | undefined;
|
|
11483
|
+
oldId?: number | null | undefined;
|
|
11484
|
+
state?: "IN_PROGRESS" | "COMPLETED" | "OPEN" | "CLOSED" | undefined;
|
|
11485
|
+
machineId?: string | undefined;
|
|
11486
|
+
piority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "PLANNED" | undefined;
|
|
11487
|
+
sourceType?: string | null | undefined;
|
|
11488
|
+
dateClosed?: Date | null | undefined;
|
|
11489
|
+
};
|
|
11490
|
+
params: {
|
|
11491
|
+
id: string;
|
|
11492
|
+
};
|
|
11493
|
+
query: unknown;
|
|
11494
|
+
headers: unknown;
|
|
11495
|
+
response: {
|
|
11496
|
+
401: "Токен олдсонгүй";
|
|
11497
|
+
422: {
|
|
11498
|
+
type: "validation";
|
|
11499
|
+
on: string;
|
|
11500
|
+
summary?: string;
|
|
11501
|
+
message?: string;
|
|
11502
|
+
found?: unknown;
|
|
11503
|
+
property?: string;
|
|
11504
|
+
expected?: string;
|
|
11505
|
+
};
|
|
11506
|
+
};
|
|
11507
|
+
};
|
|
11508
|
+
};
|
|
11509
|
+
};
|
|
11510
|
+
} & {
|
|
11511
|
+
"work-order": {
|
|
11512
|
+
":id": {
|
|
11513
|
+
delete: {
|
|
11514
|
+
body: unknown;
|
|
11515
|
+
params: {
|
|
11516
|
+
id: string;
|
|
11517
|
+
};
|
|
11518
|
+
query: unknown;
|
|
11519
|
+
headers: unknown;
|
|
11520
|
+
response: {
|
|
11521
|
+
401: "Токен олдсонгүй";
|
|
11522
|
+
422: {
|
|
11523
|
+
type: "validation";
|
|
11524
|
+
on: string;
|
|
11525
|
+
summary?: string;
|
|
11526
|
+
message?: string;
|
|
11527
|
+
found?: unknown;
|
|
11528
|
+
property?: string;
|
|
11529
|
+
expected?: string;
|
|
11530
|
+
};
|
|
11531
|
+
};
|
|
11532
|
+
};
|
|
11533
|
+
};
|
|
11534
|
+
};
|
|
11535
|
+
};
|
|
11198
11536
|
};
|
|
11199
11537
|
} & {
|
|
11200
11538
|
api: {
|
package/dist/index.js
CHANGED
|
@@ -142638,6 +142638,12 @@ function drizzle(...params) {
|
|
|
142638
142638
|
// src/lib/db/schema/index.ts
|
|
142639
142639
|
var exports_schema = {};
|
|
142640
142640
|
__export(exports_schema, {
|
|
142641
|
+
workOrderTypeEnum: () => workOrderTypeEnum,
|
|
142642
|
+
workOrderTaskTable: () => workOrderTaskTable,
|
|
142643
|
+
workOrderTable: () => workOrderTable,
|
|
142644
|
+
workOrderStateEnum: () => workOrderStateEnum,
|
|
142645
|
+
workOrderSchema: () => workOrderSchema,
|
|
142646
|
+
workOrderPiorityEnum: () => workOrderPiorityEnum,
|
|
142641
142647
|
weekDayEnum: () => weekDayEnum,
|
|
142642
142648
|
warehouseWarehouseTable: () => warehouseWarehouseTable,
|
|
142643
142649
|
warehouseTransferTable: () => warehouseTransferTable,
|
|
@@ -143455,7 +143461,7 @@ var pmPlanProductTable = pmSchema.table("plan_product", {
|
|
|
143455
143461
|
productKindId: uuid5().notNull(),
|
|
143456
143462
|
uomId: uuid5().notNull(),
|
|
143457
143463
|
quantity: numeric({ mode: "number" }),
|
|
143458
|
-
pmQuantity: uuid5()
|
|
143464
|
+
pmQuantity: uuid5()
|
|
143459
143465
|
});
|
|
143460
143466
|
var maintenanceServiceSchema = pgSchema("maintenance_service");
|
|
143461
143467
|
var maintenanceServiceRecordTable = maintenanceServiceSchema.table("record", {
|
|
@@ -143476,6 +143482,42 @@ var maintenanceServiceRecordProductTable = maintenanceServiceSchema.table("recor
|
|
|
143476
143482
|
uomId: uuid5().notNull(),
|
|
143477
143483
|
quantity: numeric({ mode: "number" })
|
|
143478
143484
|
});
|
|
143485
|
+
var workOrderSchema = pgSchema("work_order");
|
|
143486
|
+
var workOrderTypeEnum = workOrderSchema.enum("type", [
|
|
143487
|
+
"CORRECTIVE",
|
|
143488
|
+
"PREVENTIVE"
|
|
143489
|
+
]);
|
|
143490
|
+
var workOrderPiorityEnum = workOrderSchema.enum("piority", [
|
|
143491
|
+
"CRITICAL",
|
|
143492
|
+
"HIGH",
|
|
143493
|
+
"MEDIUM",
|
|
143494
|
+
"LOW",
|
|
143495
|
+
"PLANNED"
|
|
143496
|
+
]);
|
|
143497
|
+
var workOrderStateEnum = workOrderSchema.enum("state", [
|
|
143498
|
+
"OPEN",
|
|
143499
|
+
"IN_PROGRESS",
|
|
143500
|
+
"COMPLETED",
|
|
143501
|
+
"CLOSED"
|
|
143502
|
+
]);
|
|
143503
|
+
var workOrderTable = workOrderSchema.table("order", {
|
|
143504
|
+
...base_schema_helper_default,
|
|
143505
|
+
machineId: uuid5().notNull(),
|
|
143506
|
+
sourceType: varchar(),
|
|
143507
|
+
type: workOrderTypeEnum().notNull(),
|
|
143508
|
+
piority: workOrderPiorityEnum().notNull(),
|
|
143509
|
+
state: workOrderStateEnum().notNull().default("OPEN"),
|
|
143510
|
+
dateClosed: timestamp({ withTimezone: true })
|
|
143511
|
+
});
|
|
143512
|
+
var workOrderTaskTable = workOrderSchema.table("task", {
|
|
143513
|
+
...base_schema_helper_default,
|
|
143514
|
+
workOrderId: uuid5().notNull(),
|
|
143515
|
+
templateId: uuid5().notNull(),
|
|
143516
|
+
serviceKindId: uuid5().notNull(),
|
|
143517
|
+
description: text(),
|
|
143518
|
+
manHour: numeric({ mode: "number" }),
|
|
143519
|
+
state: workOrderStateEnum().notNull().default("OPEN")
|
|
143520
|
+
});
|
|
143479
143521
|
// src/lib/db/schema/techdoc.schema.ts
|
|
143480
143522
|
var techdocSchema = pgSchema("techdoc");
|
|
143481
143523
|
var techdocVehicleKindEnum = pgEnum("vehicle_kind_enum", [
|
|
@@ -147596,20 +147638,14 @@ var CompanyInvoiceLogic;
|
|
|
147596
147638
|
}).where(and(eq(companyInvoiceTable.status, "PENDING"), lte(sql3`${companyInvoiceTable.dueAt}`, now))).returning();
|
|
147597
147639
|
return result;
|
|
147598
147640
|
};
|
|
147599
|
-
CompanyInvoiceLogic.create = async (body, user2) => {
|
|
147600
|
-
if (user2.kind !== "ADMIN" && user2.companyId !== body.companyId) {
|
|
147601
|
-
return status("Forbidden", "\u0422\u04E9\u043B\u0431\u04E9\u0440\u0438\u0439\u043D \u0431\u0430\u0440\u0438\u043C\u0442 \u04AF\u04AF\u0441\u0433\u044D\u0445 \u044D\u0440\u0445\u0433\u04AF\u0439 \u0431\u0430\u0439\u043D\u0430.");
|
|
147602
|
-
}
|
|
147603
|
-
const [invoice] = await db_default.insert(companyInvoiceTable).values(body).returning();
|
|
147604
|
-
return invoice;
|
|
147605
|
-
};
|
|
147606
147641
|
CompanyInvoiceLogic.select = async (query, user2) => {
|
|
147607
147642
|
const filter = and(eq(companyInvoiceTable.companyId, query.companyId ?? "").if(query.companyId && user2.kind === "ADMIN"), eq(companyInvoiceTable.companyId, user2.companyId).if(user2.kind !== "ADMIN"), eq(companyInvoiceTable.status, query.status).if(query.status !== undefined), eq(companyInvoiceTable.billingPlanId, query.billingPlanId).if(query.billingPlanId), softDeletedFilter(companyInvoiceTable));
|
|
147608
|
-
const columns = getTableColumns(companyInvoiceTable);
|
|
147609
147643
|
const baseQuery = db_default.select({
|
|
147610
|
-
|
|
147644
|
+
invoice: companyInvoiceTable,
|
|
147645
|
+
billingPlan: companyBillingPlanTable,
|
|
147646
|
+
company: companyCompanyTable,
|
|
147611
147647
|
totalCount: totalCountSql
|
|
147612
|
-
}).from(companyInvoiceTable).where(filter).$dynamic();
|
|
147648
|
+
}).from(companyInvoiceTable).leftJoin(companyBillingPlanTable, eq(companyInvoiceTable.billingPlanId, companyBillingPlanTable.id)).leftJoin(companyCompanyTable, eq(companyInvoiceTable.companyId, companyCompanyTable.id)).where(filter).$dynamic();
|
|
147613
147649
|
const result = await pagination_helper_default(baseQuery, query.pagination);
|
|
147614
147650
|
return getPaginationContent(result, query.pagination.size);
|
|
147615
147651
|
};
|
|
@@ -147636,7 +147672,11 @@ var CompanyInvoiceModel;
|
|
|
147636
147672
|
const createSchema = createInsertSchema2(companyInvoiceTable);
|
|
147637
147673
|
const updateSchema = createUpdateSchema(companyInvoiceTable);
|
|
147638
147674
|
const selectSchema = createSelectSchema(companyInvoiceTable);
|
|
147639
|
-
CompanyInvoiceModel.create = OmitBaseSchema(createSchema)
|
|
147675
|
+
CompanyInvoiceModel.create = t.Omit(OmitBaseSchema(createSchema), [
|
|
147676
|
+
"periodEnd",
|
|
147677
|
+
"issuedAt",
|
|
147678
|
+
"dueAt"
|
|
147679
|
+
]);
|
|
147640
147680
|
CompanyInvoiceModel.update = OmitBaseSchema(updateSchema);
|
|
147641
147681
|
CompanyInvoiceModel.select = t.Composite([
|
|
147642
147682
|
t.Partial(selectSchema),
|
|
@@ -147797,9 +147837,6 @@ var invoiceRoutes = new Elysia({
|
|
|
147797
147837
|
}).post("/generate", async ({ body, user: user2 }) => await logic_default5.generate(body, user2), {
|
|
147798
147838
|
body: model_default6.generate,
|
|
147799
147839
|
userKind: "ADMIN"
|
|
147800
|
-
}).post("/", async ({ body, user: user2 }) => await logic_default5.create(body, user2), {
|
|
147801
|
-
body: model_default6.create,
|
|
147802
|
-
userKind: "ADMIN"
|
|
147803
147840
|
}).guard({
|
|
147804
147841
|
params: IdSchema
|
|
147805
147842
|
}).put("/:id", async ({ params: { id }, body, user: user2 }) => await logic_default5.update(id, body, user2), {
|
|
@@ -155498,7 +155535,7 @@ var inspection_default2 = inspectionRoutes2;
|
|
|
155498
155535
|
var MachineLogic;
|
|
155499
155536
|
((MachineLogic) => {
|
|
155500
155537
|
MachineLogic.select = async (query, user2) => {
|
|
155501
|
-
const filter = and(
|
|
155538
|
+
const filter = and(eq(companyMachineTable.companyId, user2.companyId).if(user2.kind !== "ADMIN"), eq(companyMachineTable.id, query.id).if(query.id), softDeletedFilter(companyMachineTable));
|
|
155502
155539
|
const columns = getTableColumns(companyMachineTable);
|
|
155503
155540
|
const baseQuery = db_default.select({
|
|
155504
155541
|
...columns,
|
|
@@ -155514,9 +155551,10 @@ var MachineLogic;
|
|
|
155514
155551
|
});
|
|
155515
155552
|
};
|
|
155516
155553
|
MachineLogic.update = async (id, body, user2) => {
|
|
155517
|
-
await db_default.update(companyMachineTable).set({
|
|
155554
|
+
const [result] = await db_default.update(companyMachineTable).set({
|
|
155518
155555
|
...body
|
|
155519
|
-
}).where(and(eq(companyMachineTable.id, id), eq(companyMachineTable.companyId, user2.companyId).if(user2.kind !== "ADMIN")));
|
|
155556
|
+
}).where(and(eq(companyMachineTable.id, id), eq(companyMachineTable.companyId, user2.companyId).if(user2.kind !== "ADMIN"))).returning();
|
|
155557
|
+
return result;
|
|
155520
155558
|
};
|
|
155521
155559
|
MachineLogic.remove = async (id, user2) => {
|
|
155522
155560
|
await db_default.update(companyMachineTable).set({
|
|
@@ -155717,8 +155755,7 @@ var PmPlanLogic;
|
|
|
155717
155755
|
pmPlanId: plan.id,
|
|
155718
155756
|
productKindId: product.productKindId,
|
|
155719
155757
|
uomId: product.uomId,
|
|
155720
|
-
quantity: product.quantity
|
|
155721
|
-
pmQuantity: product.id
|
|
155758
|
+
quantity: product.quantity
|
|
155722
155759
|
})));
|
|
155723
155760
|
}
|
|
155724
155761
|
});
|
|
@@ -155836,11 +155873,12 @@ var PmPlanProductLogic;
|
|
|
155836
155873
|
((PmPlanProductLogic) => {
|
|
155837
155874
|
PmPlanProductLogic.select = async (query) => {
|
|
155838
155875
|
const filter = and(eq(pmPlanProductTable.pmPlanId, query.pmPlanId), softDeletedFilter(pmPlanProductTable));
|
|
155839
|
-
const columns = getTableColumns(pmPlanProductTable);
|
|
155840
155876
|
const baseQuery = db_default.select({
|
|
155841
|
-
|
|
155877
|
+
product: pmPlanProductTable,
|
|
155878
|
+
productKind: techdocProductKindTable,
|
|
155879
|
+
uom: uomTable,
|
|
155842
155880
|
totalCount: totalCountSql
|
|
155843
|
-
}).from(pmPlanProductTable).where(filter).$dynamic();
|
|
155881
|
+
}).from(pmPlanProductTable).leftJoin(techdocProductKindTable, eq(techdocProductKindTable.id, pmPlanProductTable.productKindId)).leftJoin(uomTable, eq(uomTable.id, pmPlanProductTable.uomId)).where(filter).$dynamic();
|
|
155844
155882
|
const result = await pagination_helper_default(baseQuery, query.pagination);
|
|
155845
155883
|
return getPaginationContent(result, query.pagination.size);
|
|
155846
155884
|
};
|
|
@@ -156055,8 +156093,127 @@ var pmRoutes = new Elysia({
|
|
|
156055
156093
|
}).use(template_default2).use(plan_default);
|
|
156056
156094
|
var pm_default = pmRoutes;
|
|
156057
156095
|
|
|
156096
|
+
// src/routes/fleet/work-order/logic.ts
|
|
156097
|
+
var WorkOrderLogic;
|
|
156098
|
+
((WorkOrderLogic) => {
|
|
156099
|
+
WorkOrderLogic.select = async (query) => {
|
|
156100
|
+
const filter = softDeletedFilter(workOrderTable);
|
|
156101
|
+
const columns = getTableColumns(workOrderTable);
|
|
156102
|
+
const baseQuery = db_default.select({
|
|
156103
|
+
...columns,
|
|
156104
|
+
totalCount: totalCountSql
|
|
156105
|
+
}).from(workOrderTable).where(filter).$dynamic();
|
|
156106
|
+
const result = await pagination_helper_default(baseQuery, query.pagination);
|
|
156107
|
+
return getPaginationContent(result, query.pagination.size);
|
|
156108
|
+
};
|
|
156109
|
+
WorkOrderLogic.create = async (body) => {
|
|
156110
|
+
const [result] = await db_default.insert(workOrderTable).values(body).returning();
|
|
156111
|
+
return result;
|
|
156112
|
+
};
|
|
156113
|
+
WorkOrderLogic.update = async (id, body) => {
|
|
156114
|
+
await db_default.update(workOrderTable).set(body).where(eq(workOrderTable.id, id));
|
|
156115
|
+
};
|
|
156116
|
+
WorkOrderLogic.remove = async (id) => {
|
|
156117
|
+
await db_default.update(workOrderTable).set({
|
|
156118
|
+
deletedAt: nowSql_helper_default
|
|
156119
|
+
}).where(eq(workOrderTable.id, id));
|
|
156120
|
+
};
|
|
156121
|
+
})(WorkOrderLogic ||= {});
|
|
156122
|
+
var logic_default45 = WorkOrderLogic;
|
|
156123
|
+
|
|
156124
|
+
// src/routes/fleet/work-order/model.ts
|
|
156125
|
+
var WorkOrderModel;
|
|
156126
|
+
((WorkOrderModel) => {
|
|
156127
|
+
const createSchema = createInsertSchema2(workOrderTable);
|
|
156128
|
+
const updateSchema = createUpdateSchema(workOrderTable);
|
|
156129
|
+
WorkOrderModel.create = OmitBaseSchema(createSchema);
|
|
156130
|
+
WorkOrderModel.update = OmitBaseSchema(updateSchema);
|
|
156131
|
+
WorkOrderModel.select = t.Composite([PaginationSchema]);
|
|
156132
|
+
})(WorkOrderModel ||= {});
|
|
156133
|
+
var model_default45 = WorkOrderModel;
|
|
156134
|
+
|
|
156135
|
+
// src/routes/fleet/work-order/task/logic.ts
|
|
156136
|
+
var WorkOrderTaskLogic;
|
|
156137
|
+
((WorkOrderTaskLogic) => {
|
|
156138
|
+
WorkOrderTaskLogic.select = async (query, user2) => {
|
|
156139
|
+
const filter = softDeletedFilter(workOrderTaskTable);
|
|
156140
|
+
const columns = getTableColumns(workOrderTaskTable);
|
|
156141
|
+
const baseQuery = db_default.select({
|
|
156142
|
+
...columns,
|
|
156143
|
+
totalCount: totalCountSql
|
|
156144
|
+
}).from(workOrderTaskTable).where(filter).$dynamic();
|
|
156145
|
+
const result = await pagination_helper_default(baseQuery, query.pagination);
|
|
156146
|
+
return getPaginationContent(result, query.pagination.size);
|
|
156147
|
+
};
|
|
156148
|
+
WorkOrderTaskLogic.create = async (body, user2) => {
|
|
156149
|
+
const [result] = await db_default.insert(workOrderTaskTable).values({
|
|
156150
|
+
...body,
|
|
156151
|
+
state: body.state ?? "OPEN"
|
|
156152
|
+
}).returning();
|
|
156153
|
+
return result;
|
|
156154
|
+
};
|
|
156155
|
+
WorkOrderTaskLogic.update = async (id, body, user2) => {
|
|
156156
|
+
await db_default.update(workOrderTaskTable).set({
|
|
156157
|
+
...body
|
|
156158
|
+
}).where(eq(workOrderTaskTable.id, id));
|
|
156159
|
+
};
|
|
156160
|
+
WorkOrderTaskLogic.remove = async (id, user2) => {
|
|
156161
|
+
await db_default.update(workOrderTaskTable).set({
|
|
156162
|
+
deletedAt: nowSql_helper_default
|
|
156163
|
+
}).where(eq(workOrderTaskTable.id, id));
|
|
156164
|
+
};
|
|
156165
|
+
})(WorkOrderTaskLogic ||= {});
|
|
156166
|
+
var logic_default46 = WorkOrderTaskLogic;
|
|
156167
|
+
|
|
156168
|
+
// src/routes/fleet/work-order/task/model.ts
|
|
156169
|
+
var WorkOrderTaskModel;
|
|
156170
|
+
((WorkOrderTaskModel) => {
|
|
156171
|
+
const updateSchema = createUpdateSchema(workOrderTaskTable);
|
|
156172
|
+
WorkOrderTaskModel.create = t.Object({
|
|
156173
|
+
workOrderId: t.String({ format: "uuid" }),
|
|
156174
|
+
templateId: t.String({ format: "uuid" }),
|
|
156175
|
+
serviceKindId: t.String({ format: "uuid" }),
|
|
156176
|
+
description: t.Optional(t.String()),
|
|
156177
|
+
manHour: t.Optional(t.Number()),
|
|
156178
|
+
state: t.Optional(StringEnum(["OPEN", "IN_PROGRESS", "COMPLETED", "CLOSED"]))
|
|
156179
|
+
});
|
|
156180
|
+
WorkOrderTaskModel.update = OmitBaseSchema(updateSchema);
|
|
156181
|
+
WorkOrderTaskModel.select = t.Composite([PaginationSchema]);
|
|
156182
|
+
})(WorkOrderTaskModel ||= {});
|
|
156183
|
+
var model_default46 = WorkOrderTaskModel;
|
|
156184
|
+
|
|
156185
|
+
// src/routes/fleet/work-order/task/index.ts
|
|
156186
|
+
var workOrderTaskRoutes = new Elysia({
|
|
156187
|
+
prefix: "/task",
|
|
156188
|
+
tags: ["WorkOrderTask"]
|
|
156189
|
+
}).use(better_auth_default).guard({ auth: true }).get("/", async ({ query, user: user2 }) => logic_default46.select(query, user2), {
|
|
156190
|
+
query: model_default46.select
|
|
156191
|
+
}).post("/", async ({ body, user: user2 }) => logic_default46.create(body, user2), {
|
|
156192
|
+
body: model_default46.create
|
|
156193
|
+
}).guard({
|
|
156194
|
+
params: IdSchema
|
|
156195
|
+
}).put("/:id", async ({ body, params: { id }, user: user2 }) => logic_default46.update(id, body, user2), {
|
|
156196
|
+
body: model_default46.update
|
|
156197
|
+
}).delete("/:id", async ({ params: { id }, user: user2 }) => logic_default46.remove(id, user2));
|
|
156198
|
+
var task_default = workOrderTaskRoutes;
|
|
156199
|
+
|
|
156200
|
+
// src/routes/fleet/work-order/index.ts
|
|
156201
|
+
var workOrderRoutes = new Elysia({
|
|
156202
|
+
prefix: "/work-order",
|
|
156203
|
+
tags: ["WorkOrder"]
|
|
156204
|
+
}).use(better_auth_default).use(task_default).guard({ auth: true }).get("/", async ({ query }) => logic_default45.select(query), {
|
|
156205
|
+
query: model_default45.select
|
|
156206
|
+
}).post("/", async ({ body }) => logic_default45.create(body), {
|
|
156207
|
+
body: model_default45.create
|
|
156208
|
+
}).guard({
|
|
156209
|
+
params: IdSchema
|
|
156210
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default45.update(id, body), {
|
|
156211
|
+
body: model_default45.update
|
|
156212
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default45.remove(id));
|
|
156213
|
+
var work_order_default = workOrderRoutes;
|
|
156214
|
+
|
|
156058
156215
|
// src/routes/fleet/index.ts
|
|
156059
|
-
var fleetRoutes = new Elysia({ prefix: "/fleet" }).use(inspection_default2).use(pm_default).use(machine_default).use(ms_default);
|
|
156216
|
+
var fleetRoutes = new Elysia({ prefix: "/fleet" }).use(inspection_default2).use(pm_default).use(machine_default).use(ms_default).use(work_order_default);
|
|
156060
156217
|
var fleet_default = fleetRoutes;
|
|
156061
156218
|
|
|
156062
156219
|
// src/routes/uom/category/logic.ts
|
|
@@ -156090,7 +156247,7 @@ var UomCategoryLogic;
|
|
|
156090
156247
|
}).where(and(eq(uomCategoryTable.id, id)));
|
|
156091
156248
|
};
|
|
156092
156249
|
})(UomCategoryLogic ||= {});
|
|
156093
|
-
var
|
|
156250
|
+
var logic_default47 = UomCategoryLogic;
|
|
156094
156251
|
|
|
156095
156252
|
// src/routes/uom/category/model.ts
|
|
156096
156253
|
var UomCategoryModel;
|
|
@@ -156101,7 +156258,7 @@ var UomCategoryModel;
|
|
|
156101
156258
|
UomCategoryModel.update = OmitBaseSchema(updateSchema);
|
|
156102
156259
|
UomCategoryModel.select = t.Composite([PaginationSchema]);
|
|
156103
156260
|
})(UomCategoryModel ||= {});
|
|
156104
|
-
var
|
|
156261
|
+
var model_default47 = UomCategoryModel;
|
|
156105
156262
|
|
|
156106
156263
|
// src/routes/uom/category/index.ts
|
|
156107
156264
|
var categoryRoutes = new Elysia({
|
|
@@ -156109,15 +156266,15 @@ var categoryRoutes = new Elysia({
|
|
|
156109
156266
|
tags: ["UomCategory"]
|
|
156110
156267
|
}).use(better_auth_default).guard({
|
|
156111
156268
|
auth: true
|
|
156112
|
-
}).get("/", async ({ query }) =>
|
|
156113
|
-
query:
|
|
156114
|
-
}).post("/", async ({ body }) =>
|
|
156115
|
-
body:
|
|
156269
|
+
}).get("/", async ({ query }) => logic_default47.select(query), {
|
|
156270
|
+
query: model_default47.select
|
|
156271
|
+
}).post("/", async ({ body }) => logic_default47.create(body), {
|
|
156272
|
+
body: model_default47.create
|
|
156116
156273
|
}).guard({
|
|
156117
156274
|
params: IdSchema
|
|
156118
|
-
}).put("/:id", async ({ body, params: { id } }) =>
|
|
156119
|
-
body:
|
|
156120
|
-
}).delete("/:id", async ({ params: { id } }) =>
|
|
156275
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default47.update(id, body), {
|
|
156276
|
+
body: model_default47.update
|
|
156277
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default47.remove(id));
|
|
156121
156278
|
var category_default = categoryRoutes;
|
|
156122
156279
|
|
|
156123
156280
|
// src/routes/uom/conversion/logic.ts
|
|
@@ -156151,7 +156308,7 @@ var UomConversionLogic;
|
|
|
156151
156308
|
}).where(and(eq(uomConversionTable.id, id)));
|
|
156152
156309
|
};
|
|
156153
156310
|
})(UomConversionLogic ||= {});
|
|
156154
|
-
var
|
|
156311
|
+
var logic_default48 = UomConversionLogic;
|
|
156155
156312
|
|
|
156156
156313
|
// src/routes/uom/conversion/model.ts
|
|
156157
156314
|
var UomConversionModel;
|
|
@@ -156168,7 +156325,7 @@ var UomConversionModel;
|
|
|
156168
156325
|
})
|
|
156169
156326
|
]);
|
|
156170
156327
|
})(UomConversionModel ||= {});
|
|
156171
|
-
var
|
|
156328
|
+
var model_default48 = UomConversionModel;
|
|
156172
156329
|
|
|
156173
156330
|
// src/routes/uom/conversion/index.ts
|
|
156174
156331
|
var conversionRoutes = new Elysia({
|
|
@@ -156176,15 +156333,15 @@ var conversionRoutes = new Elysia({
|
|
|
156176
156333
|
tags: ["UomConversion"]
|
|
156177
156334
|
}).use(better_auth_default).guard({
|
|
156178
156335
|
auth: true
|
|
156179
|
-
}).get("/", async ({ query }) =>
|
|
156180
|
-
query:
|
|
156181
|
-
}).post("/", async ({ body }) =>
|
|
156182
|
-
body:
|
|
156336
|
+
}).get("/", async ({ query }) => logic_default48.select(query), {
|
|
156337
|
+
query: model_default48.select
|
|
156338
|
+
}).post("/", async ({ body }) => logic_default48.create(body), {
|
|
156339
|
+
body: model_default48.create
|
|
156183
156340
|
}).guard({
|
|
156184
156341
|
params: IdSchema
|
|
156185
|
-
}).put("/:id", async ({ body, params: { id } }) =>
|
|
156186
|
-
body:
|
|
156187
|
-
}).delete("/:id", async ({ params: { id } }) =>
|
|
156342
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default48.update(id, body), {
|
|
156343
|
+
body: model_default48.update
|
|
156344
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default48.remove(id));
|
|
156188
156345
|
var conversion_default = conversionRoutes;
|
|
156189
156346
|
|
|
156190
156347
|
// src/routes/uom/logic.ts
|
|
@@ -156218,7 +156375,7 @@ var UomLogic;
|
|
|
156218
156375
|
}).where(and(eq(uomTable.id, id)));
|
|
156219
156376
|
};
|
|
156220
156377
|
})(UomLogic ||= {});
|
|
156221
|
-
var
|
|
156378
|
+
var logic_default49 = UomLogic;
|
|
156222
156379
|
|
|
156223
156380
|
// src/routes/uom/model.ts
|
|
156224
156381
|
var UomModel;
|
|
@@ -156234,7 +156391,7 @@ var UomModel;
|
|
|
156234
156391
|
})
|
|
156235
156392
|
]);
|
|
156236
156393
|
})(UomModel ||= {});
|
|
156237
|
-
var
|
|
156394
|
+
var model_default49 = UomModel;
|
|
156238
156395
|
|
|
156239
156396
|
// src/routes/uom/index.ts
|
|
156240
156397
|
var uomSchemaRoutes = new Elysia({
|
|
@@ -156242,15 +156399,15 @@ var uomSchemaRoutes = new Elysia({
|
|
|
156242
156399
|
}).use(better_auth_default).use(category_default).use(conversion_default).guard({
|
|
156243
156400
|
userKind: "ADMIN",
|
|
156244
156401
|
tags: ["Uom"]
|
|
156245
|
-
}).get("/", async ({ query }) =>
|
|
156246
|
-
query:
|
|
156247
|
-
}).post("/", async ({ body }) =>
|
|
156248
|
-
body:
|
|
156402
|
+
}).get("/", async ({ query }) => logic_default49.select(query), {
|
|
156403
|
+
query: model_default49.select
|
|
156404
|
+
}).post("/", async ({ body }) => logic_default49.create(body), {
|
|
156405
|
+
body: model_default49.create
|
|
156249
156406
|
}).guard({
|
|
156250
156407
|
params: IdSchema
|
|
156251
|
-
}).put("/:id", async ({ body, params: { id } }) =>
|
|
156252
|
-
body:
|
|
156253
|
-
}).delete("/:id", async ({ params: { id } }) =>
|
|
156408
|
+
}).put("/:id", async ({ body, params: { id } }) => logic_default49.update(id, body), {
|
|
156409
|
+
body: model_default49.update
|
|
156410
|
+
}).delete("/:id", async ({ params: { id } }) => logic_default49.remove(id));
|
|
156254
156411
|
var uom_default = uomSchemaRoutes;
|
|
156255
156412
|
|
|
156256
156413
|
// src/routes/index.ts
|