Commit 2c460cc
committed
feat: Add generated TypeScript contracts and DTOs for Commercify API
- Introduced `contracts.ts` containing interfaces for various API requests and responses.
- Added `dtos.ts` with data transfer objects for categories, checkouts, orders, products, and users.
- Updated API index to export new DTOs and contracts.
- Refactored attribute handling in product variants to use key-value pairs instead of arrays.
- Enhanced utility functions for SKU generation and attribute transformation.
- Implemented tests for attribute transformation and product creation request formatting.
- Cleaned up health check and environment configuration code for better readability.1 parent 425903a commit 2c460cc
18 files changed
Lines changed: 695 additions & 547 deletions
File tree
- src
- lib
- schemas
- server
- api
- types
- utils
- routes/admin/products
- [id]
- edit
- new
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 9 | + | |
17 | 10 | | |
18 | 11 | | |
19 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
595 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
596 | 599 | | |
597 | 600 | | |
598 | 601 | | |
| |||
776 | 779 | | |
777 | 780 | | |
778 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
779 | 791 | | |
780 | 792 | | |
781 | 793 | | |
782 | 794 | | |
783 | 795 | | |
784 | | - | |
| 796 | + | |
785 | 797 | | |
786 | 798 | | |
787 | 799 | | |
| |||
856 | 868 | | |
857 | 869 | | |
858 | 870 | | |
859 | | - | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
860 | 874 | | |
861 | 875 | | |
862 | 876 | | |
| |||
982 | 996 | | |
983 | 997 | | |
984 | 998 | | |
985 | | - | |
986 | | - | |
| 999 | + | |
| 1000 | + | |
987 | 1001 | | |
988 | 1002 | | |
989 | 1003 | | |
| |||
997 | 1011 | | |
998 | 1012 | | |
999 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
1000 | 1024 | | |
1001 | 1025 | | |
1002 | 1026 | | |
| |||
1005 | 1029 | | |
1006 | 1030 | | |
1007 | 1031 | | |
1008 | | - | |
| 1032 | + | |
1009 | 1033 | | |
1010 | 1034 | | |
1011 | 1035 | | |
| |||
1085 | 1109 | | |
1086 | 1110 | | |
1087 | 1111 | | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
| 1112 | + | |
1091 | 1113 | | |
1092 | 1114 | | |
1093 | 1115 | | |
| |||
1630 | 1652 | | |
1631 | 1653 | | |
1632 | 1654 | | |
1633 | | - | |
1634 | | - | |
1635 | | - | |
| 1655 | + | |
1636 | 1656 | | |
1637 | 1657 | | |
1638 | 1658 | | |
| |||
0 commit comments