autosync_backend2 1.2.51 → 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.
Files changed (3) hide show
  1. package/dist/index.d.ts +2360 -953
  2. package/dist/index.js +1114 -441
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -3102,58 +3102,26 @@ export declare const app: Elysia<"", {
3102
3102
  };
3103
3103
  };
3104
3104
  };
3105
- };
3106
- } & {
3107
- api: {
3108
- permission: {};
3109
- } & {
3110
- permission: {
3111
- get: {
3112
- body: {};
3113
- params: {};
3114
- query: {};
3115
- headers: {};
3116
- response: {
3117
- 200: {
3118
- readonly code: import("./lib/permissions").PermissionCode;
3119
- description: string;
3120
- requiresAdmin?: boolean;
3121
- }[];
3122
- 401: "Токен олдсонгүй";
3123
- };
3124
- };
3125
- };
3126
- } & {
3127
- permission: {
3128
- post: {
3129
- body: {
3130
- userId: string;
3131
- permissions: string[];
3132
- };
3133
- params: {};
3134
- query: {};
3135
- headers: {};
3136
- response: {
3137
- 401: "Токен олдсонгүй";
3138
- 422: {
3139
- type: "validation";
3140
- on: string;
3141
- summary?: string;
3142
- message?: string;
3143
- found?: unknown;
3144
- property?: string;
3145
- expected?: string;
3146
- };
3147
- };
3148
- };
3149
- };
3150
3105
  } & {
3151
- permission: {
3152
- group: {
3106
+ company: {
3107
+ "billing-plan": {};
3108
+ } & {
3109
+ "billing-plan": {
3153
3110
  get: {
3154
3111
  body: unknown;
3155
3112
  params: {};
3156
3113
  query: {
3114
+ id?: string | undefined;
3115
+ createdAt?: string | undefined;
3116
+ updatedAt?: string | undefined;
3117
+ companyId?: string | undefined;
3118
+ deletedAt?: string | null | undefined;
3119
+ oldId?: number | null | undefined;
3120
+ billingPeriod?: "MONTHLY" | "ANNUAL" | "YEARLY" | undefined;
3121
+ basePrice?: number | undefined;
3122
+ maxCarCount?: number | null | undefined;
3123
+ active?: boolean | undefined;
3124
+ note?: string | null | undefined;
3157
3125
  pagination: {
3158
3126
  size: number;
3159
3127
  page: number;
@@ -3164,20 +3132,20 @@ export declare const app: Elysia<"", {
3164
3132
  200: {
3165
3133
  totalCount: number;
3166
3134
  totalPage: number;
3167
- result: {
3168
- permissions: {
3169
- readonly code: import("./lib/permissions").PermissionCode;
3170
- description: string;
3171
- requiresAdmin?: boolean;
3172
- }[];
3135
+ result: Omit<{
3173
3136
  totalCount: number;
3174
- name: string;
3137
+ companyId: string;
3138
+ billingPeriod: "MONTHLY" | "ANNUAL" | "YEARLY";
3139
+ basePrice: number;
3140
+ maxCarCount: number | null;
3141
+ active: boolean;
3142
+ note: string | null;
3175
3143
  id: string;
3176
3144
  createdAt: string;
3177
3145
  updatedAt: string;
3178
3146
  deletedAt: string | null;
3179
3147
  oldId: number | null;
3180
- }[];
3148
+ }, "totalCount">[];
3181
3149
  };
3182
3150
  401: "Токен олдсонгүй";
3183
3151
  422: {
@@ -3192,28 +3160,34 @@ export declare const app: Elysia<"", {
3192
3160
  };
3193
3161
  };
3194
3162
  };
3195
- };
3196
- } & {
3197
- permission: {
3198
- group: {
3163
+ } & {
3164
+ "billing-plan": {
3199
3165
  post: {
3200
3166
  body: {
3201
3167
  oldId?: number | null | undefined;
3202
- permissions?: string[] | undefined;
3203
- name: string;
3168
+ billingPeriod?: "MONTHLY" | "ANNUAL" | "YEARLY" | undefined;
3169
+ maxCarCount?: number | null | undefined;
3170
+ active?: boolean | undefined;
3171
+ note?: string | null | undefined;
3172
+ companyId: string;
3173
+ basePrice: number;
3204
3174
  };
3205
3175
  params: {};
3206
- query: unknown;
3207
- headers: unknown;
3176
+ query: {};
3177
+ headers: {};
3208
3178
  response: {
3209
3179
  200: {
3210
- name: string;
3211
3180
  id: string;
3212
3181
  createdAt: string;
3213
3182
  updatedAt: string;
3183
+ companyId: string;
3214
3184
  deletedAt: string | null;
3215
3185
  oldId: number | null;
3216
- permissions: string[];
3186
+ billingPeriod: "MONTHLY" | "ANNUAL" | "YEARLY";
3187
+ basePrice: number;
3188
+ maxCarCount: number | null;
3189
+ active: boolean;
3190
+ note: string | null;
3217
3191
  };
3218
3192
  401: "Токен олдсонгүй";
3219
3193
  422: {
@@ -3228,34 +3202,40 @@ export declare const app: Elysia<"", {
3228
3202
  };
3229
3203
  };
3230
3204
  };
3231
- };
3232
- } & {
3233
- permission: {
3234
- group: {
3205
+ } & {
3206
+ "billing-plan": {
3235
3207
  ":id": {
3236
3208
  put: {
3237
3209
  body: {
3238
- name?: string | undefined;
3210
+ companyId?: string | undefined;
3239
3211
  oldId?: number | null | undefined;
3240
- permissions?: string[] | undefined;
3212
+ billingPeriod?: "MONTHLY" | "ANNUAL" | "YEARLY" | undefined;
3213
+ basePrice?: number | undefined;
3214
+ maxCarCount?: number | null | undefined;
3215
+ active?: boolean | undefined;
3216
+ note?: string | null | undefined;
3241
3217
  };
3242
3218
  params: {
3243
3219
  id: string;
3244
3220
  };
3245
- query: unknown;
3246
- headers: unknown;
3221
+ query: {};
3222
+ headers: {};
3247
3223
  response: {
3248
3224
  200: {
3249
- name: string;
3225
+ companyId: string;
3226
+ billingPeriod: "MONTHLY" | "ANNUAL" | "YEARLY";
3227
+ basePrice: number;
3228
+ maxCarCount: number | null;
3229
+ active: boolean;
3230
+ note: string | null;
3250
3231
  id: string;
3251
3232
  createdAt: string;
3252
3233
  updatedAt: string;
3253
3234
  deletedAt: string | null;
3254
3235
  oldId: number | null;
3255
- permissions: string[];
3256
3236
  };
3257
3237
  401: "Токен олдсонгүй";
3258
- 404: string;
3238
+ 404: "Төлбөрийн төлөвлөгөө олдсонгүй.";
3259
3239
  422: {
3260
3240
  type: "validation";
3261
3241
  on: string;
@@ -3269,21 +3249,18 @@ export declare const app: Elysia<"", {
3269
3249
  };
3270
3250
  };
3271
3251
  };
3272
- };
3273
- } & {
3274
- permission: {
3275
- group: {
3252
+ } & {
3253
+ "billing-plan": {
3276
3254
  ":id": {
3277
3255
  delete: {
3278
- body: unknown;
3256
+ body: {};
3279
3257
  params: {
3280
3258
  id: string;
3281
3259
  };
3282
- query: unknown;
3283
- headers: unknown;
3260
+ query: {};
3261
+ headers: {};
3284
3262
  response: {
3285
3263
  401: "Токен олдсонгүй";
3286
- 404: string;
3287
3264
  422: {
3288
3265
  type: "validation";
3289
3266
  on: string;
@@ -3298,210 +3275,181 @@ export declare const app: Elysia<"", {
3298
3275
  };
3299
3276
  };
3300
3277
  };
3301
- };
3302
- } & {
3303
- api: {
3304
- user: {};
3305
3278
  } & {
3306
- user: {
3307
- get: {
3308
- body: {};
3309
- params: {};
3310
- query: {
3311
- branchId?: string | undefined;
3312
- pagination: {
3313
- size: number;
3314
- page: number;
3279
+ company: {
3280
+ invoice: {};
3281
+ } & {
3282
+ invoice: {
3283
+ payment: {};
3284
+ } & {
3285
+ payment: {
3286
+ get: {
3287
+ body: unknown;
3288
+ params: {};
3289
+ query: {
3290
+ id?: string | undefined;
3291
+ createdAt?: string | undefined;
3292
+ updatedAt?: string | undefined;
3293
+ deletedAt?: string | null | undefined;
3294
+ oldId?: number | null | undefined;
3295
+ note?: string | null | undefined;
3296
+ paidAt?: string | undefined;
3297
+ invoiceId?: string | undefined;
3298
+ amount?: number | undefined;
3299
+ reference?: string | null | undefined;
3300
+ pagination: {
3301
+ size: number;
3302
+ page: number;
3303
+ };
3304
+ };
3305
+ headers: unknown;
3306
+ response: {
3307
+ 200: {
3308
+ totalCount: number;
3309
+ totalPage: number;
3310
+ result: Omit<{
3311
+ totalCount: number;
3312
+ invoiceId: string;
3313
+ amount: number;
3314
+ paidAt: string;
3315
+ reference: string | null;
3316
+ note: string | null;
3317
+ id: string;
3318
+ createdAt: string;
3319
+ updatedAt: string;
3320
+ deletedAt: string | null;
3321
+ oldId: number | null;
3322
+ }, "totalCount">[];
3323
+ };
3324
+ 401: "Токен олдсонгүй";
3325
+ 422: {
3326
+ type: "validation";
3327
+ on: string;
3328
+ summary?: string;
3329
+ message?: string;
3330
+ found?: unknown;
3331
+ property?: string;
3332
+ expected?: string;
3333
+ };
3334
+ };
3315
3335
  };
3316
3336
  };
3317
- headers: {};
3318
- response: {
3319
- 200: {
3320
- totalCount: number;
3321
- totalPage: number;
3322
- result: {
3323
- permissions: {
3324
- readonly code: import("./lib/permissions").PermissionCode;
3325
- description: string;
3326
- requiresAdmin?: boolean;
3327
- }[];
3328
- id: string;
3329
- name: string;
3330
- email: string;
3331
- emailVerified: boolean;
3332
- image: string | null;
3333
- createdAt: Date;
3334
- updatedAt: Date;
3335
- companyId: string;
3336
- branchId: string;
3337
- kind: "ADMIN" | "COMPANY_ADMIN" | "CUSTOMER" | "INSPECTION";
3338
- employeeId: string | null;
3339
- }[];
3340
- };
3341
- 401: "Токен олдсонгүй";
3342
- 422: {
3343
- type: "validation";
3344
- on: string;
3345
- summary?: string;
3346
- message?: string;
3347
- found?: unknown;
3348
- property?: string;
3349
- expected?: string;
3337
+ } & {
3338
+ payment: {
3339
+ post: {
3340
+ body: {
3341
+ oldId?: number | null | undefined;
3342
+ note?: string | null | undefined;
3343
+ reference?: string | null | undefined;
3344
+ paidAt: string;
3345
+ invoiceId: string;
3346
+ amount: number;
3347
+ };
3348
+ params: {};
3349
+ query: unknown;
3350
+ headers: unknown;
3351
+ response: {
3352
+ 200: {
3353
+ id: string;
3354
+ createdAt: string;
3355
+ updatedAt: string;
3356
+ deletedAt: string | null;
3357
+ oldId: number | null;
3358
+ note: string | null;
3359
+ paidAt: string;
3360
+ invoiceId: string;
3361
+ amount: number;
3362
+ reference: string | null;
3363
+ };
3364
+ 401: "Токен олдсонгүй";
3365
+ 403: "Төлбөр бүртгэх эрхгүй байна.";
3366
+ 404: "Төлбөрийн баримт олдсонгүй.";
3367
+ 422: {
3368
+ type: "validation";
3369
+ on: string;
3370
+ summary?: string;
3371
+ message?: string;
3372
+ found?: unknown;
3373
+ property?: string;
3374
+ expected?: string;
3375
+ };
3376
+ };
3350
3377
  };
3351
3378
  };
3352
- };
3353
- };
3354
- } & {
3355
- user: {
3356
- me: {
3357
- get: {
3358
- body: unknown;
3359
- params: {};
3360
- query: unknown;
3361
- headers: unknown;
3362
- response: {
3363
- 200: {
3364
- company: {
3365
- name: string;
3366
- id: string;
3367
- email: string;
3368
- regNumber: string;
3369
- phone: string;
3370
- logoUrl: string;
3371
- province: string | null;
3372
- district: string | null;
3373
- khoroo: string | null;
3374
- street: string | null;
3375
- } | undefined;
3376
- id: string;
3377
- createdAt: Date;
3378
- updatedAt: Date;
3379
- email: string;
3380
- emailVerified: boolean;
3381
- name: string;
3382
- image?: string | null | undefined;
3383
- companyId: string;
3384
- branchId: string;
3385
- kind: "ADMIN" | "COMPANY_ADMIN" | "CUSTOMER" | "INSPECTION";
3386
- employeeId?: string | null | undefined;
3387
- };
3388
- 401: "Токен олдсонгүй";
3389
- };
3390
- };
3391
- };
3392
- };
3393
- } & {
3394
- user: {
3395
- post: {
3396
- body: {
3397
- branchId?: string | undefined;
3398
- kind?: "ADMIN" | "COMPANY_ADMIN" | "CUSTOMER" | "INSPECTION" | undefined;
3399
- employeeId?: string | null | undefined;
3400
- password?: string | undefined;
3401
- merchantId?: string | undefined;
3402
- name: string;
3403
- email: string;
3404
- permissions: never[];
3405
- };
3406
- params: {};
3407
- query: {};
3408
- headers: {};
3409
- response: {
3410
- 200: {
3411
- id: string;
3412
- email: string;
3413
- name: string;
3414
- image: string | null | undefined;
3415
- emailVerified: boolean;
3416
- createdAt: Date;
3417
- updatedAt: Date;
3418
- };
3419
- 400: string;
3420
- 401: "Токен олдсонгүй";
3421
- 422: {
3422
- type: "validation";
3423
- on: string;
3424
- summary?: string;
3425
- message?: string;
3426
- found?: unknown;
3427
- property?: string;
3428
- expected?: string;
3429
- };
3430
- 500: "Хэрэглэгч бүртгэхэд алдаа гарлаа.";
3431
- };
3432
- };
3433
- };
3434
- } & {
3435
- user: {
3436
- ":id": {
3437
- put: {
3438
- body: {
3439
- name?: string | undefined;
3440
- id?: string | undefined;
3441
- email?: string | undefined;
3442
- emailVerified?: boolean | undefined;
3443
- image?: string | null | undefined;
3444
- createdAt?: Date | undefined;
3445
- updatedAt?: Date | undefined;
3446
- companyId?: string | undefined;
3447
- branchId?: string | undefined;
3448
- kind?: "ADMIN" | "COMPANY_ADMIN" | "CUSTOMER" | "INSPECTION" | undefined;
3449
- employeeId?: string | null | undefined;
3450
- password?: string | undefined;
3451
- permissions: never[];
3452
- };
3453
- params: {
3454
- id: string;
3455
- };
3456
- query: {};
3457
- headers: {};
3458
- response: {
3459
- 401: "Токен олдсонгүй";
3460
- 422: {
3461
- type: "validation";
3462
- on: string;
3463
- summary?: string;
3464
- message?: string;
3465
- found?: unknown;
3466
- property?: string;
3467
- expected?: string;
3379
+ } & {
3380
+ payment: {
3381
+ invoice: {
3382
+ ":invoiceId": {
3383
+ get: {
3384
+ body: unknown;
3385
+ params: {
3386
+ invoiceId: string;
3387
+ };
3388
+ query: unknown;
3389
+ headers: unknown;
3390
+ response: {
3391
+ 200: {
3392
+ invoiceId: string;
3393
+ amount: number;
3394
+ paidAt: string;
3395
+ reference: string | null;
3396
+ note: string | null;
3397
+ id: string;
3398
+ createdAt: string;
3399
+ updatedAt: string;
3400
+ deletedAt: string | null;
3401
+ oldId: number | null;
3402
+ }[];
3403
+ 401: "Токен олдсонгүй";
3404
+ 403: "Хандах эрхгүй байна.";
3405
+ 404: "Төлбөрийн баримт олдсонгүй.";
3406
+ 422: {
3407
+ type: "validation";
3408
+ on: string;
3409
+ summary?: string;
3410
+ message?: string;
3411
+ found?: unknown;
3412
+ property?: string;
3413
+ expected?: string;
3414
+ };
3415
+ };
3416
+ };
3468
3417
  };
3469
3418
  };
3470
3419
  };
3471
- };
3472
- };
3473
- };
3474
- } & {
3475
- api: {
3476
- crm: {
3477
- "cp-order": {};
3478
- } & {
3479
- "cp-order": {
3480
- item: {};
3481
3420
  } & {
3482
- item: {
3483
- employee: {};
3484
- } & {
3485
- employee: {
3486
- get: {
3487
- body: unknown;
3488
- params: {};
3489
- query: {
3490
- cpOrderItemId: string;
3421
+ payment: {
3422
+ ":id": {
3423
+ put: {
3424
+ body: {
3425
+ oldId?: number | null | undefined;
3426
+ note?: string | null | undefined;
3427
+ paidAt?: string | undefined;
3428
+ invoiceId?: string | undefined;
3429
+ amount?: number | undefined;
3430
+ reference?: string | null | undefined;
3491
3431
  };
3492
- headers: unknown;
3432
+ params: {
3433
+ id: string;
3434
+ };
3435
+ query: {};
3436
+ headers: {};
3493
3437
  response: {
3494
3438
  200: {
3495
- cpOrderItemId: string;
3496
- employeeId: string;
3439
+ invoiceId: string;
3497
3440
  amount: number;
3441
+ paidAt: string;
3442
+ reference: string | null;
3443
+ note: string | null;
3498
3444
  id: string;
3499
3445
  createdAt: string;
3500
3446
  updatedAt: string;
3501
3447
  deletedAt: string | null;
3502
3448
  oldId: number | null;
3503
- }[];
3449
+ };
3504
3450
  401: "Токен олдсонгүй";
3451
+ 403: "Төлбөр засах эрхгүй байна.";
3452
+ 404: "Төлбөрийн баримт олдсонгүй." | "Төлбөрийн төлбөр олдсонгүй.";
3505
3453
  422: {
3506
3454
  type: "validation";
3507
3455
  on: string;
@@ -3514,31 +3462,21 @@ export declare const app: Elysia<"", {
3514
3462
  };
3515
3463
  };
3516
3464
  };
3517
- } & {
3518
- employee: {
3519
- post: {
3520
- body: {
3521
- oldId?: number | null | undefined;
3522
- amount?: number | undefined;
3523
- employeeId: string;
3524
- cpOrderItemId: string;
3465
+ };
3466
+ } & {
3467
+ payment: {
3468
+ ":id": {
3469
+ delete: {
3470
+ body: {};
3471
+ params: {
3472
+ id: string;
3525
3473
  };
3526
- params: {};
3527
- query: unknown;
3528
- headers: unknown;
3474
+ query: {};
3475
+ headers: {};
3529
3476
  response: {
3530
- 200: {
3531
- id: string;
3532
- createdAt: string;
3533
- updatedAt: string;
3534
- employeeId: string;
3535
- deletedAt: string | null;
3536
- oldId: number | null;
3537
- amount: number;
3538
- cpOrderItemId: string;
3539
- };
3540
- 400: "Энэ үйлчилгээнд ажилтан аль хэдийн хуваарилагдсан байна.";
3541
3477
  401: "Токен олдсонгүй";
3478
+ 403: "Төлбөр устгах эрхгүй байна.";
3479
+ 404: "Төлбөрийн баримт олдсонгүй." | "Төлбөрийн төлбөр олдсонгүй.";
3542
3480
  422: {
3543
3481
  type: "validation";
3544
3482
  on: string;
@@ -3551,51 +3489,751 @@ export declare const app: Elysia<"", {
3551
3489
  };
3552
3490
  };
3553
3491
  };
3554
- } & {
3555
- employee: {
3556
- ":id": {
3557
- put: {
3558
- body: {
3559
- amount?: number | undefined;
3560
- };
3561
- params: {
3562
- id: string;
3563
- };
3564
- query: unknown;
3565
- headers: unknown;
3566
- response: {
3567
- 200: {
3568
- cpOrderItemId: string;
3569
- employeeId: string;
3570
- amount: number;
3571
- id: string;
3572
- createdAt: string;
3573
- updatedAt: string;
3574
- deletedAt: string | null;
3575
- oldId: number | null;
3576
- };
3577
- 401: "Токен олдсонгүй";
3578
- 404: "Ажилтны мэдээлэл олдсонгүй.";
3579
- 422: {
3580
- type: "validation";
3581
- on: string;
3582
- summary?: string;
3583
- message?: string;
3584
- found?: unknown;
3585
- property?: string;
3586
- expected?: string;
3587
- };
3588
- };
3589
- };
3492
+ };
3493
+ };
3494
+ } & {
3495
+ invoice: {
3496
+ get: {
3497
+ body: unknown;
3498
+ params: {};
3499
+ query: {
3500
+ id?: string | undefined;
3501
+ createdAt?: string | undefined;
3502
+ updatedAt?: string | undefined;
3503
+ companyId?: string | undefined;
3504
+ deletedAt?: string | null | undefined;
3505
+ oldId?: number | null | undefined;
3506
+ basePrice?: number | undefined;
3507
+ note?: string | null | undefined;
3508
+ billingPlanId?: string | undefined;
3509
+ periodStart?: string | undefined;
3510
+ periodEnd?: string | undefined;
3511
+ carCount?: number | undefined;
3512
+ status?: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED" | undefined;
3513
+ issuedAt?: string | undefined;
3514
+ paidAt?: string | null | undefined;
3515
+ dueAt?: string | undefined;
3516
+ pagination: {
3517
+ size: number;
3518
+ page: number;
3590
3519
  };
3591
3520
  };
3592
- } & {
3593
- employee: {
3594
- ":id": {
3595
- delete: {
3596
- body: unknown;
3597
- params: {
3598
- id: string;
3521
+ headers: unknown;
3522
+ response: {
3523
+ 200: {
3524
+ totalCount: number;
3525
+ totalPage: number;
3526
+ result: Omit<{
3527
+ totalCount: number;
3528
+ companyId: string;
3529
+ billingPlanId: string;
3530
+ periodStart: string;
3531
+ periodEnd: string;
3532
+ carCount: number;
3533
+ basePrice: number;
3534
+ status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
3535
+ issuedAt: string;
3536
+ paidAt: string | null;
3537
+ dueAt: string;
3538
+ note: string | null;
3539
+ id: string;
3540
+ createdAt: string;
3541
+ updatedAt: string;
3542
+ deletedAt: string | null;
3543
+ oldId: number | null;
3544
+ }, "totalCount">[];
3545
+ };
3546
+ 401: "Токен олдсонгүй";
3547
+ 422: {
3548
+ type: "validation";
3549
+ on: string;
3550
+ summary?: string;
3551
+ message?: string;
3552
+ found?: unknown;
3553
+ property?: string;
3554
+ expected?: string;
3555
+ };
3556
+ };
3557
+ };
3558
+ };
3559
+ } & {
3560
+ invoice: {
3561
+ generate: {
3562
+ post: {
3563
+ body: {
3564
+ carCount?: number | undefined;
3565
+ companyId: string;
3566
+ billingPlanId: string;
3567
+ periodStart: string;
3568
+ };
3569
+ params: {};
3570
+ query: {};
3571
+ headers: {};
3572
+ response: {
3573
+ 200: {
3574
+ id: string;
3575
+ createdAt: string;
3576
+ updatedAt: string;
3577
+ companyId: string;
3578
+ deletedAt: string | null;
3579
+ oldId: number | null;
3580
+ basePrice: number;
3581
+ note: string | null;
3582
+ billingPlanId: string;
3583
+ periodStart: string;
3584
+ periodEnd: string;
3585
+ carCount: number;
3586
+ status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
3587
+ issuedAt: string;
3588
+ paidAt: string | null;
3589
+ dueAt: string;
3590
+ };
3591
+ 401: "Токен олдсонгүй";
3592
+ 403: "Төлбөрийн баримт үүсгэх эрхгүй байна.";
3593
+ 404: "Төлбөрийн төлөвлөгөө олдсонгүй.";
3594
+ 422: {
3595
+ type: "validation";
3596
+ on: string;
3597
+ summary?: string;
3598
+ message?: string;
3599
+ found?: unknown;
3600
+ property?: string;
3601
+ expected?: string;
3602
+ };
3603
+ };
3604
+ };
3605
+ };
3606
+ };
3607
+ } & {
3608
+ invoice: {
3609
+ post: {
3610
+ body: {
3611
+ oldId?: number | null | undefined;
3612
+ note?: string | null | undefined;
3613
+ status?: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED" | undefined;
3614
+ paidAt?: string | null | undefined;
3615
+ companyId: string;
3616
+ basePrice: number;
3617
+ billingPlanId: string;
3618
+ periodStart: string;
3619
+ periodEnd: string;
3620
+ carCount: number;
3621
+ issuedAt: string;
3622
+ dueAt: string;
3623
+ };
3624
+ params: {};
3625
+ query: {};
3626
+ headers: {};
3627
+ response: {
3628
+ 200: {
3629
+ id: string;
3630
+ createdAt: string;
3631
+ updatedAt: string;
3632
+ companyId: string;
3633
+ deletedAt: string | null;
3634
+ oldId: number | null;
3635
+ basePrice: number;
3636
+ note: string | null;
3637
+ billingPlanId: string;
3638
+ periodStart: string;
3639
+ periodEnd: string;
3640
+ carCount: number;
3641
+ status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
3642
+ issuedAt: string;
3643
+ paidAt: string | null;
3644
+ dueAt: string;
3645
+ };
3646
+ 401: "Токен олдсонгүй";
3647
+ 403: "Төлбөрийн баримт үүсгэх эрхгүй байна.";
3648
+ 422: {
3649
+ type: "validation";
3650
+ on: string;
3651
+ summary?: string;
3652
+ message?: string;
3653
+ found?: unknown;
3654
+ property?: string;
3655
+ expected?: string;
3656
+ };
3657
+ };
3658
+ };
3659
+ };
3660
+ } & {
3661
+ invoice: {
3662
+ ":id": {
3663
+ put: {
3664
+ body: {
3665
+ companyId?: string | undefined;
3666
+ oldId?: number | null | undefined;
3667
+ basePrice?: number | undefined;
3668
+ note?: string | null | undefined;
3669
+ billingPlanId?: string | undefined;
3670
+ periodStart?: string | undefined;
3671
+ periodEnd?: string | undefined;
3672
+ carCount?: number | undefined;
3673
+ status?: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED" | undefined;
3674
+ issuedAt?: string | undefined;
3675
+ paidAt?: string | null | undefined;
3676
+ dueAt?: string | undefined;
3677
+ };
3678
+ params: {
3679
+ id: string;
3680
+ };
3681
+ query: {};
3682
+ headers: {};
3683
+ response: {
3684
+ 200: {
3685
+ companyId: string;
3686
+ billingPlanId: string;
3687
+ periodStart: string;
3688
+ periodEnd: string;
3689
+ carCount: number;
3690
+ basePrice: number;
3691
+ status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
3692
+ issuedAt: string;
3693
+ paidAt: string | null;
3694
+ dueAt: string;
3695
+ note: string | null;
3696
+ id: string;
3697
+ createdAt: string;
3698
+ updatedAt: string;
3699
+ deletedAt: string | null;
3700
+ oldId: number | null;
3701
+ };
3702
+ 401: "Токен олдсонгүй";
3703
+ 404: "Төлбөрийн баримт олдсонгүй.";
3704
+ 422: {
3705
+ type: "validation";
3706
+ on: string;
3707
+ summary?: string;
3708
+ message?: string;
3709
+ found?: unknown;
3710
+ property?: string;
3711
+ expected?: string;
3712
+ };
3713
+ };
3714
+ };
3715
+ };
3716
+ };
3717
+ } & {
3718
+ invoice: {
3719
+ ":id": {
3720
+ delete: {
3721
+ body: {};
3722
+ params: {
3723
+ id: string;
3724
+ };
3725
+ query: {};
3726
+ headers: {};
3727
+ response: {
3728
+ 401: "Токен олдсонгүй";
3729
+ 422: {
3730
+ type: "validation";
3731
+ on: string;
3732
+ summary?: string;
3733
+ message?: string;
3734
+ found?: unknown;
3735
+ property?: string;
3736
+ expected?: string;
3737
+ };
3738
+ };
3739
+ };
3740
+ };
3741
+ };
3742
+ };
3743
+ };
3744
+ } & {
3745
+ api: {
3746
+ permission: {};
3747
+ } & {
3748
+ permission: {
3749
+ get: {
3750
+ body: {};
3751
+ params: {};
3752
+ query: {};
3753
+ headers: {};
3754
+ response: {
3755
+ 200: {
3756
+ readonly code: import("./lib/permissions").PermissionCode;
3757
+ description: string;
3758
+ requiresAdmin?: boolean;
3759
+ }[];
3760
+ 401: "Токен олдсонгүй";
3761
+ };
3762
+ };
3763
+ };
3764
+ } & {
3765
+ permission: {
3766
+ post: {
3767
+ body: {
3768
+ userId: string;
3769
+ permissions: string[];
3770
+ };
3771
+ params: {};
3772
+ query: {};
3773
+ headers: {};
3774
+ response: {
3775
+ 401: "Токен олдсонгүй";
3776
+ 422: {
3777
+ type: "validation";
3778
+ on: string;
3779
+ summary?: string;
3780
+ message?: string;
3781
+ found?: unknown;
3782
+ property?: string;
3783
+ expected?: string;
3784
+ };
3785
+ };
3786
+ };
3787
+ };
3788
+ } & {
3789
+ permission: {
3790
+ group: {
3791
+ get: {
3792
+ body: unknown;
3793
+ params: {};
3794
+ query: {
3795
+ pagination: {
3796
+ size: number;
3797
+ page: number;
3798
+ };
3799
+ };
3800
+ headers: unknown;
3801
+ response: {
3802
+ 200: {
3803
+ totalCount: number;
3804
+ totalPage: number;
3805
+ result: {
3806
+ permissions: {
3807
+ readonly code: import("./lib/permissions").PermissionCode;
3808
+ description: string;
3809
+ requiresAdmin?: boolean;
3810
+ }[];
3811
+ totalCount: number;
3812
+ name: string;
3813
+ id: string;
3814
+ createdAt: string;
3815
+ updatedAt: string;
3816
+ deletedAt: string | null;
3817
+ oldId: number | null;
3818
+ }[];
3819
+ };
3820
+ 401: "Токен олдсонгүй";
3821
+ 422: {
3822
+ type: "validation";
3823
+ on: string;
3824
+ summary?: string;
3825
+ message?: string;
3826
+ found?: unknown;
3827
+ property?: string;
3828
+ expected?: string;
3829
+ };
3830
+ };
3831
+ };
3832
+ };
3833
+ };
3834
+ } & {
3835
+ permission: {
3836
+ group: {
3837
+ post: {
3838
+ body: {
3839
+ oldId?: number | null | undefined;
3840
+ permissions?: string[] | undefined;
3841
+ name: string;
3842
+ };
3843
+ params: {};
3844
+ query: unknown;
3845
+ headers: unknown;
3846
+ response: {
3847
+ 200: {
3848
+ name: string;
3849
+ id: string;
3850
+ createdAt: string;
3851
+ updatedAt: string;
3852
+ deletedAt: string | null;
3853
+ oldId: number | null;
3854
+ permissions: string[];
3855
+ };
3856
+ 401: "Токен олдсонгүй";
3857
+ 422: {
3858
+ type: "validation";
3859
+ on: string;
3860
+ summary?: string;
3861
+ message?: string;
3862
+ found?: unknown;
3863
+ property?: string;
3864
+ expected?: string;
3865
+ };
3866
+ };
3867
+ };
3868
+ };
3869
+ };
3870
+ } & {
3871
+ permission: {
3872
+ group: {
3873
+ ":id": {
3874
+ put: {
3875
+ body: {
3876
+ name?: string | undefined;
3877
+ oldId?: number | null | undefined;
3878
+ permissions?: string[] | undefined;
3879
+ };
3880
+ params: {
3881
+ id: string;
3882
+ };
3883
+ query: unknown;
3884
+ headers: unknown;
3885
+ response: {
3886
+ 200: {
3887
+ name: string;
3888
+ id: string;
3889
+ createdAt: string;
3890
+ updatedAt: string;
3891
+ deletedAt: string | null;
3892
+ oldId: number | null;
3893
+ permissions: string[];
3894
+ };
3895
+ 401: "Токен олдсонгүй";
3896
+ 404: string;
3897
+ 422: {
3898
+ type: "validation";
3899
+ on: string;
3900
+ summary?: string;
3901
+ message?: string;
3902
+ found?: unknown;
3903
+ property?: string;
3904
+ expected?: string;
3905
+ };
3906
+ };
3907
+ };
3908
+ };
3909
+ };
3910
+ };
3911
+ } & {
3912
+ permission: {
3913
+ group: {
3914
+ ":id": {
3915
+ delete: {
3916
+ body: unknown;
3917
+ params: {
3918
+ id: string;
3919
+ };
3920
+ query: unknown;
3921
+ headers: unknown;
3922
+ response: {
3923
+ 401: "Токен олдсонгүй";
3924
+ 404: string;
3925
+ 422: {
3926
+ type: "validation";
3927
+ on: string;
3928
+ summary?: string;
3929
+ message?: string;
3930
+ found?: unknown;
3931
+ property?: string;
3932
+ expected?: string;
3933
+ };
3934
+ };
3935
+ };
3936
+ };
3937
+ };
3938
+ };
3939
+ };
3940
+ } & {
3941
+ api: {
3942
+ user: {};
3943
+ } & {
3944
+ user: {
3945
+ get: {
3946
+ body: {};
3947
+ params: {};
3948
+ query: {
3949
+ branchId?: string | undefined;
3950
+ pagination: {
3951
+ size: number;
3952
+ page: number;
3953
+ };
3954
+ };
3955
+ headers: {};
3956
+ response: {
3957
+ 200: {
3958
+ totalCount: number;
3959
+ totalPage: number;
3960
+ result: {
3961
+ permissions: {
3962
+ readonly code: import("./lib/permissions").PermissionCode;
3963
+ description: string;
3964
+ requiresAdmin?: boolean;
3965
+ }[];
3966
+ id: string;
3967
+ name: string;
3968
+ email: string;
3969
+ emailVerified: boolean;
3970
+ image: string | null;
3971
+ createdAt: Date;
3972
+ updatedAt: Date;
3973
+ companyId: string;
3974
+ branchId: string;
3975
+ kind: "ADMIN" | "COMPANY_ADMIN" | "CUSTOMER" | "INSPECTION";
3976
+ employeeId: string | null;
3977
+ }[];
3978
+ };
3979
+ 401: "Токен олдсонгүй";
3980
+ 422: {
3981
+ type: "validation";
3982
+ on: string;
3983
+ summary?: string;
3984
+ message?: string;
3985
+ found?: unknown;
3986
+ property?: string;
3987
+ expected?: string;
3988
+ };
3989
+ };
3990
+ };
3991
+ };
3992
+ } & {
3993
+ user: {
3994
+ me: {
3995
+ get: {
3996
+ body: unknown;
3997
+ params: {};
3998
+ query: unknown;
3999
+ headers: unknown;
4000
+ response: {
4001
+ 200: {
4002
+ company: {
4003
+ name: string;
4004
+ id: string;
4005
+ email: string;
4006
+ regNumber: string;
4007
+ phone: string;
4008
+ logoUrl: string;
4009
+ province: string | null;
4010
+ district: string | null;
4011
+ khoroo: string | null;
4012
+ street: string | null;
4013
+ } | undefined;
4014
+ id: string;
4015
+ createdAt: Date;
4016
+ updatedAt: Date;
4017
+ email: string;
4018
+ emailVerified: boolean;
4019
+ name: string;
4020
+ image?: string | null | undefined;
4021
+ companyId: string;
4022
+ branchId: string;
4023
+ kind: "ADMIN" | "COMPANY_ADMIN" | "CUSTOMER" | "INSPECTION";
4024
+ employeeId?: string | null | undefined;
4025
+ };
4026
+ 401: "Токен олдсонгүй";
4027
+ };
4028
+ };
4029
+ };
4030
+ };
4031
+ } & {
4032
+ user: {
4033
+ post: {
4034
+ body: {
4035
+ branchId?: string | undefined;
4036
+ kind?: "ADMIN" | "COMPANY_ADMIN" | "CUSTOMER" | "INSPECTION" | undefined;
4037
+ employeeId?: string | null | undefined;
4038
+ password?: string | undefined;
4039
+ merchantId?: string | undefined;
4040
+ name: string;
4041
+ email: string;
4042
+ permissions: never[];
4043
+ };
4044
+ params: {};
4045
+ query: {};
4046
+ headers: {};
4047
+ response: {
4048
+ 200: {
4049
+ id: string;
4050
+ email: string;
4051
+ name: string;
4052
+ image: string | null | undefined;
4053
+ emailVerified: boolean;
4054
+ createdAt: Date;
4055
+ updatedAt: Date;
4056
+ };
4057
+ 400: string;
4058
+ 401: "Токен олдсонгүй";
4059
+ 422: {
4060
+ type: "validation";
4061
+ on: string;
4062
+ summary?: string;
4063
+ message?: string;
4064
+ found?: unknown;
4065
+ property?: string;
4066
+ expected?: string;
4067
+ };
4068
+ 500: "Хэрэглэгч бүртгэхэд алдаа гарлаа.";
4069
+ };
4070
+ };
4071
+ };
4072
+ } & {
4073
+ user: {
4074
+ ":id": {
4075
+ put: {
4076
+ body: {
4077
+ name?: string | undefined;
4078
+ id?: string | undefined;
4079
+ email?: string | undefined;
4080
+ emailVerified?: boolean | undefined;
4081
+ image?: string | null | undefined;
4082
+ createdAt?: Date | undefined;
4083
+ updatedAt?: Date | undefined;
4084
+ companyId?: string | undefined;
4085
+ branchId?: string | undefined;
4086
+ kind?: "ADMIN" | "COMPANY_ADMIN" | "CUSTOMER" | "INSPECTION" | undefined;
4087
+ employeeId?: string | null | undefined;
4088
+ password?: string | undefined;
4089
+ permissions: never[];
4090
+ };
4091
+ params: {
4092
+ id: string;
4093
+ };
4094
+ query: {};
4095
+ headers: {};
4096
+ response: {
4097
+ 401: "Токен олдсонгүй";
4098
+ 422: {
4099
+ type: "validation";
4100
+ on: string;
4101
+ summary?: string;
4102
+ message?: string;
4103
+ found?: unknown;
4104
+ property?: string;
4105
+ expected?: string;
4106
+ };
4107
+ };
4108
+ };
4109
+ };
4110
+ };
4111
+ };
4112
+ } & {
4113
+ api: {
4114
+ crm: {
4115
+ "cp-order": {};
4116
+ } & {
4117
+ "cp-order": {
4118
+ item: {};
4119
+ } & {
4120
+ item: {
4121
+ employee: {};
4122
+ } & {
4123
+ employee: {
4124
+ get: {
4125
+ body: unknown;
4126
+ params: {};
4127
+ query: {
4128
+ cpOrderItemId: string;
4129
+ };
4130
+ headers: unknown;
4131
+ response: {
4132
+ 200: {
4133
+ cpOrderItemId: string;
4134
+ employeeId: string;
4135
+ amount: number;
4136
+ id: string;
4137
+ createdAt: string;
4138
+ updatedAt: string;
4139
+ deletedAt: string | null;
4140
+ oldId: number | null;
4141
+ }[];
4142
+ 401: "Токен олдсонгүй";
4143
+ 422: {
4144
+ type: "validation";
4145
+ on: string;
4146
+ summary?: string;
4147
+ message?: string;
4148
+ found?: unknown;
4149
+ property?: string;
4150
+ expected?: string;
4151
+ };
4152
+ };
4153
+ };
4154
+ };
4155
+ } & {
4156
+ employee: {
4157
+ post: {
4158
+ body: {
4159
+ oldId?: number | null | undefined;
4160
+ amount?: number | undefined;
4161
+ employeeId: string;
4162
+ cpOrderItemId: string;
4163
+ };
4164
+ params: {};
4165
+ query: unknown;
4166
+ headers: unknown;
4167
+ response: {
4168
+ 200: {
4169
+ id: string;
4170
+ createdAt: string;
4171
+ updatedAt: string;
4172
+ employeeId: string;
4173
+ deletedAt: string | null;
4174
+ oldId: number | null;
4175
+ amount: number;
4176
+ cpOrderItemId: string;
4177
+ };
4178
+ 400: "Энэ үйлчилгээнд ажилтан аль хэдийн хуваарилагдсан байна.";
4179
+ 401: "Токен олдсонгүй";
4180
+ 422: {
4181
+ type: "validation";
4182
+ on: string;
4183
+ summary?: string;
4184
+ message?: string;
4185
+ found?: unknown;
4186
+ property?: string;
4187
+ expected?: string;
4188
+ };
4189
+ };
4190
+ };
4191
+ };
4192
+ } & {
4193
+ employee: {
4194
+ ":id": {
4195
+ put: {
4196
+ body: {
4197
+ amount?: number | undefined;
4198
+ };
4199
+ params: {
4200
+ id: string;
4201
+ };
4202
+ query: unknown;
4203
+ headers: unknown;
4204
+ response: {
4205
+ 200: {
4206
+ cpOrderItemId: string;
4207
+ employeeId: string;
4208
+ amount: number;
4209
+ id: string;
4210
+ createdAt: string;
4211
+ updatedAt: string;
4212
+ deletedAt: string | null;
4213
+ oldId: number | null;
4214
+ };
4215
+ 401: "Токен олдсонгүй";
4216
+ 404: "Ажилтны мэдээлэл олдсонгүй.";
4217
+ 422: {
4218
+ type: "validation";
4219
+ on: string;
4220
+ summary?: string;
4221
+ message?: string;
4222
+ found?: unknown;
4223
+ property?: string;
4224
+ expected?: string;
4225
+ };
4226
+ };
4227
+ };
4228
+ };
4229
+ };
4230
+ } & {
4231
+ employee: {
4232
+ ":id": {
4233
+ delete: {
4234
+ body: unknown;
4235
+ params: {
4236
+ id: string;
3599
4237
  };
3600
4238
  query: unknown;
3601
4239
  headers: unknown;
@@ -8693,14 +9331,150 @@ export declare const app: Elysia<"", {
8693
9331
  };
8694
9332
  };
8695
9333
  } & {
8696
- "field-group": {
9334
+ "field-group": {
9335
+ ":id": {
9336
+ put: {
9337
+ body: {
9338
+ name?: string | undefined;
9339
+ code?: string | null | undefined;
9340
+ oldId?: number | null | undefined;
9341
+ description?: string | null | undefined;
9342
+ };
9343
+ params: {
9344
+ id: string;
9345
+ };
9346
+ query: unknown;
9347
+ headers: unknown;
9348
+ response: {
9349
+ 422: {
9350
+ type: "validation";
9351
+ on: string;
9352
+ summary?: string;
9353
+ message?: string;
9354
+ found?: unknown;
9355
+ property?: string;
9356
+ expected?: string;
9357
+ };
9358
+ };
9359
+ };
9360
+ };
9361
+ };
9362
+ } & {
9363
+ "field-group": {
9364
+ ":id": {
9365
+ delete: {
9366
+ body: unknown;
9367
+ params: {
9368
+ id: string;
9369
+ };
9370
+ query: unknown;
9371
+ headers: unknown;
9372
+ response: {
9373
+ 422: {
9374
+ type: "validation";
9375
+ on: string;
9376
+ summary?: string;
9377
+ message?: string;
9378
+ found?: unknown;
9379
+ property?: string;
9380
+ expected?: string;
9381
+ };
9382
+ };
9383
+ };
9384
+ };
9385
+ };
9386
+ } & {
9387
+ "field-group": {
9388
+ ":id": {
9389
+ field: {
9390
+ get: {
9391
+ body: unknown;
9392
+ params: {
9393
+ id: string;
9394
+ };
9395
+ query: unknown;
9396
+ headers: unknown;
9397
+ response: {
9398
+ 200: {
9399
+ groupId: string;
9400
+ code: string | null;
9401
+ description: string | null;
9402
+ version: string | null;
9403
+ isActive: boolean;
9404
+ metadata: unknown;
9405
+ required: boolean;
9406
+ fieldGroup: string | null;
9407
+ sortIndex: number | null;
9408
+ id: string;
9409
+ createdAt: string;
9410
+ updatedAt: string;
9411
+ deletedAt: string | null;
9412
+ oldId: number | null;
9413
+ }[];
9414
+ 422: {
9415
+ type: "validation";
9416
+ on: string;
9417
+ summary?: string;
9418
+ message?: string;
9419
+ found?: unknown;
9420
+ property?: string;
9421
+ expected?: string;
9422
+ };
9423
+ };
9424
+ };
9425
+ };
9426
+ };
9427
+ };
9428
+ };
9429
+ } & {
9430
+ inspection: {
9431
+ field: {};
9432
+ } & {
9433
+ field: {
9434
+ post: {
9435
+ body: {
9436
+ required?: boolean | undefined;
9437
+ code?: string | null | undefined;
9438
+ oldId?: number | null | undefined;
9439
+ description?: string | null | undefined;
9440
+ isActive?: boolean | undefined;
9441
+ version?: string | null | undefined;
9442
+ metadata?: import("drizzle-typebox").Json | undefined;
9443
+ fieldGroup?: string | null | undefined;
9444
+ sortIndex?: number | null | undefined;
9445
+ groupId: string;
9446
+ };
9447
+ params: {};
9448
+ query: unknown;
9449
+ headers: unknown;
9450
+ response: {
9451
+ 422: {
9452
+ type: "validation";
9453
+ on: string;
9454
+ summary?: string;
9455
+ message?: string;
9456
+ found?: unknown;
9457
+ property?: string;
9458
+ expected?: string;
9459
+ };
9460
+ };
9461
+ };
9462
+ };
9463
+ } & {
9464
+ field: {
8697
9465
  ":id": {
8698
9466
  put: {
8699
9467
  body: {
8700
- name?: string | undefined;
9468
+ required?: boolean | undefined;
8701
9469
  code?: string | null | undefined;
8702
9470
  oldId?: number | null | undefined;
8703
9471
  description?: string | null | undefined;
9472
+ isActive?: boolean | undefined;
9473
+ version?: string | null | undefined;
9474
+ metadata?: import("drizzle-typebox").Json | undefined;
9475
+ fieldGroup?: string | null | undefined;
9476
+ sortIndex?: number | null | undefined;
9477
+ groupId: string;
8704
9478
  };
8705
9479
  params: {
8706
9480
  id: string;
@@ -8722,7 +9496,7 @@ export declare const app: Elysia<"", {
8722
9496
  };
8723
9497
  };
8724
9498
  } & {
8725
- "field-group": {
9499
+ field: {
8726
9500
  ":id": {
8727
9501
  delete: {
8728
9502
  body: unknown;
@@ -8745,42 +9519,124 @@ export declare const app: Elysia<"", {
8745
9519
  };
8746
9520
  };
8747
9521
  };
9522
+ };
9523
+ } & {
9524
+ inspection: {
9525
+ "field-result": {};
8748
9526
  } & {
8749
- "field-group": {
8750
- ":id": {
8751
- field: {
8752
- get: {
8753
- body: unknown;
8754
- params: {
9527
+ "field-result": {
9528
+ get: {
9529
+ body: unknown;
9530
+ params: {};
9531
+ query: {
9532
+ pagination: {
9533
+ size: number;
9534
+ page: number;
9535
+ };
9536
+ inspectionId: string;
9537
+ };
9538
+ headers: unknown;
9539
+ response: {
9540
+ 200: {
9541
+ totalCount: number;
9542
+ totalPage: number;
9543
+ result: Omit<{
9544
+ totalCount: number;
9545
+ inspectionId: string;
9546
+ templateFieldId: string;
9547
+ result: string | null;
9548
+ numeric: number | null;
9549
+ comment: string | null;
9550
+ severityLevel: number | null;
9551
+ id: string;
9552
+ createdAt: string;
9553
+ updatedAt: string;
9554
+ deletedAt: string | null;
9555
+ oldId: number | null;
9556
+ }, "totalCount">[];
9557
+ };
9558
+ 401: "Токен олдсонгүй";
9559
+ 422: {
9560
+ type: "validation";
9561
+ on: string;
9562
+ summary?: string;
9563
+ message?: string;
9564
+ found?: unknown;
9565
+ property?: string;
9566
+ expected?: string;
9567
+ };
9568
+ };
9569
+ };
9570
+ };
9571
+ } & {
9572
+ "field-result": {
9573
+ "create-or-update": {
9574
+ post: {
9575
+ body: {
9576
+ oldId?: number | null | undefined;
9577
+ result?: string | null | undefined;
9578
+ numeric?: number | null | undefined;
9579
+ comment?: string | null | undefined;
9580
+ severityLevel?: number | null | undefined;
9581
+ inspectionId: string;
9582
+ templateFieldId: string;
9583
+ }[];
9584
+ params: {};
9585
+ query: unknown;
9586
+ headers: unknown;
9587
+ response: {
9588
+ 200: {
9589
+ inspectionId: string;
9590
+ templateFieldId: string;
9591
+ result: string | null;
9592
+ numeric: number | null;
9593
+ comment: string | null;
9594
+ severityLevel: number | null;
8755
9595
  id: string;
9596
+ createdAt: string;
9597
+ updatedAt: string;
9598
+ deletedAt: string | null;
9599
+ oldId: number | null;
9600
+ }[];
9601
+ 400: "Хяналтын үр дүн оруулах мэдээлэл байхгүй байна." | "Бүх үр дүн нь ижил хяналтын үзлэгт хамаарах ёстой.";
9602
+ 401: "Токен олдсонгүй";
9603
+ 422: {
9604
+ type: "validation";
9605
+ on: string;
9606
+ summary?: string;
9607
+ message?: string;
9608
+ found?: unknown;
9609
+ property?: string;
9610
+ expected?: string;
8756
9611
  };
8757
- query: unknown;
8758
- headers: unknown;
8759
- response: {
8760
- 200: {
8761
- groupId: string;
8762
- code: string | null;
8763
- description: string | null;
8764
- version: string | null;
8765
- isActive: boolean;
8766
- metadata: unknown;
8767
- required: boolean;
8768
- fieldGroup: string | null;
8769
- sortIndex: number | null;
9612
+ };
9613
+ };
9614
+ };
9615
+ };
9616
+ } & {
9617
+ "field-result": {
9618
+ inspection: {
9619
+ ":id": {
9620
+ all: {
9621
+ delete: {
9622
+ body: unknown;
9623
+ params: {
8770
9624
  id: string;
8771
- createdAt: string;
8772
- updatedAt: string;
8773
- deletedAt: string | null;
8774
- oldId: number | null;
8775
- }[];
8776
- 422: {
8777
- type: "validation";
8778
- on: string;
8779
- summary?: string;
8780
- message?: string;
8781
- found?: unknown;
8782
- property?: string;
8783
- expected?: string;
9625
+ };
9626
+ query: unknown;
9627
+ headers: unknown;
9628
+ response: {
9629
+ 401: "Токен олдсонгүй";
9630
+ 404: "Хяналтын үзлэг олдсонгүй.";
9631
+ 422: {
9632
+ type: "validation";
9633
+ on: string;
9634
+ summary?: string;
9635
+ message?: string;
9636
+ found?: unknown;
9637
+ property?: string;
9638
+ expected?: string;
9639
+ };
8784
9640
  };
8785
9641
  };
8786
9642
  };
@@ -8790,26 +9646,65 @@ export declare const app: Elysia<"", {
8790
9646
  };
8791
9647
  } & {
8792
9648
  inspection: {
8793
- field: {};
9649
+ template: {};
8794
9650
  } & {
8795
- field: {
9651
+ template: {
9652
+ get: {
9653
+ body: unknown;
9654
+ params: {};
9655
+ query: {
9656
+ pagination: {
9657
+ size: number;
9658
+ page: number;
9659
+ };
9660
+ };
9661
+ headers: unknown;
9662
+ response: {
9663
+ 200: {
9664
+ totalCount: number;
9665
+ totalPage: number;
9666
+ result: Omit<{
9667
+ totalCount: number;
9668
+ companyId: string | null;
9669
+ name: string;
9670
+ description: string | null;
9671
+ version: string | null;
9672
+ isActive: boolean;
9673
+ id: string;
9674
+ createdAt: string;
9675
+ updatedAt: string;
9676
+ deletedAt: string | null;
9677
+ oldId: number | null;
9678
+ }, "totalCount">[];
9679
+ };
9680
+ 422: {
9681
+ type: "validation";
9682
+ on: string;
9683
+ summary?: string;
9684
+ message?: string;
9685
+ found?: unknown;
9686
+ property?: string;
9687
+ expected?: string;
9688
+ };
9689
+ };
9690
+ };
9691
+ };
9692
+ } & {
9693
+ template: {
8796
9694
  post: {
8797
9695
  body: {
8798
- required?: boolean | undefined;
8799
- code?: string | null | undefined;
9696
+ companyId?: string | null | undefined;
8800
9697
  oldId?: number | null | undefined;
8801
9698
  description?: string | null | undefined;
8802
9699
  isActive?: boolean | undefined;
8803
9700
  version?: string | null | undefined;
8804
- metadata?: import("drizzle-typebox").Json | undefined;
8805
- fieldGroup?: string | null | undefined;
8806
- sortIndex?: number | null | undefined;
8807
- groupId: string;
9701
+ name: string;
8808
9702
  };
8809
9703
  params: {};
8810
9704
  query: unknown;
8811
9705
  headers: unknown;
8812
9706
  response: {
9707
+ 200: string;
8813
9708
  422: {
8814
9709
  type: "validation";
8815
9710
  on: string;
@@ -8823,20 +9718,53 @@ export declare const app: Elysia<"", {
8823
9718
  };
8824
9719
  };
8825
9720
  } & {
8826
- field: {
9721
+ template: {
9722
+ ":id": {
9723
+ get: {
9724
+ body: unknown;
9725
+ params: {
9726
+ id: string;
9727
+ };
9728
+ query: unknown;
9729
+ headers: unknown;
9730
+ response: {
9731
+ 200: {
9732
+ companyId: string | null;
9733
+ name: string;
9734
+ description: string | null;
9735
+ version: string | null;
9736
+ isActive: boolean;
9737
+ id: string;
9738
+ createdAt: string;
9739
+ updatedAt: string;
9740
+ deletedAt: string | null;
9741
+ oldId: number | null;
9742
+ };
9743
+ 404: "Үзлэгийн загвар олдсонгүй.";
9744
+ 422: {
9745
+ type: "validation";
9746
+ on: string;
9747
+ summary?: string;
9748
+ message?: string;
9749
+ found?: unknown;
9750
+ property?: string;
9751
+ expected?: string;
9752
+ };
9753
+ };
9754
+ };
9755
+ };
9756
+ };
9757
+ } & {
9758
+ template: {
8827
9759
  ":id": {
8828
9760
  put: {
8829
9761
  body: {
8830
- required?: boolean | undefined;
8831
- code?: string | null | undefined;
9762
+ name?: string | undefined;
9763
+ companyId?: string | null | undefined;
8832
9764
  oldId?: number | null | undefined;
8833
9765
  description?: string | null | undefined;
8834
9766
  isActive?: boolean | undefined;
8835
9767
  version?: string | null | undefined;
8836
- metadata?: import("drizzle-typebox").Json | undefined;
8837
- fieldGroup?: string | null | undefined;
8838
- sortIndex?: number | null | undefined;
8839
- groupId: string;
8840
9768
  };
8841
9769
  params: {
8842
9770
  id: string;
@@ -8844,6 +9772,7 @@ export declare const app: Elysia<"", {
8844
9772
  query: unknown;
8845
9773
  headers: unknown;
8846
9774
  response: {
9775
+ 404: "Үзлэгийн загвар олдсонгүй.";
8847
9776
  422: {
8848
9777
  type: "validation";
8849
9778
  on: string;
@@ -8858,7 +9787,7 @@ export declare const app: Elysia<"", {
8858
9787
  };
8859
9788
  };
8860
9789
  } & {
8861
- field: {
9790
+ template: {
8862
9791
  ":id": {
8863
9792
  delete: {
8864
9793
  body: unknown;
@@ -8881,12 +9810,156 @@ export declare const app: Elysia<"", {
8881
9810
  };
8882
9811
  };
8883
9812
  };
9813
+ } & {
9814
+ template: {
9815
+ ":id": {
9816
+ field: {
9817
+ get: {
9818
+ body: unknown;
9819
+ params: {
9820
+ id: string;
9821
+ };
9822
+ query: unknown;
9823
+ headers: unknown;
9824
+ response: {
9825
+ 200: {
9826
+ templateId: string;
9827
+ fieldGroupId: string | null;
9828
+ fieldGroup: string | null;
9829
+ fieldId: string | null;
9830
+ code: string | null;
9831
+ description: string | null;
9832
+ fieldType: "BOOLEAN" | "NUMERIC" | "TEXT" | "DATE" | "RATE" | "MULTI_CHOICE";
9833
+ required: boolean;
9834
+ metadata: unknown;
9835
+ sortIndex: number | null;
9836
+ id: string;
9837
+ createdAt: string;
9838
+ updatedAt: string;
9839
+ deletedAt: string | null;
9840
+ oldId: number | null;
9841
+ }[];
9842
+ 422: {
9843
+ type: "validation";
9844
+ on: string;
9845
+ summary?: string;
9846
+ message?: string;
9847
+ found?: unknown;
9848
+ property?: string;
9849
+ expected?: string;
9850
+ };
9851
+ };
9852
+ };
9853
+ };
9854
+ };
9855
+ };
9856
+ } & {
9857
+ template: {
9858
+ field: {
9859
+ ":id": {
9860
+ put: {
9861
+ body: {
9862
+ required?: boolean | undefined;
9863
+ code?: string | null | undefined;
9864
+ oldId?: number | null | undefined;
9865
+ description?: string | null | undefined;
9866
+ metadata?: import("drizzle-typebox").Json | undefined;
9867
+ fieldGroup?: string | null | undefined;
9868
+ sortIndex?: number | null | undefined;
9869
+ templateId?: string | undefined;
9870
+ fieldGroupId?: string | null | undefined;
9871
+ fieldId?: string | null | undefined;
9872
+ fieldType?: "BOOLEAN" | "NUMERIC" | "TEXT" | "DATE" | "RATE" | "MULTI_CHOICE" | undefined;
9873
+ };
9874
+ params: {
9875
+ id: string;
9876
+ };
9877
+ query: unknown;
9878
+ headers: unknown;
9879
+ response: {
9880
+ 422: {
9881
+ type: "validation";
9882
+ on: string;
9883
+ summary?: string;
9884
+ message?: string;
9885
+ found?: unknown;
9886
+ property?: string;
9887
+ expected?: string;
9888
+ };
9889
+ };
9890
+ };
9891
+ };
9892
+ };
9893
+ };
9894
+ } & {
9895
+ template: {
9896
+ ":id": {
9897
+ field: {
9898
+ post: {
9899
+ body: {
9900
+ required?: boolean | undefined;
9901
+ code?: string | null | undefined;
9902
+ oldId?: number | null | undefined;
9903
+ description?: string | null | undefined;
9904
+ metadata?: import("drizzle-typebox").Json | undefined;
9905
+ fieldGroup?: string | null | undefined;
9906
+ sortIndex?: number | null | undefined;
9907
+ fieldGroupId?: string | null | undefined;
9908
+ fieldId?: string | null | undefined;
9909
+ fieldType: "BOOLEAN" | "NUMERIC" | "TEXT" | "DATE" | "RATE" | "MULTI_CHOICE";
9910
+ };
9911
+ params: {
9912
+ id: string;
9913
+ };
9914
+ query: unknown;
9915
+ headers: unknown;
9916
+ response: {
9917
+ 422: {
9918
+ type: "validation";
9919
+ on: string;
9920
+ summary?: string;
9921
+ message?: string;
9922
+ found?: unknown;
9923
+ property?: string;
9924
+ expected?: string;
9925
+ };
9926
+ };
9927
+ };
9928
+ };
9929
+ };
9930
+ };
9931
+ } & {
9932
+ template: {
9933
+ field: {
9934
+ ":id": {
9935
+ delete: {
9936
+ body: unknown;
9937
+ params: {
9938
+ id: string;
9939
+ };
9940
+ query: unknown;
9941
+ headers: unknown;
9942
+ response: {
9943
+ 422: {
9944
+ type: "validation";
9945
+ on: string;
9946
+ summary?: string;
9947
+ message?: string;
9948
+ found?: unknown;
9949
+ property?: string;
9950
+ expected?: string;
9951
+ };
9952
+ };
9953
+ };
9954
+ };
9955
+ };
9956
+ };
8884
9957
  };
8885
9958
  } & {
8886
9959
  inspection: {
8887
- "field-result": {};
9960
+ schedule: {};
8888
9961
  } & {
8889
- "field-result": {
9962
+ schedule: {
8890
9963
  get: {
8891
9964
  body: unknown;
8892
9965
  params: {};
@@ -8895,7 +9968,6 @@ export declare const app: Elysia<"", {
8895
9968
  size: number;
8896
9969
  page: number;
8897
9970
  };
8898
- inspectionId: string;
8899
9971
  };
8900
9972
  headers: unknown;
8901
9973
  response: {
@@ -8903,18 +9975,48 @@ export declare const app: Elysia<"", {
8903
9975
  totalCount: number;
8904
9976
  totalPage: number;
8905
9977
  result: Omit<{
9978
+ schedule: {
9979
+ companyId: string;
9980
+ machineId: string;
9981
+ templateId: string;
9982
+ daysInterval: number | null;
9983
+ timeNextDue: Date | null;
9984
+ isActive: boolean;
9985
+ id: string;
9986
+ createdAt: string;
9987
+ updatedAt: string;
9988
+ deletedAt: string | null;
9989
+ oldId: number | null;
9990
+ };
9991
+ machine: {
9992
+ companyId: string | null;
9993
+ machineKindId: string;
9994
+ customerId: string | null;
9995
+ name: string | null;
9996
+ assetCode: string | null;
9997
+ vin: string | null;
9998
+ licensePlate: string | null;
9999
+ color: string | null;
10000
+ engineCc: string | null;
10001
+ cylinder: string | null;
10002
+ gasType: string | null;
10003
+ transmissionType: string | null;
10004
+ vehicleType: string | null;
10005
+ yearManufacture: number | null;
10006
+ yearImport: number | null;
10007
+ steering: string | null;
10008
+ engineCode: string | null;
10009
+ transmissionCode: string | null;
10010
+ driveTrain: string | null;
10011
+ km: number;
10012
+ customData: unknown;
10013
+ id: string;
10014
+ createdAt: string;
10015
+ updatedAt: string;
10016
+ deletedAt: string | null;
10017
+ oldId: number | null;
10018
+ } | null;
8906
10019
  totalCount: number;
8907
- inspectionId: string;
8908
- templateFieldId: string;
8909
- result: string | null;
8910
- numeric: number | null;
8911
- comment: string | null;
8912
- severityLevel: number | null;
8913
- id: string;
8914
- createdAt: string;
8915
- updatedAt: string;
8916
- deletedAt: string | null;
8917
- oldId: number | null;
8918
10020
  }, "totalCount">[];
8919
10021
  };
8920
10022
  401: "Токен олдсонгүй";
@@ -8931,36 +10033,52 @@ export declare const app: Elysia<"", {
8931
10033
  };
8932
10034
  };
8933
10035
  } & {
8934
- "field-result": {
8935
- "create-or-update": {
8936
- post: {
10036
+ schedule: {
10037
+ post: {
10038
+ body: {
10039
+ oldId?: number | null | undefined;
10040
+ isActive?: boolean | undefined;
10041
+ daysInterval?: number | null | undefined;
10042
+ timeNextDue?: Date | null | undefined;
10043
+ templateId: string;
10044
+ machineId: string;
10045
+ };
10046
+ params: {};
10047
+ query: unknown;
10048
+ headers: unknown;
10049
+ response: {
10050
+ 401: "Токен олдсонгүй";
10051
+ 422: {
10052
+ type: "validation";
10053
+ on: string;
10054
+ summary?: string;
10055
+ message?: string;
10056
+ found?: unknown;
10057
+ property?: string;
10058
+ expected?: string;
10059
+ };
10060
+ };
10061
+ };
10062
+ };
10063
+ } & {
10064
+ schedule: {
10065
+ ":id": {
10066
+ put: {
8937
10067
  body: {
10068
+ companyId?: string | undefined;
8938
10069
  oldId?: number | null | undefined;
8939
- result?: string | null | undefined;
8940
- numeric?: number | null | undefined;
8941
- comment?: string | null | undefined;
8942
- severityLevel?: number | null | undefined;
8943
- inspectionId: string;
8944
- templateFieldId: string;
8945
- }[];
8946
- params: {};
10070
+ isActive?: boolean | undefined;
10071
+ templateId?: string | undefined;
10072
+ machineId?: string | undefined;
10073
+ daysInterval?: number | null | undefined;
10074
+ timeNextDue?: Date | null | undefined;
10075
+ };
10076
+ params: {
10077
+ id: string;
10078
+ };
8947
10079
  query: unknown;
8948
10080
  headers: unknown;
8949
10081
  response: {
8950
- 200: {
8951
- inspectionId: string;
8952
- templateFieldId: string;
8953
- result: string | null;
8954
- numeric: number | null;
8955
- comment: string | null;
8956
- severityLevel: number | null;
8957
- id: string;
8958
- createdAt: string;
8959
- updatedAt: string;
8960
- deletedAt: string | null;
8961
- oldId: number | null;
8962
- }[];
8963
- 400: "Хяналтын үр дүн оруулах мэдээлэл байхгүй байна." | "Бүх үр дүн нь ижил хяналтын үзлэгт хамаарах ёстой.";
8964
10082
  401: "Токен олдсонгүй";
8965
10083
  422: {
8966
10084
  type: "validation";
@@ -8976,97 +10094,199 @@ export declare const app: Elysia<"", {
8976
10094
  };
8977
10095
  };
8978
10096
  } & {
8979
- "field-result": {
8980
- inspection: {
8981
- ":id": {
8982
- all: {
8983
- delete: {
8984
- body: unknown;
8985
- params: {
8986
- id: string;
8987
- };
8988
- query: unknown;
8989
- headers: unknown;
8990
- response: {
8991
- 401: "Токен олдсонгүй";
8992
- 404: "Хяналтын үзлэг олдсонгүй.";
8993
- 422: {
8994
- type: "validation";
8995
- on: string;
8996
- summary?: string;
8997
- message?: string;
8998
- found?: unknown;
8999
- property?: string;
9000
- expected?: string;
9001
- };
9002
- };
10097
+ schedule: {
10098
+ ":id": {
10099
+ delete: {
10100
+ body: unknown;
10101
+ params: {
10102
+ id: string;
10103
+ };
10104
+ query: unknown;
10105
+ headers: unknown;
10106
+ response: {
10107
+ 401: "Токен олдсонгүй";
10108
+ 422: {
10109
+ type: "validation";
10110
+ on: string;
10111
+ summary?: string;
10112
+ message?: string;
10113
+ found?: unknown;
10114
+ property?: string;
10115
+ expected?: string;
9003
10116
  };
9004
10117
  };
9005
10118
  };
9006
10119
  };
9007
10120
  };
9008
10121
  };
10122
+ } & {
10123
+ inspection: {};
9009
10124
  } & {
9010
10125
  inspection: {
9011
- template: {};
9012
- } & {
9013
- template: {
9014
- get: {
9015
- body: unknown;
9016
- params: {};
9017
- query: {
9018
- pagination: {
9019
- size: number;
9020
- page: number;
9021
- };
10126
+ get: {
10127
+ body: unknown;
10128
+ params: {};
10129
+ query: {
10130
+ id?: string | undefined;
10131
+ state?: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED" | undefined;
10132
+ templateId?: string | undefined;
10133
+ machineId?: string | undefined;
10134
+ stateResult?: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | undefined;
10135
+ startDate?: string | undefined;
10136
+ endDate?: string | undefined;
10137
+ pagination: {
10138
+ size: number;
10139
+ page: number;
9022
10140
  };
9023
- headers: unknown;
9024
- response: {
9025
- 200: {
9026
- totalCount: number;
9027
- totalPage: number;
9028
- result: Omit<{
9029
- totalCount: number;
10141
+ };
10142
+ headers: unknown;
10143
+ response: {
10144
+ 200: {
10145
+ totalCount: number;
10146
+ totalPage: number;
10147
+ result: Omit<{
10148
+ inspection: {
10149
+ machineId: string;
10150
+ templateId: string;
10151
+ employeeInspectedId: string;
10152
+ userInspectedId: string;
10153
+ hours: number | null;
10154
+ mileageKm: number | null;
10155
+ state: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED";
10156
+ stateResult: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | null;
10157
+ timeScheduled: Date | null;
10158
+ timeCompleted: Date | null;
10159
+ note: string | null;
10160
+ id: string;
10161
+ createdAt: string;
10162
+ updatedAt: string;
10163
+ deletedAt: string | null;
10164
+ oldId: number | null;
10165
+ };
10166
+ machine: {
9030
10167
  companyId: string | null;
9031
- name: string;
9032
- description: string | null;
9033
- version: string | null;
9034
- isActive: boolean;
10168
+ machineKindId: string;
10169
+ customerId: string | null;
10170
+ name: string | null;
10171
+ assetCode: string | null;
10172
+ vin: string | null;
10173
+ licensePlate: string | null;
10174
+ color: string | null;
10175
+ engineCc: string | null;
10176
+ cylinder: string | null;
10177
+ gasType: string | null;
10178
+ transmissionType: string | null;
10179
+ vehicleType: string | null;
10180
+ yearManufacture: number | null;
10181
+ yearImport: number | null;
10182
+ steering: string | null;
10183
+ engineCode: string | null;
10184
+ transmissionCode: string | null;
10185
+ driveTrain: string | null;
10186
+ km: number;
10187
+ customData: unknown;
9035
10188
  id: string;
9036
10189
  createdAt: string;
9037
10190
  updatedAt: string;
9038
10191
  deletedAt: string | null;
9039
10192
  oldId: number | null;
9040
- }, "totalCount">[];
9041
- };
9042
- 422: {
9043
- type: "validation";
9044
- on: string;
9045
- summary?: string;
9046
- message?: string;
9047
- found?: unknown;
9048
- property?: string;
9049
- expected?: string;
9050
- };
10193
+ } | null;
10194
+ totalCount: number;
10195
+ template: {
10196
+ name: string;
10197
+ } | null;
10198
+ }, "totalCount">[];
10199
+ };
10200
+ 401: "Токен олдсонгүй";
10201
+ 422: {
10202
+ type: "validation";
10203
+ on: string;
10204
+ summary?: string;
10205
+ message?: string;
10206
+ found?: unknown;
10207
+ property?: string;
10208
+ expected?: string;
9051
10209
  };
9052
10210
  };
9053
10211
  };
9054
- } & {
9055
- template: {
9056
- post: {
10212
+ };
10213
+ } & {
10214
+ inspection: {
10215
+ post: {
10216
+ body: {
10217
+ oldId?: number | null | undefined;
10218
+ note?: string | null | undefined;
10219
+ state?: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED" | undefined;
10220
+ timeCompleted?: Date | null | undefined;
10221
+ hours?: number | null | undefined;
10222
+ mileageKm?: number | null | undefined;
10223
+ stateResult?: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | null | undefined;
10224
+ timeScheduled?: Date | null | undefined;
10225
+ templateId: string;
10226
+ machineId: string;
10227
+ };
10228
+ params: {};
10229
+ query: unknown;
10230
+ headers: unknown;
10231
+ response: {
10232
+ 400: "Ажилтны мэдээлэл шаардлагатай.";
10233
+ 401: "Токен олдсонгүй";
10234
+ 422: {
10235
+ type: "validation";
10236
+ on: string;
10237
+ summary?: string;
10238
+ message?: string;
10239
+ found?: unknown;
10240
+ property?: string;
10241
+ expected?: string;
10242
+ };
10243
+ };
10244
+ };
10245
+ };
10246
+ } & {
10247
+ inspection: {
10248
+ ":id": {
10249
+ put: {
9057
10250
  body: {
9058
- companyId?: string | null | undefined;
9059
10251
  oldId?: number | null | undefined;
9060
- description?: string | null | undefined;
9061
- isActive?: boolean | undefined;
9062
- version?: string | null | undefined;
9063
- name: string;
10252
+ note?: string | null | undefined;
10253
+ state?: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED" | undefined;
10254
+ timeCompleted?: Date | null | undefined;
10255
+ templateId?: string | undefined;
10256
+ machineId?: string | undefined;
10257
+ employeeInspectedId?: string | undefined;
10258
+ userInspectedId?: string | undefined;
10259
+ hours?: number | null | undefined;
10260
+ mileageKm?: number | null | undefined;
10261
+ stateResult?: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | null | undefined;
10262
+ timeScheduled?: Date | null | undefined;
10263
+ };
10264
+ params: {
10265
+ id: string;
9064
10266
  };
9065
- params: {};
9066
10267
  query: unknown;
9067
10268
  headers: unknown;
9068
10269
  response: {
9069
- 200: string;
10270
+ 200: {
10271
+ machineId: string;
10272
+ templateId: string;
10273
+ employeeInspectedId: string;
10274
+ userInspectedId: string;
10275
+ hours: number | null;
10276
+ mileageKm: number | null;
10277
+ state: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED";
10278
+ stateResult: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | null;
10279
+ timeScheduled: Date | null;
10280
+ timeCompleted: Date | null;
10281
+ note: string | null;
10282
+ id: string;
10283
+ createdAt: string;
10284
+ updatedAt: string;
10285
+ deletedAt: string | null;
10286
+ oldId: number | null;
10287
+ };
10288
+ 401: "Токен олдсонгүй";
10289
+ 404: "Хяналтын үзлэг олдсонгүй.";
9070
10290
  422: {
9071
10291
  type: "validation";
9072
10292
  on: string;
@@ -9079,30 +10299,71 @@ export declare const app: Elysia<"", {
9079
10299
  };
9080
10300
  };
9081
10301
  };
10302
+ };
10303
+ };
10304
+ } & {
10305
+ fleet: {
10306
+ pm: {
10307
+ template: {};
9082
10308
  } & {
9083
10309
  template: {
9084
- ":id": {
10310
+ product: {};
10311
+ } & {
10312
+ product: {
9085
10313
  get: {
9086
10314
  body: unknown;
9087
- params: {
9088
- id: string;
10315
+ params: {};
10316
+ query: {
10317
+ pagination: {
10318
+ size: number;
10319
+ page: number;
10320
+ };
10321
+ pmTemplateId: string;
9089
10322
  };
9090
- query: unknown;
9091
10323
  headers: unknown;
9092
10324
  response: {
9093
10325
  200: {
9094
- companyId: string | null;
9095
- name: string;
9096
- description: string | null;
9097
- version: string | null;
9098
- isActive: boolean;
9099
- id: string;
9100
- createdAt: string;
9101
- updatedAt: string;
9102
- deletedAt: string | null;
9103
- oldId: number | null;
10326
+ totalCount: number;
10327
+ totalPage: number;
10328
+ result: Omit<{
10329
+ product: {
10330
+ pmTemplateId: string;
10331
+ productKindId: string;
10332
+ quantity: number | null;
10333
+ uomId: string;
10334
+ id: string;
10335
+ createdAt: string;
10336
+ updatedAt: string;
10337
+ deletedAt: string | null;
10338
+ oldId: number | null;
10339
+ };
10340
+ productKind: {
10341
+ productCategoryId: string;
10342
+ name: string;
10343
+ description: string | null;
10344
+ id: string;
10345
+ createdAt: string;
10346
+ updatedAt: string;
10347
+ deletedAt: string | null;
10348
+ oldId: number | null;
10349
+ } | null;
10350
+ uom: {
10351
+ uomCategoryId: string;
10352
+ code: string | null;
10353
+ name: string;
10354
+ description: string | null;
10355
+ symbol: string | null;
10356
+ isBaseUnit: boolean;
10357
+ baseFactor: number | null;
10358
+ id: string;
10359
+ createdAt: string;
10360
+ updatedAt: string;
10361
+ deletedAt: string | null;
10362
+ oldId: number | null;
10363
+ } | null;
10364
+ totalCount: number;
10365
+ }, "totalCount">[];
9104
10366
  };
9105
- 404: "Үзлэгийн загвар олдсонгүй.";
9106
10367
  422: {
9107
10368
  type: "validation";
9108
10369
  on: string;
@@ -9115,47 +10376,17 @@ export declare const app: Elysia<"", {
9115
10376
  };
9116
10377
  };
9117
10378
  };
9118
- };
9119
- } & {
9120
- template: {
9121
- ":id": {
9122
- put: {
10379
+ } & {
10380
+ product: {
10381
+ post: {
9123
10382
  body: {
9124
- name?: string | undefined;
9125
- companyId?: string | null | undefined;
9126
10383
  oldId?: number | null | undefined;
9127
- description?: string | null | undefined;
9128
- isActive?: boolean | undefined;
9129
- version?: string | null | undefined;
9130
- };
9131
- params: {
9132
- id: string;
9133
- };
9134
- query: unknown;
9135
- headers: unknown;
9136
- response: {
9137
- 404: "Үзлэгийн загвар олдсонгүй.";
9138
- 422: {
9139
- type: "validation";
9140
- on: string;
9141
- summary?: string;
9142
- message?: string;
9143
- found?: unknown;
9144
- property?: string;
9145
- expected?: string;
9146
- };
9147
- };
9148
- };
9149
- };
9150
- };
9151
- } & {
9152
- template: {
9153
- ":id": {
9154
- delete: {
9155
- body: unknown;
9156
- params: {
9157
- id: string;
10384
+ quantity?: number | null | undefined;
10385
+ uomId: string;
10386
+ pmTemplateId: string;
10387
+ productKindId: string;
9158
10388
  };
10389
+ params: {};
9159
10390
  query: unknown;
9160
10391
  headers: unknown;
9161
10392
  response: {
@@ -9171,66 +10402,16 @@ export declare const app: Elysia<"", {
9171
10402
  };
9172
10403
  };
9173
10404
  };
9174
- };
9175
- } & {
9176
- template: {
9177
- ":id": {
9178
- field: {
9179
- get: {
9180
- body: unknown;
9181
- params: {
9182
- id: string;
9183
- };
9184
- query: unknown;
9185
- headers: unknown;
9186
- response: {
9187
- 200: {
9188
- templateId: string;
9189
- fieldGroupId: string | null;
9190
- fieldGroup: string | null;
9191
- fieldId: string | null;
9192
- code: string | null;
9193
- description: string | null;
9194
- fieldType: "BOOLEAN" | "NUMERIC" | "TEXT" | "DATE" | "RATE" | "MULTI_CHOICE";
9195
- required: boolean;
9196
- metadata: unknown;
9197
- sortIndex: number | null;
9198
- id: string;
9199
- createdAt: string;
9200
- updatedAt: string;
9201
- deletedAt: string | null;
9202
- oldId: number | null;
9203
- }[];
9204
- 422: {
9205
- type: "validation";
9206
- on: string;
9207
- summary?: string;
9208
- message?: string;
9209
- found?: unknown;
9210
- property?: string;
9211
- expected?: string;
9212
- };
9213
- };
9214
- };
9215
- };
9216
- };
9217
- };
9218
- } & {
9219
- template: {
9220
- ":id": {
9221
- field: {
9222
- post: {
10405
+ } & {
10406
+ product: {
10407
+ ":id": {
10408
+ put: {
9223
10409
  body: {
9224
- required?: boolean | undefined;
9225
- code?: string | null | undefined;
9226
10410
  oldId?: number | null | undefined;
9227
- description?: string | null | undefined;
9228
- metadata?: import("drizzle-typebox").Json | undefined;
9229
- fieldGroup?: string | null | undefined;
9230
- sortIndex?: number | null | undefined;
9231
- fieldGroupId?: string | null | undefined;
9232
- fieldId?: string | null | undefined;
9233
- fieldType: "BOOLEAN" | "NUMERIC" | "TEXT" | "DATE" | "RATE" | "MULTI_CHOICE";
10411
+ quantity?: number | null | undefined;
10412
+ uomId?: string | undefined;
10413
+ pmTemplateId?: string | undefined;
10414
+ productKindId?: string | undefined;
9234
10415
  };
9235
10416
  params: {
9236
10417
  id: string;
@@ -9251,10 +10432,8 @@ export declare const app: Elysia<"", {
9251
10432
  };
9252
10433
  };
9253
10434
  };
9254
- };
9255
- } & {
9256
- template: {
9257
- field: {
10435
+ } & {
10436
+ product: {
9258
10437
  ":id": {
9259
10438
  delete: {
9260
10439
  body: unknown;
@@ -9278,12 +10457,8 @@ export declare const app: Elysia<"", {
9278
10457
  };
9279
10458
  };
9280
10459
  };
9281
- };
9282
- } & {
9283
- inspection: {
9284
- schedule: {};
9285
10460
  } & {
9286
- schedule: {
10461
+ template: {
9287
10462
  get: {
9288
10463
  body: unknown;
9289
10464
  params: {};
@@ -9299,41 +10474,56 @@ export declare const app: Elysia<"", {
9299
10474
  totalCount: number;
9300
10475
  totalPage: number;
9301
10476
  result: Omit<{
9302
- schedule: {
9303
- companyId: string;
9304
- machineId: string;
9305
- templateId: string;
9306
- daysInterval: number | null;
9307
- timeNextDue: Date | null;
9308
- isActive: boolean;
10477
+ template: {
10478
+ machineKindId: string;
10479
+ companyId: string | null;
10480
+ operationAmount: number | null;
10481
+ uomId: string;
10482
+ serviceKindId: string;
10483
+ name: string;
10484
+ description: string | null;
9309
10485
  id: string;
9310
10486
  createdAt: string;
9311
10487
  updatedAt: string;
9312
10488
  deletedAt: string | null;
9313
10489
  oldId: number | null;
9314
10490
  };
9315
- machine: {
9316
- companyId: string | null;
9317
- machineKindId: string;
9318
- customerId: string | null;
9319
- name: string | null;
9320
- assetCode: string | null;
9321
- vin: string | null;
9322
- licensePlate: string | null;
9323
- color: string | null;
9324
- engineCc: string | null;
9325
- cylinder: string | null;
9326
- gasType: string | null;
9327
- transmissionType: string | null;
9328
- vehicleType: string | null;
9329
- yearManufacture: number | null;
9330
- yearImport: number | null;
9331
- steering: string | null;
9332
- engineCode: string | null;
9333
- transmissionCode: string | null;
9334
- driveTrain: string | null;
9335
- km: number;
9336
- customData: unknown;
10491
+ machineKind: {
10492
+ vehicleKindEnum: "MAKE" | "MODEL_GROUP" | "MODEL";
10493
+ parentId: string | null;
10494
+ name: string;
10495
+ description: string | null;
10496
+ yearStart: number | null;
10497
+ yearEnd: number | null;
10498
+ imagePath: string | null;
10499
+ id: string;
10500
+ createdAt: string;
10501
+ updatedAt: string;
10502
+ deletedAt: string | null;
10503
+ oldId: number | null;
10504
+ } | null;
10505
+ uom: {
10506
+ uomCategoryId: string;
10507
+ code: string | null;
10508
+ name: string;
10509
+ description: string | null;
10510
+ symbol: string | null;
10511
+ isBaseUnit: boolean;
10512
+ baseFactor: number | null;
10513
+ id: string;
10514
+ createdAt: string;
10515
+ updatedAt: string;
10516
+ deletedAt: string | null;
10517
+ oldId: number | null;
10518
+ } | null;
10519
+ serviceKind: {
10520
+ serviceKindId: string | null;
10521
+ companyId: string;
10522
+ branchId: string | null;
10523
+ name: string;
10524
+ description: string | null;
10525
+ enabled: boolean;
10526
+ price: number;
9337
10527
  id: string;
9338
10528
  createdAt: string;
9339
10529
  updatedAt: string;
@@ -9343,7 +10533,6 @@ export declare const app: Elysia<"", {
9343
10533
  totalCount: number;
9344
10534
  }, "totalCount">[];
9345
10535
  };
9346
- 401: "Токен олдсонгүй";
9347
10536
  422: {
9348
10537
  type: "validation";
9349
10538
  on: string;
@@ -9357,21 +10546,22 @@ export declare const app: Elysia<"", {
9357
10546
  };
9358
10547
  };
9359
10548
  } & {
9360
- schedule: {
10549
+ template: {
9361
10550
  post: {
9362
10551
  body: {
10552
+ companyId?: string | null | undefined;
9363
10553
  oldId?: number | null | undefined;
9364
- isActive?: boolean | undefined;
9365
- daysInterval?: number | null | undefined;
9366
- timeNextDue?: Date | null | undefined;
9367
- templateId: string;
9368
- machineId: string;
10554
+ description?: string | null | undefined;
10555
+ operationAmount?: number | null | undefined;
10556
+ name: string;
10557
+ serviceKindId: string;
10558
+ machineKindId: string;
10559
+ uomId: string;
9369
10560
  };
9370
10561
  params: {};
9371
10562
  query: unknown;
9372
10563
  headers: unknown;
9373
10564
  response: {
9374
- 401: "Токен олдсонгүй";
9375
10565
  422: {
9376
10566
  type: "validation";
9377
10567
  on: string;
@@ -9385,17 +10575,18 @@ export declare const app: Elysia<"", {
9385
10575
  };
9386
10576
  };
9387
10577
  } & {
9388
- schedule: {
10578
+ template: {
9389
10579
  ":id": {
9390
10580
  put: {
9391
10581
  body: {
9392
- companyId?: string | undefined;
10582
+ name?: string | undefined;
10583
+ companyId?: string | null | undefined;
9393
10584
  oldId?: number | null | undefined;
9394
- isActive?: boolean | undefined;
9395
- templateId?: string | undefined;
9396
- machineId?: string | undefined;
9397
- daysInterval?: number | null | undefined;
9398
- timeNextDue?: Date | null | undefined;
10585
+ description?: string | null | undefined;
10586
+ serviceKindId?: string | undefined;
10587
+ machineKindId?: string | undefined;
10588
+ operationAmount?: number | null | undefined;
10589
+ uomId?: string | undefined;
9399
10590
  };
9400
10591
  params: {
9401
10592
  id: string;
@@ -9403,7 +10594,6 @@ export declare const app: Elysia<"", {
9403
10594
  query: unknown;
9404
10595
  headers: unknown;
9405
10596
  response: {
9406
- 401: "Токен олдсонгүй";
9407
10597
  422: {
9408
10598
  type: "validation";
9409
10599
  on: string;
@@ -9418,7 +10608,7 @@ export declare const app: Elysia<"", {
9418
10608
  };
9419
10609
  };
9420
10610
  } & {
9421
- schedule: {
10611
+ template: {
9422
10612
  ":id": {
9423
10613
  delete: {
9424
10614
  body: unknown;
@@ -9428,7 +10618,6 @@ export declare const app: Elysia<"", {
9428
10618
  query: unknown;
9429
10619
  headers: unknown;
9430
10620
  response: {
9431
- 401: "Токен олдсонгүй";
9432
10621
  422: {
9433
10622
  type: "validation";
9434
10623
  on: string;
@@ -9444,193 +10633,191 @@ export declare const app: Elysia<"", {
9444
10633
  };
9445
10634
  };
9446
10635
  } & {
9447
- inspection: {};
9448
- } & {
9449
- inspection: {
9450
- get: {
9451
- body: unknown;
9452
- params: {};
9453
- query: {
9454
- id?: string | undefined;
9455
- state?: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED" | undefined;
9456
- templateId?: string | undefined;
9457
- machineId?: string | undefined;
9458
- stateResult?: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | undefined;
9459
- startDate?: string | undefined;
9460
- endDate?: string | undefined;
9461
- pagination: {
9462
- size: number;
9463
- page: number;
9464
- };
9465
- };
9466
- headers: unknown;
9467
- response: {
9468
- 200: {
9469
- totalCount: number;
9470
- totalPage: number;
9471
- result: Omit<{
9472
- inspection: {
9473
- machineId: string;
9474
- templateId: string;
9475
- employeeInspectedId: string;
9476
- userInspectedId: string;
9477
- hours: number | null;
9478
- mileageKm: number | null;
9479
- state: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED";
9480
- stateResult: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | null;
9481
- timeScheduled: Date | null;
9482
- timeCompleted: Date | null;
9483
- note: string | null;
9484
- id: string;
9485
- createdAt: string;
9486
- updatedAt: string;
9487
- deletedAt: string | null;
9488
- oldId: number | null;
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;
9489
10650
  };
9490
- machine: {
9491
- companyId: string | null;
9492
- machineKindId: string;
9493
- customerId: string | null;
9494
- name: string | null;
9495
- assetCode: string | null;
9496
- vin: string | null;
9497
- licensePlate: string | null;
9498
- color: string | null;
9499
- engineCc: string | null;
9500
- cylinder: string | null;
9501
- gasType: string | null;
9502
- transmissionType: string | null;
9503
- vehicleType: string | null;
9504
- yearManufacture: number | null;
9505
- yearImport: number | null;
9506
- steering: string | null;
9507
- engineCode: string | null;
9508
- transmissionCode: string | null;
9509
- driveTrain: string | null;
9510
- km: number;
9511
- customData: unknown;
9512
- id: string;
9513
- createdAt: string;
9514
- updatedAt: string;
9515
- deletedAt: string | null;
9516
- oldId: number | null;
9517
- } | null;
9518
- totalCount: number;
9519
- template: {
9520
- name: string;
9521
- } | null;
9522
- }, "totalCount">[];
9523
- };
9524
- 401: "Токен олдсонгүй";
9525
- 422: {
9526
- type: "validation";
9527
- on: string;
9528
- summary?: string;
9529
- message?: string;
9530
- found?: unknown;
9531
- property?: string;
9532
- expected?: string;
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
+ };
9533
10684
  };
9534
10685
  };
9535
- };
9536
- };
9537
- } & {
9538
- inspection: {
9539
- post: {
9540
- body: {
9541
- oldId?: number | null | undefined;
9542
- note?: string | null | undefined;
9543
- state?: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED" | undefined;
9544
- timeCompleted?: Date | null | undefined;
9545
- hours?: number | null | undefined;
9546
- mileageKm?: number | null | undefined;
9547
- stateResult?: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | null | undefined;
9548
- timeScheduled?: Date | null | undefined;
9549
- templateId: string;
9550
- machineId: string;
9551
- };
9552
- params: {};
9553
- query: unknown;
9554
- headers: unknown;
9555
- response: {
9556
- 400: "Ажилтны мэдээлэл шаардлагатай.";
9557
- 401: "Токен олдсонгүй";
9558
- 422: {
9559
- type: "validation";
9560
- on: string;
9561
- summary?: string;
9562
- message?: string;
9563
- found?: unknown;
9564
- property?: string;
9565
- expected?: string;
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
+ };
9566
10713
  };
9567
10714
  };
9568
- };
9569
- };
9570
- } & {
9571
- inspection: {
9572
- ":id": {
9573
- put: {
9574
- body: {
9575
- oldId?: number | null | undefined;
9576
- note?: string | null | undefined;
9577
- state?: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED" | undefined;
9578
- timeCompleted?: Date | null | undefined;
9579
- templateId?: string | undefined;
9580
- machineId?: string | undefined;
9581
- employeeInspectedId?: string | undefined;
9582
- userInspectedId?: string | undefined;
9583
- hours?: number | null | undefined;
9584
- mileageKm?: number | null | undefined;
9585
- stateResult?: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | null | undefined;
9586
- timeScheduled?: Date | null | undefined;
9587
- };
9588
- params: {
9589
- id: string;
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
+ };
9590
10758
  };
9591
- query: unknown;
9592
- headers: unknown;
9593
- response: {
9594
- 200: {
9595
- machineId: string;
9596
- templateId: string;
9597
- employeeInspectedId: string;
9598
- userInspectedId: string;
9599
- hours: number | null;
9600
- mileageKm: number | null;
9601
- state: "CREATED" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED";
9602
- stateResult: "FAILED" | "NOT_INSPECTED" | "PASSED" | "RETURNED" | "WAIVED" | null;
9603
- timeScheduled: Date | null;
9604
- timeCompleted: Date | null;
9605
- note: string | null;
9606
- id: string;
9607
- createdAt: string;
9608
- updatedAt: string;
9609
- deletedAt: string | null;
9610
- oldId: number | null;
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
+ };
9611
10790
  };
9612
- 401: "Токен олдсонгүй";
9613
- 404: "Хяналтын үзлэг олдсонгүй.";
9614
- 422: {
9615
- type: "validation";
9616
- on: string;
9617
- summary?: string;
9618
- message?: string;
9619
- found?: unknown;
9620
- property?: string;
9621
- expected?: string;
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
+ };
9622
10815
  };
9623
10816
  };
9624
10817
  };
9625
10818
  };
9626
- };
9627
- };
9628
- } & {
9629
- fleet: {
9630
- pm: {
9631
- template: {};
9632
10819
  } & {
9633
- template: {
10820
+ plan: {
9634
10821
  product: {};
9635
10822
  } & {
9636
10823
  product: {
@@ -9642,7 +10829,7 @@ export declare const app: Elysia<"", {
9642
10829
  size: number;
9643
10830
  page: number;
9644
10831
  };
9645
- pmTemplateId: string;
10832
+ pmPlanId: string;
9646
10833
  };
9647
10834
  headers: unknown;
9648
10835
  response: {
@@ -9650,44 +10837,20 @@ export declare const app: Elysia<"", {
9650
10837
  totalCount: number;
9651
10838
  totalPage: number;
9652
10839
  result: Omit<{
9653
- product: {
9654
- pmTemplateId: string;
9655
- productKindId: string;
9656
- quantity: number | null;
9657
- uomId: string;
9658
- id: string;
9659
- createdAt: string;
9660
- updatedAt: string;
9661
- deletedAt: string | null;
9662
- oldId: number | null;
9663
- };
9664
- productKind: {
9665
- productCategoryId: string;
9666
- name: string;
9667
- description: string | null;
9668
- id: string;
9669
- createdAt: string;
9670
- updatedAt: string;
9671
- deletedAt: string | null;
9672
- oldId: number | null;
9673
- } | null;
9674
- uom: {
9675
- uomCategoryId: string;
9676
- code: string | null;
9677
- name: string;
9678
- description: string | null;
9679
- symbol: string | null;
9680
- isBaseUnit: boolean;
9681
- baseFactor: number | null;
9682
- id: string;
9683
- createdAt: string;
9684
- updatedAt: string;
9685
- deletedAt: string | null;
9686
- oldId: number | null;
9687
- } | null;
9688
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;
9689
10851
  }, "totalCount">[];
9690
10852
  };
10853
+ 401: "Токен олдсонгүй";
9691
10854
  422: {
9692
10855
  type: "validation";
9693
10856
  on: string;
@@ -9707,13 +10870,15 @@ export declare const app: Elysia<"", {
9707
10870
  oldId?: number | null | undefined;
9708
10871
  quantity?: number | null | undefined;
9709
10872
  uomId: string;
9710
- pmTemplateId: string;
9711
10873
  productKindId: string;
10874
+ pmPlanId: string;
10875
+ pmQuantity: string;
9712
10876
  };
9713
10877
  params: {};
9714
10878
  query: unknown;
9715
10879
  headers: unknown;
9716
10880
  response: {
10881
+ 401: "Токен олдсонгүй";
9717
10882
  422: {
9718
10883
  type: "validation";
9719
10884
  on: string;
@@ -9726,6 +10891,49 @@ export declare const app: Elysia<"", {
9726
10891
  };
9727
10892
  };
9728
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
+ };
9729
10937
  } & {
9730
10938
  product: {
9731
10939
  ":id": {
@@ -9734,8 +10942,9 @@ export declare const app: Elysia<"", {
9734
10942
  oldId?: number | null | undefined;
9735
10943
  quantity?: number | null | undefined;
9736
10944
  uomId?: string | undefined;
9737
- pmTemplateId?: string | undefined;
9738
10945
  productKindId?: string | undefined;
10946
+ pmPlanId?: string | undefined;
10947
+ pmQuantity?: string | undefined;
9739
10948
  };
9740
10949
  params: {
9741
10950
  id: string;
@@ -9743,6 +10952,7 @@ export declare const app: Elysia<"", {
9743
10952
  query: unknown;
9744
10953
  headers: unknown;
9745
10954
  response: {
10955
+ 401: "Токен олдсонгүй";
9746
10956
  422: {
9747
10957
  type: "validation";
9748
10958
  on: string;
@@ -9767,6 +10977,7 @@ export declare const app: Elysia<"", {
9767
10977
  query: unknown;
9768
10978
  headers: unknown;
9769
10979
  response: {
10980
+ 401: "Токен олдсонгүй";
9770
10981
  422: {
9771
10982
  type: "validation";
9772
10983
  on: string;
@@ -9782,79 +10993,33 @@ export declare const app: Elysia<"", {
9782
10993
  };
9783
10994
  };
9784
10995
  } & {
9785
- template: {
10996
+ plan: {
9786
10997
  get: {
9787
10998
  body: unknown;
9788
10999
  params: {};
9789
- query: {
9790
- pagination: {
9791
- size: number;
9792
- page: number;
9793
- };
9794
- };
9795
- headers: unknown;
9796
- response: {
9797
- 200: {
9798
- totalCount: number;
9799
- totalPage: number;
9800
- result: Omit<{
9801
- template: {
9802
- machineKindId: string;
9803
- companyId: string | null;
9804
- operationAmount: number | null;
9805
- uomId: string;
9806
- serviceKindId: string;
9807
- name: string;
9808
- description: string | null;
9809
- id: string;
9810
- createdAt: string;
9811
- updatedAt: string;
9812
- deletedAt: string | null;
9813
- oldId: number | null;
9814
- };
9815
- machineKind: {
9816
- vehicleKindEnum: "MAKE" | "MODEL_GROUP" | "MODEL";
9817
- parentId: string | null;
9818
- name: string;
9819
- description: string | null;
9820
- yearStart: number | null;
9821
- yearEnd: number | null;
9822
- imagePath: string | null;
9823
- id: string;
9824
- createdAt: string;
9825
- updatedAt: string;
9826
- deletedAt: string | null;
9827
- oldId: number | null;
9828
- } | null;
9829
- uom: {
9830
- uomCategoryId: string;
9831
- code: string | null;
9832
- name: string;
9833
- description: string | null;
9834
- symbol: string | null;
9835
- isBaseUnit: boolean;
9836
- baseFactor: number | null;
9837
- id: string;
9838
- createdAt: string;
9839
- updatedAt: string;
9840
- deletedAt: string | null;
9841
- oldId: number | null;
9842
- } | null;
9843
- serviceKind: {
9844
- serviceKindId: string | null;
9845
- companyId: string;
9846
- branchId: string | null;
9847
- name: string;
9848
- description: string | null;
9849
- enabled: boolean;
9850
- price: number;
9851
- id: string;
9852
- createdAt: string;
9853
- updatedAt: string;
9854
- deletedAt: string | null;
9855
- oldId: number | null;
9856
- } | null;
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<{
9857
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;
9858
11023
  }, "totalCount">[];
9859
11024
  };
9860
11025
  422: {
@@ -9870,22 +11035,23 @@ export declare const app: Elysia<"", {
9870
11035
  };
9871
11036
  };
9872
11037
  } & {
9873
- template: {
11038
+ plan: {
9874
11039
  post: {
9875
11040
  body: {
9876
- companyId?: string | null | undefined;
9877
11041
  oldId?: number | null | undefined;
9878
11042
  description?: string | null | undefined;
9879
- operationAmount?: number | null | undefined;
11043
+ dateStart?: Date | null | undefined;
11044
+ dateEnd?: Date | null | undefined;
9880
11045
  name: string;
9881
- serviceKindId: string;
9882
- machineKindId: string;
9883
- uomId: string;
11046
+ companyId: string;
9884
11047
  };
9885
11048
  params: {};
9886
11049
  query: unknown;
9887
11050
  headers: unknown;
9888
11051
  response: {
11052
+ 200: {
11053
+ id: string;
11054
+ };
9889
11055
  422: {
9890
11056
  type: "validation";
9891
11057
  on: string;
@@ -9899,18 +11065,16 @@ export declare const app: Elysia<"", {
9899
11065
  };
9900
11066
  };
9901
11067
  } & {
9902
- template: {
11068
+ plan: {
9903
11069
  ":id": {
9904
11070
  put: {
9905
11071
  body: {
9906
11072
  name?: string | undefined;
9907
- companyId?: string | null | undefined;
11073
+ companyId?: string | undefined;
9908
11074
  oldId?: number | null | undefined;
9909
11075
  description?: string | null | undefined;
9910
- serviceKindId?: string | undefined;
9911
- machineKindId?: string | undefined;
9912
- operationAmount?: number | null | undefined;
9913
- uomId?: string | undefined;
11076
+ dateStart?: Date | null | undefined;
11077
+ dateEnd?: Date | null | undefined;
9914
11078
  };
9915
11079
  params: {
9916
11080
  id: string;
@@ -9932,7 +11096,7 @@ export declare const app: Elysia<"", {
9932
11096
  };
9933
11097
  };
9934
11098
  } & {
9935
- template: {
11099
+ plan: {
9936
11100
  ":id": {
9937
11101
  delete: {
9938
11102
  body: unknown;
@@ -10138,6 +11302,249 @@ export declare const app: Elysia<"", {
10138
11302
  };
10139
11303
  };
10140
11304
  };
11305
+ } & {
11306
+ fleet: {
11307
+ ms: {
11308
+ record: {
11309
+ product: {};
11310
+ } & {
11311
+ product: {
11312
+ get: {
11313
+ body: unknown;
11314
+ params: {};
11315
+ query: {
11316
+ recordId: string;
11317
+ };
11318
+ headers: unknown;
11319
+ response: {
11320
+ 200: {
11321
+ msRecordId: string;
11322
+ companyProductId: string;
11323
+ uomId: string;
11324
+ quantity: number | null;
11325
+ id: string;
11326
+ createdAt: string;
11327
+ updatedAt: string;
11328
+ deletedAt: string | null;
11329
+ oldId: number | null;
11330
+ }[];
11331
+ 401: "Токен олдсонгүй";
11332
+ 422: {
11333
+ type: "validation";
11334
+ on: string;
11335
+ summary?: string;
11336
+ message?: string;
11337
+ found?: unknown;
11338
+ property?: string;
11339
+ expected?: string;
11340
+ };
11341
+ };
11342
+ };
11343
+ };
11344
+ } & {
11345
+ product: {
11346
+ post: {
11347
+ body: unknown;
11348
+ params: {};
11349
+ query: unknown;
11350
+ headers: unknown;
11351
+ response: {
11352
+ 401: "Токен олдсонгүй";
11353
+ };
11354
+ };
11355
+ };
11356
+ } & {
11357
+ product: {
11358
+ ":id": {
11359
+ put: {
11360
+ body: unknown;
11361
+ params: {
11362
+ id: string;
11363
+ };
11364
+ query: unknown;
11365
+ headers: unknown;
11366
+ response: {
11367
+ 401: "Токен олдсонгүй";
11368
+ 422: {
11369
+ type: "validation";
11370
+ on: string;
11371
+ summary?: string;
11372
+ message?: string;
11373
+ found?: unknown;
11374
+ property?: string;
11375
+ expected?: string;
11376
+ };
11377
+ };
11378
+ };
11379
+ };
11380
+ };
11381
+ } & {
11382
+ product: {
11383
+ ":id": {
11384
+ delete: {
11385
+ body: unknown;
11386
+ params: {
11387
+ id: string;
11388
+ };
11389
+ query: unknown;
11390
+ headers: unknown;
11391
+ response: {
11392
+ 401: "Токен олдсонгүй";
11393
+ 422: {
11394
+ type: "validation";
11395
+ on: string;
11396
+ summary?: string;
11397
+ message?: string;
11398
+ found?: unknown;
11399
+ property?: string;
11400
+ expected?: string;
11401
+ };
11402
+ };
11403
+ };
11404
+ };
11405
+ };
11406
+ };
11407
+ } & {
11408
+ record: {};
11409
+ } & {
11410
+ record: {
11411
+ get: {
11412
+ body: unknown;
11413
+ params: {};
11414
+ query: {
11415
+ pagination: {
11416
+ size: number;
11417
+ page: number;
11418
+ };
11419
+ };
11420
+ headers: unknown;
11421
+ response: {
11422
+ 200: {
11423
+ totalCount: number;
11424
+ totalPage: number;
11425
+ result: Omit<{
11426
+ totalCount: number;
11427
+ machineId: string;
11428
+ serviceKindId: string;
11429
+ pmPlanId: string | null;
11430
+ pmPlanMachineId: string | null;
11431
+ employeeTechnicianId: string;
11432
+ state: string;
11433
+ note: string | null;
11434
+ timeCompleted: Date | null;
11435
+ id: string;
11436
+ createdAt: string;
11437
+ updatedAt: string;
11438
+ deletedAt: string | null;
11439
+ oldId: number | null;
11440
+ }, "totalCount">[];
11441
+ };
11442
+ 401: "Токен олдсонгүй";
11443
+ 422: {
11444
+ type: "validation";
11445
+ on: string;
11446
+ summary?: string;
11447
+ message?: string;
11448
+ found?: unknown;
11449
+ property?: string;
11450
+ expected?: string;
11451
+ };
11452
+ };
11453
+ };
11454
+ };
11455
+ } & {
11456
+ record: {
11457
+ post: {
11458
+ body: {
11459
+ oldId?: number | null | undefined;
11460
+ note?: string | null | undefined;
11461
+ timeCompleted?: Date | null | undefined;
11462
+ pmPlanId?: string | null | undefined;
11463
+ pmPlanMachineId?: string | null | undefined;
11464
+ serviceKindId: string;
11465
+ state: string;
11466
+ machineId: string;
11467
+ employeeTechnicianId: string;
11468
+ };
11469
+ params: {};
11470
+ query: unknown;
11471
+ headers: unknown;
11472
+ response: {
11473
+ 401: "Токен олдсонгүй";
11474
+ 422: {
11475
+ type: "validation";
11476
+ on: string;
11477
+ summary?: string;
11478
+ message?: string;
11479
+ found?: unknown;
11480
+ property?: string;
11481
+ expected?: string;
11482
+ };
11483
+ };
11484
+ };
11485
+ };
11486
+ } & {
11487
+ record: {
11488
+ ":id": {
11489
+ put: {
11490
+ body: {
11491
+ oldId?: number | null | undefined;
11492
+ serviceKindId?: string | undefined;
11493
+ note?: string | null | undefined;
11494
+ state?: string | undefined;
11495
+ timeCompleted?: Date | null | undefined;
11496
+ machineId?: string | undefined;
11497
+ pmPlanId?: string | null | undefined;
11498
+ pmPlanMachineId?: string | null | undefined;
11499
+ employeeTechnicianId?: string | undefined;
11500
+ };
11501
+ params: {
11502
+ id: string;
11503
+ };
11504
+ query: unknown;
11505
+ headers: unknown;
11506
+ response: {
11507
+ 401: "Токен олдсонгүй";
11508
+ 422: {
11509
+ type: "validation";
11510
+ on: string;
11511
+ summary?: string;
11512
+ message?: string;
11513
+ found?: unknown;
11514
+ property?: string;
11515
+ expected?: string;
11516
+ };
11517
+ };
11518
+ };
11519
+ };
11520
+ };
11521
+ } & {
11522
+ record: {
11523
+ ":id": {
11524
+ delete: {
11525
+ body: unknown;
11526
+ params: {
11527
+ id: string;
11528
+ };
11529
+ query: unknown;
11530
+ headers: unknown;
11531
+ response: {
11532
+ 401: "Токен олдсонгүй";
11533
+ 422: {
11534
+ type: "validation";
11535
+ on: string;
11536
+ summary?: string;
11537
+ message?: string;
11538
+ found?: unknown;
11539
+ property?: string;
11540
+ expected?: string;
11541
+ };
11542
+ };
11543
+ };
11544
+ };
11545
+ };
11546
+ };
11547
+ };
10141
11548
  };
10142
11549
  } & {
10143
11550
  api: {