@voyant-travel/quotes 0.119.2

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 (51) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +39 -0
  3. package/dist/booking-extension.d.ts +123 -0
  4. package/dist/booking-extension.d.ts.map +1 -0
  5. package/dist/booking-extension.js +87 -0
  6. package/dist/index.d.ts +16 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +32 -0
  9. package/dist/routes/index.d.ts +1410 -0
  10. package/dist/routes/index.d.ts.map +1 -0
  11. package/dist/routes/index.js +8 -0
  12. package/dist/routes/pipelines.d.ts +292 -0
  13. package/dist/routes/pipelines.d.ts.map +1 -0
  14. package/dist/routes/pipelines.js +59 -0
  15. package/dist/routes/quote-versions.d.ts +746 -0
  16. package/dist/routes/quote-versions.d.ts.map +1 -0
  17. package/dist/routes/quote-versions.js +175 -0
  18. package/dist/routes/quotes.d.ts +391 -0
  19. package/dist/routes/quotes.d.ts.map +1 -0
  20. package/dist/routes/quotes.js +70 -0
  21. package/dist/schema-relations.d.ts +30 -0
  22. package/dist/schema-relations.d.ts.map +1 -0
  23. package/dist/schema-relations.js +49 -0
  24. package/dist/schema-sales.d.ts +1511 -0
  25. package/dist/schema-sales.d.ts.map +1 -0
  26. package/dist/schema-sales.js +164 -0
  27. package/dist/schema-shared.d.ts +5 -0
  28. package/dist/schema-shared.d.ts.map +1 -0
  29. package/dist/schema-shared.js +18 -0
  30. package/dist/schema.d.ts +5 -0
  31. package/dist/schema.d.ts.map +1 -0
  32. package/dist/schema.js +4 -0
  33. package/dist/service/helpers.d.ts +22 -0
  34. package/dist/service/helpers.d.ts.map +1 -0
  35. package/dist/service/helpers.js +39 -0
  36. package/dist/service/index.d.ts +1734 -0
  37. package/dist/service/index.d.ts.map +1 -0
  38. package/dist/service/index.js +11 -0
  39. package/dist/service/pipelines.d.ts +113 -0
  40. package/dist/service/pipelines.d.ts.map +1 -0
  41. package/dist/service/pipelines.js +68 -0
  42. package/dist/service/quote-versions.d.ts +674 -0
  43. package/dist/service/quote-versions.d.ts.map +1 -0
  44. package/dist/service/quote-versions.js +400 -0
  45. package/dist/service/quotes.d.ts +826 -0
  46. package/dist/service/quotes.d.ts.map +1 -0
  47. package/dist/service/quotes.js +110 -0
  48. package/dist/validation.d.ts +2 -0
  49. package/dist/validation.d.ts.map +1 -0
  50. package/dist/validation.js +1 -0
  51. package/package.json +72 -0
