@porulle/core 0.5.0 → 0.7.0

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 (42) hide show
  1. package/LICENSE +21 -0
  2. package/dist/interfaces/rest/routes/orders.d.ts.map +1 -1
  3. package/dist/interfaces/rest/routes/orders.js +25 -1
  4. package/dist/interfaces/rest/schemas/catalog.d.ts +12 -1
  5. package/dist/interfaces/rest/schemas/catalog.d.ts.map +1 -1
  6. package/dist/interfaces/rest/schemas/orders.d.ts +1393 -0
  7. package/dist/interfaces/rest/schemas/orders.d.ts.map +1 -1
  8. package/dist/interfaces/rest/schemas/orders.js +97 -0
  9. package/dist/kernel/error-mapper.d.ts.map +1 -1
  10. package/dist/kernel/error-mapper.js +1 -0
  11. package/dist/kernel/errors.d.ts +5 -0
  12. package/dist/kernel/errors.d.ts.map +1 -1
  13. package/dist/kernel/errors.js +9 -0
  14. package/dist/modules/catalog/entity-service.d.ts.map +1 -1
  15. package/dist/modules/catalog/entity-service.js +19 -3
  16. package/dist/modules/catalog/schemas.d.ts +12 -1
  17. package/dist/modules/catalog/schemas.d.ts.map +1 -1
  18. package/dist/modules/catalog/schemas.js +14 -1
  19. package/dist/modules/catalog/service.d.ts +7 -1
  20. package/dist/modules/catalog/service.d.ts.map +1 -1
  21. package/dist/modules/media/service.d.ts +18 -0
  22. package/dist/modules/media/service.d.ts.map +1 -1
  23. package/dist/modules/media/service.js +26 -0
  24. package/dist/modules/orders/service.d.ts +16 -1
  25. package/dist/modules/orders/service.d.ts.map +1 -1
  26. package/dist/modules/orders/service.js +47 -3
  27. package/dist/modules/pricing/service.d.ts.map +1 -1
  28. package/dist/modules/pricing/service.js +19 -1
  29. package/dist/runtime/server.d.ts.map +1 -1
  30. package/dist/runtime/server.js +34 -2
  31. package/package.json +14 -14
  32. package/src/interfaces/rest/routes/orders.ts +36 -1
  33. package/src/interfaces/rest/schemas/orders.ts +104 -0
  34. package/src/kernel/error-mapper.ts +1 -0
  35. package/src/kernel/errors.ts +11 -0
  36. package/src/modules/catalog/entity-service.ts +27 -3
  37. package/src/modules/catalog/schemas.ts +15 -1
  38. package/src/modules/catalog/service.ts +2 -2
  39. package/src/modules/media/service.ts +40 -0
  40. package/src/modules/orders/service.ts +85 -2
  41. package/src/modules/pricing/service.ts +29 -1
  42. package/src/runtime/server.ts +35 -2
@@ -3,6 +3,38 @@ export declare const ChangeOrderStatusBodySchema: z.ZodObject<{
3
3
  status: z.ZodString;
4
4
  reason: z.ZodOptional<z.ZodString>;
5
5
  }, z.core.$strip>;
