@voyant-travel/cruises-react 0.118.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 (100) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +70 -0
  3. package/dist/client.d.ts +14 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +59 -0
  6. package/dist/components/cruise-catalog-card.d.ts +13 -0
  7. package/dist/components/cruise-catalog-card.d.ts.map +1 -0
  8. package/dist/components/cruise-catalog-card.js +58 -0
  9. package/dist/components/enrichment-program-list.d.ts +13 -0
  10. package/dist/components/enrichment-program-list.d.ts.map +1 -0
  11. package/dist/components/enrichment-program-list.js +45 -0
  12. package/dist/components/external-badge.d.ts +14 -0
  13. package/dist/components/external-badge.d.ts.map +1 -0
  14. package/dist/components/external-badge.js +17 -0
  15. package/dist/components/pricing-grid.d.ts +21 -0
  16. package/dist/components/pricing-grid.d.ts.map +1 -0
  17. package/dist/components/pricing-grid.js +81 -0
  18. package/dist/components/quote-display.d.ts +14 -0
  19. package/dist/components/quote-display.d.ts.map +1 -0
  20. package/dist/components/quote-display.js +61 -0
  21. package/dist/hooks/index.d.ts +15 -0
  22. package/dist/hooks/index.d.ts.map +1 -0
  23. package/dist/hooks/index.js +14 -0
  24. package/dist/hooks/use-cruise-booking.d.ts +205 -0
  25. package/dist/hooks/use-cruise-booking.d.ts.map +1 -0
  26. package/dist/hooks/use-cruise-booking.js +56 -0
  27. package/dist/hooks/use-cruise-mutation.d.ts +144 -0
  28. package/dist/hooks/use-cruise-mutation.d.ts.map +1 -0
  29. package/dist/hooks/use-cruise-mutation.js +58 -0
  30. package/dist/hooks/use-cruise.d.ts +38 -0
  31. package/dist/hooks/use-cruise.d.ts.map +1 -0
  32. package/dist/hooks/use-cruise.js +16 -0
  33. package/dist/hooks/use-cruises.d.ts +61 -0
  34. package/dist/hooks/use-cruises.d.ts.map +1 -0
  35. package/dist/hooks/use-cruises.js +16 -0
  36. package/dist/hooks/use-effective-itinerary.d.ts +27 -0
  37. package/dist/hooks/use-effective-itinerary.d.ts.map +1 -0
  38. package/dist/hooks/use-effective-itinerary.js +16 -0
  39. package/dist/hooks/use-enrichment.d.ts +72 -0
  40. package/dist/hooks/use-enrichment.d.ts.map +1 -0
  41. package/dist/hooks/use-enrichment.js +64 -0
  42. package/dist/hooks/use-external-actions.d.ts +43 -0
  43. package/dist/hooks/use-external-actions.d.ts.map +1 -0
  44. package/dist/hooks/use-external-actions.js +45 -0
  45. package/dist/hooks/use-pricing.d.ts +65 -0
  46. package/dist/hooks/use-pricing.d.ts.map +1 -0
  47. package/dist/hooks/use-pricing.js +28 -0
  48. package/dist/hooks/use-sailing-mutation.d.ts +147 -0
  49. package/dist/hooks/use-sailing-mutation.d.ts.map +1 -0
  50. package/dist/hooks/use-sailing-mutation.js +55 -0
  51. package/dist/hooks/use-sailings.d.ts +49 -0
  52. package/dist/hooks/use-sailings.d.ts.map +1 -0
  53. package/dist/hooks/use-sailings.js +20 -0
  54. package/dist/hooks/use-search-index.d.ts +43 -0
  55. package/dist/hooks/use-search-index.d.ts.map +1 -0
  56. package/dist/hooks/use-search-index.js +51 -0
  57. package/dist/hooks/use-ship-mutation.d.ts +186 -0
  58. package/dist/hooks/use-ship-mutation.d.ts.map +1 -0
  59. package/dist/hooks/use-ship-mutation.js +92 -0
  60. package/dist/hooks/use-ships.d.ts +101 -0
  61. package/dist/hooks/use-ships.d.ts.map +1 -0
  62. package/dist/hooks/use-ships.js +43 -0
  63. package/dist/hooks/use-storefront.d.ts +230 -0
  64. package/dist/hooks/use-storefront.d.ts.map +1 -0
  65. package/dist/hooks/use-storefront.js +62 -0
  66. package/dist/i18n/en.d.ts +3 -0
  67. package/dist/i18n/en.d.ts.map +1 -0
  68. package/dist/i18n/en.js +79 -0
  69. package/dist/i18n/index.d.ts +5 -0
  70. package/dist/i18n/index.d.ts.map +1 -0
  71. package/dist/i18n/index.js +3 -0
  72. package/dist/i18n/messages.d.ts +62 -0
  73. package/dist/i18n/messages.d.ts.map +1 -0
  74. package/dist/i18n/messages.js +1 -0
  75. package/dist/i18n/provider.d.ts +26 -0
  76. package/dist/i18n/provider.d.ts.map +1 -0
  77. package/dist/i18n/provider.js +44 -0
  78. package/dist/i18n/ro.d.ts +3 -0
  79. package/dist/i18n/ro.d.ts.map +1 -0
  80. package/dist/i18n/ro.js +79 -0
  81. package/dist/index.d.ts +7 -0
  82. package/dist/index.d.ts.map +1 -0
  83. package/dist/index.js +6 -0
  84. package/dist/provider.d.ts +2 -0
  85. package/dist/provider.d.ts.map +1 -0
  86. package/dist/provider.js +1 -0
  87. package/dist/query-keys.d.ts +82 -0
  88. package/dist/query-keys.d.ts.map +1 -0
  89. package/dist/query-keys.js +39 -0
  90. package/dist/query-options.d.ts +1272 -0
  91. package/dist/query-options.d.ts.map +1 -0
  92. package/dist/query-options.js +136 -0
  93. package/dist/schemas.d.ts +1061 -0
  94. package/dist/schemas.d.ts.map +1 -0
  95. package/dist/schemas.js +339 -0
  96. package/dist/ui.d.ts +6 -0
  97. package/dist/ui.d.ts.map +1 -0
  98. package/dist/ui.js +5 -0
  99. package/package.json +121 -0
  100. package/src/styles.css +11 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,IAAI,uBAAuB,EAChD,KAAK,uBAAuB,IAAI,yBAAyB,EACzD,mBAAmB,IAAI,qBAAqB,EAC5C,KAAK,wBAAwB,IAAI,0BAA0B,GAC5D,MAAM,sBAAsB,CAAA"}
