@honestdigital/vehicle-service-types 1.0.13

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 (41) hide show
  1. package/README.md +76 -0
  2. package/dist/context.d.ts +53 -0
  3. package/dist/context.d.ts.map +1 -0
  4. package/dist/repositories/vehicleConfigOptions.d.ts +165 -0
  5. package/dist/repositories/vehicleConfigOptions.d.ts.map +1 -0
  6. package/dist/routers/index.d.ts +793 -0
  7. package/dist/routers/index.d.ts.map +1 -0
  8. package/dist/schemas/comparison.schema.d.ts +37 -0
  9. package/dist/schemas/comparison.schema.d.ts.map +1 -0
  10. package/dist/schemas/externalApi.schema.d.ts +1532 -0
  11. package/dist/schemas/externalApi.schema.d.ts.map +1 -0
  12. package/dist/schemas/filters.schema.d.ts +276 -0
  13. package/dist/schemas/filters.schema.d.ts.map +1 -0
  14. package/dist/schemas/vehicle.schema.d.ts +1204 -0
  15. package/dist/schemas/vehicle.schema.d.ts.map +1 -0
  16. package/dist/services/lenderdesk.d.ts +139 -0
  17. package/dist/services/lenderdesk.d.ts.map +1 -0
  18. package/dist/services/mmt.d.ts +52 -0
  19. package/dist/services/mmt.d.ts.map +1 -0
  20. package/dist/types/comparison.d.ts +157 -0
  21. package/dist/types/comparison.d.ts.map +1 -0
  22. package/dist/types/filters.d.ts +95 -0
  23. package/dist/types/filters.d.ts.map +1 -0
  24. package/dist/types/guards.d.ts +32 -0
  25. package/dist/types/guards.d.ts.map +1 -0
  26. package/dist/types/index.d.ts +18 -0
  27. package/dist/types/index.d.ts.map +1 -0
  28. package/dist/types/jdp.d.ts +210 -0
  29. package/dist/types/jdp.d.ts.map +1 -0
  30. package/dist/types/search.d.ts +475 -0
  31. package/dist/types/search.d.ts.map +1 -0
  32. package/dist/types/sync.d.ts +102 -0
  33. package/dist/types/sync.d.ts.map +1 -0
  34. package/dist/types/vehicle.d.ts +75 -0
  35. package/dist/types/vehicle.d.ts.map +1 -0
  36. package/dist/types.d.ts +17 -0
  37. package/dist/types.d.ts.map +1 -0
  38. package/dist/types.js +4213 -0
  39. package/dist/utilities/error.d.ts +49 -0
  40. package/dist/utilities/error.d.ts.map +1 -0
  41. package/package.json +112 -0