6
+ export declare const RefundOrderBodySchema: z.ZodObject<{
7
+ amount: z.ZodOptional<z.ZodNumber>;
8
+ reason: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ export declare const CaptureOrderBodySchema: z.ZodObject<{
11
+ amount: z.ZodOptional<z.ZodNumber>;
12
+ }, z.core.$strip>;
13
+ export declare const CreateOrderBodySchema: z.ZodObject<{
14
+ customerId: z.ZodOptional<z.ZodUUID>;
15
+ currency: z.ZodString;
16
+ subtotal: z.ZodNumber;
17
+ taxTotal: z.ZodNumber;
18
+ shippingTotal: z.ZodNumber;
19
+ discountTotal: z.ZodOptional<z.ZodNumber>;
20
+ grandTotal: z.ZodNumber;
21
+ paymentIntentId: z.ZodOptional<z.ZodString>;
22
+ paymentMethodId: z.ZodOptional<z.ZodString>;
23
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24
+ lineItems: z.ZodArray<z.ZodObject<{
25
+ entityId: z.ZodUUID;
26
+ entityType: z.ZodString;
27
+ variantId: z.ZodOptional<z.ZodUUID>;
28
+ sku: z.ZodOptional<z.ZodString>;
29
+ title: z.ZodString;
30
+ quantity: z.ZodNumber;
31
+ unitPrice: z.ZodNumber;
32
+ totalPrice: z.ZodNumber;
33
+ taxAmount: z.ZodOptional<z.ZodNumber>;
34
+ discountAmount: z.ZodOptional<z.ZodNumber>;
35
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>;
6
38
  export declare const OrderDataResponseSchema: z.ZodObject<{
7
39
  data: import("drizzle-zod").BuildSchema<"select", {
8
40
  id: import("drizzle-orm/pg-core").PgColumn<{
@@ -1563,6 +1595,1367 @@ export declare const getOrderFulfillmentsRoute: {
1563
1595
  } & {
1564
1596
  getRoutingPath(): "/:id/fulfillments";
1565
1597
  };
1598
+ export declare const createOrderRoute: {
1599
+ method: "post";
1600
+ path: "/";
1601
+ tags: string[];
1602
+ summary: string;
1603
+ description: string;
1604
+ request: {
1605
+ body: {
1606
+ content: {
1607
+ "application/json": {
1608
+ schema: z.ZodObject<{
1609
+ customerId: z.ZodOptional<z.ZodUUID>;
1610
+ currency: z.ZodString;
1611
+ subtotal: z.ZodNumber;
1612
+ taxTotal: z.ZodNumber;
1613
+ shippingTotal: z.ZodNumber;
1614
+ discountTotal: z.ZodOptional<z.ZodNumber>;
1615
+ grandTotal: z.ZodNumber;
1616
+ paymentIntentId: z.ZodOptional<z.ZodString>;
1617
+ paymentMethodId: z.ZodOptional<z.ZodString>;
1618
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1619
+ lineItems: z.ZodArray<z.ZodObject<{
1620
+ entityId: z.ZodUUID;
1621
+ entityType: z.ZodString;
1622
+ variantId: z.ZodOptional<z.ZodUUID>;
1623
+ sku: z.ZodOptional<z.ZodString>;
1624
+ title: z.ZodString;
1625
+ quantity: z.ZodNumber;
1626
+ unitPrice: z.ZodNumber;
1627
+ totalPrice: z.ZodNumber;
1628
+ taxAmount: z.ZodOptional<z.ZodNumber>;
1629
+ discountAmount: z.ZodOptional<z.ZodNumber>;
1630
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1631
+ }, z.core.$strip>>;
1632
+ }, z.core.$strip>;
1633
+ };
1634
+ };
1635
+ required: true;
1636
+ };
1637
+ };
1638
+ responses: {
1639
+ 400: {
1640
+ readonly content: {
1641
+ readonly "application/json": {
1642
+ readonly schema: z.ZodObject<{
1643
+ error: z.ZodObject<{
1644
+ code: z.ZodString;
1645
+ message: z.ZodString;
1646
+ details: z.ZodOptional<z.ZodObject<{
1647
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1648
+ path: z.ZodString;
1649
+ message: z.ZodString;
1650
+ code: z.ZodString;
1651
+ }, z.core.$strip>>>;
1652
+ }, z.core.$strip>>;
1653
+ }, z.core.$strip>;
1654
+ }, z.core.$strip>;
1655
+ };
1656
+ };
1657
+ readonly description: "Business logic error.";
1658
+ };
1659
+ 401: {
1660
+ readonly content: {
1661
+ readonly "application/json": {
1662
+ readonly schema: z.ZodObject<{
1663
+ error: z.ZodObject<{
1664
+ code: z.ZodString;
1665
+ message: z.ZodString;
1666
+ details: z.ZodOptional<z.ZodObject<{
1667
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1668
+ path: z.ZodString;
1669
+ message: z.ZodString;
1670
+ code: z.ZodString;
1671
+ }, z.core.$strip>>>;
1672
+ }, z.core.$strip>>;
1673
+ }, z.core.$strip>;
1674
+ }, z.core.$strip>;
1675
+ };
1676
+ };
1677
+ readonly description: "Authentication required.";
1678
+ };
1679
+ 403: {
1680
+ readonly content: {
1681
+ readonly "application/json": {
1682
+ readonly schema: z.ZodObject<{
1683
+ error: z.ZodObject<{
1684
+ code: z.ZodString;
1685
+ message: z.ZodString;
1686
+ details: z.ZodOptional<z.ZodObject<{
1687
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1688
+ path: z.ZodString;
1689
+ message: z.ZodString;
1690
+ code: z.ZodString;
1691
+ }, z.core.$strip>>>;
1692
+ }, z.core.$strip>>;
1693
+ }, z.core.$strip>;
1694
+ }, z.core.$strip>;
1695
+ };
1696
+ };
1697
+ readonly description: "Insufficient permissions.";
1698
+ };
1699
+ 404: {
1700
+ readonly content: {
1701
+ readonly "application/json": {
1702
+ readonly schema: z.ZodObject<{
1703
+ error: z.ZodObject<{
1704
+ code: z.ZodString;
1705
+ message: z.ZodString;
1706
+ details: z.ZodOptional<z.ZodObject<{
1707
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1708
+ path: z.ZodString;
1709
+ message: z.ZodString;
1710
+ code: z.ZodString;
1711
+ }, z.core.$strip>>>;
1712
+ }, z.core.$strip>>;
1713
+ }, z.core.$strip>;
1714
+ }, z.core.$strip>;
1715
+ };
1716
+ };
1717
+ readonly description: "Resource not found.";
1718
+ };
1719
+ 422: {
1720
+ readonly content: {
1721
+ readonly "application/json": {
1722
+ readonly schema: z.ZodObject<{
1723
+ error: z.ZodObject<{
1724
+ code: z.ZodString;
1725
+ message: z.ZodString;
1726
+ details: z.ZodOptional<z.ZodObject<{
1727
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1728
+ path: z.ZodString;
1729
+ message: z.ZodString;
1730
+ code: z.ZodString;
1731
+ }, z.core.$strip>>>;
1732
+ }, z.core.$strip>>;
1733
+ }, z.core.$strip>;
1734
+ }, z.core.$strip>;
1735
+ };
1736
+ };
1737
+ readonly description: "Validation error.";
1738
+ };
1739
+ 201: {
1740
+ content: {
1741
+ "application/json": {
1742
+ schema: z.ZodObject<{
1743
+ data: import("drizzle-zod").BuildSchema<"select", {
1744
+ id: import("drizzle-orm/pg-core").PgColumn<{
1745
+ name: "id";
1746
+ tableName: "orders";
1747
+ dataType: "string";
1748
+ columnType: "PgUUID";
1749
+ data: string;
1750
+ driverParam: string;
1751
+ notNull: true;
1752
+ hasDefault: true;
1753
+ isPrimaryKey: true;
1754
+ isAutoincrement: false;
1755
+ hasRuntimeDefault: false;
1756
+ enumValues: undefined;
1757
+ baseColumn: never;
1758
+ identity: undefined;
1759
+ generated: undefined;
1760
+ }, {}, {}>;
1761
+ organizationId: import("drizzle-orm/pg-core").PgColumn<{
1762
+ name: "organization_id";
1763
+ tableName: "orders";
1764
+ dataType: "string";
1765
+ columnType: "PgText";
1766
+ data: string;
1767
+ driverParam: string;
1768
+ notNull: true;
1769
+ hasDefault: false;
1770
+ isPrimaryKey: false;
1771
+ isAutoincrement: false;
1772
+ hasRuntimeDefault: false;
1773
+ enumValues: [string, ...string[]];
1774
+ baseColumn: never;
1775
+ identity: undefined;
1776
+ generated: undefined;
1777
+ }, {}, {}>;
1778
+ orderNumber: import("drizzle-orm/pg-core").PgColumn<{
1779
+ name: "order_number";
1780
+ tableName: "orders";
1781
+ dataType: "string";
1782
+ columnType: "PgText";
1783
+ data: string;
1784
+ driverParam: string;
1785
+ notNull: true;
1786
+ hasDefault: false;
1787
+ isPrimaryKey: false;
1788
+ isAutoincrement: false;
1789
+ hasRuntimeDefault: false;
1790
+ enumValues: [string, ...string[]];
1791
+ baseColumn: never;
1792
+ identity: undefined;
1793
+ generated: undefined;
1794
+ }, {}, {}>;
1795
+ customerId: import("drizzle-orm/pg-core").PgColumn<{
1796
+ name: "customer_id";
1797
+ tableName: "orders";
1798
+ dataType: "string";
1799
+ columnType: "PgUUID";
1800
+ data: string;
1801
+ driverParam: string;
1802
+ notNull: false;
1803
+ hasDefault: false;
1804
+ isPrimaryKey: false;
1805
+ isAutoincrement: false;
1806
+ hasRuntimeDefault: false;
1807
+ enumValues: undefined;
1808
+ baseColumn: never;
1809
+ identity: undefined;
1810
+ generated: undefined;
1811
+ }, {}, {}>;
1812
+ status: import("drizzle-orm/pg-core").PgColumn<{
1813
+ name: "status";
1814
+ tableName: "orders";
1815
+ dataType: "string";
1816
+ columnType: "PgText";
1817
+ data: string;
1818
+ driverParam: string;
1819
+ notNull: true;
1820
+ hasDefault: true;
1821
+ isPrimaryKey: false;
1822
+ isAutoincrement: false;
1823
+ hasRuntimeDefault: false;
1824
+ enumValues: [string, ...string[]];
1825
+ baseColumn: never;
1826
+ identity: undefined;
1827
+ generated: undefined;
1828
+ }, {}, {}>;
1829
+ currency: import("drizzle-orm/pg-core").PgColumn<{
1830
+ name: "currency";
1831
+ tableName: "orders";
1832
+ dataType: "string";
1833
+ columnType: "PgText";
1834
+ data: string;
1835
+ driverParam: string;
1836
+ notNull: true;
1837
+ hasDefault: false;
1838
+ isPrimaryKey: false;
1839
+ isAutoincrement: false;
1840
+ hasRuntimeDefault: false;
1841
+ enumValues: [string, ...string[]];
1842
+ baseColumn: never;
1843
+ identity: undefined;
1844
+ generated: undefined;
1845
+ }, {}, {}>;
1846
+ subtotal: import("drizzle-orm/pg-core").PgColumn<{
1847
+ name: "subtotal";
1848
+ tableName: "orders";
1849
+ dataType: "number";
1850
+ columnType: "PgInteger";
1851
+ data: number;
1852
+ driverParam: string | number;
1853
+ notNull: true;
1854
+ hasDefault: false;
1855
+ isPrimaryKey: false;
1856
+ isAutoincrement: false;
1857
+ hasRuntimeDefault: false;
1858
+ enumValues: undefined;
1859
+ baseColumn: never;
1860
+ identity: undefined;
1861
+ generated: undefined;
1862
+ }, {}, {}>;
1863
+ taxTotal: import("drizzle-orm/pg-core").PgColumn<{
1864
+ name: "tax_total";
1865
+ tableName: "orders";
1866
+ dataType: "number";
1867
+ columnType: "PgInteger";
1868
+ data: number;
1869
+ driverParam: string | number;
1870
+ notNull: true;
1871
+ hasDefault: false;
1872
+ isPrimaryKey: false;
1873
+ isAutoincrement: false;
1874
+ hasRuntimeDefault: false;
1875
+ enumValues: undefined;
1876
+ baseColumn: never;
1877
+ identity: undefined;
1878
+ generated: undefined;
1879
+ }, {}, {}>;
1880
+ shippingTotal: import("drizzle-orm/pg-core").PgColumn<{
1881
+ name: "shipping_total";
1882
+ tableName: "orders";
1883
+ dataType: "number";
1884
+ columnType: "PgInteger";
1885
+ data: number;
1886
+ driverParam: string | number;
1887
+ notNull: true;
1888
+ hasDefault: false;
1889
+ isPrimaryKey: false;
1890
+ isAutoincrement: false;
1891
+ hasRuntimeDefault: false;
1892
+ enumValues: undefined;
1893
+ baseColumn: never;
1894
+ identity: undefined;
1895
+ generated: undefined;
1896
+ }, {}, {}>;
1897
+ discountTotal: import("drizzle-orm/pg-core").PgColumn<{
1898
+ name: "discount_total";
1899
+ tableName: "orders";
1900
+ dataType: "number";
1901
+ columnType: "PgInteger";
1902
+ data: number;
1903
+ driverParam: string | number;
1904
+ notNull: true;
1905
+ hasDefault: true;
1906
+ isPrimaryKey: false;
1907
+ isAutoincrement: false;
1908
+ hasRuntimeDefault: false;
1909
+ enumValues: undefined;
1910
+ baseColumn: never;
1911
+ identity: undefined;
1912
+ generated: undefined;
1913
+ }, {}, {}>;
1914
+ grandTotal: import("drizzle-orm/pg-core").PgColumn<{
1915
+ name: "grand_total";
1916
+ tableName: "orders";
1917
+ dataType: "number";
1918
+ columnType: "PgInteger";
1919
+ data: number;
1920
+ driverParam: string | number;
1921
+ notNull: true;
1922
+ hasDefault: false;
1923
+ isPrimaryKey: false;
1924
+ isAutoincrement: false;
1925
+ hasRuntimeDefault: false;
1926
+ enumValues: undefined;
1927
+ baseColumn: never;
1928
+ identity: undefined;
1929
+ generated: undefined;
1930
+ }, {}, {}>;
1931
+ amountCaptured: import("drizzle-orm/pg-core").PgColumn<{
1932
+ name: "amount_captured";
1933
+ tableName: "orders";
1934
+ dataType: "number";
1935
+ columnType: "PgInteger";
1936
+ data: number;
1937
+ driverParam: string | number;
1938
+ notNull: false;
1939
+ hasDefault: false;
1940
+ isPrimaryKey: false;
1941
+ isAutoincrement: false;
1942
+ hasRuntimeDefault: false;
1943
+ enumValues: undefined;
1944
+ baseColumn: never;
1945
+ identity: undefined;
1946
+ generated: undefined;
1947
+ }, {}, {}>;
1948
+ paymentIntentId: import("drizzle-orm/pg-core").PgColumn<{
1949
+ name: "payment_intent_id";
1950
+ tableName: "orders";
1951
+ dataType: "string";
1952
+ columnType: "PgText";
1953
+ data: string;
1954
+ driverParam: string;
1955
+ notNull: false;
1956
+ hasDefault: false;
1957
+ isPrimaryKey: false;
1958
+ isAutoincrement: false;
1959
+ hasRuntimeDefault: false;
1960
+ enumValues: [string, ...string[]];
1961
+ baseColumn: never;
1962
+ identity: undefined;
1963
+ generated: undefined;
1964
+ }, {}, {}>;
1965
+ paymentMethodId: import("drizzle-orm/pg-core").PgColumn<{
1966
+ name: "payment_method_id";
1967
+ tableName: "orders";
1968
+ dataType: "string";
1969
+ columnType: "PgText";
1970
+ data: string;
1971
+ driverParam: string;
1972
+ notNull: false;
1973
+ hasDefault: false;
1974
+ isPrimaryKey: false;
1975
+ isAutoincrement: false;
1976
+ hasRuntimeDefault: false;
1977
+ enumValues: [string, ...string[]];
1978
+ baseColumn: never;
1979
+ identity: undefined;
1980
+ generated: undefined;
1981
+ }, {}, {}>;
1982
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
1983
+ name: "metadata";
1984
+ tableName: "orders";
1985
+ dataType: "json";
1986
+ columnType: "PgJsonb";
1987
+ data: Record<string, unknown>;
1988
+ driverParam: unknown;
1989
+ notNull: false;
1990
+ hasDefault: true;
1991
+ isPrimaryKey: false;
1992
+ isAutoincrement: false;
1993
+ hasRuntimeDefault: false;
1994
+ enumValues: undefined;
1995
+ baseColumn: never;
1996
+ identity: undefined;
1997
+ generated: undefined;
1998
+ }, {}, {
1999
+ $type: Record<string, unknown>;
2000
+ }>;
2001
+ placedAt: import("drizzle-orm/pg-core").PgColumn<{
2002
+ name: "placed_at";
2003
+ tableName: "orders";
2004
+ dataType: "date";
2005
+ columnType: "PgTimestamp";
2006
+ data: Date;
2007
+ driverParam: string;
2008
+ notNull: true;
2009
+ hasDefault: true;
2010
+ isPrimaryKey: false;
2011
+ isAutoincrement: false;
2012
+ hasRuntimeDefault: false;
2013
+ enumValues: undefined;
2014
+ baseColumn: never;
2015
+ identity: undefined;
2016
+ generated: undefined;
2017
+ }, {}, {}>;
2018
+ fulfilledAt: import("drizzle-orm/pg-core").PgColumn<{
2019
+ name: "fulfilled_at";
2020
+ tableName: "orders";
2021
+ dataType: "date";
2022
+ columnType: "PgTimestamp";
2023
+ data: Date;
2024
+ driverParam: string;
2025
+ notNull: false;
2026
+ hasDefault: false;
2027
+ isPrimaryKey: false;
2028
+ isAutoincrement: false;
2029
+ hasRuntimeDefault: false;
2030
+ enumValues: undefined;
2031
+ baseColumn: never;
2032
+ identity: undefined;
2033
+ generated: undefined;
2034
+ }, {}, {}>;
2035
+ cancelledAt: import("drizzle-orm/pg-core").PgColumn<{
2036
+ name: "cancelled_at";
2037
+ tableName: "orders";
2038
+ dataType: "date";
2039
+ columnType: "PgTimestamp";
2040
+ data: Date;
2041
+ driverParam: string;
2042
+ notNull: false;
2043
+ hasDefault: false;
2044
+ isPrimaryKey: false;
2045
+ isAutoincrement: false;
2046
+ hasRuntimeDefault: false;
2047
+ enumValues: undefined;
2048
+ baseColumn: never;
2049
+ identity: undefined;
2050
+ generated: undefined;
2051
+ }, {}, {}>;
2052
+ }, {
2053
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2054
+ }, undefined>;
2055
+ }, z.core.$strip>;
2056
+ };
2057
+ };
2058
+ description: string;
2059
+ };
2060
+ };
2061
+ } & {
2062
+ getRoutingPath(): "/";
2063
+ };
2064
+ export declare const refundOrderRoute: {
2065
+ method: "post";
2066
+ path: "/{id}/refund";
2067
+ tags: string[];
2068
+ summary: string;
2069
+ description: string;
2070
+ request: {
2071
+ params: z.ZodObject<{
2072
+ id: z.ZodUUID;
2073
+ }, z.core.$strip>;
2074
+ body: {
2075
+ content: {
2076
+ "application/json": {
2077
+ schema: z.ZodObject<{
2078
+ amount: z.ZodOptional<z.ZodNumber>;
2079
+ reason: z.ZodOptional<z.ZodString>;
2080
+ }, z.core.$strip>;
2081
+ };
2082
+ };
2083
+ required: false;
2084
+ };
2085
+ };
2086
+ responses: {
2087
+ 400: {
2088
+ readonly content: {
2089
+ readonly "application/json": {
2090
+ readonly schema: z.ZodObject<{
2091
+ error: z.ZodObject<{
2092
+ code: z.ZodString;
2093
+ message: z.ZodString;
2094
+ details: z.ZodOptional<z.ZodObject<{
2095
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2096
+ path: z.ZodString;
2097
+ message: z.ZodString;
2098
+ code: z.ZodString;
2099
+ }, z.core.$strip>>>;
2100
+ }, z.core.$strip>>;
2101
+ }, z.core.$strip>;
2102
+ }, z.core.$strip>;
2103
+ };
2104
+ };
2105
+ readonly description: "Business logic error.";
2106
+ };
2107
+ 401: {
2108
+ readonly content: {
2109
+ readonly "application/json": {
2110
+ readonly schema: z.ZodObject<{
2111
+ error: z.ZodObject<{
2112
+ code: z.ZodString;
2113
+ message: z.ZodString;
2114
+ details: z.ZodOptional<z.ZodObject<{
2115
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2116
+ path: z.ZodString;
2117
+ message: z.ZodString;
2118
+ code: z.ZodString;
2119
+ }, z.core.$strip>>>;
2120
+ }, z.core.$strip>>;
2121
+ }, z.core.$strip>;
2122
+ }, z.core.$strip>;
2123
+ };
2124
+ };
2125
+ readonly description: "Authentication required.";
2126
+ };
2127
+ 403: {
2128
+ readonly content: {
2129
+ readonly "application/json": {
2130
+ readonly schema: z.ZodObject<{
2131
+ error: z.ZodObject<{
2132
+ code: z.ZodString;
2133
+ message: z.ZodString;
2134
+ details: z.ZodOptional<z.ZodObject<{
2135
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2136
+ path: z.ZodString;
2137
+ message: z.ZodString;
2138
+ code: z.ZodString;
2139
+ }, z.core.$strip>>>;
2140
+ }, z.core.$strip>>;
2141
+ }, z.core.$strip>;
2142
+ }, z.core.$strip>;
2143
+ };
2144
+ };
2145
+ readonly description: "Insufficient permissions.";
2146
+ };
2147
+ 404: {
2148
+ readonly content: {
2149
+ readonly "application/json": {
2150
+ readonly schema: z.ZodObject<{
2151
+ error: z.ZodObject<{
2152
+ code: z.ZodString;
2153
+ message: z.ZodString;
2154
+ details: z.ZodOptional<z.ZodObject<{
2155
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2156
+ path: z.ZodString;
2157
+ message: z.ZodString;
2158
+ code: z.ZodString;
2159
+ }, z.core.$strip>>>;
2160
+ }, z.core.$strip>>;
2161
+ }, z.core.$strip>;
2162
+ }, z.core.$strip>;
2163
+ };
2164
+ };
2165
+ readonly description: "Resource not found.";
2166
+ };
2167
+ 422: {
2168
+ readonly content: {
2169
+ readonly "application/json": {
2170
+ readonly schema: z.ZodObject<{
2171
+ error: z.ZodObject<{
2172
+ code: z.ZodString;
2173
+ message: z.ZodString;
2174
+ details: z.ZodOptional<z.ZodObject<{
2175
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2176
+ path: z.ZodString;
2177
+ message: z.ZodString;
2178
+ code: z.ZodString;
2179
+ }, z.core.$strip>>>;
2180
+ }, z.core.$strip>>;
2181
+ }, z.core.$strip>;
2182
+ }, z.core.$strip>;
2183
+ };
2184
+ };
2185
+ readonly description: "Validation error.";
2186
+ };
2187
+ 200: {
2188
+ content: {
2189
+ "application/json": {
2190
+ schema: z.ZodObject<{
2191
+ data: import("drizzle-zod").BuildSchema<"select", {
2192
+ id: import("drizzle-orm/pg-core").PgColumn<{
2193
+ name: "id";
2194
+ tableName: "orders";
2195
+ dataType: "string";
2196
+ columnType: "PgUUID";
2197
+ data: string;
2198
+ driverParam: string;
2199
+ notNull: true;
2200
+ hasDefault: true;
2201
+ isPrimaryKey: true;
2202
+ isAutoincrement: false;
2203
+ hasRuntimeDefault: false;
2204
+ enumValues: undefined;
2205
+ baseColumn: never;
2206
+ identity: undefined;
2207
+ generated: undefined;
2208
+ }, {}, {}>;
2209
+ organizationId: import("drizzle-orm/pg-core").PgColumn<{
2210
+ name: "organization_id";
2211
+ tableName: "orders";
2212
+ dataType: "string";
2213
+ columnType: "PgText";
2214
+ data: string;
2215
+ driverParam: string;
2216
+ notNull: true;
2217
+ hasDefault: false;
2218
+ isPrimaryKey: false;
2219
+ isAutoincrement: false;
2220
+ hasRuntimeDefault: false;
2221
+ enumValues: [string, ...string[]];
2222
+ baseColumn: never;
2223
+ identity: undefined;
2224
+ generated: undefined;
2225
+ }, {}, {}>;
2226
+ orderNumber: import("drizzle-orm/pg-core").PgColumn<{
2227
+ name: "order_number";
2228
+ tableName: "orders";
2229
+ dataType: "string";
2230
+ columnType: "PgText";
2231
+ data: string;
2232
+ driverParam: string;
2233
+ notNull: true;
2234
+ hasDefault: false;
2235
+ isPrimaryKey: false;
2236
+ isAutoincrement: false;
2237
+ hasRuntimeDefault: false;
2238
+ enumValues: [string, ...string[]];
2239
+ baseColumn: never;
2240
+ identity: undefined;
2241
+ generated: undefined;
2242
+ }, {}, {}>;
2243
+ customerId: import("drizzle-orm/pg-core").PgColumn<{
2244
+ name: "customer_id";
2245
+ tableName: "orders";
2246
+ dataType: "string";
2247
+ columnType: "PgUUID";
2248
+ data: string;
2249
+ driverParam: string;
2250
+ notNull: false;
2251
+ hasDefault: false;
2252
+ isPrimaryKey: false;
2253
+ isAutoincrement: false;
2254
+ hasRuntimeDefault: false;
2255
+ enumValues: undefined;
2256
+ baseColumn: never;
2257
+ identity: undefined;
2258
+ generated: undefined;
2259
+ }, {}, {}>;
2260
+ status: import("drizzle-orm/pg-core").PgColumn<{
2261
+ name: "status";
2262
+ tableName: "orders";
2263
+ dataType: "string";
2264
+ columnType: "PgText";
2265
+ data: string;
2266
+ driverParam: string;
2267
+ notNull: true;
2268
+ hasDefault: true;
2269
+ isPrimaryKey: false;
2270
+ isAutoincrement: false;
2271
+ hasRuntimeDefault: false;
2272
+ enumValues: [string, ...string[]];
2273
+ baseColumn: never;
2274
+ identity: undefined;
2275
+ generated: undefined;
2276
+ }, {}, {}>;
2277
+ currency: import("drizzle-orm/pg-core").PgColumn<{
2278
+ name: "currency";
2279
+ tableName: "orders";
2280
+ dataType: "string";
2281
+ columnType: "PgText";
2282
+ data: string;
2283
+ driverParam: string;
2284
+ notNull: true;
2285
+ hasDefault: false;
2286
+ isPrimaryKey: false;
2287
+ isAutoincrement: false;
2288
+ hasRuntimeDefault: false;
2289
+ enumValues: [string, ...string[]];
2290
+ baseColumn: never;
2291
+ identity: undefined;
2292
+ generated: undefined;
2293
+ }, {}, {}>;
2294
+ subtotal: import("drizzle-orm/pg-core").PgColumn<{
2295
+ name: "subtotal";
2296
+ tableName: "orders";
2297
+ dataType: "number";
2298
+ columnType: "PgInteger";
2299
+ data: number;
2300
+ driverParam: string | number;
2301
+ notNull: true;
2302
+ hasDefault: false;
2303
+ isPrimaryKey: false;
2304
+ isAutoincrement: false;
2305
+ hasRuntimeDefault: false;
2306
+ enumValues: undefined;
2307
+ baseColumn: never;
2308
+ identity: undefined;
2309
+ generated: undefined;
2310
+ }, {}, {}>;
2311
+ taxTotal: import("drizzle-orm/pg-core").PgColumn<{
2312
+ name: "tax_total";
2313
+ tableName: "orders";
2314
+ dataType: "number";
2315
+ columnType: "PgInteger";
2316
+ data: number;
2317
+ driverParam: string | number;
2318
+ notNull: true;
2319
+ hasDefault: false;
2320
+ isPrimaryKey: false;
2321
+ isAutoincrement: false;
2322
+ hasRuntimeDefault: false;
2323
+ enumValues: undefined;
2324
+ baseColumn: never;
2325
+ identity: undefined;
2326
+ generated: undefined;
2327
+ }, {}, {}>;
2328
+ shippingTotal: import("drizzle-orm/pg-core").PgColumn<{
2329
+ name: "shipping_total";
2330
+ tableName: "orders";
2331
+ dataType: "number";
2332
+ columnType: "PgInteger";
2333
+ data: number;
2334
+ driverParam: string | number;
2335
+ notNull: true;
2336
+ hasDefault: false;
2337
+ isPrimaryKey: false;
2338
+ isAutoincrement: false;
2339
+ hasRuntimeDefault: false;
2340
+ enumValues: undefined;
2341
+ baseColumn: never;
2342
+ identity: undefined;
2343
+ generated: undefined;
2344
+ }, {}, {}>;
2345
+ discountTotal: import("drizzle-orm/pg-core").PgColumn<{
2346
+ name: "discount_total";
2347
+ tableName: "orders";
2348
+ dataType: "number";
2349
+ columnType: "PgInteger";
2350
+ data: number;
2351
+ driverParam: string | number;
2352
+ notNull: true;
2353
+ hasDefault: true;
2354
+ isPrimaryKey: false;
2355
+ isAutoincrement: false;
2356
+ hasRuntimeDefault: false;
2357
+ enumValues: undefined;
2358
+ baseColumn: never;
2359
+ identity: undefined;
2360
+ generated: undefined;
2361
+ }, {}, {}>;
2362
+ grandTotal: import("drizzle-orm/pg-core").PgColumn<{
2363
+ name: "grand_total";
2364
+ tableName: "orders";
2365
+ dataType: "number";
2366
+ columnType: "PgInteger";
2367
+ data: number;
2368
+ driverParam: string | number;
2369
+ notNull: true;
2370
+ hasDefault: false;
2371
+ isPrimaryKey: false;
2372
+ isAutoincrement: false;
2373
+ hasRuntimeDefault: false;
2374
+ enumValues: undefined;
2375
+ baseColumn: never;
2376
+ identity: undefined;
2377
+ generated: undefined;
2378
+ }, {}, {}>;
2379
+ amountCaptured: import("drizzle-orm/pg-core").PgColumn<{
2380
+ name: "amount_captured";
2381
+ tableName: "orders";
2382
+ dataType: "number";
2383
+ columnType: "PgInteger";
2384
+ data: number;
2385
+ driverParam: string | number;
2386
+ notNull: false;
2387
+ hasDefault: false;
2388
+ isPrimaryKey: false;
2389
+ isAutoincrement: false;
2390
+ hasRuntimeDefault: false;
2391
+ enumValues: undefined;
2392
+ baseColumn: never;
2393
+ identity: undefined;
2394
+ generated: undefined;
2395
+ }, {}, {}>;
2396
+ paymentIntentId: import("drizzle-orm/pg-core").PgColumn<{
2397
+ name: "payment_intent_id";
2398
+ tableName: "orders";
2399
+ dataType: "string";
2400
+ columnType: "PgText";
2401
+ data: string;
2402
+ driverParam: string;
2403
+ notNull: false;
2404
+ hasDefault: false;
2405
+ isPrimaryKey: false;
2406
+ isAutoincrement: false;
2407
+ hasRuntimeDefault: false;
2408
+ enumValues: [string, ...string[]];
2409
+ baseColumn: never;
2410
+ identity: undefined;
2411
+ generated: undefined;
2412
+ }, {}, {}>;
2413
+ paymentMethodId: import("drizzle-orm/pg-core").PgColumn<{
2414
+ name: "payment_method_id";
2415
+ tableName: "orders";
2416
+ dataType: "string";
2417
+ columnType: "PgText";
2418
+ data: string;
2419
+ driverParam: string;
2420
+ notNull: false;
2421
+ hasDefault: false;
2422
+ isPrimaryKey: false;
2423
+ isAutoincrement: false;
2424
+ hasRuntimeDefault: false;
2425
+ enumValues: [string, ...string[]];
2426
+ baseColumn: never;
2427
+ identity: undefined;
2428
+ generated: undefined;
2429
+ }, {}, {}>;
2430
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
2431
+ name: "metadata";
2432
+ tableName: "orders";
2433
+ dataType: "json";
2434
+ columnType: "PgJsonb";
2435
+ data: Record<string, unknown>;
2436
+ driverParam: unknown;
2437
+ notNull: false;
2438
+ hasDefault: true;
2439
+ isPrimaryKey: false;
2440
+ isAutoincrement: false;
2441
+ hasRuntimeDefault: false;
2442
+ enumValues: undefined;
2443
+ baseColumn: never;
2444
+ identity: undefined;
2445
+ generated: undefined;
2446
+ }, {}, {
2447
+ $type: Record<string, unknown>;
2448
+ }>;
2449
+ placedAt: import("drizzle-orm/pg-core").PgColumn<{
2450
+ name: "placed_at";
2451
+ tableName: "orders";
2452
+ dataType: "date";
2453
+ columnType: "PgTimestamp";
2454
+ data: Date;
2455
+ driverParam: string;
2456
+ notNull: true;
2457
+ hasDefault: true;
2458
+ isPrimaryKey: false;
2459
+ isAutoincrement: false;
2460
+ hasRuntimeDefault: false;
2461
+ enumValues: undefined;
2462
+ baseColumn: never;
2463
+ identity: undefined;
2464
+ generated: undefined;
2465
+ }, {}, {}>;
2466
+ fulfilledAt: import("drizzle-orm/pg-core").PgColumn<{
2467
+ name: "fulfilled_at";
2468
+ tableName: "orders";
2469
+ dataType: "date";
2470
+ columnType: "PgTimestamp";
2471
+ data: Date;
2472
+ driverParam: string;
2473
+ notNull: false;
2474
+ hasDefault: false;
2475
+ isPrimaryKey: false;
2476
+ isAutoincrement: false;
2477
+ hasRuntimeDefault: false;
2478
+ enumValues: undefined;
2479
+ baseColumn: never;
2480
+ identity: undefined;
2481
+ generated: undefined;
2482
+ }, {}, {}>;
2483
+ cancelledAt: import("drizzle-orm/pg-core").PgColumn<{
2484
+ name: "cancelled_at";
2485
+ tableName: "orders";
2486
+ dataType: "date";
2487
+ columnType: "PgTimestamp";
2488
+ data: Date;
2489
+ driverParam: string;
2490
+ notNull: false;
2491
+ hasDefault: false;
2492
+ isPrimaryKey: false;
2493
+ isAutoincrement: false;
2494
+ hasRuntimeDefault: false;
2495
+ enumValues: undefined;
2496
+ baseColumn: never;
2497
+ identity: undefined;
2498
+ generated: undefined;
2499
+ }, {}, {}>;
2500
+ }, {
2501
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2502
+ }, undefined>;
2503
+ }, z.core.$strip>;
2504
+ };
2505
+ };
2506
+ description: string;
2507
+ };
2508
+ };
2509
+ } & {
2510
+ getRoutingPath(): "/:id/refund";
2511
+ };
2512
+ export declare const captureOrderRoute: {
2513
+ method: "post";
2514
+ path: "/{id}/capture";
2515
+ tags: string[];
2516
+ summary: string;
2517
+ description: string;
2518
+ request: {
2519
+ params: z.ZodObject<{
2520
+ id: z.ZodUUID;
2521
+ }, z.core.$strip>;
2522
+ body: {
2523
+ content: {
2524
+ "application/json": {
2525
+ schema: z.ZodObject<{
2526
+ amount: z.ZodOptional<z.ZodNumber>;
2527
+ }, z.core.$strip>;
2528
+ };
2529
+ };
2530
+ required: false;
2531
+ };
2532
+ };
2533
+ responses: {
2534
+ 400: {
2535
+ readonly content: {
2536
+ readonly "application/json": {
2537
+ readonly schema: z.ZodObject<{
2538
+ error: z.ZodObject<{
2539
+ code: z.ZodString;
2540
+ message: z.ZodString;
2541
+ details: z.ZodOptional<z.ZodObject<{
2542
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2543
+ path: z.ZodString;
2544
+ message: z.ZodString;
2545
+ code: z.ZodString;
2546
+ }, z.core.$strip>>>;
2547
+ }, z.core.$strip>>;
2548
+ }, z.core.$strip>;
2549
+ }, z.core.$strip>;
2550
+ };
2551
+ };
2552
+ readonly description: "Business logic error.";
2553
+ };
2554
+ 401: {
2555
+ readonly content: {
2556
+ readonly "application/json": {
2557
+ readonly schema: z.ZodObject<{
2558
+ error: z.ZodObject<{
2559
+ code: z.ZodString;
2560
+ message: z.ZodString;
2561
+ details: z.ZodOptional<z.ZodObject<{
2562
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2563
+ path: z.ZodString;
2564
+ message: z.ZodString;
2565
+ code: z.ZodString;
2566
+ }, z.core.$strip>>>;
2567
+ }, z.core.$strip>>;
2568
+ }, z.core.$strip>;
2569
+ }, z.core.$strip>;
2570
+ };
2571
+ };
2572
+ readonly description: "Authentication required.";
2573
+ };
2574
+ 403: {
2575
+ readonly content: {
2576
+ readonly "application/json": {
2577
+ readonly schema: z.ZodObject<{
2578
+ error: z.ZodObject<{
2579
+ code: z.ZodString;
2580
+ message: z.ZodString;
2581
+ details: z.ZodOptional<z.ZodObject<{
2582
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2583
+ path: z.ZodString;
2584
+ message: z.ZodString;
2585
+ code: z.ZodString;
2586
+ }, z.core.$strip>>>;
2587
+ }, z.core.$strip>>;
2588
+ }, z.core.$strip>;
2589
+ }, z.core.$strip>;
2590
+ };
2591
+ };
2592
+ readonly description: "Insufficient permissions.";
2593
+ };
2594
+ 404: {
2595
+ readonly content: {
2596
+ readonly "application/json": {
2597
+ readonly schema: z.ZodObject<{
2598
+ error: z.ZodObject<{
2599
+ code: z.ZodString;
2600
+ message: z.ZodString;
2601
+ details: z.ZodOptional<z.ZodObject<{
2602
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2603
+ path: z.ZodString;
2604
+ message: z.ZodString;
2605
+ code: z.ZodString;
2606
+ }, z.core.$strip>>>;
2607
+ }, z.core.$strip>>;
2608
+ }, z.core.$strip>;
2609
+ }, z.core.$strip>;
2610
+ };
2611
+ };
2612
+ readonly description: "Resource not found.";
2613
+ };
2614
+ 422: {
2615
+ readonly content: {
2616
+ readonly "application/json": {
2617
+ readonly schema: z.ZodObject<{
2618
+ error: z.ZodObject<{
2619
+ code: z.ZodString;
2620
+ message: z.ZodString;
2621
+ details: z.ZodOptional<z.ZodObject<{
2622
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2623
+ path: z.ZodString;
2624
+ message: z.ZodString;
2625
+ code: z.ZodString;
2626
+ }, z.core.$strip>>>;
2627
+ }, z.core.$strip>>;
2628
+ }, z.core.$strip>;
2629
+ }, z.core.$strip>;
2630
+ };
2631
+ };
2632
+ readonly description: "Validation error.";
2633
+ };
2634
+ 200: {
2635
+ content: {
2636
+ "application/json": {
2637
+ schema: z.ZodObject<{
2638
+ data: import("drizzle-zod").BuildSchema<"select", {
2639
+ id: import("drizzle-orm/pg-core").PgColumn<{
2640
+ name: "id";
2641
+ tableName: "orders";
2642
+ dataType: "string";
2643
+ columnType: "PgUUID";
2644
+ data: string;
2645
+ driverParam: string;
2646
+ notNull: true;
2647
+ hasDefault: true;
2648
+ isPrimaryKey: true;
2649
+ isAutoincrement: false;
2650
+ hasRuntimeDefault: false;
2651
+ enumValues: undefined;
2652
+ baseColumn: never;
2653
+ identity: undefined;
2654
+ generated: undefined;
2655
+ }, {}, {}>;
2656
+ organizationId: import("drizzle-orm/pg-core").PgColumn<{
2657
+ name: "organization_id";
2658
+ tableName: "orders";
2659
+ dataType: "string";
2660
+ columnType: "PgText";
2661
+ data: string;
2662
+ driverParam: string;
2663
+ notNull: true;
2664
+ hasDefault: false;
2665
+ isPrimaryKey: false;
2666
+ isAutoincrement: false;
2667
+ hasRuntimeDefault: false;
2668
+ enumValues: [string, ...string[]];
2669
+ baseColumn: never;
2670
+ identity: undefined;
2671
+ generated: undefined;
2672
+ }, {}, {}>;
2673
+ orderNumber: import("drizzle-orm/pg-core").PgColumn<{
2674
+ name: "order_number";
2675
+ tableName: "orders";
2676
+ dataType: "string";
2677
+ columnType: "PgText";
2678
+ data: string;
2679
+ driverParam: string;
2680
+ notNull: true;
2681
+ hasDefault: false;
2682
+ isPrimaryKey: false;
2683
+ isAutoincrement: false;
2684
+ hasRuntimeDefault: false;
2685
+ enumValues: [string, ...string[]];
2686
+ baseColumn: never;
2687
+ identity: undefined;
2688
+ generated: undefined;
2689
+ }, {}, {}>;
2690
+ customerId: import("drizzle-orm/pg-core").PgColumn<{
2691
+ name: "customer_id";
2692
+ tableName: "orders";
2693
+ dataType: "string";
2694
+ columnType: "PgUUID";
2695
+ data: string;
2696
+ driverParam: string;
2697
+ notNull: false;
2698
+ hasDefault: false;
2699
+ isPrimaryKey: false;
2700
+ isAutoincrement: false;
2701
+ hasRuntimeDefault: false;
2702
+ enumValues: undefined;
2703
+ baseColumn: never;
2704
+ identity: undefined;
2705
+ generated: undefined;
2706
+ }, {}, {}>;
2707
+ status: import("drizzle-orm/pg-core").PgColumn<{
2708
+ name: "status";
2709
+ tableName: "orders";
2710
+ dataType: "string";
2711
+ columnType: "PgText";
2712
+ data: string;
2713
+ driverParam: string;
2714
+ notNull: true;
2715
+ hasDefault: true;
2716
+ isPrimaryKey: false;
2717
+ isAutoincrement: false;
2718
+ hasRuntimeDefault: false;
2719
+ enumValues: [string, ...string[]];
2720
+ baseColumn: never;
2721
+ identity: undefined;
2722
+ generated: undefined;
2723
+ }, {}, {}>;
2724
+ currency: import("drizzle-orm/pg-core").PgColumn<{
2725
+ name: "currency";
2726
+ tableName: "orders";
2727
+ dataType: "string";
2728
+ columnType: "PgText";
2729
+ data: string;
2730
+ driverParam: string;
2731
+ notNull: true;
2732
+ hasDefault: false;
2733
+ isPrimaryKey: false;
2734
+ isAutoincrement: false;
2735
+ hasRuntimeDefault: false;
2736
+ enumValues: [string, ...string[]];
2737
+ baseColumn: never;
2738
+ identity: undefined;
2739
+ generated: undefined;
2740
+ }, {}, {}>;
2741
+ subtotal: import("drizzle-orm/pg-core").PgColumn<{
2742
+ name: "subtotal";
2743
+ tableName: "orders";
2744
+ dataType: "number";
2745
+ columnType: "PgInteger";
2746
+ data: number;
2747
+ driverParam: string | number;
2748
+ notNull: true;
2749
+ hasDefault: false;
2750
+ isPrimaryKey: false;
2751
+ isAutoincrement: false;
2752
+ hasRuntimeDefault: false;
2753
+ enumValues: undefined;
2754
+ baseColumn: never;
2755
+ identity: undefined;
2756
+ generated: undefined;
2757
+ }, {}, {}>;
2758
+ taxTotal: import("drizzle-orm/pg-core").PgColumn<{
2759
+ name: "tax_total";
2760
+ tableName: "orders";
2761
+ dataType: "number";
2762
+ columnType: "PgInteger";
2763
+ data: number;
2764
+ driverParam: string | number;
2765
+ notNull: true;
2766
+ hasDefault: false;
2767
+ isPrimaryKey: false;
2768
+ isAutoincrement: false;
2769
+ hasRuntimeDefault: false;
2770
+ enumValues: undefined;
2771
+ baseColumn: never;
2772
+ identity: undefined;
2773
+ generated: undefined;
2774
+ }, {}, {}>;
2775
+ shippingTotal: import("drizzle-orm/pg-core").PgColumn<{
2776
+ name: "shipping_total";
2777
+ tableName: "orders";
2778
+ dataType: "number";
2779
+ columnType: "PgInteger";
2780
+ data: number;
2781
+ driverParam: string | number;
2782
+ notNull: true;
2783
+ hasDefault: false;
2784
+ isPrimaryKey: false;
2785
+ isAutoincrement: false;
2786
+ hasRuntimeDefault: false;
2787
+ enumValues: undefined;
2788
+ baseColumn: never;
2789
+ identity: undefined;
2790
+ generated: undefined;
2791
+ }, {}, {}>;
2792
+ discountTotal: import("drizzle-orm/pg-core").PgColumn<{
2793
+ name: "discount_total";
2794
+ tableName: "orders";
2795
+ dataType: "number";
2796
+ columnType: "PgInteger";
2797
+ data: number;
2798
+ driverParam: string | number;
2799
+ notNull: true;
2800
+ hasDefault: true;
2801
+ isPrimaryKey: false;
2802
+ isAutoincrement: false;
2803
+ hasRuntimeDefault: false;
2804
+ enumValues: undefined;
2805
+ baseColumn: never;
2806
+ identity: undefined;
2807
+ generated: undefined;
2808
+ }, {}, {}>;
2809
+ grandTotal: import("drizzle-orm/pg-core").PgColumn<{
2810
+ name: "grand_total";
2811
+ tableName: "orders";
2812
+ dataType: "number";
2813
+ columnType: "PgInteger";
2814
+ data: number;
2815
+ driverParam: string | number;
2816
+ notNull: true;
2817
+ hasDefault: false;
2818
+ isPrimaryKey: false;
2819
+ isAutoincrement: false;
2820
+ hasRuntimeDefault: false;
2821
+ enumValues: undefined;
2822
+ baseColumn: never;
2823
+ identity: undefined;
2824
+ generated: undefined;
2825
+ }, {}, {}>;
2826
+ amountCaptured: import("drizzle-orm/pg-core").PgColumn<{
2827
+ name: "amount_captured";
2828
+ tableName: "orders";
2829
+ dataType: "number";
2830
+ columnType: "PgInteger";
2831
+ data: number;
2832
+ driverParam: string | number;
2833
+ notNull: false;
2834
+ hasDefault: false;
2835
+ isPrimaryKey: false;
2836
+ isAutoincrement: false;
2837
+ hasRuntimeDefault: false;
2838
+ enumValues: undefined;
2839
+ baseColumn: never;
2840
+ identity: undefined;
2841
+ generated: undefined;
2842
+ }, {}, {}>;
2843
+ paymentIntentId: import("drizzle-orm/pg-core").PgColumn<{
2844
+ name: "payment_intent_id";
2845
+ tableName: "orders";
2846
+ dataType: "string";
2847
+ columnType: "PgText";
2848
+ data: string;
2849
+ driverParam: string;
2850
+ notNull: false;
2851
+ hasDefault: false;
2852
+ isPrimaryKey: false;
2853
+ isAutoincrement: false;
2854
+ hasRuntimeDefault: false;
2855
+ enumValues: [string, ...string[]];
2856
+ baseColumn: never;
2857
+ identity: undefined;
2858
+ generated: undefined;
2859
+ }, {}, {}>;
2860
+ paymentMethodId: import("drizzle-orm/pg-core").PgColumn<{
2861
+ name: "payment_method_id";
2862
+ tableName: "orders";
2863
+ dataType: "string";
2864
+ columnType: "PgText";
2865
+ data: string;
2866
+ driverParam: string;
2867
+ notNull: false;
2868
+ hasDefault: false;
2869
+ isPrimaryKey: false;
2870
+ isAutoincrement: false;
2871
+ hasRuntimeDefault: false;
2872
+ enumValues: [string, ...string[]];
2873
+ baseColumn: never;
2874
+ identity: undefined;
2875
+ generated: undefined;
2876
+ }, {}, {}>;
2877
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
2878
+ name: "metadata";
2879
+ tableName: "orders";
2880
+ dataType: "json";
2881
+ columnType: "PgJsonb";
2882
+ data: Record<string, unknown>;
2883
+ driverParam: unknown;
2884
+ notNull: false;
2885
+ hasDefault: true;
2886
+ isPrimaryKey: false;
2887
+ isAutoincrement: false;
2888
+ hasRuntimeDefault: false;
2889
+ enumValues: undefined;
2890
+ baseColumn: never;
2891
+ identity: undefined;
2892
+ generated: undefined;
2893
+ }, {}, {
2894
+ $type: Record<string, unknown>;
2895
+ }>;
2896
+ placedAt: import("drizzle-orm/pg-core").PgColumn<{
2897
+ name: "placed_at";
2898
+ tableName: "orders";
2899
+ dataType: "date";
2900
+ columnType: "PgTimestamp";
2901
+ data: Date;
2902
+ driverParam: string;
2903
+ notNull: true;
2904
+ hasDefault: true;
2905
+ isPrimaryKey: false;
2906
+ isAutoincrement: false;
2907
+ hasRuntimeDefault: false;
2908
+ enumValues: undefined;
2909
+ baseColumn: never;
2910
+ identity: undefined;
2911
+ generated: undefined;
2912
+ }, {}, {}>;
2913
+ fulfilledAt: import("drizzle-orm/pg-core").PgColumn<{
2914
+ name: "fulfilled_at";
2915
+ tableName: "orders";
2916
+ dataType: "date";
2917
+ columnType: "PgTimestamp";
2918
+ data: Date;
2919
+ driverParam: string;
2920
+ notNull: false;
2921
+ hasDefault: false;
2922
+ isPrimaryKey: false;
2923
+ isAutoincrement: false;
2924
+ hasRuntimeDefault: false;
2925
+ enumValues: undefined;
2926
+ baseColumn: never;
2927
+ identity: undefined;
2928
+ generated: undefined;
2929
+ }, {}, {}>;
2930
+ cancelledAt: import("drizzle-orm/pg-core").PgColumn<{
2931
+ name: "cancelled_at";
2932
+ tableName: "orders";
2933
+ dataType: "date";
2934
+ columnType: "PgTimestamp";
2935
+ data: Date;
2936
+ driverParam: string;
2937
+ notNull: false;
2938
+ hasDefault: false;
2939
+ isPrimaryKey: false;
2940
+ isAutoincrement: false;
2941
+ hasRuntimeDefault: false;
2942
+ enumValues: undefined;
2943
+ baseColumn: never;
2944
+ identity: undefined;
2945
+ generated: undefined;
2946
+ }, {}, {}>;
2947
+ }, {
2948
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2949
+ }, undefined>;
2950
+ }, z.core.$strip>;
2951
+ };
2952
+ };
2953
+ description: string;
2954
+ };
2955
+ };
2956
+ } & {
2957
+ getRoutingPath(): "/:id/capture";
2958
+ };
1566
2959
  export declare const changeOrderStatusRoute: {
1567
2960
  method: "patch";
1568
2961
  path: "/{id}/status";