@voyant-travel/inventory 0.1.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 (311) hide show
  1. package/LICENSE +201 -0
  2. package/dist/action-ledger-drift.d.ts +29 -0
  3. package/dist/action-ledger-drift.d.ts.map +1 -0
  4. package/dist/action-ledger-drift.js +338 -0
  5. package/dist/action-ledger.d.ts +104 -0
  6. package/dist/action-ledger.d.ts.map +1 -0
  7. package/dist/action-ledger.js +100 -0
  8. package/dist/authoring/builder.d.ts +37 -0
  9. package/dist/authoring/builder.d.ts.map +1 -0
  10. package/dist/authoring/builder.js +248 -0
  11. package/dist/authoring/clone-content.d.ts +38 -0
  12. package/dist/authoring/clone-content.d.ts.map +1 -0
  13. package/dist/authoring/clone-content.js +367 -0
  14. package/dist/authoring/clone-pricing.d.ts +9 -0
  15. package/dist/authoring/clone-pricing.d.ts.map +1 -0
  16. package/dist/authoring/clone-pricing.js +242 -0
  17. package/dist/authoring/clone.d.ts +45 -0
  18. package/dist/authoring/clone.d.ts.map +1 -0
  19. package/dist/authoring/clone.js +142 -0
  20. package/dist/authoring/errors.d.ts +21 -0
  21. package/dist/authoring/errors.d.ts.map +1 -0
  22. package/dist/authoring/errors.js +13 -0
  23. package/dist/authoring/extension.d.ts +248 -0
  24. package/dist/authoring/extension.d.ts.map +1 -0
  25. package/dist/authoring/extension.js +116 -0
  26. package/dist/authoring/index.d.ts +12 -0
  27. package/dist/authoring/index.d.ts.map +1 -0
  28. package/dist/authoring/index.js +11 -0
  29. package/dist/authoring/schema.d.ts +85 -0
  30. package/dist/authoring/schema.d.ts.map +1 -0
  31. package/dist/authoring/schema.js +16 -0
  32. package/dist/authoring/service.d.ts +28 -0
  33. package/dist/authoring/service.d.ts.map +1 -0
  34. package/dist/authoring/service.js +66 -0
  35. package/dist/authoring/spec.d.ts +524 -0
  36. package/dist/authoring/spec.d.ts.map +1 -0
  37. package/dist/authoring/spec.js +167 -0
  38. package/dist/authoring/validate.d.ts +17 -0
  39. package/dist/authoring/validate.d.ts.map +1 -0
  40. package/dist/authoring/validate.js +83 -0
  41. package/dist/authoring.d.ts +2 -0
  42. package/dist/authoring.d.ts.map +1 -0
  43. package/dist/authoring.js +1 -0
  44. package/dist/booking-engine/handler-support.d.ts +91 -0
  45. package/dist/booking-engine/handler-support.d.ts.map +1 -0
  46. package/dist/booking-engine/handler-support.js +355 -0
  47. package/dist/booking-engine/handler.d.ts +404 -0
  48. package/dist/booking-engine/handler.d.ts.map +1 -0
  49. package/dist/booking-engine/handler.js +398 -0
  50. package/dist/booking-engine/index.d.ts +8 -0
  51. package/dist/booking-engine/index.d.ts.map +1 -0
  52. package/dist/booking-engine/index.js +7 -0
  53. package/dist/booking-engine.d.ts +2 -0
  54. package/dist/booking-engine.d.ts.map +1 -0
  55. package/dist/booking-engine.js +1 -0
  56. package/dist/booking-extension.d.ts +278 -0
  57. package/dist/booking-extension.d.ts.map +1 -0
  58. package/dist/booking-extension.js +161 -0
  59. package/dist/catalog-policy-departures.d.ts +52 -0
  60. package/dist/catalog-policy-departures.d.ts.map +1 -0
  61. package/dist/catalog-policy-departures.js +169 -0
  62. package/dist/catalog-policy-destinations.d.ts +43 -0
  63. package/dist/catalog-policy-destinations.d.ts.map +1 -0
  64. package/dist/catalog-policy-destinations.js +165 -0
  65. package/dist/catalog-policy-pricing.d.ts +55 -0
  66. package/dist/catalog-policy-pricing.d.ts.map +1 -0
  67. package/dist/catalog-policy-pricing.js +109 -0
  68. package/dist/catalog-policy-promotions.d.ts +52 -0
  69. package/dist/catalog-policy-promotions.d.ts.map +1 -0
  70. package/dist/catalog-policy-promotions.js +270 -0
  71. package/dist/catalog-policy-taxonomy.d.ts +51 -0
  72. package/dist/catalog-policy-taxonomy.d.ts.map +1 -0
  73. package/dist/catalog-policy-taxonomy.js +191 -0
  74. package/dist/catalog-policy.d.ts +33 -0
  75. package/dist/catalog-policy.d.ts.map +1 -0
  76. package/dist/catalog-policy.js +733 -0
  77. package/dist/content-shape.d.ts +15 -0
  78. package/dist/content-shape.d.ts.map +1 -0
  79. package/dist/content-shape.js +28 -0
  80. package/dist/draft-shape.d.ts +43 -0
  81. package/dist/draft-shape.d.ts.map +1 -0
  82. package/dist/draft-shape.js +48 -0
  83. package/dist/events.d.ts +37 -0
  84. package/dist/events.d.ts.map +1 -0
  85. package/dist/events.js +32 -0
  86. package/dist/extras/catalog-policy.d.ts +30 -0
  87. package/dist/extras/catalog-policy.d.ts.map +1 -0
  88. package/dist/extras/catalog-policy.js +319 -0
  89. package/dist/extras/content-shape.d.ts +5 -0
  90. package/dist/extras/content-shape.d.ts.map +1 -0
  91. package/dist/extras/content-shape.js +13 -0
  92. package/dist/extras/draft-shape.d.ts +34 -0
  93. package/dist/extras/draft-shape.d.ts.map +1 -0
  94. package/dist/extras/draft-shape.js +69 -0
  95. package/dist/extras/routes.d.ts +380 -0
  96. package/dist/extras/routes.d.ts.map +1 -0
  97. package/dist/extras/routes.js +59 -0
  98. package/dist/extras/schema-sourced-content.d.ts +254 -0
  99. package/dist/extras/schema-sourced-content.d.ts.map +1 -0
  100. package/dist/extras/schema-sourced-content.js +45 -0
  101. package/dist/extras/schema.d.ts +628 -0
  102. package/dist/extras/schema.d.ts.map +1 -0
  103. package/dist/extras/schema.js +87 -0
  104. package/dist/extras/service-catalog-plane.d.ts +77 -0
  105. package/dist/extras/service-catalog-plane.d.ts.map +1 -0
  106. package/dist/extras/service-catalog-plane.js +219 -0
  107. package/dist/extras/service-content-synthesizer.d.ts +41 -0
  108. package/dist/extras/service-content-synthesizer.d.ts.map +1 -0
  109. package/dist/extras/service-content-synthesizer.js +138 -0
  110. package/dist/extras/service-content.d.ts +48 -0
  111. package/dist/extras/service-content.d.ts.map +1 -0
  112. package/dist/extras/service-content.js +253 -0
  113. package/dist/extras/service.d.ts +185 -0
  114. package/dist/extras/service.d.ts.map +1 -0
  115. package/dist/extras/service.js +96 -0
  116. package/dist/extras/validation.d.ts +437 -0
  117. package/dist/extras/validation.d.ts.map +1 -0
  118. package/dist/extras/validation.js +149 -0
  119. package/dist/extras.d.ts +267 -0
  120. package/dist/extras.d.ts.map +1 -0
  121. package/dist/extras.js +19 -0
  122. package/dist/index.d.ts +22 -0
  123. package/dist/index.d.ts.map +1 -0
  124. package/dist/index.js +32 -0
  125. package/dist/interface.d.ts +5869 -0
  126. package/dist/interface.d.ts.map +1 -0
  127. package/dist/interface.js +54 -0
  128. package/dist/public-routes.d.ts +2 -0
  129. package/dist/public-routes.d.ts.map +1 -0
  130. package/dist/public-routes.js +1 -0
  131. package/dist/public-validation.d.ts +2 -0
  132. package/dist/public-validation.d.ts.map +1 -0
  133. package/dist/public-validation.js +1 -0
  134. package/dist/read-model.d.ts +25 -0
  135. package/dist/read-model.d.ts.map +1 -0
  136. package/dist/read-model.js +99 -0
  137. package/dist/route-env.d.ts +22 -0
  138. package/dist/route-env.d.ts.map +1 -0
  139. package/dist/route-env.js +1 -0
  140. package/dist/routes-associations.d.ts +164 -0
  141. package/dist/routes-associations.d.ts.map +1 -0
  142. package/dist/routes-associations.js +100 -0
  143. package/dist/routes-catalog.d.ts +436 -0
  144. package/dist/routes-catalog.d.ts.map +1 -0
  145. package/dist/routes-catalog.js +104 -0
  146. package/dist/routes-configuration.d.ts +773 -0
  147. package/dist/routes-configuration.d.ts.map +1 -0
  148. package/dist/routes-configuration.js +364 -0
  149. package/dist/routes-content.d.ts +74 -0
  150. package/dist/routes-content.d.ts.map +1 -0
  151. package/dist/routes-content.js +117 -0
  152. package/dist/routes-core.d.ts +331 -0
  153. package/dist/routes-core.d.ts.map +1 -0
  154. package/dist/routes-core.js +95 -0
  155. package/dist/routes-itinerary.d.ts +759 -0
  156. package/dist/routes-itinerary.d.ts.map +1 -0
  157. package/dist/routes-itinerary.js +387 -0
  158. package/dist/routes-maintenance.d.ts +32 -0
  159. package/dist/routes-maintenance.d.ts.map +1 -0
  160. package/dist/routes-maintenance.js +14 -0
  161. package/dist/routes-media.d.ts +634 -0
  162. package/dist/routes-media.d.ts.map +1 -0
  163. package/dist/routes-media.js +245 -0
  164. package/dist/routes-merchandising.d.ts +1120 -0
  165. package/dist/routes-merchandising.d.ts.map +1 -0
  166. package/dist/routes-merchandising.js +377 -0
  167. package/dist/routes-options.d.ts +363 -0
  168. package/dist/routes-options.d.ts.map +1 -0
  169. package/dist/routes-options.js +173 -0
  170. package/dist/routes-public.d.ts +776 -0
  171. package/dist/routes-public.d.ts.map +1 -0
  172. package/dist/routes-public.js +119 -0
  173. package/dist/routes-translations.d.ts +489 -0
  174. package/dist/routes-translations.d.ts.map +1 -0
  175. package/dist/routes-translations.js +258 -0
  176. package/dist/routes.d.ts +5097 -0
  177. package/dist/routes.d.ts.map +1 -0
  178. package/dist/routes.js +64 -0
  179. package/dist/schema-core.d.ts +1238 -0
  180. package/dist/schema-core.d.ts.map +1 -0
  181. package/dist/schema-core.js +157 -0
  182. package/dist/schema-itinerary.d.ts +1169 -0
  183. package/dist/schema-itinerary.d.ts.map +1 -0
  184. package/dist/schema-itinerary.js +130 -0
  185. package/dist/schema-relations.d.ts +117 -0
  186. package/dist/schema-relations.d.ts.map +1 -0
  187. package/dist/schema-relations.js +192 -0
  188. package/dist/schema-settings.d.ts +1800 -0
  189. package/dist/schema-settings.d.ts.map +1 -0
  190. package/dist/schema-settings.js +220 -0
  191. package/dist/schema-shared.d.ts +15 -0
  192. package/dist/schema-shared.d.ts.map +1 -0
  193. package/dist/schema-shared.js +91 -0
  194. package/dist/schema-sourced-content.d.ts +262 -0
  195. package/dist/schema-sourced-content.d.ts.map +1 -0
  196. package/dist/schema-sourced-content.js +69 -0
  197. package/dist/schema-taxonomy.d.ts +1363 -0
  198. package/dist/schema-taxonomy.d.ts.map +1 -0
  199. package/dist/schema-taxonomy.js +203 -0
  200. package/dist/schema.d.ts +10 -0
  201. package/dist/schema.d.ts.map +1 -0
  202. package/dist/schema.js +9 -0
  203. package/dist/service-aggregates.d.ts +29 -0
  204. package/dist/service-aggregates.d.ts.map +1 -0
  205. package/dist/service-aggregates.js +56 -0
  206. package/dist/service-catalog-plane-destinations.d.ts +30 -0
  207. package/dist/service-catalog-plane-destinations.d.ts.map +1 -0
  208. package/dist/service-catalog-plane-destinations.js +143 -0
  209. package/dist/service-catalog-plane-taxonomy.d.ts +73 -0
  210. package/dist/service-catalog-plane-taxonomy.d.ts.map +1 -0
  211. package/dist/service-catalog-plane-taxonomy.js +242 -0
  212. package/dist/service-catalog-plane.d.ts +179 -0
  213. package/dist/service-catalog-plane.d.ts.map +1 -0
  214. package/dist/service-catalog-plane.js +431 -0
  215. package/dist/service-catalog.d.ts +251 -0
  216. package/dist/service-catalog.d.ts.map +1 -0
  217. package/dist/service-catalog.js +517 -0
  218. package/dist/service-configuration.d.ts +261 -0
  219. package/dist/service-configuration.d.ts.map +1 -0
  220. package/dist/service-configuration.js +343 -0
  221. package/dist/service-content-owned.d.ts +68 -0
  222. package/dist/service-content-owned.d.ts.map +1 -0
  223. package/dist/service-content-owned.js +329 -0
  224. package/dist/service-content-synthesizer.d.ts +90 -0
  225. package/dist/service-content-synthesizer.d.ts.map +1 -0
  226. package/dist/service-content-synthesizer.js +178 -0
  227. package/dist/service-content.d.ts +106 -0
  228. package/dist/service-content.d.ts.map +1 -0
  229. package/dist/service-content.js +388 -0
  230. package/dist/service-core.d.ts +194 -0
  231. package/dist/service-core.d.ts.map +1 -0
  232. package/dist/service-core.js +213 -0
  233. package/dist/service-delivery-formats.d.ts +58 -0
  234. package/dist/service-delivery-formats.d.ts.map +1 -0
  235. package/dist/service-delivery-formats.js +107 -0
  236. package/dist/service-destinations.d.ts +223 -0
  237. package/dist/service-destinations.d.ts.map +1 -0
  238. package/dist/service-destinations.js +310 -0
  239. package/dist/service-itinerary-history.d.ts +457 -0
  240. package/dist/service-itinerary-history.d.ts.map +1 -0
  241. package/dist/service-itinerary-history.js +135 -0
  242. package/dist/service-itinerary.d.ts +1149 -0
  243. package/dist/service-itinerary.d.ts.map +1 -0
  244. package/dist/service-itinerary.js +419 -0
  245. package/dist/service-media.d.ts +272 -0
  246. package/dist/service-media.d.ts.map +1 -0
  247. package/dist/service-media.js +320 -0
  248. package/dist/service-merchandising.d.ts +184 -0
  249. package/dist/service-merchandising.d.ts.map +1 -0
  250. package/dist/service-merchandising.js +181 -0
  251. package/dist/service-option-translations.d.ts +268 -0
  252. package/dist/service-option-translations.d.ts.map +1 -0
  253. package/dist/service-option-translations.js +300 -0
  254. package/dist/service-options.d.ts +181 -0
  255. package/dist/service-options.d.ts.map +1 -0
  256. package/dist/service-options.js +179 -0
  257. package/dist/service-product-destinations.d.ts +37 -0
  258. package/dist/service-product-destinations.d.ts.map +1 -0
  259. package/dist/service-product-destinations.js +94 -0
  260. package/dist/service-public.d.ts +664 -0
  261. package/dist/service-public.d.ts.map +1 -0
  262. package/dist/service-public.js +374 -0
  263. package/dist/service-taxonomy.d.ts +197 -0
  264. package/dist/service-taxonomy.d.ts.map +1 -0
  265. package/dist/service-taxonomy.js +221 -0
  266. package/dist/service.d.ts +3929 -0
  267. package/dist/service.d.ts.map +1 -0
  268. package/dist/service.js +28 -0
  269. package/dist/tasks/brochure-printers.d.ts +31 -0
  270. package/dist/tasks/brochure-printers.d.ts.map +1 -0
  271. package/dist/tasks/brochure-printers.js +149 -0
  272. package/dist/tasks/brochure-templates.d.ts +36 -0
  273. package/dist/tasks/brochure-templates.d.ts.map +1 -0
  274. package/dist/tasks/brochure-templates.js +110 -0
  275. package/dist/tasks/brochures.d.ts +43 -0
  276. package/dist/tasks/brochures.d.ts.map +1 -0
  277. package/dist/tasks/brochures.js +72 -0
  278. package/dist/tasks/generate-pdf.d.ts +8 -0
  279. package/dist/tasks/generate-pdf.d.ts.map +1 -0
  280. package/dist/tasks/generate-pdf.js +106 -0
  281. package/dist/tasks/index.d.ts +5 -0
  282. package/dist/tasks/index.d.ts.map +1 -0
  283. package/dist/tasks/index.js +4 -0
  284. package/dist/tasks/pdf-text.d.ts +2 -0
  285. package/dist/tasks/pdf-text.d.ts.map +1 -0
  286. package/dist/tasks/pdf-text.js +40 -0
  287. package/dist/tasks.d.ts +2 -0
  288. package/dist/tasks.d.ts.map +1 -0
  289. package/dist/tasks.js +1 -0
  290. package/dist/validation-catalog.d.ts +2 -0
  291. package/dist/validation-catalog.d.ts.map +1 -0
  292. package/dist/validation-catalog.js +3 -0
  293. package/dist/validation-config.d.ts +2 -0
  294. package/dist/validation-config.d.ts.map +1 -0
  295. package/dist/validation-config.js +3 -0
  296. package/dist/validation-content.d.ts +2 -0
  297. package/dist/validation-content.d.ts.map +1 -0
  298. package/dist/validation-content.js +3 -0
  299. package/dist/validation-core.d.ts +2 -0
  300. package/dist/validation-core.d.ts.map +1 -0
  301. package/dist/validation-core.js +3 -0
  302. package/dist/validation-public.d.ts +2 -0
  303. package/dist/validation-public.d.ts.map +1 -0
  304. package/dist/validation-public.js +3 -0
  305. package/dist/validation-shared.d.ts +2 -0
  306. package/dist/validation-shared.d.ts.map +1 -0
  307. package/dist/validation-shared.js +3 -0
  308. package/dist/validation.d.ts +2 -0
  309. package/dist/validation.d.ts.map +1 -0
  310. package/dist/validation.js +3 -0
  311. package/package.json +204 -0