@@ -0,0 +1,793 @@
1
+ /**
2
+ * Combined application router
3
+ * Mounts inventory, sync, vehicle, lenderdesk, and chrome-image routers under their respective namespaces
4
+ */
5
+ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6
+ ctx: import("../context").TRPCContext;
7
+ meta: object;
8
+ errorShape: {
9
+ data: {
10
+ code: import("../utilities/error").ErrorCode;
11
+ httpStatus: number;
12
+ context: Record<string, unknown> | undefined;
13
+ path?: string;
14
+ stack?: string;
15
+ };
16
+ message: string;
17
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
18
+ };
19
+ transformer: true;
20
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
21
+ chromeImage: import("@trpc/server").TRPCBuiltRouter<{
22
+ ctx: import("../context").TRPCContext;
23
+ meta: object;
24
+ errorShape: {
25
+ data: {
26
+ code: import("../utilities/error").ErrorCode;
27
+ httpStatus: number;
28
+ context: Record<string, unknown> | undefined;
29
+ path?: string;
30
+ stack?: string;
31
+ };
32
+ message: string;
33
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
34
+ };
35
+ transformer: true;
36
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
37
+ resolveImageUrl: import("@trpc/server").TRPCQueryProcedure<{
38
+ input: {
39
+ filename: string;
40
+ };
41
+ output: {
42
+ url: string;
43
+ } | null;
44
+ meta: object;
45
+ }>;
46
+ }>>;
47
+ inventory: import("@trpc/server").TRPCBuiltRouter<{
48
+ ctx: import("../context").TRPCContext;
49
+ meta: object;
50
+ errorShape: {
51
+ data: {
52
+ code: import("../utilities/error").ErrorCode;
53
+ httpStatus: number;
54
+ context: Record<string, unknown> | undefined;
55
+ path?: string;
56
+ stack?: string;
57
+ };
58
+ message: string;
59
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
60
+ };
61
+ transformer: true;
62
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
63
+ getFacets: import("@trpc/server").TRPCQueryProcedure<{
64
+ input: {
65
+ status?: string | string[] | undefined;
66
+ trim?: string | string[] | undefined;
67
+ fuelType?: string | string[] | undefined;
68
+ location?: string | string[] | undefined;
69
+ brand?: string | string[] | undefined;
70
+ model?: string | string[] | undefined;
71
+ year?: string | string[] | undefined;
72
+ price?: {
73
+ min: string;
74
+ max: string;
75
+ } | undefined;
76
+ mileage?: {
77
+ min: string;
78
+ max: string;
79
+ } | undefined;
80
+ bodyStyle?: string | string[] | undefined;
81
+ exteriorColor?: string | string[] | undefined;
82
+ exteriorColorGeneric?: string | string[] | undefined;
83
+ interiorColor?: string | string[] | undefined;
84
+ interiorColorGeneric?: string | string[] | undefined;
85
+ drivetrain?: string | string[] | undefined;
86
+ doors?: string | string[] | undefined;
87
+ } | undefined;
88
+ output: import("../types").FilterState;
89
+ meta: object;
90
+ }>;
91
+ getMakeModelHierarchy: import("@trpc/server").TRPCQueryProcedure<{
92
+ input: {
93
+ status?: "NEW" | "USED" | "CERTIFIED" | undefined;
94
+ } | undefined;
95
+ output: import("../types").ConsolidatedMMT[];
96
+ meta: object;
97
+ }>;
98
+ getVehicle: import("@trpc/server").TRPCQueryProcedure<{
99
+ input: {
100
+ vin: string;
101
+ imageParams?: {
102
+ size: string;
103
+ shots?: string[] | undefined;
104
+ format?: "jpg" | "png" | undefined;
105
+ includeThumbnails?: boolean | undefined;
106
+ } | undefined;
107
+ };
108
+ output: import("../types").Vehicle;
109
+ meta: object;
110
+ }>;
111
+ getInventory: import("@trpc/server").TRPCQueryProcedure<{
112
+ input: {
113
+ filters: {
114
+ status?: string | string[] | undefined;
115
+ trim?: string | string[] | undefined;
116
+ fuelType?: string | string[] | undefined;
117
+ location?: string | string[] | undefined;
118
+ brand?: string | string[] | undefined;
119
+ model?: string | string[] | undefined;
120
+ year?: string | string[] | undefined;
121
+ price?: {
122
+ min: string;
123
+ max: string;
124
+ } | undefined;
125
+ mileage?: {
126
+ min: string;
127
+ max: string;
128
+ } | undefined;
129
+ bodyStyle?: string | string[] | undefined;
130
+ exteriorColor?: string | string[] | undefined;
131
+ exteriorColorGeneric?: string | string[] | undefined;
132
+ interiorColor?: string | string[] | undefined;
133
+ interiorColorGeneric?: string | string[] | undefined;
134
+ drivetrain?: string | string[] | undefined;
135
+ doors?: string | string[] | undefined;
136
+ };
137
+ imageParams?: {
138
+ size: string;
139
+ shots?: string[] | undefined;
140
+ format?: "jpg" | "png" | undefined;
141
+ includeThumbnails?: boolean | undefined;
142
+ } | undefined;
143
+ limit?: number | undefined;
144
+ page?: number | undefined;
145
+ selectedMakeModelTrims?: {
146
+ make: string;
147
+ models: {
148
+ name: string;
149
+ trims: string[];
150
+ }[];
151
+ }[] | undefined;
152
+ sortBy?: "year_desc" | "year_asc" | "price_desc" | "price_asc" | "mileage_desc" | "mileage_asc" | undefined;
153
+ groupByModel?: boolean | undefined;
154
+ searchQuery?: string | undefined;
155
+ };
156
+ output: {
157
+ filters: {
158
+ year?: import("../types").FilterOptionValue[];
159
+ status?: import("../types").FilterOptionValue[];
160
+ location?: import("../types").FilterOptionValue[];
161
+ drivetrain?: import("../types").FilterOptionValue[];
162
+ doors?: import("../types").FilterOptionValue[];
163
+ fuelType?: import("../types").FilterOptionValue[];
164
+ bodyStyle?: import("../types").FilterOptionValue[];
165
+ exteriorColor?: import("../types").FilterOptionValue[];
166
+ interiorColor?: import("../types").FilterOptionValue[];
167
+ exteriorColorGeneric?: import("../types").FilterOptionValue[];
168
+ interiorColorGeneric?: import("../types").FilterOptionValue[];
169
+ price?: import("../types").RangeValue;
170
+ mileage?: import("../types").RangeValue;
171
+ };
172
+ vehicles: import("../types").Vehicle[];
173
+ pagination: {
174
+ totalDocs: number;
175
+ page: number;
176
+ totalPages: number;
177
+ hasNextPage: boolean;
178
+ hasPrevPage: boolean;
179
+ };
180
+ makeModelTrims: {
181
+ make: string;
182
+ models: {
183
+ name: string;
184
+ trims: {
185
+ name: string;
186
+ }[];
187
+ }[];
188
+ }[];
189
+ };
190
+ meta: object;
191
+ }>;
192
+ getAvailableColorsForTrim: import("@trpc/server").TRPCQueryProcedure<{
193
+ input: {
194
+ brand: string;
195
+ model: string;
196
+ trimId: string;
197
+ };
198
+ output: import("../repositories/vehicleConfigOptions").TrimColors;
199
+ meta: object;
200
+ }>;
201
+ getVehicleByConfiguration: import("@trpc/server").TRPCQueryProcedure<{
202
+ input: {
203
+ trim: string | null;
204
+ brand: string;
205
+ model: string;
206
+ exteriorColor: string | null;
207
+ interiorColor: string | null;
208
+ status?: "NEW" | "USED" | "CERTIFIED" | null | undefined;
209
+ imageParams?: {
210
+ size: string;
211
+ shots?: string[] | undefined;
212
+ format?: "jpg" | "png" | undefined;
213
+ includeThumbnails?: boolean | undefined;
214
+ } | undefined;
215
+ priorityField?: "trim" | "exteriorColor" | "interiorColor" | null | undefined;
216
+ };
217
+ output: {
218
+ vehicle: import("../types").Vehicle;
219
+ matchType: "exact" | "partial";
220
+ colorOptions: {
221
+ exterior: Array<{
222
+ id: string;
223
+ name: string;
224
+ hex: string;
225
+ type: "standard" | "metallic" | "premium";
226
+ available: boolean;
227
+ }>;
228
+ interior: Array<{
229
+ id: string;
230
+ name: string;
231
+ hex: string;
232
+ type: "standard" | "metallic" | "premium";
233
+ available: boolean;
234
+ }>;
235
+ };
236
+ matchingCount: number;
237
+ trimOptions: Array<{
238
+ id: string;
239
+ name: string;
240
+ description: string;
241
+ available: boolean;
242
+ }>;
243
+ };
244
+ meta: object;
245
+ }>;
246
+ getVehicleConfigurationByVin: import("@trpc/server").TRPCQueryProcedure<{
247
+ input: {
248
+ vin: string;
249
+ };
250
+ output: import("../repositories/vehicleConfigOptions").VehicleConfiguration;
251
+ meta: object;
252
+ }>;
253
+ getByVins: import("@trpc/server").TRPCQueryProcedure<{
254
+ input: {
255
+ vins: string[];
256
+ imageParams?: {
257
+ size: string;
258
+ shots?: string[] | undefined;
259
+ format?: "jpg" | "png" | undefined;
260
+ includeThumbnails?: boolean | undefined;
261
+ } | undefined;
262
+ };
263
+ output: import("../types").Vehicle[];
264
+ meta: object;
265
+ }>;
266
+ getSuggestedVehicles: import("@trpc/server").TRPCQueryProcedure<{
267
+ input: {
268
+ imageParams?: {
269
+ size: string;
270
+ shots?: string[] | undefined;
271
+ format?: "jpg" | "png" | undefined;
272
+ includeThumbnails?: boolean | undefined;
273
+ } | undefined;
274
+ limit?: number | undefined;
275
+ preferredBrands?: [string, number][] | undefined;
276
+ preferredModels?: [string, number][] | undefined;
277
+ preferredBodyStyles?: [string, number][] | undefined;
278
+ preferredFuelTypes?: [string, number][] | undefined;
279
+ preferredDrivetrains?: [string, number][] | undefined;
280
+ priceRangePreference?: {
281
+ min: number;
282
+ max: number;
283
+ } | undefined;
284
+ mileageRangePreference?: {
285
+ min: number;
286
+ max: number;
287
+ } | undefined;
288
+ };
289
+ output: {
290
+ vehicles: import("../types").Vehicle[];
291
+ totalCandidates: number;
292
+ };
293
+ meta: object;
294
+ }>;
295
+ getCombinedFilters: import("@trpc/server").TRPCQueryProcedure<{
296
+ input: {
297
+ status?: string | string[] | undefined;
298
+ trim?: string | string[] | undefined;
299
+ fuelType?: string | string[] | undefined;
300
+ location?: string | string[] | undefined;
301
+ brand?: string | string[] | undefined;
302
+ model?: string | string[] | undefined;
303
+ year?: string | string[] | undefined;
304
+ price?: {
305
+ min: string;
306
+ max: string;
307
+ } | undefined;
308
+ mileage?: {
309
+ min: string;
310
+ max: string;
311
+ } | undefined;
312
+ bodyStyle?: string | string[] | undefined;
313
+ exteriorColor?: string | string[] | undefined;
314
+ exteriorColorGeneric?: string | string[] | undefined;
315
+ interiorColor?: string | string[] | undefined;
316
+ interiorColorGeneric?: string | string[] | undefined;
317
+ drivetrain?: string | string[] | undefined;
318
+ doors?: string | string[] | undefined;
319
+ } | undefined;
320
+ output: {
321
+ new: {
322
+ filters: import("../types").FilterState;
323
+ mmtFilters: Array<{
324
+ make: string;
325
+ models: Array<{
326
+ name: string;
327
+ trims: Array<{
328
+ name: string;
329
+ }>;
330
+ }>;
331
+ }>;
332
+ };
333
+ used: {
334
+ filters: import("../types").FilterState;
335
+ mmtFilters: Array<{
336
+ make: string;
337
+ models: Array<{
338
+ name: string;
339
+ trims: Array<{
340
+ name: string;
341
+ }>;
342
+ }>;
343
+ }>;
344
+ };
345
+ };
346
+ meta: object;
347
+ }>;
348
+ searchInventory: import("@trpc/server").TRPCQueryProcedure<{
349
+ input: {
350
+ filters?: {
351
+ status?: string | string[] | undefined;
352
+ trim?: string | string[] | undefined;
353
+ fuelType?: string | string[] | undefined;
354
+ location?: string | string[] | undefined;
355
+ brand?: string | string[] | undefined;
356
+ model?: string | string[] | undefined;
357
+ year?: string | string[] | undefined;
358
+ price?: {
359
+ min: string;
360
+ max: string;
361
+ } | undefined;
362
+ mileage?: {
363
+ min: string;
364
+ max: string;
365
+ } | undefined;
366
+ bodyStyle?: string | string[] | undefined;
367
+ exteriorColor?: string | string[] | undefined;
368
+ exteriorColorGeneric?: string | string[] | undefined;
369
+ interiorColor?: string | string[] | undefined;
370
+ interiorColorGeneric?: string | string[] | undefined;
371
+ drivetrain?: string | string[] | undefined;
372
+ doors?: string | string[] | undefined;
373
+ } | undefined;
374
+ pagination?: {
375
+ limit?: number | undefined;
376
+ offset?: number | undefined;
377
+ } | undefined;
378
+ sortBy?: "year_desc" | "year_asc" | "price_desc" | "price_asc" | "mileage_desc" | "mileage_asc" | undefined;
379
+ groupByModel?: boolean | undefined;
380
+ searchQuery?: string | undefined;
381
+ };
382
+ output: {
383
+ vehicles: {
384
+ vin: string;
385
+ brand: string;
386
+ model: string;
387
+ trim: string;
388
+ year: number;
389
+ price: number;
390
+ status: "NEW" | "USED" | "CERTIFIED";
391
+ exteriorColor: string | null;
392
+ interiorColor: string | null;
393
+ mainImage: string | undefined;
394
+ }[];
395
+ totalCount: number;
396
+ pagination: {
397
+ limit: number;
398
+ offset: number;
399
+ hasMore: boolean;
400
+ };
401
+ searchMeta: {
402
+ query: string;
403
+ resultCount: number;
404
+ executionTimeMs: number;
405
+ } | undefined;
406
+ };
407
+ meta: object;
408
+ }>;
409
+ getVehicleBySlug: import("@trpc/server").TRPCQueryProcedure<{
410
+ input: {
411
+ brand: string;
412
+ modelTrimSlug: string;
413
+ status?: "NEW" | "USED" | "CERTIFIED" | undefined;
414
+ imageParams?: {
415
+ size: string;
416
+ shots?: string[] | undefined;
417
+ format?: "jpg" | "png" | undefined;
418
+ includeThumbnails?: boolean | undefined;
419
+ } | undefined;
420
+ };
421
+ output: {
422
+ vehicle: import("../types").Vehicle;
423
+ matchType: "exact" | "partial";
424
+ colorOptions: {
425
+ exterior: Array<{
426
+ id: string;
427
+ name: string;
428
+ hex: string;
429
+ type: "standard" | "metallic" | "premium";
430
+ available: boolean;
431
+ }>;
432
+ interior: Array<{
433
+ id: string;
434
+ name: string;
435
+ hex: string;
436
+ type: "standard" | "metallic" | "premium";
437
+ available: boolean;
438
+ }>;
439
+ };
440
+ matchingCount: number;
441
+ trimOptions: Array<{
442
+ id: string;
443
+ name: string;
444
+ description: string;
445
+ available: boolean;
446
+ }>;
447
+ };
448
+ meta: object;
449
+ }>;
450
+ getPopularVehicles: import("@trpc/server").TRPCQueryProcedure<{
451
+ input: {
452
+ imageParams?: {
453
+ size: string;
454
+ shots?: string[] | undefined;
455
+ format?: "jpg" | "png" | undefined;
456
+ includeThumbnails?: boolean | undefined;
457
+ } | undefined;
458
+ limit?: number | undefined;
459
+ overrides?: {
460
+ model: string;
461
+ make: string;
462
+ }[] | null | undefined;
463
+ };
464
+ output: {
465
+ vehicles: import("../types").Vehicle[];
466
+ popularCombinations: Array<{
467
+ make: string;
468
+ model: string;
469
+ count: number;
470
+ }>;
471
+ };
472
+ meta: object;
473
+ }>;
474
+ getNavDropdownVehicles: import("@trpc/server").TRPCQueryProcedure<{
475
+ input: {
476
+ source: "auto" | "manual";
477
+ imageParams?: {
478
+ size: string;
479
+ shots?: string[] | undefined;
480
+ format?: "jpg" | "png" | undefined;
481
+ includeThumbnails?: boolean | undefined;
482
+ } | undefined;
483
+ autoConfig?: {
484
+ count?: number | undefined;
485
+ condition?: "new" | "used" | "any" | undefined;
486
+ bodyTypes?: string | undefined;
487
+ makes?: string | undefined;
488
+ logic?: "topByCount" | "latestAdded" | "featured" | undefined;
489
+ } | undefined;
490
+ manualModels?: {
491
+ model: string;
492
+ make: string;
493
+ overrideLabel?: string | undefined;
494
+ }[] | undefined;
495
+ };
496
+ output: {
497
+ make: string;
498
+ model: string;
499
+ trim: string | null;
500
+ label: string;
501
+ image: string | null;
502
+ startingPrice: number | null;
503
+ count: number;
504
+ status: string | null;
505
+ }[];
506
+ meta: object;
507
+ }>;
508
+ getVDPStaticParams: import("@trpc/server").TRPCQueryProcedure<{
509
+ input: {
510
+ status: "NEW" | "USED";
511
+ };
512
+ output: {
513
+ make: string;
514
+ modelTrimSlug: string;
515
+ }[];
516
+ meta: object;
517
+ }>;
518
+ getModelAggregation: import("@trpc/server").TRPCQueryProcedure<{
519
+ input: {
520
+ models: {
521
+ brand: string;
522
+ model: string;
523
+ year: number;
524
+ }[];
525
+ status?: "NEW" | "USED" | "CERTIFIED" | undefined;
526
+ };
527
+ output: import("../types").ModelAggregation[];
528
+ meta: object;
529
+ }>;
530
+ getMakes: import("@trpc/server").TRPCQueryProcedure<{
531
+ input: {
532
+ status?: "NEW" | "USED" | "CERTIFIED" | undefined;
533
+ } | undefined;
534
+ output: string[];
535
+ meta: object;
536
+ }>;
537
+ getModelsByMake: import("@trpc/server").TRPCQueryProcedure<{
538
+ input: {
539
+ make: string;
540
+ status?: "NEW" | "USED" | "CERTIFIED" | undefined;
541
+ };
542
+ output: string[];
543
+ meta: object;
544
+ }>;
545
+ getYearsByMakeModel: import("@trpc/server").TRPCQueryProcedure<{
546
+ input: {
547
+ model: string;
548
+ make: string;
549
+ status?: "NEW" | "USED" | "CERTIFIED" | undefined;
550
+ };
551
+ output: number[];
552
+ meta: object;
553
+ }>;
554
+ }>>;
555
+ lenderdesk: import("@trpc/server").TRPCBuiltRouter<{
556
+ ctx: import("../context").TRPCContext;
557
+ meta: object;
558
+ errorShape: {
559
+ data: {
560
+ code: import("../utilities/error").ErrorCode;
561
+ httpStatus: number;
562
+ context: Record<string, unknown> | undefined;
563
+ path?: string;
564
+ stack?: string;
565
+ };
566
+ message: string;
567
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
568
+ };
569
+ transformer: true;
570
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
571
+ getPaymentOptions: import("@trpc/server").TRPCQueryProcedure<{
572
+ input: {
573
+ vin: string;
574
+ };
575
+ output: {
576
+ vin: string;
577
+ totalOptions: number;
578
+ best: {
579
+ lease: import("../services/lenderdesk").PaymentOption;
580
+ loan: import("../services/lenderdesk").PaymentOption;
581
+ cash: import("../services/lenderdesk").PaymentOption;
582
+ };
583
+ allOptions: import("../services/lenderdesk").PaymentOption[];
584
+ };
585
+ meta: object;
586
+ }>;
587
+ getCustomQuotes: import("@trpc/server").TRPCMutationProcedure<{
588
+ input: {
589
+ vin: string;
590
+ offerType?: "Loan" | "Lease" | "Cash" | undefined;
591
+ term?: number | undefined;
592
+ downPayment?: number | undefined;
593
+ beacon?: number | undefined;
594
+ annualMileage?: number | undefined;
595
+ tradeIn?: number | undefined;
596
+ zipCode?: string | undefined;
597
+ };
598
+ output: {
599
+ vin: string;
600
+ params: {
601
+ downPayment: number;
602
+ beacon: number;
603
+ term: string | number;
604
+ annualMileage: number;
605
+ offerType: string;
606
+ tradeIn: number;
607
+ };
608
+ best: {
609
+ lease: import("../services/lenderdesk").PaymentOption;
610
+ loan: import("../services/lenderdesk").PaymentOption;
611
+ cash: import("../services/lenderdesk").PaymentOption;
612
+ };
613
+ options: {
614
+ lease: import("../services/lenderdesk").PaymentOption[];
615
+ loan: import("../services/lenderdesk").PaymentOption[];
616
+ cash: import("../services/lenderdesk").PaymentOption[];
617
+ };
618
+ totalOptions: number;
619
+ };
620
+ meta: object;
621
+ }>;
622
+ getDisclosures: import("@trpc/server").TRPCQueryProcedure<{
623
+ input: void;
624
+ output: Record<string, string>;
625
+ meta: object;
626
+ }>;
627
+ getVehicleDetails: import("@trpc/server").TRPCQueryProcedure<{
628
+ input: {
629
+ vin: string;
630
+ };
631
+ output: import("../services/lenderdesk").VehicleDetails;
632
+ meta: object;
633
+ }>;
634
+ }>>;
635
+ sync: import("@trpc/server").TRPCBuiltRouter<{
636
+ ctx: import("../context").TRPCContext;
637
+ meta: object;
638
+ errorShape: {
639
+ data: {
640
+ code: import("../utilities/error").ErrorCode;
641
+ httpStatus: number;
642
+ context: Record<string, unknown> | undefined;
643
+ path?: string;
644
+ stack?: string;
645
+ };
646
+ message: string;
647
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
648
+ };
649
+ transformer: true;
650
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
651
+ syncTenant: import("@trpc/server").TRPCMutationProcedure<{
652
+ input: void;
653
+ output: {
654
+ duration: number | undefined;
655
+ errors?: import("../types").SyncError[] | undefined;
656
+ success: boolean;
657
+ syncHistoryId: number | undefined;
658
+ stats: import("../types").SyncStats;
659
+ errorCount: number;
660
+ };
661
+ meta: object;
662
+ }>;
663
+ getSyncHistory: import("@trpc/server").TRPCQueryProcedure<{
664
+ input: {
665
+ limit?: number | undefined;
666
+ };
667
+ output: {
668
+ history: {
669
+ status: string;
670
+ id: number;
671
+ tenantId: number;
672
+ startedAt: Date;
673
+ completedAt: Date | null;
674
+ createdCount: number | null;
675
+ updatedCount: number | null;
676
+ deletedCount: number | null;
677
+ failedCount: number | null;
678
+ totalCount: number | null;
679
+ errorMessage: string | null;
680
+ triggeredBy: string;
681
+ }[];
682
+ total: number;
683
+ };
684
+ meta: object;
685
+ }>;
686
+ getSyncErrors: import("@trpc/server").TRPCQueryProcedure<{
687
+ input: {
688
+ syncHistoryId: number;
689
+ };
690
+ output: {
691
+ errors: {
692
+ operation: string;
693
+ id: number;
694
+ createdAt: Date | null;
695
+ tenantId: number;
696
+ vin: string;
697
+ errorMessage: string;
698
+ syncHistoryId: number | null;
699
+ errorContext: unknown;
700
+ }[];
701
+ total: number;
702
+ };
703
+ meta: object;
704
+ }>;
705
+ getLatestSyncStatus: import("@trpc/server").TRPCQueryProcedure<{
706
+ input: void;
707
+ output: {
708
+ hasHistory: boolean;
709
+ status: {
710
+ status: string;
711
+ id: number;
712
+ tenantId: number;
713
+ startedAt: Date;
714
+ completedAt: Date | null;
715
+ createdCount: number | null;
716
+ updatedCount: number | null;
717
+ deletedCount: number | null;
718
+ failedCount: number | null;
719
+ totalCount: number | null;
720
+ errorMessage: string | null;
721
+ triggeredBy: string;
722
+ };
723
+ } | {
724
+ hasHistory: boolean;
725
+ status: null;
726
+ };
727
+ meta: object;
728
+ }>;
729
+ getRecentErrors: import("@trpc/server").TRPCQueryProcedure<{
730
+ input: {
731
+ limit?: number | undefined;
732
+ };
733
+ output: {
734
+ errors: {
735
+ operation: string;
736
+ id: number;
737
+ createdAt: Date | null;
738
+ tenantId: number;
739
+ vin: string;
740
+ errorMessage: string;
741
+ syncHistoryId: number | null;
742
+ errorContext: unknown;
743
+ }[];
744
+ total: number;
745
+ };
746
+ meta: object;
747
+ }>;
748
+ }>>;
749
+ vehicle: import("@trpc/server").TRPCBuiltRouter<{
750
+ ctx: import("../context").TRPCContext;
751
+ meta: object;
752
+ errorShape: {
753
+ data: {
754
+ code: import("../utilities/error").ErrorCode;
755
+ httpStatus: number;
756
+ context: Record<string, unknown> | undefined;
757
+ path?: string;
758
+ stack?: string;
759
+ };
760
+ message: string;
761
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
762
+ };
763
+ transformer: true;
764
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
765
+ getTrims: import("@trpc/server").TRPCQueryProcedure<{
766
+ input: {
767
+ model: string;
768
+ make: string;
769
+ };
770
+ output: {
771
+ trims: string[];
772
+ };
773
+ meta: object;
774
+ }>;
775
+ cheapestByTrim: import("@trpc/server").TRPCQueryProcedure<{
776
+ input: {
777
+ trim: string;
778
+ model: string;
779
+ make: string;
780
+ };
781
+ output: {
782
+ vehicle?: any;
783
+ };
784
+ meta: object;
785
+ }>;
786
+ }>>;
787
+ }>>;
788
+ /**
789
+ * Export type for tRPC client
790
+ * Used by frontend to get type-safe API calls
791
+ */
792
+ export type AppRouter = typeof appRouter;
793
+ //# sourceMappingURL=index.d.ts.map