| @@ -44,8 +44,9 @@ | ||
| 44 | 44 | * Carries the stored object_types AND the live-row predicate |
| 45 | 45 | * name on Digest_Index, so the reader, the proxy stamper and |
| 46 | 46 | * the authoritative-absence answer all read one id-space fact |
| 47 | 47 | * instead of each re-deciding it. |
| 48 | + * - repair — explicit drill_down/self_heal support, with a reason for nulls. | |
| 48 | 49 | * - fingerprint — UNIVERSAL config-change detection membership; every |
| 49 | 50 | * collection carries it (null is invalid), with the barcode |
| 50 | 51 | * flag naming recipe membership. The contract-version lever |
| 51 | 52 | * itself lives in Config_Fingerprint::PAYLOAD_CONTRACT_VERSION, |
| @@ -82,11 +83,23 @@ | ||
| 82 | 83 | 'write' => array( 'route' => '/wc/v3/products' ), |
| 83 | 84 | 'journal' => array( 'object_type' => 'product' ), |
| 84 | 85 | 'digest' => array( |
| 85 | 86 | 'id_space' => 'products', |
| 87 | + 'label' => '', | |
| 86 | 88 | 'object_types' => array( 'product', 'variation' ), |
| 89 | + 'child_type' => 'variation', | |
| 90 | + 'select' => 'row_digest_select_sql', | |
| 91 | + 'id_column' => 'p.ID', | |
| 92 | + 'live_max' => 'product_live_max_id_sql', | |
| 93 | + 'servable' => 'servable_product_ids', | |
| 94 | + 'published_ids' => 'published_product_ids', | |
| 87 | 95 | 'live_rows' => 'live_row_exists_sql', |
| 88 | 96 | ), |
| 97 | + 'repair' => array( | |
| 98 | + 'drill_down' => true, | |
| 99 | + 'self_heal' => true, | |
| 100 | + 'reason' => 'Products support drill-down and automatic repair, including variations in their shared id-space.', | |
| 101 | + ), | |
| 89 | 102 | 'fingerprint' => array( 'barcode' => true ), |
| 90 | 103 | 'backfill' => array( |
| 91 | 104 | 'kind' => 'post', |
| 92 | 105 | 'scan_post_types' => array( 'product', 'product_variation' ), |
| @@ -111,8 +124,13 @@ | ||
| 111 | 124 | // takes the parent from create payloads and the stored object thereafter. |
| 112 | 125 | 'write' => array( 'route' => '/wc/v3/products' ), |
| 113 | 126 | 'journal' => array( 'object_type' => 'variation' ), |
| 114 | 127 | 'digest' => null, // folded into the products id-space (owner row carries it) |
| 128 | + 'repair' => array( | |
| 129 | + 'drill_down' => null, | |
| 130 | + 'self_heal' => null, | |
| 131 | + 'reason' => 'Variations are repaired through the products id-space.', | |
| 132 | + ), | |
| 115 | 133 | 'fingerprint' => array( 'barcode' => true ), |
| 116 | 134 | 'backfill' => array( |
| 117 | 135 | 'kind' => 'post', |
| 118 | 136 | 'scan_post_types' => array( 'product', 'product_variation' ), |
| @@ -135,11 +153,20 @@ | ||
| 135 | 153 | 'write' => array( 'route' => '/wc/v3/orders' ), |
| 136 | 154 | 'journal' => array( 'object_type' => 'order' ), // orders consume the journal via the payload-windowed pull lane, catalogue via the pointer stream |
| 137 | 155 | 'digest' => array( |
| 138 | 156 | 'id_space' => 'orders', |
| 157 | + 'label' => 'order ', | |
| 139 | 158 | 'object_types' => array( 'order' ), |
| 159 | + 'select' => 'order_digest_select_sql', | |
| 160 | + 'id_column' => '{id}', | |
| 161 | + 'live_max' => 'order_live_max_id_sql', | |
| 140 | 162 | 'live_rows' => 'order_live_row_exists_sql', |
| 141 | 163 | ), |
| 164 | + 'repair' => array( | |
| 165 | + 'drill_down' => null, | |
| 166 | + 'self_heal' => null, | |
| 167 | + 'reason' => 'Detection is available; drill-down and automatic repair are not implemented.', | |
| 168 | + ), | |
| 142 | 169 | 'fingerprint' => array( 'barcode' => false ), |
| 143 | 170 | 'backfill' => array( 'kind' => 'order' ), |
| 144 | 171 | ), |
| 145 | 172 | 'customers' => array( |
| @@ -159,11 +186,20 @@ | ||
| 159 | 186 | 'write' => array( 'route' => '/wc/v3/customers' ), |
| 160 | 187 | 'journal' => array( 'object_type' => 'customer' ), |
| 161 | 188 | 'digest' => array( |
| 162 | 189 | 'id_space' => 'customers', |
| 190 | + 'label' => 'customer ', | |
| 163 | 191 | 'object_types' => array( 'customer' ), |
| 192 | + 'select' => 'customer_digest_select_sql', | |
| 193 | + 'id_column' => 'u.ID', | |
| 194 | + 'live_max' => 'customer_live_max_id_sql', | |
| 164 | 195 | 'live_rows' => 'customer_live_row_exists_sql', |
| 165 | 196 | ), |
| 197 | + 'repair' => array( | |
| 198 | + 'drill_down' => null, | |
| 199 | + 'self_heal' => null, | |
| 200 | + 'reason' => 'Detection is available; drill-down and automatic repair are not implemented.', | |
| 201 | + ), | |
| 166 | 202 | 'fingerprint' => array( 'barcode' => false ), |
| 167 | 203 | 'backfill' => array( 'kind' => 'user' ), |
| 168 | 204 | ), |
| 169 | 205 | 'categories' => array( |
| @@ -183,8 +219,13 @@ | ||
| 183 | 219 | ), |
| 184 | 220 | 'write' => array( 'route' => '/wc/v3/products/categories' ), |
| 185 | 221 | 'journal' => array( 'object_type' => 'category' ), |
| 186 | 222 | 'digest' => null, |
| 223 | + 'repair' => array( | |
| 224 | + 'drill_down' => null, | |
| 225 | + 'self_heal' => null, | |
| 226 | + 'reason' => 'No digest id-space is implemented for this collection.', | |
| 227 | + ), | |
| 187 | 228 | 'fingerprint' => array( 'barcode' => false ), |
| 188 | 229 | 'backfill' => array( |
| 189 | 230 | 'kind' => 'term', |
| 190 | 231 | 'taxonomy' => 'product_cat', |
| @@ -207,8 +248,13 @@ | ||
| 207 | 248 | ), |
| 208 | 249 | 'write' => array( 'route' => '/wc/v3/products/brands' ), |
| 209 | 250 | 'journal' => array( 'object_type' => 'brand' ), |
| 210 | 251 | 'digest' => null, |
| 252 | + 'repair' => array( | |
| 253 | + 'drill_down' => null, | |
| 254 | + 'self_heal' => null, | |
| 255 | + 'reason' => 'No digest id-space is implemented for this collection.', | |
| 256 | + ), | |
| 211 | 257 | 'fingerprint' => array( 'barcode' => false ), |
| 212 | 258 | 'backfill' => array( |
| 213 | 259 | 'kind' => 'term', |
| 214 | 260 | 'taxonomy' => 'product_brand', |
| @@ -231,8 +277,13 @@ | ||
| 231 | 277 | ), |
| 232 | 278 | 'write' => null, // read-only: no client push path exists |
| 233 | 279 | 'journal' => array( 'object_type' => 'tag' ), |
| 234 | 280 | 'digest' => null, |
| 281 | + 'repair' => array( | |
| 282 | + 'drill_down' => null, | |
| 283 | + 'self_heal' => null, | |
| 284 | + 'reason' => 'No digest id-space is implemented for this collection.', | |
| 285 | + ), | |
| 235 | 286 | 'fingerprint' => array( 'barcode' => false ), |
| 236 | 287 | 'backfill' => array( |
| 237 | 288 | 'kind' => 'term', |
| 238 | 289 | 'taxonomy' => 'product_tag', |
| @@ -255,8 +306,13 @@ | ||
| 255 | 306 | ), |
| 256 | 307 | 'write' => array( 'route' => '/wc/v3/coupons' ), |
| 257 | 308 | 'journal' => array( 'object_type' => 'coupon' ), |
| 258 | 309 | 'digest' => null, |
| 310 | + 'repair' => array( | |
| 311 | + 'drill_down' => null, | |
| 312 | + 'self_heal' => null, | |
| 313 | + 'reason' => 'No digest id-space is implemented for this collection.', | |
| 314 | + ), | |
| 259 | 315 | 'fingerprint' => array( 'barcode' => false ), |
| 260 | 316 | 'backfill' => array( |
| 261 | 317 | 'kind' => 'post', |
| 262 | 318 | 'scan_post_types' => array( 'shop_coupon' ), |
| @@ -273,8 +329,13 @@ | ||
| 273 | 329 | ), |
| 274 | 330 | 'write' => null, // principled read-only |
| 275 | 331 | 'journal' => array( 'object_type' => 'tax_rate' ), |
| 276 | 332 | 'digest' => null, |
| 333 | + 'repair' => array( | |
| 334 | + 'drill_down' => null, | |
| 335 | + 'self_heal' => null, | |
| 336 | + 'reason' => 'No digest id-space is implemented for this collection.', | |
| 337 | + ), | |
| 277 | 338 | 'fingerprint' => array( 'barcode' => false ), |
| 278 | 339 | 'backfill' => null, // no meta store to stamp |
| 279 | 340 | ), |
| 280 | 341 | ); |