@@ -0,0 +1,733 @@
1
+ // agent-quality: file-size exception -- owner: inventory; existing module stays co-located until a dedicated split preserves behavior and tests.
2
+ /**
3
+ * Catalog plane field policy for Inventory-owned products.
4
+ *
5
+ * Declares every product field's governance under the
6
+ * `@voyant-travel/catalog` 12-attribute contract. Phase B shake-out
7
+ * adoption — see `docs/architecture/catalog-architecture.md` §9.1.
8
+ *
9
+ * Scope of this file:
10
+ * - The root `products` table (from `schema-core.ts`).
11
+ * - Provenance + identity fields the catalog plane needs to track.
12
+ *
13
+ * Out of scope (deferred to follow-up adoption passes):
14
+ * - `productOptions`, `optionUnits`, `productDays`, `productNotes`,
15
+ * `productVersions` — promoted child entities (per composition rule §6.2);
16
+ * each gets its own micro-registry when wired in.
17
+ * - The split of `tags` into `marketing_tags` + `facet_tags` per the
18
+ * human-readable / machine-evaluable rule (§7.1). Today's schema has a
19
+ * single `tags` column; declared here as merchandisable with a TODO.
20
+ */
21
+ import { defineFieldPolicy } from "@voyant-travel/catalog/contract";
22
+ /**
23
+ * Field-policy declarations for `products`. Pass through `defineFieldPolicy`
24
+ * to apply inheritance and produce the runtime registry.
25
+ */
26
+ const PRODUCT_FIELD_POLICY = [
27
+ // ── Source pointer / provenance ─────────────────────────────────────────
28
+ // These are not columns on the `products` table; they live on the parallel
29
+ // catalog Provenance row. Declared here so the indexer / overlay resolver
30
+ // know how to treat them.
31
+ {
32
+ path: "source.kind",
33
+ class: "managed",
34
+ merge: "source-only",
35
+ drift: "critical",
36
+ reindex: "facet-affecting",
37
+ snapshot: "on-book",
38
+ query: "indexed-column",
39
+ localized: false,
40
+ visibility: ["staff"],
41
+ editRole: "none",
42
+ overrideFriction: "none",
43
+ sourceFreshness: "sync",
44
+ },
45
+ {
46
+ path: "source.ref",
47
+ class: "managed",
48
+ merge: "source-only",
49
+ drift: "critical",
50
+ reindex: "none",
51
+ snapshot: "on-book",
52
+ query: "indexed-column",
53
+ localized: false,
54
+ visibility: ["staff"],
55
+ editRole: "none",
56
+ overrideFriction: "none",
57
+ sourceFreshness: "sync",
58
+ },
59
+ {
60
+ path: "seller.operator_id",
61
+ class: "managed",
62
+ merge: "source-only",
63
+ drift: "critical",
64
+ reindex: "none",
65
+ snapshot: "on-book",
66
+ query: "indexed-column",
67
+ localized: false,
68
+ visibility: ["staff"],
69
+ editRole: "none",
70
+ overrideFriction: "none",
71
+ sourceFreshness: "static",
72
+ },
73
+ // ── Identity / lifecycle ────────────────────────────────────────────────
74
+ {
75
+ path: "id",
76
+ class: "managed",
77
+ merge: "source-only",
78
+ drift: "critical",
79
+ reindex: "none",
80
+ snapshot: "on-book",
81
+ query: "first-class-table",
82
+ localized: false,
83
+ visibility: ["staff", "customer", "partner"],
84
+ editRole: "none",
85
+ overrideFriction: "none",
86
+ sourceFreshness: "static",
87
+ },
88
+ {
89
+ path: "createdAt",
90
+ class: "managed",
91
+ merge: "source-only",
92
+ drift: "none",
93
+ reindex: "none",
94
+ snapshot: "on-book",
95
+ query: "indexed-column",
96
+ localized: false,
97
+ visibility: ["staff"],
98
+ editRole: "none",
99
+ overrideFriction: "none",
100
+ sourceFreshness: "static",
101
+ },
102
+ {
103
+ path: "updatedAt",
104
+ class: "managed",
105
+ merge: "source-only",
106
+ drift: "none",
107
+ reindex: "none",
108
+ snapshot: "never",
109
+ query: "indexed-column",
110
+ localized: false,
111
+ visibility: ["staff"],
112
+ editRole: "none",
113
+ overrideFriction: "none",
114
+ sourceFreshness: "sync",
115
+ },
116
+ // ── Merchandisable / marketing ──────────────────────────────────────────
117
+ // Note: `name` maps to "title" in catalog vocabulary. The existing schema
118
+ // column stays `name` for backwards compatibility; the field-policy path
119
+ // uses the schema column name so the indexer can map it directly.
120
+ {
121
+ path: "name",
122
+ class: "merchandisable",
123
+ merge: "replace",
124
+ drift: "medium",
125
+ reindex: "entry-locale",
126
+ snapshot: "on-book",
127
+ query: "indexed-column",
128
+ localized: true,
129
+ visibility: ["staff", "customer", "partner"],
130
+ editRole: "marketing",
131
+ overrideFriction: "none",
132
+ sourceFreshness: "sync",
133
+ },
134
+ {
135
+ path: "description",
136
+ class: "merchandisable",
137
+ merge: "replace",
138
+ drift: "low",
139
+ reindex: "entry-locale",
140
+ snapshot: "on-book",
141
+ query: "blob-only",
142
+ localized: true,
143
+ visibility: ["staff", "customer", "partner"],
144
+ editRole: "marketing",
145
+ overrideFriction: "none",
146
+ sourceFreshness: "sync",
147
+ },
148
+ {
149
+ path: "termsHtml",
150
+ class: "merchandisable",
151
+ merge: "replace",
152
+ drift: "low",
153
+ reindex: "entry-locale",
154
+ snapshot: "on-book",
155
+ query: "blob-only",
156
+ localized: true,
157
+ visibility: ["staff", "customer", "partner"],
158
+ editRole: "marketing",
159
+ overrideFriction: "none",
160
+ sourceFreshness: "sync",
161
+ },
162
+ {
163
+ path: "inclusionsHtml",
164
+ class: "merchandisable",
165
+ merge: "replace",
166
+ drift: "low",
167
+ reindex: "entry-locale",
168
+ snapshot: "on-book",
169
+ query: "blob-only",
170
+ localized: true,
171
+ visibility: ["staff", "customer", "partner"],
172
+ editRole: "marketing",
173
+ overrideFriction: "none",
174
+ sourceFreshness: "sync",
175
+ },
176
+ {
177
+ path: "exclusionsHtml",
178
+ class: "merchandisable",
179
+ merge: "replace",
180
+ drift: "low",
181
+ reindex: "entry-locale",
182
+ snapshot: "on-book",
183
+ query: "blob-only",
184
+ localized: true,
185
+ visibility: ["staff", "customer", "partner"],
186
+ editRole: "marketing",
187
+ overrideFriction: "none",
188
+ sourceFreshness: "sync",
189
+ },
190
+ {
191
+ path: "shortDescription",
192
+ class: "merchandisable",
193
+ merge: "replace",
194
+ drift: "low",
195
+ reindex: "entry-locale",
196
+ snapshot: "on-book",
197
+ query: "indexed-column",
198
+ localized: true,
199
+ visibility: ["staff", "customer", "partner"],
200
+ editRole: "marketing",
201
+ overrideFriction: "none",
202
+ sourceFreshness: "sync",
203
+ },
204
+ {
205
+ path: "slug",
206
+ class: "merchandisable",
207
+ merge: "replace",
208
+ drift: "medium",
209
+ reindex: "entry-locale",
210
+ snapshot: "on-book",
211
+ query: "indexed-column",
212
+ localized: true,
213
+ visibility: ["staff", "customer", "partner"],
214
+ editRole: "marketing",
215
+ overrideFriction: "none",
216
+ sourceFreshness: "sync",
217
+ },
218
+ // TODO(catalog): split into marketing_tags + facet_tags per architecture
219
+ // §7.1 (human-readable + machine-evaluable rule). Today's schema has one
220
+ // `tags` column; declared here as merchandisable + additive-set so
221
+ // marketing can extend the source set without trampling it. Until the
222
+ // split lands, search-facet leakage is possible (marketing edits affect
223
+ // search facets); flag for follow-up.
224
+ {
225
+ path: "tags[]",
226
+ class: "merchandisable",
227
+ merge: "additive-set",
228
+ drift: "low",
229
+ reindex: "entry",
230
+ snapshot: "on-book",
231
+ query: "indexed-column",
232
+ localized: false,
233
+ visibility: ["staff", "customer", "partner"],
234
+ editRole: "marketing",
235
+ overrideFriction: "none",
236
+ sourceFreshness: "sync",
237
+ },
238
+ // ── Structural / facet-affecting ───────────────────────────────────────
239
+ {
240
+ path: "status",
241
+ class: "structural",
242
+ merge: "source-only",
243
+ drift: "high",
244
+ reindex: "facet-affecting",
245
+ snapshot: "on-book",
246
+ query: "indexed-column",
247
+ localized: false,
248
+ visibility: ["staff"],
249
+ editRole: "none",
250
+ overrideFriction: "none",
251
+ sourceFreshness: "sync",
252
+ },
253
+ {
254
+ path: "bookingMode",
255
+ class: "structural",
256
+ merge: "source-only",
257
+ drift: "high",
258
+ reindex: "facet-affecting",
259
+ snapshot: "on-book",
260
+ query: "indexed-column",
261
+ localized: false,
262
+ visibility: ["staff", "customer", "partner"],
263
+ editRole: "none",
264
+ overrideFriction: "none",
265
+ sourceFreshness: "sync",
266
+ },
267
+ // ── Sourced merchandising facets ────────────────────────────────────────
268
+ // Board basis (AI/HB/BB/RO) + star rating are first-class on the Connect
269
+ // SearchDocument (connect-sdk >= 0.3) and mapped by the connect adapter.
270
+ // Owned products leave these null until they carry equivalent columns.
271
+ {
272
+ path: "board",
273
+ class: "structural",
274
+ merge: "source-only",
275
+ drift: "medium",
276
+ reindex: "facet-affecting",
277
+ snapshot: "on-book",
278
+ query: "indexed-column",
279
+ localized: false,
280
+ visibility: ["staff", "customer", "partner"],
281
+ editRole: "none",
282
+ overrideFriction: "none",
283
+ sourceFreshness: "sync",
284
+ },
285
+ {
286
+ path: "stars",
287
+ class: "structural",
288
+ merge: "source-only",
289
+ drift: "medium",
290
+ reindex: "facet-affecting",
291
+ snapshot: "on-book",
292
+ query: "indexed-column",
293
+ localized: false,
294
+ visibility: ["staff", "customer", "partner"],
295
+ editRole: "none",
296
+ overrideFriction: "none",
297
+ sourceFreshness: "sync",
298
+ },
299
+ {
300
+ // Transport inclusion (e.g. "flight" for flight+stay packages). Sourced
301
+ // from the upstream package's flightIncluded flag.
302
+ path: "transport",
303
+ class: "structural",
304
+ merge: "source-only",
305
+ drift: "medium",
306
+ reindex: "facet-affecting",
307
+ snapshot: "on-book",
308
+ query: "indexed-column",
309
+ localized: false,
310
+ visibility: ["staff", "customer", "partner"],
311
+ editRole: "none",
312
+ overrideFriction: "none",
313
+ sourceFreshness: "sync",
314
+ },
315
+ {
316
+ // Raw destination labels/codes from the upstream search doc (sourced rows).
317
+ // Owned products use the resolved regions/countries/cities arrays instead.
318
+ path: "destinations[]",
319
+ class: "structural",
320
+ merge: "source-only",
321
+ drift: "medium",
322
+ reindex: "facet-affecting",
323
+ snapshot: "on-book",
324
+ query: "indexed-column",
325
+ localized: false,
326
+ visibility: ["staff", "customer", "partner"],
327
+ editRole: "none",
328
+ overrideFriction: "none",
329
+ sourceFreshness: "sync",
330
+ },
331
+ {
332
+ path: "countryCodes[]",
333
+ class: "structural",
334
+ merge: "source-only",
335
+ drift: "medium",
336
+ reindex: "facet-affecting",
337
+ snapshot: "on-book",
338
+ query: "indexed-column",
339
+ localized: false,
340
+ visibility: ["staff", "customer", "partner"],
341
+ editRole: "none",
342
+ overrideFriction: "none",
343
+ sourceFreshness: "sync",
344
+ },
345
+ {
346
+ // Supply mechanic — durable, product-agnostic split that drives the
347
+ // search + booking surface: "dynamic" (live-composed, any date, calendar
348
+ // pricing) vs "scheduled" (fixed dated departures with seat allotment).
349
+ // See docs/architecture/catalog-supply-models.md. Distinct from `category`
350
+ // (package/tour/excursion…), which lives on productType/categories.
351
+ path: "supplyModel",
352
+ class: "structural",
353
+ merge: "source-only",
354
+ drift: "low",
355
+ reindex: "facet-affecting",
356
+ snapshot: "on-book",
357
+ query: "indexed-column",
358
+ localized: false,
359
+ visibility: ["staff", "customer", "partner"],
360
+ editRole: "none",
361
+ overrideFriction: "none",
362
+ sourceFreshness: "sync",
363
+ },
364
+ {
365
+ path: "capacityMode",
366
+ class: "structural",
367
+ merge: "source-only",
368
+ drift: "medium",
369
+ reindex: "entry",
370
+ snapshot: "on-book",
371
+ query: "indexed-column",
372
+ localized: false,
373
+ visibility: ["staff"],
374
+ editRole: "none",
375
+ overrideFriction: "none",
376
+ sourceFreshness: "sync",
377
+ },
378
+ {
379
+ // The `visibility` *column* on the products table — distinct from the
380
+ // catalog plane's audience-visibility axis.
381
+ path: "visibility",
382
+ class: "structural",
383
+ merge: "source-only",
384
+ drift: "high",
385
+ reindex: "facet-affecting",
386
+ snapshot: "on-book",
387
+ query: "indexed-column",
388
+ localized: false,
389
+ visibility: ["staff"],
390
+ editRole: "none",
391
+ overrideFriction: "none",
392
+ sourceFreshness: "sync",
393
+ },
394
+ {
395
+ path: "activated",
396
+ class: "structural",
397
+ merge: "source-only",
398
+ drift: "high",
399
+ reindex: "facet-affecting",
400
+ snapshot: "on-book",
401
+ query: "indexed-column",
402
+ localized: false,
403
+ visibility: ["staff"],
404
+ editRole: "none",
405
+ overrideFriction: "none",
406
+ sourceFreshness: "sync",
407
+ },
408
+ {
409
+ path: "productTypeId",
410
+ class: "structural",
411
+ merge: "source-only",
412
+ drift: "medium",
413
+ reindex: "facet-affecting",
414
+ snapshot: "on-book",
415
+ query: "indexed-column",
416
+ localized: false,
417
+ visibility: ["staff", "customer", "partner"],
418
+ editRole: "none",
419
+ overrideFriction: "none",
420
+ sourceFreshness: "sync",
421
+ },
422
+ {
423
+ path: "facilityId",
424
+ class: "structural",
425
+ merge: "source-only",
426
+ drift: "medium",
427
+ reindex: "entry",
428
+ snapshot: "on-book",
429
+ query: "indexed-column",
430
+ localized: false,
431
+ visibility: ["staff"],
432
+ editRole: "none",
433
+ overrideFriction: "none",
434
+ sourceFreshness: "sync",
435
+ },
436
+ {
437
+ path: "supplierId",
438
+ class: "structural",
439
+ merge: "source-only",
440
+ drift: "high",
441
+ reindex: "facet-affecting",
442
+ snapshot: "on-book",
443
+ query: "indexed-column",
444
+ localized: false,
445
+ visibility: ["staff"],
446
+ editRole: "none",
447
+ overrideFriction: "none",
448
+ sourceFreshness: "sync",
449
+ },
450
+ {
451
+ path: "pax",
452
+ class: "structural",
453
+ merge: "source-only",
454
+ drift: "medium",
455
+ reindex: "entry",
456
+ snapshot: "on-book",
457
+ query: "indexed-column",
458
+ localized: false,
459
+ visibility: ["staff", "customer", "partner"],
460
+ editRole: "none",
461
+ overrideFriction: "none",
462
+ sourceFreshness: "sync",
463
+ },
464
+ {
465
+ path: "startDate",
466
+ class: "structural",
467
+ merge: "source-only",
468
+ drift: "medium",
469
+ reindex: "facet-affecting",
470
+ snapshot: "on-book",
471
+ query: "indexed-column",
472
+ localized: false,
473
+ visibility: ["staff", "customer", "partner"],
474
+ editRole: "none",
475
+ overrideFriction: "none",
476
+ sourceFreshness: "sync",
477
+ },
478
+ {
479
+ path: "endDate",
480
+ class: "structural",
481
+ merge: "source-only",
482
+ drift: "medium",
483
+ reindex: "facet-affecting",
484
+ snapshot: "on-book",
485
+ query: "indexed-column",
486
+ localized: false,
487
+ visibility: ["staff", "customer", "partner"],
488
+ editRole: "none",
489
+ overrideFriction: "none",
490
+ sourceFreshness: "sync",
491
+ },
492
+ {
493
+ path: "startDateEpochDays",
494
+ class: "structural",
495
+ merge: "source-only",
496
+ drift: "medium",
497
+ reindex: "facet-affecting",
498
+ snapshot: "on-book",
499
+ query: "indexed-column",
500
+ localized: false,
501
+ visibility: ["staff", "customer", "partner"],
502
+ editRole: "none",
503
+ overrideFriction: "none",
504
+ sourceFreshness: "sync",
505
+ },
506
+ {
507
+ path: "endDateEpochDays",
508
+ class: "structural",
509
+ merge: "source-only",
510
+ drift: "medium",
511
+ reindex: "facet-affecting",
512
+ snapshot: "on-book",
513
+ query: "indexed-column",
514
+ localized: false,
515
+ visibility: ["staff", "customer", "partner"],
516
+ editRole: "none",
517
+ overrideFriction: "none",
518
+ sourceFreshness: "sync",
519
+ },
520
+ {
521
+ path: "availableDeparturesCount",
522
+ class: "merchandisable",
523
+ merge: "source-only",
524
+ // High-drift because the count moves whenever availability_slots are
525
+ // added/removed or close-outs change; reindex-on-entry keeps it warm
526
+ // enough for the operator catalog table without being load-bearing
527
+ // for downstream booking flows.
528
+ drift: "high",
529
+ reindex: "facet-affecting",
530
+ snapshot: "never",
531
+ query: "indexed-column",
532
+ localized: false,
533
+ visibility: ["staff", "customer", "partner"],
534
+ editRole: "none",
535
+ overrideFriction: "none",
536
+ sourceFreshness: "sync",
537
+ },
538
+ {
539
+ path: "durationDays",
540
+ class: "structural",
541
+ merge: "source-only",
542
+ drift: "low",
543
+ reindex: "facet-affecting",
544
+ snapshot: "on-book",
545
+ query: "indexed-column",
546
+ localized: false,
547
+ visibility: ["staff", "customer", "partner"],
548
+ editRole: "none",
549
+ overrideFriction: "none",
550
+ sourceFreshness: "sync",
551
+ },
552
+ {
553
+ path: "primaryMediaUrl",
554
+ class: "merchandisable",
555
+ merge: "source-only",
556
+ drift: "low",
557
+ reindex: "entry",
558
+ snapshot: "on-book",
559
+ query: "indexed-column",
560
+ localized: false,
561
+ visibility: ["staff", "customer", "partner"],
562
+ editRole: "none",
563
+ overrideFriction: "none",
564
+ sourceFreshness: "sync",
565
+ },
566
+ {
567
+ path: "thumbnailUrl",
568
+ class: "merchandisable",
569
+ merge: "source-only",
570
+ drift: "low",
571
+ reindex: "entry",
572
+ snapshot: "on-book",
573
+ query: "indexed-column",
574
+ localized: false,
575
+ visibility: ["staff", "customer", "partner"],
576
+ editRole: "none",
577
+ overrideFriction: "none",
578
+ sourceFreshness: "sync",
579
+ },
580
+ {
581
+ path: "coverMediaUrl",
582
+ class: "merchandisable",
583
+ merge: "source-only",
584
+ drift: "low",
585
+ reindex: "entry",
586
+ snapshot: "on-book",
587
+ query: "indexed-column",
588
+ localized: false,
589
+ visibility: ["staff", "customer", "partner"],
590
+ editRole: "none",
591
+ overrideFriction: "none",
592
+ sourceFreshness: "sync",
593
+ },
594
+ {
595
+ path: "latitude",
596
+ class: "structural",
597
+ merge: "source-only",
598
+ drift: "low",
599
+ reindex: "facet-affecting",
600
+ snapshot: "on-book",
601
+ query: "indexed-column",
602
+ localized: false,
603
+ visibility: ["staff", "customer", "partner"],
604
+ editRole: "none",
605
+ overrideFriction: "none",
606
+ sourceFreshness: "sync",
607
+ },
608
+ {
609
+ path: "longitude",
610
+ class: "structural",
611
+ merge: "source-only",
612
+ drift: "low",
613
+ reindex: "facet-affecting",
614
+ snapshot: "on-book",
615
+ query: "indexed-column",
616
+ localized: false,
617
+ visibility: ["staff", "customer", "partner"],
618
+ editRole: "none",
619
+ overrideFriction: "none",
620
+ sourceFreshness: "sync",
621
+ },
622
+ {
623
+ path: "timezone",
624
+ class: "managed",
625
+ merge: "source-only",
626
+ drift: "low",
627
+ reindex: "none",
628
+ snapshot: "on-book",
629
+ query: "blob-only",
630
+ localized: false,
631
+ visibility: ["staff", "customer", "partner"],
632
+ editRole: "none",
633
+ overrideFriction: "none",
634
+ sourceFreshness: "sync",
635
+ },
636
+ {
637
+ path: "reservationTimeoutMinutes",
638
+ class: "structural",
639
+ merge: "source-only",
640
+ drift: "low",
641
+ reindex: "none",
642
+ snapshot: "never",
643
+ query: "blob-only",
644
+ localized: false,
645
+ visibility: ["staff"],
646
+ editRole: "none",
647
+ overrideFriction: "none",
648
+ sourceFreshness: "sync",
649
+ },
650
+ {
651
+ path: "termsShowOnContract",
652
+ class: "structural",
653
+ merge: "replace",
654
+ drift: "medium",
655
+ reindex: "none",
656
+ snapshot: "on-book",
657
+ query: "blob-only",
658
+ localized: false,
659
+ visibility: ["staff"],
660
+ editRole: "ops",
661
+ overrideFriction: "confirm",
662
+ sourceFreshness: "static",
663
+ },
664
+ // ── Pricing (configured defaults — not the live quote) ──────────────────
665
+ // These are the operator's configured prices on the product. The live
666
+ // quote engine resolves volatile-live `quote_price` separately at quote
667
+ // time and is captured at booking commit (snapshot mode handled by the
668
+ // pricing module's own field policy when it adopts).
669
+ {
670
+ path: "sellAmountCents",
671
+ class: "structural",
672
+ merge: "source-only",
673
+ drift: "high",
674
+ reindex: "entry",
675
+ snapshot: "on-quote-and-book",
676
+ query: "indexed-column",
677
+ localized: false,
678
+ visibility: ["staff", "customer", "partner"],
679
+ editRole: "none",
680
+ overrideFriction: "none",
681
+ sourceFreshness: "sync",
682
+ },
683
+ {
684
+ path: "sellCurrency",
685
+ class: "managed",
686
+ merge: "source-only",
687
+ drift: "high",
688
+ reindex: "entry",
689
+ snapshot: "on-quote-and-book",
690
+ query: "indexed-column",
691
+ localized: false,
692
+ visibility: ["staff", "customer", "partner"],
693
+ editRole: "none",
694
+ overrideFriction: "none",
695
+ sourceFreshness: "sync",
696
+ },
697
+ // ── Internal / staff-only ──────────────────────────────────────────────
698
+ {
699
+ path: "costAmountCents",
700
+ class: "managed",
701
+ merge: "source-only",
702
+ drift: "medium",
703
+ reindex: "none",
704
+ snapshot: "never",
705
+ query: "blob-only",
706
+ localized: false,
707
+ visibility: ["staff"],
708
+ editRole: "none",
709
+ overrideFriction: "none",
710
+ sourceFreshness: "sync",
711
+ },
712
+ {
713
+ path: "marginPercent",
714
+ class: "managed",
715
+ merge: "source-only",
716
+ drift: "medium",
717
+ reindex: "none",
718
+ snapshot: "never",
719
+ query: "blob-only",
720
+ localized: false,
721
+ visibility: ["staff"],
722
+ editRole: "none",
723
+ overrideFriction: "none",
724
+ sourceFreshness: "sync",
725
+ },
726
+ ];
727
+ /**
728
+ * Resolved field-policy registry for products. Verticals adopt the catalog
729
+ * plane by exporting this; templates wire it into the indexer, overlay
730
+ * resolver, and snapshot capture pipeline.
731
+ */
732
+ export const productCatalogPolicy = defineFieldPolicy(PRODUCT_FIELD_POLICY);
733
+ export { PRODUCT_FIELD_POLICY };