@@ -0,0 +1 @@
1
+ export { useVoyantReactContext as useVoyantCruisesContext, VoyantReactProvider as VoyantCruisesProvider, } from "@voyant-travel/react";
@@ -0,0 +1,82 @@
1
+ export interface CruisesListFilters {
2
+ cruiseType?: "ocean" | "river" | "expedition" | "coastal" | undefined;
3
+ status?: "draft" | "awaiting_review" | "live" | "archived" | undefined;
4
+ lineSupplierId?: string | undefined;
5
+ region?: string | undefined;
6
+ search?: string | undefined;
7
+ limit?: number | undefined;
8
+ offset?: number | undefined;
9
+ }
10
+ export interface SailingsListFilters {
11
+ cruiseId?: string | undefined;
12
+ shipId?: string | undefined;
13
+ dateFrom?: string | undefined;
14
+ dateTo?: string | undefined;
15
+ salesStatus?: "open" | "on_request" | "wait_list" | "sold_out" | "closed" | undefined;
16
+ direction?: "upstream" | "downstream" | "round_trip" | "one_way" | undefined;
17
+ limit?: number | undefined;
18
+ offset?: number | undefined;
19
+ }
20
+ export interface ShipsListFilters {
21
+ lineSupplierId?: string | undefined;
22
+ shipType?: "ocean" | "river" | "expedition" | "yacht" | "sailing" | "coastal" | undefined;
23
+ isActive?: boolean | undefined;
24
+ search?: string | undefined;
25
+ limit?: number | undefined;
26
+ offset?: number | undefined;
27
+ }
28
+ export interface PricesListFilters {
29
+ sailingId?: string | undefined;
30
+ cabinCategoryId?: string | undefined;
31
+ occupancy?: number | undefined;
32
+ fareCode?: string | undefined;
33
+ availability?: "available" | "limited" | "on_request" | "wait_list" | "sold_out" | undefined;
34
+ priceCatalogId?: string | undefined;
35
+ limit?: number | undefined;
36
+ offset?: number | undefined;
37
+ }
38
+ export interface StorefrontListFilters {
39
+ cruiseType?: "ocean" | "river" | "expedition" | "coastal" | undefined;
40
+ region?: string | undefined;
41
+ theme?: string | undefined;
42
+ dateFrom?: string | undefined;
43
+ dateTo?: string | undefined;
44
+ priceMaxCents?: number | undefined;
45
+ source?: "local" | "external" | undefined;
46
+ search?: string | undefined;
47
+ limit?: number | undefined;
48
+ offset?: number | undefined;
49
+ }
50
+ /**
51
+ * Hierarchical TanStack query keys for the cruises module. Following the
52
+ * convention from relationships-react and products-react: all keys are tuples rooted
53
+ * at ["voyant", "cruises", ...] so a single invalidation can wipe everything
54
+ * cruises-related, and finer-grained invalidations target specific resources.
55
+ */
56
+ export declare const cruisesQueryKeys: {
57
+ readonly all: readonly ["voyant", "cruises"];
58
+ readonly cruises: () => readonly ["voyant", "cruises", "cruises"];
59
+ readonly cruisesList: (filters: CruisesListFilters) => readonly ["voyant", "cruises", "cruises", "list", CruisesListFilters];
60
+ /** Detail by unified key — accepts both `cru_*` TypeIDs and `<provider>:<ref>` external keys. */
61
+ readonly cruise: (key: string, include?: ReadonlyArray<"sailings" | "days">) => readonly ["voyant", "cruises", "cruises", "detail", string, readonly ("sailings" | "days")[]];
62
+ readonly cruiseSailings: (key: string) => readonly ["voyant", "cruises", "cruises", "detail", string, readonly ("sailings" | "days")[], "sailings"];
63
+ readonly sailings: () => readonly ["voyant", "cruises", "sailings"];
64
+ readonly sailingsList: (filters: SailingsListFilters) => readonly ["voyant", "cruises", "sailings", "list", SailingsListFilters];
65
+ readonly sailing: (key: string, include?: ReadonlyArray<"pricing" | "itinerary">) => readonly ["voyant", "cruises", "sailings", "detail", string, readonly ("pricing" | "itinerary")[]];
66
+ readonly sailingItinerary: (key: string) => readonly ["voyant", "cruises", "sailings", "detail", string, readonly ("pricing" | "itinerary")[], "itinerary"];
67
+ readonly ships: () => readonly ["voyant", "cruises", "ships"];
68
+ readonly shipsList: (filters: ShipsListFilters) => readonly ["voyant", "cruises", "ships", "list", ShipsListFilters];
69
+ readonly ship: (key: string) => readonly ["voyant", "cruises", "ships", "detail", string];
70
+ readonly shipDecks: (key: string) => readonly ["voyant", "cruises", "ships", "detail", string, "decks"];
71
+ readonly shipCategories: (key: string) => readonly ["voyant", "cruises", "ships", "detail", string, "categories"];
72
+ readonly categoryCabins: (categoryId: string) => readonly ["voyant", "cruises", "categories", string, "cabins"];
73
+ readonly prices: () => readonly ["voyant", "cruises", "prices"];
74
+ readonly pricesList: (filters: PricesListFilters) => readonly ["voyant", "cruises", "prices", "list", PricesListFilters];
75
+ readonly enrichment: (cruiseKey: string) => readonly ["voyant", "cruises", "cruises", "detail", string, readonly ("sailings" | "days")[], "enrichment"];
76
+ readonly storefront: () => readonly ["voyant", "cruises", "storefront"];
77
+ readonly storefrontList: (filters: StorefrontListFilters) => readonly ["voyant", "cruises", "storefront", "list", StorefrontListFilters];
78
+ readonly storefrontCruise: (slug: string) => readonly ["voyant", "cruises", "storefront", "detail", string];
79
+ readonly storefrontSailing: (key: string) => readonly ["voyant", "cruises", "storefront", "sailings", string];
80
+ readonly storefrontShip: (key: string) => readonly ["voyant", "cruises", "storefront", "ships", string];
81
+ };
82
+ //# sourceMappingURL=query-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,CAAA;IACrE,MAAM,CAAC,EAAE,OAAO,GAAG,iBAAiB,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAA;IACtE,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAA;IACrF,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,CAAA;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CA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3B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;oCAKJ,kBAAkB;IAEzC,iGAAiG;2BACnF,MAAM,YAAY,aAAa,CAAC,UAAU,GAAG,MAAM,CAAC;mCAE5C,MAAM;;qCAIJ,mBAAmB;4BAE5B,MAAM,YAAY,aAAa,CAAC,SAAS,GAAG,WAAW,CAAC;qCAE/C,MAAM;;kCAIT,gBAAgB;yBACzB,MAAM;8BACD,MAAM;mCACD,MAAM;0CAGC,MAAM;;mCAKb,iBAAiB;qCAIf,MAAM;;uCAIJ,qBAAqB;sCAEtB,MAAM;sCACN,MAAM;mCACT,MAAM;CACpB,CAAA"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Hierarchical TanStack query keys for the cruises module. Following the
3
+ * convention from relationships-react and products-react: all keys are tuples rooted
4
+ * at ["voyant", "cruises", ...] so a single invalidation can wipe everything
5
+ * cruises-related, and finer-grained invalidations target specific resources.
6
+ */
7
+ export const cruisesQueryKeys = {
8
+ all: ["voyant", "cruises"],
9
+ // Cruises (root entity)
10
+ cruises: () => [...cruisesQueryKeys.all, "cruises"],
11
+ cruisesList: (filters) => [...cruisesQueryKeys.cruises(), "list", filters],
12
+ /** Detail by unified key — accepts both `cru_*` TypeIDs and `<provider>:<ref>` external keys. */
13
+ cruise: (key, include) => [...cruisesQueryKeys.cruises(), "detail", key, include ?? []],
14
+ cruiseSailings: (key) => [...cruisesQueryKeys.cruise(key), "sailings"],
15
+ // Sailings
16
+ sailings: () => [...cruisesQueryKeys.all, "sailings"],
17
+ sailingsList: (filters) => [...cruisesQueryKeys.sailings(), "list", filters],
18
+ sailing: (key, include) => [...cruisesQueryKeys.sailings(), "detail", key, include ?? []],
19
+ sailingItinerary: (key) => [...cruisesQueryKeys.sailing(key), "itinerary"],
20
+ // Ships
21
+ ships: () => [...cruisesQueryKeys.all, "ships"],
22
+ shipsList: (filters) => [...cruisesQueryKeys.ships(), "list", filters],
23
+ ship: (key) => [...cruisesQueryKeys.ships(), "detail", key],
24
+ shipDecks: (key) => [...cruisesQueryKeys.ship(key), "decks"],
25
+ shipCategories: (key) => [...cruisesQueryKeys.ship(key), "categories"],
26
+ // Cabin categories + cabins
27
+ categoryCabins: (categoryId) => [...cruisesQueryKeys.all, "categories", categoryId, "cabins"],
28
+ // Pricing
29
+ prices: () => [...cruisesQueryKeys.all, "prices"],
30
+ pricesList: (filters) => [...cruisesQueryKeys.prices(), "list", filters],
31
+ // Enrichment programs (per cruise)
32
+ enrichment: (cruiseKey) => [...cruisesQueryKeys.cruise(cruiseKey), "enrichment"],
33
+ // Storefront (public)
34
+ storefront: () => [...cruisesQueryKeys.all, "storefront"],
35
+ storefrontList: (filters) => [...cruisesQueryKeys.storefront(), "list", filters],
36
+ storefrontCruise: (slug) => [...cruisesQueryKeys.storefront(), "detail", slug],
37
+ storefrontSailing: (key) => [...cruisesQueryKeys.storefront(), "sailings", key],
38
+ storefrontShip: (key) => [...cruisesQueryKeys.storefront(), "ships", key],
39
+ };