@@ -0,0 +1,1410 @@
1
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ type Env = {
3
+ Variables: {
4
+ db: PostgresJsDatabase;
5
+ userId?: string;
6
+ };
7
+ };
8
+ export declare const quotesRoutes: import("hono/hono-base").HonoBase<Env, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
9
+ "/pipelines": {
10
+ $get: {
11
+ input: {};
12
+ output: {
13
+ data: {
14
+ id: string;
15
+ entityType: "quote" | "organization" | "person" | "activity";
16
+ name: string;
17
+ isDefault: boolean;
18
+ sortOrder: number;
19
+ createdAt: string;
20
+ updatedAt: string;
21
+ }[];
22
+ total: number;
23
+ limit: number;
24
+ offset: number;
25
+ };
26
+ outputFormat: "json";
27
+ status: import("hono/utils/http-status").ContentfulStatusCode;
28
+ };
29
+ };
30
+ } & {
31
+ "/pipelines": {
32
+ $post: {
33
+ input: {};
34
+ output: {
35
+ data: {
36
+ name: string;
37
+ createdAt: string;
38
+ updatedAt: string;
39
+ id: string;
40
+ entityType: "quote" | "organization" | "person" | "activity";
41
+ isDefault: boolean;
42
+ sortOrder: number;
43
+ } | undefined;
44
+ };
45
+ outputFormat: "json";
46
+ status: 201;
47
+ };
48
+ };
49
+ } & {
50
+ "/pipelines/:id": {
51
+ $get: {
52
+ input: {
53
+ param: {
54
+ id: string;
55
+ };
56
+ };
57
+ output: {
58
+ error: string;
59
+ };
60
+ outputFormat: "json";
61
+ status: 404;
62
+ } | {
63
+ input: {
64
+ param: {
65
+ id: string;
66
+ };
67
+ };
68
+ output: {
69
+ data: {
70
+ id: string;
71
+ entityType: "quote" | "organization" | "person" | "activity";
72
+ name: string;
73
+ isDefault: boolean;
74
+ sortOrder: number;
75
+ createdAt: string;
76
+ updatedAt: string;
77
+ };
78
+ };
79
+ outputFormat: "json";
80
+ status: import("hono/utils/http-status").ContentfulStatusCode;
81
+ };
82
+ };
83
+ } & {
84
+ "/pipelines/:id": {
85
+ $patch: {
86
+ input: {
87
+ param: {
88
+ id: string;
89
+ };
90
+ };
91
+ output: {
92
+ error: string;
93
+ };
94
+ outputFormat: "json";
95
+ status: 404;
96
+ } | {
97
+ input: {
98
+ param: {
99
+ id: string;
100
+ };
101
+ };
102
+ output: {
103
+ data: {
104
+ id: string;
105
+ entityType: "quote" | "organization" | "person" | "activity";
106
+ name: string;
107
+ isDefault: boolean;
108
+ sortOrder: number;
109
+ createdAt: string;
110
+ updatedAt: string;
111
+ };
112
+ };
113
+ outputFormat: "json";
114
+ status: import("hono/utils/http-status").ContentfulStatusCode;
115
+ };
116
+ };
117
+ } & {
118
+ "/pipelines/:id": {
119
+ $delete: {
120
+ input: {
121
+ param: {
122
+ id: string;
123
+ };
124
+ };
125
+ output: {
126
+ error: string;
127
+ };
128
+ outputFormat: "json";
129
+ status: 404;
130
+ } | {
131
+ input: {
132
+ param: {
133
+ id: string;
134
+ };
135
+ };
136
+ output: {
137
+ success: true;
138
+ };
139
+ outputFormat: "json";
140
+ status: import("hono/utils/http-status").ContentfulStatusCode;
141
+ };
142
+ };
143
+ } & {
144
+ "/stages": {
145
+ $get: {
146
+ input: {};
147
+ output: {
148
+ data: {
149
+ id: string;
150
+ pipelineId: string;
151
+ name: string;
152
+ sortOrder: number;
153
+ probability: number | null;
154
+ isClosed: boolean;
155
+ isWon: boolean;
156
+ isLost: boolean;
157
+ createdAt: string;
158
+ updatedAt: string;
159
+ }[];
160
+ total: number;
161
+ limit: number;
162
+ offset: number;
163
+ };
164
+ outputFormat: "json";
165
+ status: import("hono/utils/http-status").ContentfulStatusCode;
166
+ };
167
+ };
168
+ } & {
169
+ "/stages": {
170
+ $post: {
171
+ input: {};
172
+ output: {
173
+ data: {
174
+ name: string;
175
+ createdAt: string;
176
+ updatedAt: string;
177
+ id: string;
178
+ sortOrder: number;
179
+ pipelineId: string;
180
+ probability: number | null;
181
+ isClosed: boolean;
182
+ isWon: boolean;
183
+ isLost: boolean;
184
+ } | undefined;
185
+ };
186
+ outputFormat: "json";
187
+ status: 201;
188
+ };
189
+ };
190
+ } & {
191
+ "/stages/:id": {
192
+ $get: {
193
+ input: {
194
+ param: {
195
+ id: string;
196
+ };
197
+ };
198
+ output: {
199
+ error: string;
200
+ };
201
+ outputFormat: "json";
202
+ status: 404;
203
+ } | {
204
+ input: {
205
+ param: {
206
+ id: string;
207
+ };
208
+ };
209
+ output: {
210
+ data: {
211
+ id: string;
212
+ pipelineId: string;
213
+ name: string;
214
+ sortOrder: number;
215
+ probability: number | null;
216
+ isClosed: boolean;
217
+ isWon: boolean;
218
+ isLost: boolean;
219
+ createdAt: string;
220
+ updatedAt: string;
221
+ };
222
+ };
223
+ outputFormat: "json";
224
+ status: import("hono/utils/http-status").ContentfulStatusCode;
225
+ };
226
+ };
227
+ } & {
228
+ "/stages/:id": {
229
+ $patch: {
230
+ input: {
231
+ param: {
232
+ id: string;
233
+ };
234
+ };
235
+ output: {
236
+ error: string;
237
+ };
238
+ outputFormat: "json";
239
+ status: 404;
240
+ } | {
241
+ input: {
242
+ param: {
243
+ id: string;
244
+ };
245
+ };
246
+ output: {
247
+ data: {
248
+ id: string;
249
+ pipelineId: string;
250
+ name: string;
251
+ sortOrder: number;
252
+ probability: number | null;
253
+ isClosed: boolean;
254
+ isWon: boolean;
255
+ isLost: boolean;
256
+ createdAt: string;
257
+ updatedAt: string;
258
+ };
259
+ };
260
+ outputFormat: "json";
261
+ status: import("hono/utils/http-status").ContentfulStatusCode;
262
+ };
263
+ };
264
+ } & {
265
+ "/stages/:id": {
266
+ $delete: {
267
+ input: {
268
+ param: {
269
+ id: string;
270
+ };
271
+ };
272
+ output: {
273
+ error: string;
274
+ };
275
+ outputFormat: "json";
276
+ status: 404;
277
+ } | {
278
+ input: {
279
+ param: {
280
+ id: string;
281
+ };
282
+ };
283
+ output: {
284
+ success: true;
285
+ };
286
+ outputFormat: "json";
287
+ status: import("hono/utils/http-status").ContentfulStatusCode;
288
+ };
289
+ };
290
+ }, "/"> | import("hono/types").MergeSchemaPath<{
291
+ "/quotes": {
292
+ $get: {
293
+ input: {};
294
+ output: {
295
+ data: {
296
+ id: string;
297
+ title: string;
298
+ personId: string | null;
299
+ organizationId: string | null;
300
+ pipelineId: string;
301
+ stageId: string;
302
+ ownerId: string | null;
303
+ status: "open" | "won" | "lost" | "archived";
304
+ acceptedVersionId: string | null;
305
+ valueAmountCents: number | null;
306
+ valueCurrency: string | null;
307
+ expectedCloseDate: string | null;
308
+ source: string | null;
309
+ sourceRef: string | null;
310
+ lostReason: string | null;
311
+ tags: string[];
312
+ createdAt: string;
313
+ updatedAt: string;
314
+ stageChangedAt: string;
315
+ closedAt: string | null;
316
+ }[];
317
+ total: number;
318
+ limit: number;
319
+ offset: number;
320
+ };
321
+ outputFormat: "json";
322
+ status: import("hono/utils/http-status").ContentfulStatusCode;
323
+ };
324
+ };
325
+ } & {
326
+ "/quotes": {
327
+ $post: {
328
+ input: {};
329
+ output: {
330
+ data: {
331
+ createdAt: string;
332
+ updatedAt: string;
333
+ id: string;
334
+ title: string;
335
+ pipelineId: string;
336
+ personId: string | null;
337
+ organizationId: string | null;
338
+ stageId: string;
339
+ ownerId: string | null;
340
+ status: "open" | "won" | "lost" | "archived";
341
+ acceptedVersionId: string | null;
342
+ valueAmountCents: number | null;
343
+ valueCurrency: string | null;
344
+ expectedCloseDate: string | null;
345
+ source: string | null;
346
+ sourceRef: string | null;
347
+ lostReason: string | null;
348
+ tags: string[];
349
+ stageChangedAt: string;
350
+ closedAt: string | null;
351
+ } | undefined;
352
+ };
353
+ outputFormat: "json";
354
+ status: 201;
355
+ };
356
+ };
357
+ } & {
358
+ "/quotes/:id": {
359
+ $get: {
360
+ input: {
361
+ param: {
362
+ id: string;
363
+ };
364
+ };
365
+ output: {
366
+ error: string;
367
+ };
368
+ outputFormat: "json";
369
+ status: 404;
370
+ } | {
371
+ input: {
372
+ param: {
373
+ id: string;
374
+ };
375
+ };
376
+ output: {
377
+ data: {
378
+ id: string;
379
+ title: string;
380
+ personId: string | null;
381
+ organizationId: string | null;
382
+ pipelineId: string;
383
+ stageId: string;
384
+ ownerId: string | null;
385
+ status: "open" | "won" | "lost" | "archived";
386
+ acceptedVersionId: string | null;
387
+ valueAmountCents: number | null;
388
+ valueCurrency: string | null;
389
+ expectedCloseDate: string | null;
390
+ source: string | null;
391
+ sourceRef: string | null;
392
+ lostReason: string | null;
393
+ tags: string[];
394
+ createdAt: string;
395
+ updatedAt: string;
396
+ stageChangedAt: string;
397
+ closedAt: string | null;
398
+ };
399
+ };
400
+ outputFormat: "json";
401
+ status: import("hono/utils/http-status").ContentfulStatusCode;
402
+ };
403
+ };
404
+ } & {
405
+ "/quotes/:id": {
406
+ $patch: {
407
+ input: {
408
+ param: {
409
+ id: string;
410
+ };
411
+ };
412
+ output: {
413
+ error: string;
414
+ };
415
+ outputFormat: "json";
416
+ status: 404;
417
+ } | {
418
+ input: {
419
+ param: {
420
+ id: string;
421
+ };
422
+ };
423
+ output: {
424
+ data: {
425
+ id: string;
426
+ title: string;
427
+ personId: string | null;
428
+ organizationId: string | null;
429
+ pipelineId: string;
430
+ stageId: string;
431
+ ownerId: string | null;
432
+ status: "open" | "won" | "lost" | "archived";
433
+ acceptedVersionId: string | null;
434
+ valueAmountCents: number | null;
435
+ valueCurrency: string | null;
436
+ expectedCloseDate: string | null;
437
+ source: string | null;
438
+ sourceRef: string | null;
439
+ lostReason: string | null;
440
+ tags: string[];
441
+ createdAt: string;
442
+ updatedAt: string;
443
+ stageChangedAt: string;
444
+ closedAt: string | null;
445
+ };
446
+ };
447
+ outputFormat: "json";
448
+ status: import("hono/utils/http-status").ContentfulStatusCode;
449
+ };
450
+ };
451
+ } & {
452
+ "/quotes/:id": {
453
+ $delete: {
454
+ input: {
455
+ param: {
456
+ id: string;
457
+ };
458
+ };
459
+ output: {
460
+ error: string;
461
+ };
462
+ outputFormat: "json";
463
+ status: 404;
464
+ } | {
465
+ input: {
466
+ param: {
467
+ id: string;
468
+ };
469
+ };
470
+ output: {
471
+ success: true;
472
+ };
473
+ outputFormat: "json";
474
+ status: import("hono/utils/http-status").ContentfulStatusCode;
475
+ };
476
+ };
477
+ } & {
478
+ "/quotes/:id/participants": {
479
+ $get: {
480
+ input: {
481
+ param: {
482
+ id: string;
483
+ };
484
+ };
485
+ output: {
486
+ data: {
487
+ id: string;
488
+ quoteId: string;
489
+ personId: string;
490
+ role: "traveler" | "booker" | "decision_maker" | "finance" | "other";
491
+ isPrimary: boolean;
492
+ createdAt: string;
493
+ }[];
494
+ };
495
+ outputFormat: "json";
496
+ status: import("hono/utils/http-status").ContentfulStatusCode;
497
+ };
498
+ };
499
+ } & {
500
+ "/quotes/:id/participants": {
501
+ $post: {
502
+ input: {
503
+ param: {
504
+ id: string;
505
+ };
506
+ };
507
+ output: {
508
+ data: {
509
+ quoteId: string;
510
+ createdAt: string;
511
+ id: string;
512
+ personId: string;
513
+ role: "traveler" | "booker" | "decision_maker" | "finance" | "other";
514
+ isPrimary: boolean;
515
+ } | undefined;
516
+ };
517
+ outputFormat: "json";
518
+ status: 201;
519
+ };
520
+ };
521
+ } & {
522
+ "/quote-participants/:id": {
523
+ $delete: {
524
+ input: {
525
+ param: {
526
+ id: string;
527
+ };
528
+ };
529
+ output: {
530
+ error: string;
531
+ };
532
+ outputFormat: "json";
533
+ status: 404;
534
+ } | {
535
+ input: {
536
+ param: {
537
+ id: string;
538
+ };
539
+ };
540
+ output: {
541
+ success: true;
542
+ };
543
+ outputFormat: "json";
544
+ status: import("hono/utils/http-status").ContentfulStatusCode;
545
+ };
546
+ };
547
+ } & {
548
+ "/quotes/:id/products": {
549
+ $get: {
550
+ input: {
551
+ param: {
552
+ id: string;
553
+ };
554
+ };
555
+ output: {
556
+ data: {
557
+ id: string;
558
+ quoteId: string;
559
+ productId: string | null;
560
+ supplierServiceId: string | null;
561
+ nameSnapshot: string;
562
+ description: string | null;
563
+ quantity: number;
564
+ unitPriceAmountCents: number | null;
565
+ costAmountCents: number | null;
566
+ currency: string | null;
567
+ discountAmountCents: number | null;
568
+ createdAt: string;
569
+ updatedAt: string;
570
+ }[];
571
+ };
572
+ outputFormat: "json";
573
+ status: import("hono/utils/http-status").ContentfulStatusCode;
574
+ };
575
+ };
576
+ } & {
577
+ "/quotes/:id/products": {
578
+ $post: {
579
+ input: {
580
+ param: {
581
+ id: string;
582
+ };
583
+ };
584
+ output: {
585
+ data: {
586
+ quoteId: string;
587
+ createdAt: string;
588
+ updatedAt: string;
589
+ description: string | null;
590
+ id: string;
591
+ productId: string | null;
592
+ supplierServiceId: string | null;
593
+ nameSnapshot: string;
594
+ quantity: number;
595
+ unitPriceAmountCents: number | null;
596
+ costAmountCents: number | null;
597
+ currency: string | null;
598
+ discountAmountCents: number | null;
599
+ } | undefined;
600
+ };
601
+ outputFormat: "json";
602
+ status: 201;
603
+ };
604
+ };
605
+ } & {
606
+ "/quote-products/:id": {
607
+ $patch: {
608
+ input: {
609
+ param: {
610
+ id: string;
611
+ };
612
+ };
613
+ output: {
614
+ error: string;
615
+ };
616
+ outputFormat: "json";
617
+ status: 404;
618
+ } | {
619
+ input: {
620
+ param: {
621
+ id: string;
622
+ };
623
+ };
624
+ output: {
625
+ data: {
626
+ id: string;
627
+ quoteId: string;
628
+ productId: string | null;
629
+ supplierServiceId: string | null;
630
+ nameSnapshot: string;
631
+ description: string | null;
632
+ quantity: number;
633
+ unitPriceAmountCents: number | null;
634
+ costAmountCents: number | null;
635
+ currency: string | null;
636
+ discountAmountCents: number | null;
637
+ createdAt: string;
638
+ updatedAt: string;
639
+ };
640
+ };
641
+ outputFormat: "json";
642
+ status: import("hono/utils/http-status").ContentfulStatusCode;
643
+ };
644
+ };
645
+ } & {
646
+ "/quote-products/:id": {
647
+ $delete: {
648
+ input: {
649
+ param: {
650
+ id: string;
651
+ };
652
+ };
653
+ output: {
654
+ error: string;
655
+ };
656
+ outputFormat: "json";
657
+ status: 404;
658
+ } | {
659
+ input: {
660
+ param: {
661
+ id: string;
662
+ };
663
+ };
664
+ output: {
665
+ success: true;
666
+ };
667
+ outputFormat: "json";
668
+ status: import("hono/utils/http-status").ContentfulStatusCode;
669
+ };
670
+ };
671
+ }, "/"> | import("hono/types").MergeSchemaPath<{
672
+ "/quote-versions": {
673
+ $get: {
674
+ input: {};
675
+ output: {
676
+ data: {
677
+ id: string;
678
+ quoteId: string;
679
+ label: string | null;
680
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
681
+ supersedesId: string | null;
682
+ tripSnapshotId: string | null;
683
+ validUntil: string | null;
684
+ currency: string;
685
+ subtotalAmountCents: number;
686
+ taxAmountCents: number;
687
+ totalAmountCents: number;
688
+ notes: string | null;
689
+ sentAt: string | null;
690
+ viewedAt: string | null;
691
+ decidedAt: string | null;
692
+ createdAt: string;
693
+ updatedAt: string;
694
+ archivedAt: string | null;
695
+ }[];
696
+ total: number;
697
+ limit: number;
698
+ offset: number;
699
+ };
700
+ outputFormat: "json";
701
+ status: import("hono/utils/http-status").ContentfulStatusCode;
702
+ };
703
+ };
704
+ } & {
705
+ "/quotes/:id/versions": {
706
+ $post: {
707
+ input: {
708
+ param: {
709
+ id: string;
710
+ };
711
+ };
712
+ output: {
713
+ data: {
714
+ quoteId: string;
715
+ createdAt: string;
716
+ updatedAt: string;
717
+ id: string;
718
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
719
+ currency: string;
720
+ label: string | null;
721
+ supersedesId: string | null;
722
+ tripSnapshotId: string | null;
723
+ validUntil: string | null;
724
+ subtotalAmountCents: number;
725
+ taxAmountCents: number;
726
+ totalAmountCents: number;
727
+ notes: string | null;
728
+ sentAt: string | null;
729
+ viewedAt: string | null;
730
+ decidedAt: string | null;
731
+ archivedAt: string | null;
732
+ } | undefined;
733
+ };
734
+ outputFormat: "json";
735
+ status: 201;
736
+ } | {
737
+ input: {
738
+ param: {
739
+ id: string;
740
+ };
741
+ };
742
+ output: {
743
+ error: string;
744
+ };
745
+ outputFormat: "json";
746
+ status: 409;
747
+ };
748
+ };
749
+ } & {
750
+ "/quote-versions/expire": {
751
+ $post: {
752
+ input: {};
753
+ output: {
754
+ data: {
755
+ id: string;
756
+ quoteId: string;
757
+ label: string | null;
758
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
759
+ supersedesId: string | null;
760
+ tripSnapshotId: string | null;
761
+ validUntil: string | null;
762
+ currency: string;
763
+ subtotalAmountCents: number;
764
+ taxAmountCents: number;
765
+ totalAmountCents: number;
766
+ notes: string | null;
767
+ sentAt: string | null;
768
+ viewedAt: string | null;
769
+ decidedAt: string | null;
770
+ createdAt: string;
771
+ updatedAt: string;
772
+ archivedAt: string | null;
773
+ }[];
774
+ };
775
+ outputFormat: "json";
776
+ status: import("hono/utils/http-status").ContentfulStatusCode;
777
+ };
778
+ };
779
+ } & {
780
+ "/quote-versions/:id": {
781
+ $get: {
782
+ input: {
783
+ param: {
784
+ id: string;
785
+ };
786
+ };
787
+ output: {
788
+ error: string;
789
+ };
790
+ outputFormat: "json";
791
+ status: 404;
792
+ } | {
793
+ input: {
794
+ param: {
795
+ id: string;
796
+ };
797
+ };
798
+ output: {
799
+ data: {
800
+ id: string;
801
+ quoteId: string;
802
+ label: string | null;
803
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
804
+ supersedesId: string | null;
805
+ tripSnapshotId: string | null;
806
+ validUntil: string | null;
807
+ currency: string;
808
+ subtotalAmountCents: number;
809
+ taxAmountCents: number;
810
+ totalAmountCents: number;
811
+ notes: string | null;
812
+ sentAt: string | null;
813
+ viewedAt: string | null;
814
+ decidedAt: string | null;
815
+ createdAt: string;
816
+ updatedAt: string;
817
+ archivedAt: string | null;
818
+ };
819
+ };
820
+ outputFormat: "json";
821
+ status: import("hono/utils/http-status").ContentfulStatusCode;
822
+ };
823
+ };
824
+ } & {
825
+ "/quote-versions/:id": {
826
+ $patch: {
827
+ input: {
828
+ param: {
829
+ id: string;
830
+ };
831
+ };
832
+ output: {
833
+ error: string;
834
+ };
835
+ outputFormat: "json";
836
+ status: 404;
837
+ } | {
838
+ input: {
839
+ param: {
840
+ id: string;
841
+ };
842
+ };
843
+ output: {
844
+ data: {
845
+ id: string;
846
+ quoteId: string;
847
+ label: string | null;
848
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
849
+ supersedesId: string | null;
850
+ tripSnapshotId: string | null;
851
+ validUntil: string | null;
852
+ currency: string;
853
+ subtotalAmountCents: number;
854
+ taxAmountCents: number;
855
+ totalAmountCents: number;
856
+ notes: string | null;
857
+ sentAt: string | null;
858
+ viewedAt: string | null;
859
+ decidedAt: string | null;
860
+ createdAt: string;
861
+ updatedAt: string;
862
+ archivedAt: string | null;
863
+ };
864
+ };
865
+ outputFormat: "json";
866
+ status: import("hono/utils/http-status").ContentfulStatusCode;
867
+ } | {
868
+ input: {
869
+ param: {
870
+ id: string;
871
+ };
872
+ };
873
+ output: {
874
+ error: string;
875
+ };
876
+ outputFormat: "json";
877
+ status: 409;
878
+ };
879
+ };
880
+ } & {
881
+ "/quote-versions/:id": {
882
+ $delete: {
883
+ input: {
884
+ param: {
885
+ id: string;
886
+ };
887
+ };
888
+ output: {
889
+ error: string;
890
+ };
891
+ outputFormat: "json";
892
+ status: 404;
893
+ } | {
894
+ input: {
895
+ param: {
896
+ id: string;
897
+ };
898
+ };
899
+ output: {
900
+ success: true;
901
+ };
902
+ outputFormat: "json";
903
+ status: import("hono/utils/http-status").ContentfulStatusCode;
904
+ } | {
905
+ input: {
906
+ param: {
907
+ id: string;
908
+ };
909
+ };
910
+ output: {
911
+ error: string;
912
+ };
913
+ outputFormat: "json";
914
+ status: 409;
915
+ };
916
+ };
917
+ } & {
918
+ "/quote-versions/:id/trip-snapshot": {
919
+ $post: {
920
+ input: {
921
+ param: {
922
+ id: string;
923
+ };
924
+ };
925
+ output: {
926
+ error: string;
927
+ };
928
+ outputFormat: "json";
929
+ status: 404;
930
+ } | {
931
+ input: {
932
+ param: {
933
+ id: string;
934
+ };
935
+ };
936
+ output: {
937
+ data: {
938
+ quoteVersion: {
939
+ id: string;
940
+ quoteId: string;
941
+ label: string | null;
942
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
943
+ supersedesId: string | null;
944
+ tripSnapshotId: string | null;
945
+ validUntil: string | null;
946
+ currency: string;
947
+ subtotalAmountCents: number;
948
+ taxAmountCents: number;
949
+ totalAmountCents: number;
950
+ notes: string | null;
951
+ sentAt: string | null;
952
+ viewedAt: string | null;
953
+ decidedAt: string | null;
954
+ createdAt: string;
955
+ updatedAt: string;
956
+ archivedAt: string | null;
957
+ };
958
+ lines: {
959
+ quoteVersionId: string;
960
+ createdAt: string;
961
+ updatedAt: string;
962
+ description: string;
963
+ id: string;
964
+ productId: string | null;
965
+ supplierServiceId: string | null;
966
+ quantity: number;
967
+ unitPriceAmountCents: number;
968
+ currency: string;
969
+ totalAmountCents: number;
970
+ }[];
971
+ };
972
+ };
973
+ outputFormat: "json";
974
+ status: import("hono/utils/http-status").ContentfulStatusCode;
975
+ } | {
976
+ input: {
977
+ param: {
978
+ id: string;
979
+ };
980
+ };
981
+ output: {
982
+ error: string;
983
+ };
984
+ outputFormat: "json";
985
+ status: 409;
986
+ };
987
+ };
988
+ } & {
989
+ "/quote-versions/:id/send": {
990
+ $post: {
991
+ input: {
992
+ param: {
993
+ id: string;
994
+ };
995
+ };
996
+ output: {
997
+ error: string;
998
+ };
999
+ outputFormat: "json";
1000
+ status: 404;
1001
+ } | {
1002
+ input: {
1003
+ param: {
1004
+ id: string;
1005
+ };
1006
+ };
1007
+ output: {
1008
+ data: {
1009
+ id: string;
1010
+ quoteId: string;
1011
+ label: string | null;
1012
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
1013
+ supersedesId: string | null;
1014
+ tripSnapshotId: string | null;
1015
+ validUntil: string | null;
1016
+ currency: string;
1017
+ subtotalAmountCents: number;
1018
+ taxAmountCents: number;
1019
+ totalAmountCents: number;
1020
+ notes: string | null;
1021
+ sentAt: string | null;
1022
+ viewedAt: string | null;
1023
+ decidedAt: string | null;
1024
+ createdAt: string;
1025
+ updatedAt: string;
1026
+ archivedAt: string | null;
1027
+ };
1028
+ };
1029
+ outputFormat: "json";
1030
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1031
+ } | {
1032
+ input: {
1033
+ param: {
1034
+ id: string;
1035
+ };
1036
+ };
1037
+ output: {
1038
+ error: string;
1039
+ };
1040
+ outputFormat: "json";
1041
+ status: 409;
1042
+ };
1043
+ };
1044
+ } & {
1045
+ "/quote-versions/:id/view": {
1046
+ $post: {
1047
+ input: {
1048
+ param: {
1049
+ id: string;
1050
+ };
1051
+ };
1052
+ output: {
1053
+ error: string;
1054
+ };
1055
+ outputFormat: "json";
1056
+ status: 404;
1057
+ } | {
1058
+ input: {
1059
+ param: {
1060
+ id: string;
1061
+ };
1062
+ };
1063
+ output: {
1064
+ data: {
1065
+ id: string;
1066
+ quoteId: string;
1067
+ label: string | null;
1068
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
1069
+ supersedesId: string | null;
1070
+ tripSnapshotId: string | null;
1071
+ validUntil: string | null;
1072
+ currency: string;
1073
+ subtotalAmountCents: number;
1074
+ taxAmountCents: number;
1075
+ totalAmountCents: number;
1076
+ notes: string | null;
1077
+ sentAt: string | null;
1078
+ viewedAt: string | null;
1079
+ decidedAt: string | null;
1080
+ createdAt: string;
1081
+ updatedAt: string;
1082
+ archivedAt: string | null;
1083
+ };
1084
+ };
1085
+ outputFormat: "json";
1086
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1087
+ };
1088
+ };
1089
+ } & {
1090
+ "/quote-versions/:id/accept": {
1091
+ $post: {
1092
+ input: {
1093
+ param: {
1094
+ id: string;
1095
+ };
1096
+ };
1097
+ output: {
1098
+ error: string;
1099
+ };
1100
+ outputFormat: "json";
1101
+ status: 404;
1102
+ } | {
1103
+ input: {
1104
+ param: {
1105
+ id: string;
1106
+ };
1107
+ };
1108
+ output: {
1109
+ data: {
1110
+ quote: {
1111
+ createdAt: string;
1112
+ updatedAt: string;
1113
+ id: string;
1114
+ title: string;
1115
+ pipelineId: string;
1116
+ personId: string | null;
1117
+ organizationId: string | null;
1118
+ stageId: string;
1119
+ ownerId: string | null;
1120
+ status: "open" | "won" | "lost" | "archived";
1121
+ acceptedVersionId: string | null;
1122
+ valueAmountCents: number | null;
1123
+ valueCurrency: string | null;
1124
+ expectedCloseDate: string | null;
1125
+ source: string | null;
1126
+ sourceRef: string | null;
1127
+ lostReason: string | null;
1128
+ tags: string[];
1129
+ stageChangedAt: string;
1130
+ closedAt: string | null;
1131
+ };
1132
+ quoteVersion: {
1133
+ quoteId: string;
1134
+ createdAt: string;
1135
+ updatedAt: string;
1136
+ id: string;
1137
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
1138
+ currency: string;
1139
+ label: string | null;
1140
+ supersedesId: string | null;
1141
+ tripSnapshotId: string | null;
1142
+ validUntil: string | null;
1143
+ subtotalAmountCents: number;
1144
+ taxAmountCents: number;
1145
+ totalAmountCents: number;
1146
+ notes: string | null;
1147
+ sentAt: string | null;
1148
+ viewedAt: string | null;
1149
+ decidedAt: string | null;
1150
+ archivedAt: string | null;
1151
+ };
1152
+ closedQuoteVersions: {
1153
+ quoteId: string;
1154
+ createdAt: string;
1155
+ updatedAt: string;
1156
+ id: string;
1157
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
1158
+ currency: string;
1159
+ label: string | null;
1160
+ supersedesId: string | null;
1161
+ tripSnapshotId: string | null;
1162
+ validUntil: string | null;
1163
+ subtotalAmountCents: number;
1164
+ taxAmountCents: number;
1165
+ totalAmountCents: number;
1166
+ notes: string | null;
1167
+ sentAt: string | null;
1168
+ viewedAt: string | null;
1169
+ decidedAt: string | null;
1170
+ archivedAt: string | null;
1171
+ }[];
1172
+ };
1173
+ };
1174
+ outputFormat: "json";
1175
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1176
+ } | {
1177
+ input: {
1178
+ param: {
1179
+ id: string;
1180
+ };
1181
+ };
1182
+ output: {
1183
+ error: string;
1184
+ };
1185
+ outputFormat: "json";
1186
+ status: 409;
1187
+ };
1188
+ };
1189
+ } & {
1190
+ "/quote-versions/:id/decline": {
1191
+ $post: {
1192
+ input: {
1193
+ param: {
1194
+ id: string;
1195
+ };
1196
+ };
1197
+ output: {
1198
+ error: string;
1199
+ };
1200
+ outputFormat: "json";
1201
+ status: 404;
1202
+ } | {
1203
+ input: {
1204
+ param: {
1205
+ id: string;
1206
+ };
1207
+ };
1208
+ output: {
1209
+ data: {
1210
+ id: string;
1211
+ quoteId: string;
1212
+ label: string | null;
1213
+ status: "draft" | "sent" | "accepted" | "declined" | "superseded" | "expired";
1214
+ supersedesId: string | null;
1215
+ tripSnapshotId: string | null;
1216
+ validUntil: string | null;
1217
+ currency: string;
1218
+ subtotalAmountCents: number;
1219
+ taxAmountCents: number;
1220
+ totalAmountCents: number;
1221
+ notes: string | null;
1222
+ sentAt: string | null;
1223
+ viewedAt: string | null;
1224
+ decidedAt: string | null;
1225
+ createdAt: string;
1226
+ updatedAt: string;
1227
+ archivedAt: string | null;
1228
+ };
1229
+ };
1230
+ outputFormat: "json";
1231
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1232
+ } | {
1233
+ input: {
1234
+ param: {
1235
+ id: string;
1236
+ };
1237
+ };
1238
+ output: {
1239
+ error: string;
1240
+ };
1241
+ outputFormat: "json";
1242
+ status: 409;
1243
+ };
1244
+ };
1245
+ } & {
1246
+ "/quote-versions/:id/lines": {
1247
+ $get: {
1248
+ input: {
1249
+ param: {
1250
+ id: string;
1251
+ };
1252
+ };
1253
+ output: {
1254
+ data: {
1255
+ id: string;
1256
+ quoteVersionId: string;
1257
+ productId: string | null;
1258
+ supplierServiceId: string | null;
1259
+ description: string;
1260
+ quantity: number;
1261
+ unitPriceAmountCents: number;
1262
+ totalAmountCents: number;
1263
+ currency: string;
1264
+ createdAt: string;
1265
+ updatedAt: string;
1266
+ }[];
1267
+ };
1268
+ outputFormat: "json";
1269
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1270
+ };
1271
+ };
1272
+ } & {
1273
+ "/quote-versions/:id/lines": {
1274
+ $post: {
1275
+ input: {
1276
+ param: {
1277
+ id: string;
1278
+ };
1279
+ };
1280
+ output: {
1281
+ error: string;
1282
+ };
1283
+ outputFormat: "json";
1284
+ status: 404;
1285
+ } | {
1286
+ input: {
1287
+ param: {
1288
+ id: string;
1289
+ };
1290
+ };
1291
+ output: {
1292
+ data: {
1293
+ quoteVersionId: string;
1294
+ createdAt: string;
1295
+ updatedAt: string;
1296
+ description: string;
1297
+ id: string;
1298
+ productId: string | null;
1299
+ supplierServiceId: string | null;
1300
+ quantity: number;
1301
+ unitPriceAmountCents: number;
1302
+ currency: string;
1303
+ totalAmountCents: number;
1304
+ };
1305
+ };
1306
+ outputFormat: "json";
1307
+ status: 201;
1308
+ } | {
1309
+ input: {
1310
+ param: {
1311
+ id: string;
1312
+ };
1313
+ };
1314
+ output: {
1315
+ error: string;
1316
+ };
1317
+ outputFormat: "json";
1318
+ status: 409;
1319
+ };
1320
+ };
1321
+ } & {
1322
+ "/quote-version-lines/:id": {
1323
+ $patch: {
1324
+ input: {
1325
+ param: {
1326
+ id: string;
1327
+ };
1328
+ };
1329
+ output: {
1330
+ error: string;
1331
+ };
1332
+ outputFormat: "json";
1333
+ status: 404;
1334
+ } | {
1335
+ input: {
1336
+ param: {
1337
+ id: string;
1338
+ };
1339
+ };
1340
+ output: {
1341
+ data: {
1342
+ id: string;
1343
+ quoteVersionId: string;
1344
+ productId: string | null;
1345
+ supplierServiceId: string | null;
1346
+ description: string;
1347
+ quantity: number;
1348
+ unitPriceAmountCents: number;
1349
+ totalAmountCents: number;
1350
+ currency: string;
1351
+ createdAt: string;
1352
+ updatedAt: string;
1353
+ };
1354
+ };
1355
+ outputFormat: "json";
1356
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1357
+ } | {
1358
+ input: {
1359
+ param: {
1360
+ id: string;
1361
+ };
1362
+ };
1363
+ output: {
1364
+ error: string;
1365
+ };
1366
+ outputFormat: "json";
1367
+ status: 409;
1368
+ };
1369
+ };
1370
+ } & {
1371
+ "/quote-version-lines/:id": {
1372
+ $delete: {
1373
+ input: {
1374
+ param: {
1375
+ id: string;
1376
+ };
1377
+ };
1378
+ output: {
1379
+ error: string;
1380
+ };
1381
+ outputFormat: "json";
1382
+ status: 404;
1383
+ } | {
1384
+ input: {
1385
+ param: {
1386
+ id: string;
1387
+ };
1388
+ };
1389
+ output: {
1390
+ success: true;
1391
+ };
1392
+ outputFormat: "json";
1393
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1394
+ } | {
1395
+ input: {
1396
+ param: {
1397
+ id: string;
1398
+ };
1399
+ };
1400
+ output: {
1401
+ error: string;
1402
+ };
1403
+ outputFormat: "json";
1404
+ status: 409;
1405
+ };
1406
+ };
1407
+ }, "/">, "/", "/">;
1408
+ export type QuotesRoutes = typeof quotesRoutes;
1409
+ export {};
1410
+ //# sourceMappingURL=index.d.ts.map