@voyantjs/products 0.28.3 → 0.30.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.
- package/dist/booking-engine/handler.d.ts +8 -0
- package/dist/booking-engine/handler.d.ts.map +1 -1
- package/dist/booking-engine/handler.js +38 -0
- package/dist/catalog-policy-departures.d.ts +52 -0
- package/dist/catalog-policy-departures.d.ts.map +1 -0
- package/dist/catalog-policy-departures.js +169 -0
- package/dist/catalog-policy-destinations.d.ts +41 -0
- package/dist/catalog-policy-destinations.d.ts.map +1 -0
- package/dist/catalog-policy-destinations.js +121 -0
- package/dist/catalog-policy-pricing.d.ts +55 -0
- package/dist/catalog-policy-pricing.d.ts.map +1 -0
- package/dist/catalog-policy-pricing.js +109 -0
- package/dist/catalog-policy-promotions.d.ts +52 -0
- package/dist/catalog-policy-promotions.d.ts.map +1 -0
- package/dist/catalog-policy-promotions.js +270 -0
- package/dist/catalog-policy-taxonomy.d.ts +51 -0
- package/dist/catalog-policy-taxonomy.d.ts.map +1 -0
- package/dist/catalog-policy-taxonomy.js +191 -0
- package/dist/events.d.ts +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/routes.d.ts +254 -19
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +73 -5
- package/dist/schema-taxonomy.d.ts +287 -0
- package/dist/schema-taxonomy.d.ts.map +1 -1
- package/dist/schema-taxonomy.js +47 -0
- package/dist/service-catalog-plane-destinations.d.ts +30 -0
- package/dist/service-catalog-plane-destinations.d.ts.map +1 -0
- package/dist/service-catalog-plane-destinations.js +119 -0
- package/dist/service-catalog-plane-taxonomy.d.ts +73 -0
- package/dist/service-catalog-plane-taxonomy.d.ts.map +1 -0
- package/dist/service-catalog-plane-taxonomy.js +242 -0
- package/dist/service-catalog-plane.d.ts +46 -1
- package/dist/service-catalog-plane.d.ts.map +1 -1
- package/dist/service-catalog-plane.js +42 -6
- package/dist/service.d.ts +98 -19
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +142 -1
- package/dist/tasks/brochures.d.ts +1 -1
- package/dist/validation-content.d.ts +38 -0
- package/dist/validation-content.d.ts.map +1 -1
- package/dist/validation-content.js +29 -0
- package/package.json +77 -7
package/dist/routes.d.ts
CHANGED
|
@@ -75,8 +75,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
75
75
|
input: {};
|
|
76
76
|
output: {
|
|
77
77
|
data: {
|
|
78
|
-
id: string;
|
|
79
78
|
name: string;
|
|
79
|
+
id: string;
|
|
80
80
|
createdAt: string;
|
|
81
81
|
updatedAt: string;
|
|
82
82
|
status: "active" | "draft" | "archived";
|
|
@@ -1584,8 +1584,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
1584
1584
|
};
|
|
1585
1585
|
output: {
|
|
1586
1586
|
data: {
|
|
1587
|
-
id: string;
|
|
1588
1587
|
name: string;
|
|
1588
|
+
id: string;
|
|
1589
1589
|
createdAt: string;
|
|
1590
1590
|
updatedAt: string;
|
|
1591
1591
|
description: string | null;
|
|
@@ -1661,6 +1661,241 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
1661
1661
|
status: 200;
|
|
1662
1662
|
};
|
|
1663
1663
|
};
|
|
1664
|
+
} & {
|
|
1665
|
+
"/product-category-translations": {
|
|
1666
|
+
$get: {
|
|
1667
|
+
input: {};
|
|
1668
|
+
output: {
|
|
1669
|
+
data: {
|
|
1670
|
+
id: string;
|
|
1671
|
+
categoryId: string;
|
|
1672
|
+
languageTag: string;
|
|
1673
|
+
name: string;
|
|
1674
|
+
description: string | null;
|
|
1675
|
+
seoTitle: string | null;
|
|
1676
|
+
seoDescription: string | null;
|
|
1677
|
+
createdAt: string;
|
|
1678
|
+
updatedAt: string;
|
|
1679
|
+
}[];
|
|
1680
|
+
total: number;
|
|
1681
|
+
limit: number;
|
|
1682
|
+
offset: number;
|
|
1683
|
+
};
|
|
1684
|
+
outputFormat: "json";
|
|
1685
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1686
|
+
};
|
|
1687
|
+
};
|
|
1688
|
+
} & {
|
|
1689
|
+
"/product-categories/:id/translations": {
|
|
1690
|
+
$post: {
|
|
1691
|
+
input: {
|
|
1692
|
+
param: {
|
|
1693
|
+
id: string;
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
output: {
|
|
1697
|
+
error: string;
|
|
1698
|
+
};
|
|
1699
|
+
outputFormat: "json";
|
|
1700
|
+
status: 404;
|
|
1701
|
+
} | {
|
|
1702
|
+
input: {
|
|
1703
|
+
param: {
|
|
1704
|
+
id: string;
|
|
1705
|
+
};
|
|
1706
|
+
};
|
|
1707
|
+
output: {
|
|
1708
|
+
data: {
|
|
1709
|
+
name: string;
|
|
1710
|
+
id: string;
|
|
1711
|
+
createdAt: string;
|
|
1712
|
+
updatedAt: string;
|
|
1713
|
+
description: string | null;
|
|
1714
|
+
languageTag: string;
|
|
1715
|
+
seoTitle: string | null;
|
|
1716
|
+
seoDescription: string | null;
|
|
1717
|
+
categoryId: string;
|
|
1718
|
+
};
|
|
1719
|
+
};
|
|
1720
|
+
outputFormat: "json";
|
|
1721
|
+
status: 201;
|
|
1722
|
+
};
|
|
1723
|
+
};
|
|
1724
|
+
} & {
|
|
1725
|
+
"/product-category-translations/:id": {
|
|
1726
|
+
$patch: {
|
|
1727
|
+
input: {
|
|
1728
|
+
param: {
|
|
1729
|
+
id: string;
|
|
1730
|
+
};
|
|
1731
|
+
};
|
|
1732
|
+
output: {
|
|
1733
|
+
error: string;
|
|
1734
|
+
};
|
|
1735
|
+
outputFormat: "json";
|
|
1736
|
+
status: 404;
|
|
1737
|
+
} | {
|
|
1738
|
+
input: {
|
|
1739
|
+
param: {
|
|
1740
|
+
id: string;
|
|
1741
|
+
};
|
|
1742
|
+
};
|
|
1743
|
+
output: {
|
|
1744
|
+
data: {
|
|
1745
|
+
id: string;
|
|
1746
|
+
categoryId: string;
|
|
1747
|
+
languageTag: string;
|
|
1748
|
+
name: string;
|
|
1749
|
+
description: string | null;
|
|
1750
|
+
seoTitle: string | null;
|
|
1751
|
+
seoDescription: string | null;
|
|
1752
|
+
createdAt: string;
|
|
1753
|
+
updatedAt: string;
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
outputFormat: "json";
|
|
1757
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1758
|
+
};
|
|
1759
|
+
};
|
|
1760
|
+
} & {
|
|
1761
|
+
"/product-category-translations/:id": {
|
|
1762
|
+
$delete: {
|
|
1763
|
+
input: {
|
|
1764
|
+
param: {
|
|
1765
|
+
id: string;
|
|
1766
|
+
};
|
|
1767
|
+
};
|
|
1768
|
+
output: {
|
|
1769
|
+
error: string;
|
|
1770
|
+
};
|
|
1771
|
+
outputFormat: "json";
|
|
1772
|
+
status: 404;
|
|
1773
|
+
} | {
|
|
1774
|
+
input: {
|
|
1775
|
+
param: {
|
|
1776
|
+
id: string;
|
|
1777
|
+
};
|
|
1778
|
+
};
|
|
1779
|
+
output: {
|
|
1780
|
+
success: true;
|
|
1781
|
+
};
|
|
1782
|
+
outputFormat: "json";
|
|
1783
|
+
status: 200;
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
} & {
|
|
1787
|
+
"/product-tag-translations": {
|
|
1788
|
+
$get: {
|
|
1789
|
+
input: {};
|
|
1790
|
+
output: {
|
|
1791
|
+
data: {
|
|
1792
|
+
id: string;
|
|
1793
|
+
tagId: string;
|
|
1794
|
+
languageTag: string;
|
|
1795
|
+
name: string;
|
|
1796
|
+
createdAt: string;
|
|
1797
|
+
updatedAt: string;
|
|
1798
|
+
}[];
|
|
1799
|
+
total: number;
|
|
1800
|
+
limit: number;
|
|
1801
|
+
offset: number;
|
|
1802
|
+
};
|
|
1803
|
+
outputFormat: "json";
|
|
1804
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1805
|
+
};
|
|
1806
|
+
};
|
|
1807
|
+
} & {
|
|
1808
|
+
"/product-tags/:id/translations": {
|
|
1809
|
+
$post: {
|
|
1810
|
+
input: {
|
|
1811
|
+
param: {
|
|
1812
|
+
id: string;
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
output: {
|
|
1816
|
+
error: string;
|
|
1817
|
+
};
|
|
1818
|
+
outputFormat: "json";
|
|
1819
|
+
status: 404;
|
|
1820
|
+
} | {
|
|
1821
|
+
input: {
|
|
1822
|
+
param: {
|
|
1823
|
+
id: string;
|
|
1824
|
+
};
|
|
1825
|
+
};
|
|
1826
|
+
output: {
|
|
1827
|
+
data: {
|
|
1828
|
+
name: string;
|
|
1829
|
+
id: string;
|
|
1830
|
+
createdAt: string;
|
|
1831
|
+
updatedAt: string;
|
|
1832
|
+
languageTag: string;
|
|
1833
|
+
tagId: string;
|
|
1834
|
+
};
|
|
1835
|
+
};
|
|
1836
|
+
outputFormat: "json";
|
|
1837
|
+
status: 201;
|
|
1838
|
+
};
|
|
1839
|
+
};
|
|
1840
|
+
} & {
|
|
1841
|
+
"/product-tag-translations/:id": {
|
|
1842
|
+
$patch: {
|
|
1843
|
+
input: {
|
|
1844
|
+
param: {
|
|
1845
|
+
id: string;
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
output: {
|
|
1849
|
+
error: string;
|
|
1850
|
+
};
|
|
1851
|
+
outputFormat: "json";
|
|
1852
|
+
status: 404;
|
|
1853
|
+
} | {
|
|
1854
|
+
input: {
|
|
1855
|
+
param: {
|
|
1856
|
+
id: string;
|
|
1857
|
+
};
|
|
1858
|
+
};
|
|
1859
|
+
output: {
|
|
1860
|
+
data: {
|
|
1861
|
+
id: string;
|
|
1862
|
+
tagId: string;
|
|
1863
|
+
languageTag: string;
|
|
1864
|
+
name: string;
|
|
1865
|
+
createdAt: string;
|
|
1866
|
+
updatedAt: string;
|
|
1867
|
+
};
|
|
1868
|
+
};
|
|
1869
|
+
outputFormat: "json";
|
|
1870
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1873
|
+
} & {
|
|
1874
|
+
"/product-tag-translations/:id": {
|
|
1875
|
+
$delete: {
|
|
1876
|
+
input: {
|
|
1877
|
+
param: {
|
|
1878
|
+
id: string;
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
output: {
|
|
1882
|
+
error: string;
|
|
1883
|
+
};
|
|
1884
|
+
outputFormat: "json";
|
|
1885
|
+
status: 404;
|
|
1886
|
+
} | {
|
|
1887
|
+
input: {
|
|
1888
|
+
param: {
|
|
1889
|
+
id: string;
|
|
1890
|
+
};
|
|
1891
|
+
};
|
|
1892
|
+
output: {
|
|
1893
|
+
success: true;
|
|
1894
|
+
};
|
|
1895
|
+
outputFormat: "json";
|
|
1896
|
+
status: 200;
|
|
1897
|
+
};
|
|
1898
|
+
};
|
|
1664
1899
|
} & {
|
|
1665
1900
|
"/destination-links": {
|
|
1666
1901
|
$get: {
|
|
@@ -1833,8 +2068,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
1833
2068
|
};
|
|
1834
2069
|
output: {
|
|
1835
2070
|
data: {
|
|
1836
|
-
id: string;
|
|
1837
2071
|
name: string;
|
|
2072
|
+
id: string;
|
|
1838
2073
|
createdAt: string;
|
|
1839
2074
|
updatedAt: string;
|
|
1840
2075
|
status: "active" | "draft" | "archived";
|
|
@@ -2013,8 +2248,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2013
2248
|
};
|
|
2014
2249
|
output: {
|
|
2015
2250
|
data: {
|
|
2016
|
-
id: string;
|
|
2017
2251
|
name: string;
|
|
2252
|
+
id: string;
|
|
2018
2253
|
createdAt: string;
|
|
2019
2254
|
updatedAt: string;
|
|
2020
2255
|
description: string | null;
|
|
@@ -2191,8 +2426,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2191
2426
|
};
|
|
2192
2427
|
output: {
|
|
2193
2428
|
data: {
|
|
2194
|
-
id: string;
|
|
2195
2429
|
name: string;
|
|
2430
|
+
id: string;
|
|
2196
2431
|
createdAt: string;
|
|
2197
2432
|
updatedAt: string;
|
|
2198
2433
|
slug: string | null;
|
|
@@ -2351,8 +2586,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2351
2586
|
};
|
|
2352
2587
|
output: {
|
|
2353
2588
|
data: {
|
|
2354
|
-
id: string;
|
|
2355
2589
|
name: string;
|
|
2590
|
+
id: string;
|
|
2356
2591
|
createdAt: string;
|
|
2357
2592
|
updatedAt: string;
|
|
2358
2593
|
description: string | null;
|
|
@@ -2505,8 +2740,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2505
2740
|
};
|
|
2506
2741
|
output: {
|
|
2507
2742
|
data: {
|
|
2508
|
-
id: string;
|
|
2509
2743
|
name: string;
|
|
2744
|
+
id: string;
|
|
2510
2745
|
createdAt: string;
|
|
2511
2746
|
updatedAt: string;
|
|
2512
2747
|
description: string | null;
|
|
@@ -2653,8 +2888,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2653
2888
|
metadata: {
|
|
2654
2889
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
2655
2890
|
} | null;
|
|
2656
|
-
id: string;
|
|
2657
2891
|
name: string;
|
|
2892
|
+
id: string;
|
|
2658
2893
|
createdAt: string;
|
|
2659
2894
|
updatedAt: string;
|
|
2660
2895
|
description: string | null;
|
|
@@ -2808,8 +3043,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2808
3043
|
metadata: {
|
|
2809
3044
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
2810
3045
|
} | null;
|
|
2811
|
-
id: string;
|
|
2812
3046
|
name: string;
|
|
3047
|
+
id: string;
|
|
2813
3048
|
createdAt: string;
|
|
2814
3049
|
updatedAt: string;
|
|
2815
3050
|
slug: string;
|
|
@@ -2946,8 +3181,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2946
3181
|
input: {};
|
|
2947
3182
|
output: {
|
|
2948
3183
|
data: {
|
|
2949
|
-
id: string;
|
|
2950
3184
|
name: string;
|
|
3185
|
+
id: string;
|
|
2951
3186
|
createdAt: string;
|
|
2952
3187
|
updatedAt: string;
|
|
2953
3188
|
} | undefined;
|
|
@@ -3177,8 +3412,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3177
3412
|
};
|
|
3178
3413
|
output: {
|
|
3179
3414
|
data: {
|
|
3180
|
-
id: string;
|
|
3181
3415
|
name: string;
|
|
3416
|
+
id: string;
|
|
3182
3417
|
createdAt: string;
|
|
3183
3418
|
updatedAt: string;
|
|
3184
3419
|
url: string;
|
|
@@ -3298,8 +3533,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3298
3533
|
};
|
|
3299
3534
|
output: {
|
|
3300
3535
|
data: {
|
|
3301
|
-
id: string;
|
|
3302
3536
|
name: string;
|
|
3537
|
+
id: string;
|
|
3303
3538
|
createdAt: string;
|
|
3304
3539
|
updatedAt: string;
|
|
3305
3540
|
url: string;
|
|
@@ -3342,8 +3577,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3342
3577
|
};
|
|
3343
3578
|
output: {
|
|
3344
3579
|
data: {
|
|
3345
|
-
id: string;
|
|
3346
3580
|
name: string;
|
|
3581
|
+
id: string;
|
|
3347
3582
|
createdAt: string;
|
|
3348
3583
|
updatedAt: string;
|
|
3349
3584
|
url: string;
|
|
@@ -3438,8 +3673,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3438
3673
|
};
|
|
3439
3674
|
output: {
|
|
3440
3675
|
data: {
|
|
3441
|
-
id: string;
|
|
3442
3676
|
name: string;
|
|
3677
|
+
id: string;
|
|
3443
3678
|
createdAt: string;
|
|
3444
3679
|
updatedAt: string;
|
|
3445
3680
|
url: string;
|
|
@@ -3635,8 +3870,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3635
3870
|
};
|
|
3636
3871
|
output: {
|
|
3637
3872
|
data: {
|
|
3638
|
-
id: string;
|
|
3639
3873
|
name: string;
|
|
3874
|
+
id: string;
|
|
3640
3875
|
createdAt: string;
|
|
3641
3876
|
updatedAt: string;
|
|
3642
3877
|
productId: string;
|
|
@@ -3729,8 +3964,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3729
3964
|
};
|
|
3730
3965
|
output: {
|
|
3731
3966
|
data: {
|
|
3732
|
-
id: string;
|
|
3733
3967
|
name: string;
|
|
3968
|
+
id: string;
|
|
3734
3969
|
createdAt: string;
|
|
3735
3970
|
updatedAt: string;
|
|
3736
3971
|
productId: string;
|
|
@@ -3991,8 +4226,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3991
4226
|
};
|
|
3992
4227
|
output: {
|
|
3993
4228
|
data: {
|
|
3994
|
-
id: string;
|
|
3995
4229
|
name: string;
|
|
4230
|
+
id: string;
|
|
3996
4231
|
createdAt: string;
|
|
3997
4232
|
notes: string | null;
|
|
3998
4233
|
description: string | null;
|
|
@@ -4420,8 +4655,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
4420
4655
|
};
|
|
4421
4656
|
output: {
|
|
4422
4657
|
data: {
|
|
4423
|
-
id: string;
|
|
4424
4658
|
name: string;
|
|
4659
|
+
id: string;
|
|
4425
4660
|
createdAt: string;
|
|
4426
4661
|
updatedAt: string;
|
|
4427
4662
|
url: string;
|
|
@@ -4523,8 +4758,8 @@ export declare const productRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
4523
4758
|
};
|
|
4524
4759
|
output: {
|
|
4525
4760
|
data: {
|
|
4526
|
-
id: string;
|
|
4527
4761
|
name: string;
|
|
4762
|
+
id: string;
|
|
4528
4763
|
createdAt: string;
|
|
4529
4764
|
updatedAt: string;
|
|
4530
4765
|
url: string;
|
package/dist/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAyFjE,KAAK,GAAG,GAAG;IACT,SAAS,EAAE;QACT,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,QAAQ,CAAC,EAAE,OAAO,gBAAgB,EAAE,QAAQ,CAAA;KAC7C,CAAA;CACF,CAAA;AAMD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgtDtB,CAAA;AAEJ,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA"}
|
package/dist/routes.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Hono } from "hono";
|
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { emitProductContentChanged } from "./events.js";
|
|
5
5
|
import { productsService } from "./service.js";
|
|
6
|
-
import { destinationListQuerySchema, destinationTranslationListQuerySchema, duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertDestinationSchema, insertDestinationTranslationSchema, insertItinerarySchema, insertOptionUnitSchema, insertOptionUnitTranslationSchema, insertProductActivationSettingSchema, insertProductCapabilitySchema, insertProductCategorySchema, insertProductDeliveryFormatSchema, insertProductDestinationSchema, insertProductFaqSchema, insertProductFeatureSchema, insertProductLocationSchema, insertProductMediaSchema, insertProductNoteSchema, insertProductOptionSchema, insertProductOptionTranslationSchema, insertProductSchema, insertProductTagSchema, insertProductTicketSettingSchema, insertProductTranslationSchema, insertProductTypeSchema, insertProductVisibilitySettingSchema, insertVersionSchema, optionUnitListQuerySchema, optionUnitTranslationListQuerySchema, productActivationSettingListQuerySchema, productAggregatesQuerySchema, productCapabilityListQuerySchema, productCategoryListQuerySchema, productDeliveryFormatListQuerySchema, productDestinationListQuerySchema, productFaqListQuerySchema, productFeatureListQuerySchema, productListQuerySchema, productLocationListQuerySchema, productMediaListQuerySchema, productOptionListQuerySchema, productOptionTranslationListQuerySchema, productTagListQuerySchema, productTicketSettingListQuerySchema, productTranslationListQuerySchema, productTypeListQuerySchema, productVisibilitySettingListQuerySchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateDestinationSchema, updateDestinationTranslationSchema, updateItinerarySchema, updateOptionUnitSchema, updateOptionUnitTranslationSchema, updateProductActivationSettingSchema, updateProductCapabilitySchema, updateProductCategorySchema, updateProductDeliveryFormatSchema, updateProductFaqSchema, updateProductFeatureSchema, updateProductLocationSchema, updateProductMediaSchema, updateProductOptionSchema, updateProductOptionTranslationSchema, updateProductSchema, updateProductTagSchema, updateProductTicketSettingSchema, updateProductTranslationSchema, updateProductTypeSchema, updateProductVisibilitySettingSchema, upsertProductBrochureSchema, } from "./validation.js";
|
|
6
|
+
import { destinationListQuerySchema, destinationTranslationListQuerySchema, duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertDestinationSchema, insertDestinationTranslationSchema, insertItinerarySchema, insertOptionUnitSchema, insertOptionUnitTranslationSchema, insertProductActivationSettingSchema, insertProductCapabilitySchema, insertProductCategorySchema, insertProductCategoryTranslationSchema, insertProductDeliveryFormatSchema, insertProductDestinationSchema, insertProductFaqSchema, insertProductFeatureSchema, insertProductLocationSchema, insertProductMediaSchema, insertProductNoteSchema, insertProductOptionSchema, insertProductOptionTranslationSchema, insertProductSchema, insertProductTagSchema, insertProductTagTranslationSchema, insertProductTicketSettingSchema, insertProductTranslationSchema, insertProductTypeSchema, insertProductVisibilitySettingSchema, insertVersionSchema, optionUnitListQuerySchema, optionUnitTranslationListQuerySchema, productActivationSettingListQuerySchema, productAggregatesQuerySchema, productCapabilityListQuerySchema, productCategoryListQuerySchema, productCategoryTranslationListQuerySchema, productDeliveryFormatListQuerySchema, productDestinationListQuerySchema, productFaqListQuerySchema, productFeatureListQuerySchema, productListQuerySchema, productLocationListQuerySchema, productMediaListQuerySchema, productOptionListQuerySchema, productOptionTranslationListQuerySchema, productTagListQuerySchema, productTagTranslationListQuerySchema, productTicketSettingListQuerySchema, productTranslationListQuerySchema, productTypeListQuerySchema, productVisibilitySettingListQuerySchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateDestinationSchema, updateDestinationTranslationSchema, updateItinerarySchema, updateOptionUnitSchema, updateOptionUnitTranslationSchema, updateProductActivationSettingSchema, updateProductCapabilitySchema, updateProductCategorySchema, updateProductCategoryTranslationSchema, updateProductDeliveryFormatSchema, updateProductFaqSchema, updateProductFeatureSchema, updateProductLocationSchema, updateProductMediaSchema, updateProductOptionSchema, updateProductOptionTranslationSchema, updateProductSchema, updateProductTagSchema, updateProductTagTranslationSchema, updateProductTicketSettingSchema, updateProductTranslationSchema, updateProductTypeSchema, updateProductVisibilitySettingSchema, upsertProductBrochureSchema, } from "./validation.js";
|
|
7
7
|
// ==========================================================================
|
|
8
8
|
// Products — method-chained routes for Hono RPC type inference
|
|
9
9
|
// ==========================================================================
|
|
@@ -360,6 +360,66 @@ export const productRoutes = new Hono()
|
|
|
360
360
|
return c.json({ error: "Destination translation not found" }, 404);
|
|
361
361
|
}
|
|
362
362
|
return c.json({ success: true }, 200);
|
|
363
|
+
})
|
|
364
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
365
|
+
// Product category translations (locale-aware names + descriptions).
|
|
366
|
+
// Mirrors the destinations translation surface above. The catalog plane's
|
|
367
|
+
// taxonomy projection reads these per-slice locale and falls back to
|
|
368
|
+
// `productCategories.name` when no row exists for a given locale.
|
|
369
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
370
|
+
.get("/product-category-translations", async (c) => {
|
|
371
|
+
const query = parseQuery(c, productCategoryTranslationListQuerySchema);
|
|
372
|
+
return c.json(await productsService.listProductCategoryTranslations(c.get("db"), query));
|
|
373
|
+
})
|
|
374
|
+
.post("/product-categories/:id/translations", async (c) => {
|
|
375
|
+
const row = await productsService.upsertProductCategoryTranslation(c.get("db"), c.req.param("id"), await parseJsonBody(c, insertProductCategoryTranslationSchema));
|
|
376
|
+
if (!row) {
|
|
377
|
+
return c.json({ error: "Product category not found" }, 404);
|
|
378
|
+
}
|
|
379
|
+
return c.json({ data: row }, 201);
|
|
380
|
+
})
|
|
381
|
+
.patch("/product-category-translations/:id", async (c) => {
|
|
382
|
+
const row = await productsService.updateProductCategoryTranslation(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateProductCategoryTranslationSchema));
|
|
383
|
+
if (!row) {
|
|
384
|
+
return c.json({ error: "Product category translation not found" }, 404);
|
|
385
|
+
}
|
|
386
|
+
return c.json({ data: row });
|
|
387
|
+
})
|
|
388
|
+
.delete("/product-category-translations/:id", async (c) => {
|
|
389
|
+
const row = await productsService.deleteProductCategoryTranslation(c.get("db"), c.req.param("id"));
|
|
390
|
+
if (!row) {
|
|
391
|
+
return c.json({ error: "Product category translation not found" }, 404);
|
|
392
|
+
}
|
|
393
|
+
return c.json({ success: true }, 200);
|
|
394
|
+
})
|
|
395
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
396
|
+
// Product tag translations. Slimmer shape — tags are short labels with no
|
|
397
|
+
// description / SEO blurbs (per #502 non-goals).
|
|
398
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
399
|
+
.get("/product-tag-translations", async (c) => {
|
|
400
|
+
const query = parseQuery(c, productTagTranslationListQuerySchema);
|
|
401
|
+
return c.json(await productsService.listProductTagTranslations(c.get("db"), query));
|
|
402
|
+
})
|
|
403
|
+
.post("/product-tags/:id/translations", async (c) => {
|
|
404
|
+
const row = await productsService.upsertProductTagTranslation(c.get("db"), c.req.param("id"), await parseJsonBody(c, insertProductTagTranslationSchema));
|
|
405
|
+
if (!row) {
|
|
406
|
+
return c.json({ error: "Product tag not found" }, 404);
|
|
407
|
+
}
|
|
408
|
+
return c.json({ data: row }, 201);
|
|
409
|
+
})
|
|
410
|
+
.patch("/product-tag-translations/:id", async (c) => {
|
|
411
|
+
const row = await productsService.updateProductTagTranslation(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateProductTagTranslationSchema));
|
|
412
|
+
if (!row) {
|
|
413
|
+
return c.json({ error: "Product tag translation not found" }, 404);
|
|
414
|
+
}
|
|
415
|
+
return c.json({ data: row });
|
|
416
|
+
})
|
|
417
|
+
.delete("/product-tag-translations/:id", async (c) => {
|
|
418
|
+
const row = await productsService.deleteProductTagTranslation(c.get("db"), c.req.param("id"));
|
|
419
|
+
if (!row) {
|
|
420
|
+
return c.json({ error: "Product tag translation not found" }, 404);
|
|
421
|
+
}
|
|
422
|
+
return c.json({ success: true }, 200);
|
|
363
423
|
})
|
|
364
424
|
.get("/destination-links", async (c) => {
|
|
365
425
|
const query = parseQuery(c, productDestinationListQuerySchema);
|
|
@@ -964,21 +1024,25 @@ export const productRoutes = new Hono()
|
|
|
964
1024
|
});
|
|
965
1025
|
})
|
|
966
1026
|
.post("/:id/categories", async (c) => {
|
|
1027
|
+
const productId = c.req.param("id");
|
|
967
1028
|
const { categoryId, sortOrder } = await parseJsonBody(c, z.object({
|
|
968
1029
|
categoryId: z.string(),
|
|
969
1030
|
sortOrder: z.number().optional(),
|
|
970
1031
|
}));
|
|
971
|
-
const row = await productsService.addProductToCategory(c.get("db"),
|
|
1032
|
+
const row = await productsService.addProductToCategory(c.get("db"), productId, categoryId, sortOrder);
|
|
972
1033
|
if (!row) {
|
|
973
1034
|
return c.json({ error: "Already assigned or not found" }, 409);
|
|
974
1035
|
}
|
|
1036
|
+
await emitProductContentChanged(c.get("eventBus"), { id: productId, axis: "category" });
|
|
975
1037
|
return c.json({ success: true }, 201);
|
|
976
1038
|
})
|
|
977
1039
|
.delete("/:id/categories/:categoryId", async (c) => {
|
|
978
|
-
const
|
|
1040
|
+
const productId = c.req.param("id");
|
|
1041
|
+
const row = await productsService.removeProductFromCategory(c.get("db"), productId, c.req.param("categoryId"));
|
|
979
1042
|
if (!row) {
|
|
980
1043
|
return c.json({ error: "Association not found" }, 404);
|
|
981
1044
|
}
|
|
1045
|
+
await emitProductContentChanged(c.get("eventBus"), { id: productId, axis: "category" });
|
|
982
1046
|
return c.json({ success: true }, 200);
|
|
983
1047
|
})
|
|
984
1048
|
// ==========================================================================
|
|
@@ -990,20 +1054,24 @@ export const productRoutes = new Hono()
|
|
|
990
1054
|
});
|
|
991
1055
|
})
|
|
992
1056
|
.post("/:id/tags", async (c) => {
|
|
1057
|
+
const productId = c.req.param("id");
|
|
993
1058
|
const { tagId } = await parseJsonBody(c, z.object({
|
|
994
1059
|
tagId: z.string(),
|
|
995
1060
|
}));
|
|
996
|
-
const row = await productsService.addProductTag(c.get("db"),
|
|
1061
|
+
const row = await productsService.addProductTag(c.get("db"), productId, tagId);
|
|
997
1062
|
if (!row) {
|
|
998
1063
|
return c.json({ error: "Already assigned or not found" }, 409);
|
|
999
1064
|
}
|
|
1065
|
+
await emitProductContentChanged(c.get("eventBus"), { id: productId, axis: "tag" });
|
|
1000
1066
|
return c.json({ success: true }, 201);
|
|
1001
1067
|
})
|
|
1002
1068
|
.delete("/:id/tags/:tagId", async (c) => {
|
|
1003
|
-
const
|
|
1069
|
+
const productId = c.req.param("id");
|
|
1070
|
+
const row = await productsService.removeProductTag(c.get("db"), productId, c.req.param("tagId"));
|
|
1004
1071
|
if (!row) {
|
|
1005
1072
|
return c.json({ error: "Association not found" }, 404);
|
|
1006
1073
|
}
|
|
1074
|
+
await emitProductContentChanged(c.get("eventBus"), { id: productId, axis: "tag" });
|
|
1007
1075
|
return c.json({ success: true }, 200);
|
|
1008
1076
|
})
|
|
1009
1077
|
// ==========================================================================
|