@epilot/entity-client 7.2.0 → 7.2.1-rc1

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/openapi.d.ts CHANGED
@@ -516,26 +516,41 @@ declare namespace Components {
516
516
  repeatable?: boolean;
517
517
  has_primary?: boolean;
518
518
  /**
519
- * Controls how updates to this attribute are handled.
520
- * - `direct` (default): update is applied immediately. No changeset created.
521
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
522
- * - `approval`: update creates a changeset, requires explicit human approval.
519
+ * Controls how updates to this attribute are handled. See the `EditMode`
520
+ * schema for the per-mode semantics. Defaults to `direct`.
523
521
  *
524
522
  */
525
523
  edit_mode?: "direct" | "external" | "approval";
526
524
  /**
527
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
525
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
526
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
527
+ * they are ignored for `approval` mode, which resolves via explicit
528
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
529
+ *
528
530
  */
529
531
  edit_mode_config?: {
530
532
  match_strategy?: /**
531
- * Strategy for auto-clearing the changeset when an external update is received.
533
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
534
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
535
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
536
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
532
537
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
533
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
538
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
534
539
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
535
540
  *
536
541
  */
537
542
  MatchStrategy;
538
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
543
+ fuzzy_config?: /**
544
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
545
+ * Not used for `edit_mode: approval`.
546
+ *
547
+ * Type compatibility with attribute shape is enforced at schema save time:
548
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
549
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
550
+ * - relation attributes: `relation_set`
551
+ *
552
+ */
553
+ FuzzyConfig;
539
554
  };
540
555
  type: "address";
541
556
  default_address_fields?: /**
@@ -719,26 +734,41 @@ declare namespace Components {
719
734
  repeatable?: boolean;
720
735
  has_primary?: boolean;
721
736
  /**
722
- * Controls how updates to this attribute are handled.
723
- * - `direct` (default): update is applied immediately. No changeset created.
724
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
725
- * - `approval`: update creates a changeset, requires explicit human approval.
737
+ * Controls how updates to this attribute are handled. See the `EditMode`
738
+ * schema for the per-mode semantics. Defaults to `direct`.
726
739
  *
727
740
  */
728
741
  edit_mode?: "direct" | "external" | "approval";
729
742
  /**
730
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
743
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
744
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
745
+ * they are ignored for `approval` mode, which resolves via explicit
746
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
747
+ *
731
748
  */
732
749
  edit_mode_config?: {
733
750
  match_strategy?: /**
734
- * Strategy for auto-clearing the changeset when an external update is received.
751
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
752
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
753
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
754
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
735
755
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
736
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
756
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
737
757
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
738
758
  *
739
759
  */
740
760
  MatchStrategy;
741
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
761
+ fuzzy_config?: /**
762
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
763
+ * Not used for `edit_mode: approval`.
764
+ *
765
+ * Type compatibility with attribute shape is enforced at schema save time:
766
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
767
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
768
+ * - relation attributes: `relation_set`
769
+ *
770
+ */
771
+ FuzzyConfig;
742
772
  };
743
773
  type: "relation_address";
744
774
  default_address_fields?: /**
@@ -939,26 +969,41 @@ declare namespace Components {
939
969
  repeatable?: boolean;
940
970
  has_primary?: boolean;
941
971
  /**
942
- * Controls how updates to this attribute are handled.
943
- * - `direct` (default): update is applied immediately. No changeset created.
944
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
945
- * - `approval`: update creates a changeset, requires explicit human approval.
972
+ * Controls how updates to this attribute are handled. See the `EditMode`
973
+ * schema for the per-mode semantics. Defaults to `direct`.
946
974
  *
947
975
  */
948
976
  edit_mode?: "direct" | "external" | "approval";
949
977
  /**
950
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
978
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
979
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
980
+ * they are ignored for `approval` mode, which resolves via explicit
981
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
982
+ *
951
983
  */
952
984
  edit_mode_config?: {
953
985
  match_strategy?: /**
954
- * Strategy for auto-clearing the changeset when an external update is received.
986
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
987
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
988
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
989
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
955
990
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
956
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
991
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
957
992
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
958
993
  *
959
994
  */
960
995
  MatchStrategy;
961
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
996
+ fuzzy_config?: /**
997
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
998
+ * Not used for `edit_mode: approval`.
999
+ *
1000
+ * Type compatibility with attribute shape is enforced at schema save time:
1001
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
1002
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
1003
+ * - relation attributes: `relation_set`
1004
+ *
1005
+ */
1006
+ FuzzyConfig;
962
1007
  };
963
1008
  type: "automation";
964
1009
  }
@@ -1174,26 +1219,41 @@ declare namespace Components {
1174
1219
  repeatable?: boolean;
1175
1220
  has_primary?: boolean;
1176
1221
  /**
1177
- * Controls how updates to this attribute are handled.
1178
- * - `direct` (default): update is applied immediately. No changeset created.
1179
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
1180
- * - `approval`: update creates a changeset, requires explicit human approval.
1222
+ * Controls how updates to this attribute are handled. See the `EditMode`
1223
+ * schema for the per-mode semantics. Defaults to `direct`.
1181
1224
  *
1182
1225
  */
1183
1226
  edit_mode?: "direct" | "external" | "approval";
1184
1227
  /**
1185
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
1228
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
1229
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
1230
+ * they are ignored for `approval` mode, which resolves via explicit
1231
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
1232
+ *
1186
1233
  */
1187
1234
  edit_mode_config?: {
1188
1235
  match_strategy?: /**
1189
- * Strategy for auto-clearing the changeset when an external update is received.
1236
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
1237
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
1238
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
1239
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
1190
1240
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
1191
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
1241
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
1192
1242
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
1193
1243
  *
1194
1244
  */
1195
1245
  MatchStrategy;
1196
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
1246
+ fuzzy_config?: /**
1247
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
1248
+ * Not used for `edit_mode: approval`.
1249
+ *
1250
+ * Type compatibility with attribute shape is enforced at schema save time:
1251
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
1252
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
1253
+ * - relation attributes: `relation_set`
1254
+ *
1255
+ */
1256
+ FuzzyConfig;
1197
1257
  };
1198
1258
  }
1199
1259
  /**
@@ -1279,8 +1339,12 @@ declare namespace Components {
1279
1339
  _manifest?: string /* uuid */[] | null;
1280
1340
  /**
1281
1341
  * Pending attribute changesets for attributes configured with external or approval edit mode.
1282
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
1283
- * Use the changeset management endpoints to apply or dismiss changesets.
1342
+ *
1343
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
1344
+ * and is what `:apply` / `:dismiss` operate on.
1345
+ *
1346
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
1347
+ * from request bodies. Use the changeset management endpoints to mutate this field.
1284
1348
  *
1285
1349
  */
1286
1350
  _changesets?: {
@@ -1445,26 +1509,41 @@ declare namespace Components {
1445
1509
  repeatable?: boolean;
1446
1510
  has_primary?: boolean;
1447
1511
  /**
1448
- * Controls how updates to this attribute are handled.
1449
- * - `direct` (default): update is applied immediately. No changeset created.
1450
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
1451
- * - `approval`: update creates a changeset, requires explicit human approval.
1512
+ * Controls how updates to this attribute are handled. See the `EditMode`
1513
+ * schema for the per-mode semantics. Defaults to `direct`.
1452
1514
  *
1453
1515
  */
1454
1516
  edit_mode?: "direct" | "external" | "approval";
1455
1517
  /**
1456
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
1518
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
1519
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
1520
+ * they are ignored for `approval` mode, which resolves via explicit
1521
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
1522
+ *
1457
1523
  */
1458
1524
  edit_mode_config?: {
1459
1525
  match_strategy?: /**
1460
- * Strategy for auto-clearing the changeset when an external update is received.
1526
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
1527
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
1528
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
1529
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
1461
1530
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
1462
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
1531
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
1463
1532
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
1464
1533
  *
1465
1534
  */
1466
1535
  MatchStrategy;
1467
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
1536
+ fuzzy_config?: /**
1537
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
1538
+ * Not used for `edit_mode: approval`.
1539
+ *
1540
+ * Type compatibility with attribute shape is enforced at schema save time:
1541
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
1542
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
1543
+ * - relation attributes: `relation_set`
1544
+ *
1545
+ */
1546
+ FuzzyConfig;
1468
1547
  };
1469
1548
  type: "boolean";
1470
1549
  display_type?: "switch" | "checkbox";
@@ -1487,17 +1566,19 @@ declare namespace Components {
1487
1566
  created_at: string; // date-time
1488
1567
  created_by?: /* Identifies the actor that created the changeset. */ ChangesetCreator;
1489
1568
  /**
1490
- * The edit mode that triggered this changeset
1569
+ * The edit mode that triggered this changeset.
1570
+ * - `external`: auto-cleared by a matching `?direct=true` write (see `match_strategy`).
1571
+ * - `approval`: resolved only via explicit `:apply` / `:dismiss` endpoints; never auto-clears.
1572
+ *
1491
1573
  */
1492
1574
  edit_mode: "external" | "approval";
1493
- match_strategy?: /**
1494
- * Strategy for auto-clearing the changeset when an external update is received.
1495
- * - `exact`: The inbound value must exactly match the proposed value (deep equality).
1496
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
1497
- * - `any`: Any update to the attribute clears the changeset, regardless of value.
1575
+ /**
1576
+ * Match strategy copied from the attribute's `edit_mode_config` at changeset
1577
+ * creation time. Only consulted when `edit_mode` is `external`; ignored for
1578
+ * `approval` (which never auto-clears).
1498
1579
  *
1499
1580
  */
1500
- MatchStrategy;
1581
+ match_strategy?: "exact" | "fuzzy" | "any";
1501
1582
  /**
1502
1583
  * Optional label indicating where the change originated (e.g. end_customer_portal, installer_portal, journey, automation)
1503
1584
  */
@@ -1733,26 +1814,41 @@ declare namespace Components {
1733
1814
  repeatable?: boolean;
1734
1815
  has_primary?: boolean;
1735
1816
  /**
1736
- * Controls how updates to this attribute are handled.
1737
- * - `direct` (default): update is applied immediately. No changeset created.
1738
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
1739
- * - `approval`: update creates a changeset, requires explicit human approval.
1817
+ * Controls how updates to this attribute are handled. See the `EditMode`
1818
+ * schema for the per-mode semantics. Defaults to `direct`.
1740
1819
  *
1741
1820
  */
1742
1821
  edit_mode?: "direct" | "external" | "approval";
1743
1822
  /**
1744
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
1823
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
1824
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
1825
+ * they are ignored for `approval` mode, which resolves via explicit
1826
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
1827
+ *
1745
1828
  */
1746
1829
  edit_mode_config?: {
1747
1830
  match_strategy?: /**
1748
- * Strategy for auto-clearing the changeset when an external update is received.
1831
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
1832
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
1833
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
1834
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
1749
1835
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
1750
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
1836
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
1751
1837
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
1752
1838
  *
1753
1839
  */
1754
1840
  MatchStrategy;
1755
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
1841
+ fuzzy_config?: /**
1842
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
1843
+ * Not used for `edit_mode: approval`.
1844
+ *
1845
+ * Type compatibility with attribute shape is enforced at schema save time:
1846
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
1847
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
1848
+ * - relation attributes: `relation_set`
1849
+ *
1850
+ */
1851
+ FuzzyConfig;
1756
1852
  };
1757
1853
  type: "computed";
1758
1854
  computed?: boolean;
@@ -1919,26 +2015,41 @@ declare namespace Components {
1919
2015
  repeatable?: boolean;
1920
2016
  has_primary?: boolean;
1921
2017
  /**
1922
- * Controls how updates to this attribute are handled.
1923
- * - `direct` (default): update is applied immediately. No changeset created.
1924
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
1925
- * - `approval`: update creates a changeset, requires explicit human approval.
2018
+ * Controls how updates to this attribute are handled. See the `EditMode`
2019
+ * schema for the per-mode semantics. Defaults to `direct`.
1926
2020
  *
1927
2021
  */
1928
2022
  edit_mode?: "direct" | "external" | "approval";
1929
2023
  /**
1930
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
2024
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
2025
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
2026
+ * they are ignored for `approval` mode, which resolves via explicit
2027
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
2028
+ *
1931
2029
  */
1932
2030
  edit_mode_config?: {
1933
2031
  match_strategy?: /**
1934
- * Strategy for auto-clearing the changeset when an external update is received.
2032
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
2033
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
2034
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
2035
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
1935
2036
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
1936
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
2037
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
1937
2038
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
1938
2039
  *
1939
2040
  */
1940
2041
  MatchStrategy;
1941
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
2042
+ fuzzy_config?: /**
2043
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
2044
+ * Not used for `edit_mode: approval`.
2045
+ *
2046
+ * Type compatibility with attribute shape is enforced at schema save time:
2047
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
2048
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
2049
+ * - relation attributes: `relation_set`
2050
+ *
2051
+ */
2052
+ FuzzyConfig;
1942
2053
  };
1943
2054
  type: "consent";
1944
2055
  topic: string;
@@ -2098,26 +2209,41 @@ declare namespace Components {
2098
2209
  repeatable?: boolean;
2099
2210
  has_primary?: boolean;
2100
2211
  /**
2101
- * Controls how updates to this attribute are handled.
2102
- * - `direct` (default): update is applied immediately. No changeset created.
2103
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
2104
- * - `approval`: update creates a changeset, requires explicit human approval.
2212
+ * Controls how updates to this attribute are handled. See the `EditMode`
2213
+ * schema for the per-mode semantics. Defaults to `direct`.
2105
2214
  *
2106
2215
  */
2107
2216
  edit_mode?: "direct" | "external" | "approval";
2108
2217
  /**
2109
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
2218
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
2219
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
2220
+ * they are ignored for `approval` mode, which resolves via explicit
2221
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
2222
+ *
2110
2223
  */
2111
2224
  edit_mode_config?: {
2112
2225
  match_strategy?: /**
2113
- * Strategy for auto-clearing the changeset when an external update is received.
2226
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
2227
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
2228
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
2229
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
2114
2230
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
2115
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
2231
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
2116
2232
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
2117
2233
  *
2118
2234
  */
2119
2235
  MatchStrategy;
2120
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
2236
+ fuzzy_config?: /**
2237
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
2238
+ * Not used for `edit_mode: approval`.
2239
+ *
2240
+ * Type compatibility with attribute shape is enforced at schema save time:
2241
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
2242
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
2243
+ * - relation attributes: `relation_set`
2244
+ *
2245
+ */
2246
+ FuzzyConfig;
2121
2247
  };
2122
2248
  type: "country";
2123
2249
  }
@@ -2275,26 +2401,41 @@ declare namespace Components {
2275
2401
  repeatable?: boolean;
2276
2402
  has_primary?: boolean;
2277
2403
  /**
2278
- * Controls how updates to this attribute are handled.
2279
- * - `direct` (default): update is applied immediately. No changeset created.
2280
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
2281
- * - `approval`: update creates a changeset, requires explicit human approval.
2404
+ * Controls how updates to this attribute are handled. See the `EditMode`
2405
+ * schema for the per-mode semantics. Defaults to `direct`.
2282
2406
  *
2283
2407
  */
2284
2408
  edit_mode?: "direct" | "external" | "approval";
2285
2409
  /**
2286
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
2410
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
2411
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
2412
+ * they are ignored for `approval` mode, which resolves via explicit
2413
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
2414
+ *
2287
2415
  */
2288
2416
  edit_mode_config?: {
2289
2417
  match_strategy?: /**
2290
- * Strategy for auto-clearing the changeset when an external update is received.
2418
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
2419
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
2420
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
2421
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
2291
2422
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
2292
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
2423
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
2293
2424
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
2294
2425
  *
2295
2426
  */
2296
2427
  MatchStrategy;
2297
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
2428
+ fuzzy_config?: /**
2429
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
2430
+ * Not used for `edit_mode: approval`.
2431
+ *
2432
+ * Type compatibility with attribute shape is enforced at schema save time:
2433
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
2434
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
2435
+ * - relation attributes: `relation_set`
2436
+ *
2437
+ */
2438
+ FuzzyConfig;
2298
2439
  };
2299
2440
  type: "currency";
2300
2441
  currency_selector_only?: boolean;
@@ -2462,26 +2603,41 @@ declare namespace Components {
2462
2603
  repeatable?: boolean;
2463
2604
  has_primary?: boolean;
2464
2605
  /**
2465
- * Controls how updates to this attribute are handled.
2466
- * - `direct` (default): update is applied immediately. No changeset created.
2467
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
2468
- * - `approval`: update creates a changeset, requires explicit human approval.
2606
+ * Controls how updates to this attribute are handled. See the `EditMode`
2607
+ * schema for the per-mode semantics. Defaults to `direct`.
2469
2608
  *
2470
2609
  */
2471
2610
  edit_mode?: "direct" | "external" | "approval";
2472
2611
  /**
2473
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
2612
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
2613
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
2614
+ * they are ignored for `approval` mode, which resolves via explicit
2615
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
2616
+ *
2474
2617
  */
2475
2618
  edit_mode_config?: {
2476
2619
  match_strategy?: /**
2477
- * Strategy for auto-clearing the changeset when an external update is received.
2620
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
2621
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
2622
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
2623
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
2478
2624
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
2479
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
2625
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
2480
2626
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
2481
2627
  *
2482
2628
  */
2483
2629
  MatchStrategy;
2484
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
2630
+ fuzzy_config?: /**
2631
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
2632
+ * Not used for `edit_mode: approval`.
2633
+ *
2634
+ * Type compatibility with attribute shape is enforced at schema save time:
2635
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
2636
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
2637
+ * - relation attributes: `relation_set`
2638
+ *
2639
+ */
2640
+ FuzzyConfig;
2485
2641
  };
2486
2642
  type: "date" | "datetime";
2487
2643
  }
@@ -2522,18 +2678,49 @@ declare namespace Components {
2522
2678
  cluster?: string;
2523
2679
  }
2524
2680
  /**
2525
- * Configuration for non-direct edit modes on an entity attribute.
2681
+ * Controls whether a write goes through immediately or is held as a pending entry
2682
+ * on the parent entity's `_changesets` map.
2683
+ *
2684
+ * - `direct`: write applied immediately. No changeset created.
2685
+ * - `external`: write held as a pending changeset; auto-cleared on a matching direct/ERP write.
2686
+ * - `approval`: write held as a pending changeset; requires explicit human apply/dismiss.
2687
+ *
2688
+ * Used at two levels: per-attribute (entity-attribute changesets) and per-capability
2689
+ * (currently the `meter_readings` capability on the Meter schema, gating reading submissions).
2690
+ *
2691
+ */
2692
+ export type EditMode = "direct" | "external" | "approval";
2693
+ /**
2694
+ * Configuration for `edit_mode: external` auto-clear matching.
2695
+ * Fields here (`match_strategy`, `fuzzy_config`) only take effect when
2696
+ * `edit_mode` is `external`. They are ignored for `edit_mode: approval`,
2697
+ * which never auto-clears and is resolved exclusively via the
2698
+ * `:apply` / `:dismiss` changeset endpoints.
2699
+ *
2526
2700
  */
2527
2701
  export interface EditModeConfig {
2528
2702
  match_strategy?: /**
2529
- * Strategy for auto-clearing the changeset when an external update is received.
2703
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
2704
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
2705
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
2706
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
2530
2707
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
2531
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
2708
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
2532
2709
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
2533
2710
  *
2534
2711
  */
2535
2712
  MatchStrategy;
2536
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
2713
+ fuzzy_config?: /**
2714
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
2715
+ * Not used for `edit_mode: approval`.
2716
+ *
2717
+ * Type compatibility with attribute shape is enforced at schema save time:
2718
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
2719
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
2720
+ * - relation attributes: `relation_set`
2721
+ *
2722
+ */
2723
+ FuzzyConfig;
2537
2724
  }
2538
2725
  /**
2539
2726
  * Email address
@@ -2689,26 +2876,41 @@ declare namespace Components {
2689
2876
  repeatable?: boolean;
2690
2877
  has_primary?: boolean;
2691
2878
  /**
2692
- * Controls how updates to this attribute are handled.
2693
- * - `direct` (default): update is applied immediately. No changeset created.
2694
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
2695
- * - `approval`: update creates a changeset, requires explicit human approval.
2879
+ * Controls how updates to this attribute are handled. See the `EditMode`
2880
+ * schema for the per-mode semantics. Defaults to `direct`.
2696
2881
  *
2697
2882
  */
2698
2883
  edit_mode?: "direct" | "external" | "approval";
2699
2884
  /**
2700
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
2885
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
2886
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
2887
+ * they are ignored for `approval` mode, which resolves via explicit
2888
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
2889
+ *
2701
2890
  */
2702
2891
  edit_mode_config?: {
2703
2892
  match_strategy?: /**
2704
- * Strategy for auto-clearing the changeset when an external update is received.
2893
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
2894
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
2895
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
2896
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
2705
2897
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
2706
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
2898
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
2707
2899
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
2708
2900
  *
2709
2901
  */
2710
2902
  MatchStrategy;
2711
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
2903
+ fuzzy_config?: /**
2904
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
2905
+ * Not used for `edit_mode: approval`.
2906
+ *
2907
+ * Type compatibility with attribute shape is enforced at schema save time:
2908
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
2909
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
2910
+ * - relation attributes: `relation_set`
2911
+ *
2912
+ */
2913
+ FuzzyConfig;
2712
2914
  };
2713
2915
  type: "email";
2714
2916
  }
@@ -2795,8 +2997,12 @@ declare namespace Components {
2795
2997
  _manifest?: string /* uuid */[] | null;
2796
2998
  /**
2797
2999
  * Pending attribute changesets for attributes configured with external or approval edit mode.
2798
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
2799
- * Use the changeset management endpoints to apply or dismiss changesets.
3000
+ *
3001
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
3002
+ * and is what `:apply` / `:dismiss` operate on.
3003
+ *
3004
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
3005
+ * from request bodies. Use the changeset management endpoints to mutate this field.
2800
3006
  *
2801
3007
  */
2802
3008
  _changesets?: {
@@ -3299,8 +3505,12 @@ declare namespace Components {
3299
3505
  _manifest?: string /* uuid */[] | null;
3300
3506
  /**
3301
3507
  * Pending attribute changesets for attributes configured with external or approval edit mode.
3302
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
3303
- * Use the changeset management endpoints to apply or dismiss changesets.
3508
+ *
3509
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
3510
+ * and is what `:apply` / `:dismiss` operate on.
3511
+ *
3512
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
3513
+ * from request bodies. Use the changeset management endpoints to mutate this field.
3304
3514
  *
3305
3515
  */
3306
3516
  _changesets?: {
@@ -3590,8 +3800,12 @@ declare namespace Components {
3590
3800
  _manifest?: string /* uuid */[] | null;
3591
3801
  /**
3592
3802
  * Pending attribute changesets for attributes configured with external or approval edit mode.
3593
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
3594
- * Use the changeset management endpoints to apply or dismiss changesets.
3803
+ *
3804
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
3805
+ * and is what `:apply` / `:dismiss` operate on.
3806
+ *
3807
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
3808
+ * from request bodies. Use the changeset management endpoints to mutate this field.
3595
3809
  *
3596
3810
  */
3597
3811
  _changesets?: {
@@ -3683,8 +3897,12 @@ declare namespace Components {
3683
3897
  _manifest?: string /* uuid */[] | null;
3684
3898
  /**
3685
3899
  * Pending attribute changesets for attributes configured with external or approval edit mode.
3686
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
3687
- * Use the changeset management endpoints to apply or dismiss changesets.
3900
+ *
3901
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
3902
+ * and is what `:apply` / `:dismiss` operate on.
3903
+ *
3904
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
3905
+ * from request bodies. Use the changeset management endpoints to mutate this field.
3688
3906
  *
3689
3907
  */
3690
3908
  _changesets?: {
@@ -3775,8 +3993,12 @@ declare namespace Components {
3775
3993
  _manifest?: string /* uuid */[] | null;
3776
3994
  /**
3777
3995
  * Pending attribute changesets for attributes configured with external or approval edit mode.
3778
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
3779
- * Use the changeset management endpoints to apply or dismiss changesets.
3996
+ *
3997
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
3998
+ * and is what `:apply` / `:dismiss` operate on.
3999
+ *
4000
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
4001
+ * from request bodies. Use the changeset management endpoints to mutate this field.
3780
4002
  *
3781
4003
  */
3782
4004
  _changesets?: {
@@ -3867,8 +4089,12 @@ declare namespace Components {
3867
4089
  _manifest?: string /* uuid */[] | null;
3868
4090
  /**
3869
4091
  * Pending attribute changesets for attributes configured with external or approval edit mode.
3870
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
3871
- * Use the changeset management endpoints to apply or dismiss changesets.
4092
+ *
4093
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
4094
+ * and is what `:apply` / `:dismiss` operate on.
4095
+ *
4096
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
4097
+ * from request bodies. Use the changeset management endpoints to mutate this field.
3872
4098
  *
3873
4099
  */
3874
4100
  _changesets?: {
@@ -5208,26 +5434,41 @@ declare namespace Components {
5208
5434
  repeatable?: boolean;
5209
5435
  has_primary?: boolean;
5210
5436
  /**
5211
- * Controls how updates to this attribute are handled.
5212
- * - `direct` (default): update is applied immediately. No changeset created.
5213
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
5214
- * - `approval`: update creates a changeset, requires explicit human approval.
5437
+ * Controls how updates to this attribute are handled. See the `EditMode`
5438
+ * schema for the per-mode semantics. Defaults to `direct`.
5215
5439
  *
5216
5440
  */
5217
5441
  edit_mode?: "direct" | "external" | "approval";
5218
5442
  /**
5219
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
5443
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
5444
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
5445
+ * they are ignored for `approval` mode, which resolves via explicit
5446
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
5447
+ *
5220
5448
  */
5221
5449
  edit_mode_config?: {
5222
5450
  match_strategy?: /**
5223
- * Strategy for auto-clearing the changeset when an external update is received.
5451
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
5452
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
5453
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
5454
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
5224
5455
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
5225
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
5456
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
5226
5457
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
5227
5458
  *
5228
5459
  */
5229
5460
  MatchStrategy;
5230
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
5461
+ fuzzy_config?: /**
5462
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
5463
+ * Not used for `edit_mode: approval`.
5464
+ *
5465
+ * Type compatibility with attribute shape is enforced at schema save time:
5466
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
5467
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
5468
+ * - relation attributes: `relation_set`
5469
+ *
5470
+ */
5471
+ FuzzyConfig;
5231
5472
  };
5232
5473
  type: "image" | "file";
5233
5474
  multiple?: boolean;
@@ -5254,19 +5495,26 @@ declare namespace Components {
5254
5495
  file_size_bytes?: number;
5255
5496
  }
5256
5497
  /**
5257
- * Configuration for fuzzy match strategies on changeset auto-clearing.
5498
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
5499
+ * Not used for `edit_mode: approval`.
5500
+ *
5501
+ * Type compatibility with attribute shape is enforced at schema save time:
5502
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
5503
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
5504
+ * - relation attributes: `relation_set`
5505
+ *
5258
5506
  */
5259
5507
  export interface FuzzyConfig {
5260
5508
  /**
5261
5509
  * Which fuzzy algorithm to apply.
5262
5510
  */
5263
- type: "suffix" | "digits_only" | "normalize_phone" | "ignore_fields" | "contains_entry" | "regex";
5511
+ type: "suffix" | "digits_only" | "normalize_phone" | "ignore_fields" | "set_equivalent" | "entry_match" | "relation_set" | "regex";
5264
5512
  /**
5265
5513
  * For type=suffix: number of characters to compare from end of string.
5266
5514
  */
5267
5515
  suffix_length?: number;
5268
5516
  /**
5269
- * For type=ignore_fields: field names to exclude when comparing array entries.
5517
+ * For type=ignore_fields and type=set_equivalent: field names to exclude when comparing array entries. `_id` is always stripped by the platform regardless of this config.
5270
5518
  */
5271
5519
  fields_to_ignore?: string[];
5272
5520
  /**
@@ -5278,9 +5526,28 @@ declare namespace Components {
5278
5526
  */
5279
5527
  country_code?: string;
5280
5528
  /**
5281
- * For type=normalize_phone and type=contains_entry: attribute key(s) within array entries to compare on.
5529
+ * For type=normalize_phone: attribute key within array entries to compare on (e.g. 'phone_number').
5282
5530
  */
5283
5531
  match_on?: string;
5532
+ /**
5533
+ * For type=entry_match: business key(s) within each entry used to match proposed entries against incoming entries.
5534
+ */
5535
+ key?: /* For type=entry_match: business key(s) within each entry used to match proposed entries against incoming entries. */ string | string[];
5536
+ /**
5537
+ * For type=entry_match and type=set_equivalent: how strict the comparison is.
5538
+ * - `subset` (default for entry_match): every proposed entry must exist in incoming; extra incoming entries are allowed.
5539
+ * - `exact_set` (default for set_equivalent): the two sides must contain the same entries (order-insensitive, multiset semantics).
5540
+ *
5541
+ */
5542
+ mode?: "subset" | "exact_set";
5543
+ /**
5544
+ * For type=relation_set: when true, relation order is significant. Defaults to false (order-insensitive).
5545
+ */
5546
+ ordered?: boolean;
5547
+ /**
5548
+ * For type=relation_set: when true, each relation item's `_tags` must match on both sides (order-insensitive). Defaults to false — `_tags` are stripped before compare.
5549
+ */
5550
+ require_tags_match?: boolean;
5284
5551
  /**
5285
5552
  * For type=regex: regular expression pattern to test the incoming value against.
5286
5553
  */
@@ -5875,8 +6142,12 @@ declare namespace Components {
5875
6142
  _manifest?: string /* uuid */[] | null;
5876
6143
  /**
5877
6144
  * Pending attribute changesets for attributes configured with external or approval edit mode.
5878
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
5879
- * Use the changeset management endpoints to apply or dismiss changesets.
6145
+ *
6146
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
6147
+ * and is what `:apply` / `:dismiss` operate on.
6148
+ *
6149
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
6150
+ * from request bodies. Use the changeset management endpoints to mutate this field.
5880
6151
  *
5881
6152
  */
5882
6153
  _changesets?: {
@@ -6040,26 +6311,41 @@ declare namespace Components {
6040
6311
  repeatable?: boolean;
6041
6312
  has_primary?: boolean;
6042
6313
  /**
6043
- * Controls how updates to this attribute are handled.
6044
- * - `direct` (default): update is applied immediately. No changeset created.
6045
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
6046
- * - `approval`: update creates a changeset, requires explicit human approval.
6314
+ * Controls how updates to this attribute are handled. See the `EditMode`
6315
+ * schema for the per-mode semantics. Defaults to `direct`.
6047
6316
  *
6048
6317
  */
6049
6318
  edit_mode?: "direct" | "external" | "approval";
6050
6319
  /**
6051
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
6320
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
6321
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
6322
+ * they are ignored for `approval` mode, which resolves via explicit
6323
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
6324
+ *
6052
6325
  */
6053
6326
  edit_mode_config?: {
6054
6327
  match_strategy?: /**
6055
- * Strategy for auto-clearing the changeset when an external update is received.
6328
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
6329
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
6330
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
6331
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
6056
6332
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
6057
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
6333
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
6058
6334
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
6059
6335
  *
6060
6336
  */
6061
6337
  MatchStrategy;
6062
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
6338
+ fuzzy_config?: /**
6339
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
6340
+ * Not used for `edit_mode: approval`.
6341
+ *
6342
+ * Type compatibility with attribute shape is enforced at schema save time:
6343
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
6344
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
6345
+ * - relation attributes: `relation_set`
6346
+ *
6347
+ */
6348
+ FuzzyConfig;
6063
6349
  };
6064
6350
  type: "internal";
6065
6351
  }
@@ -6217,26 +6503,41 @@ declare namespace Components {
6217
6503
  repeatable?: boolean;
6218
6504
  has_primary?: boolean;
6219
6505
  /**
6220
- * Controls how updates to this attribute are handled.
6221
- * - `direct` (default): update is applied immediately. No changeset created.
6222
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
6223
- * - `approval`: update creates a changeset, requires explicit human approval.
6506
+ * Controls how updates to this attribute are handled. See the `EditMode`
6507
+ * schema for the per-mode semantics. Defaults to `direct`.
6224
6508
  *
6225
6509
  */
6226
6510
  edit_mode?: "direct" | "external" | "approval";
6227
6511
  /**
6228
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
6512
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
6513
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
6514
+ * they are ignored for `approval` mode, which resolves via explicit
6515
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
6516
+ *
6229
6517
  */
6230
6518
  edit_mode_config?: {
6231
6519
  match_strategy?: /**
6232
- * Strategy for auto-clearing the changeset when an external update is received.
6520
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
6521
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
6522
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
6523
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
6233
6524
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
6234
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
6525
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
6235
6526
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
6236
6527
  *
6237
6528
  */
6238
6529
  MatchStrategy;
6239
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
6530
+ fuzzy_config?: /**
6531
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
6532
+ * Not used for `edit_mode: approval`.
6533
+ *
6534
+ * Type compatibility with attribute shape is enforced at schema save time:
6535
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
6536
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
6537
+ * - relation attributes: `relation_set`
6538
+ *
6539
+ */
6540
+ FuzzyConfig;
6240
6541
  };
6241
6542
  type: "internal_user";
6242
6543
  }
@@ -6394,26 +6695,41 @@ declare namespace Components {
6394
6695
  repeatable?: boolean;
6395
6696
  has_primary?: boolean;
6396
6697
  /**
6397
- * Controls how updates to this attribute are handled.
6398
- * - `direct` (default): update is applied immediately. No changeset created.
6399
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
6400
- * - `approval`: update creates a changeset, requires explicit human approval.
6698
+ * Controls how updates to this attribute are handled. See the `EditMode`
6699
+ * schema for the per-mode semantics. Defaults to `direct`.
6401
6700
  *
6402
6701
  */
6403
6702
  edit_mode?: "direct" | "external" | "approval";
6404
6703
  /**
6405
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
6704
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
6705
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
6706
+ * they are ignored for `approval` mode, which resolves via explicit
6707
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
6708
+ *
6406
6709
  */
6407
6710
  edit_mode_config?: {
6408
6711
  match_strategy?: /**
6409
- * Strategy for auto-clearing the changeset when an external update is received.
6712
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
6713
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
6714
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
6715
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
6410
6716
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
6411
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
6717
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
6412
6718
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
6413
6719
  *
6414
6720
  */
6415
6721
  MatchStrategy;
6416
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
6722
+ fuzzy_config?: /**
6723
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
6724
+ * Not used for `edit_mode: approval`.
6725
+ *
6726
+ * Type compatibility with attribute shape is enforced at schema save time:
6727
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
6728
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
6729
+ * - relation attributes: `relation_set`
6730
+ *
6731
+ */
6732
+ FuzzyConfig;
6417
6733
  };
6418
6734
  type: "invitation_email";
6419
6735
  }
@@ -6579,26 +6895,41 @@ declare namespace Components {
6579
6895
  repeatable?: boolean;
6580
6896
  has_primary?: boolean;
6581
6897
  /**
6582
- * Controls how updates to this attribute are handled.
6583
- * - `direct` (default): update is applied immediately. No changeset created.
6584
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
6585
- * - `approval`: update creates a changeset, requires explicit human approval.
6898
+ * Controls how updates to this attribute are handled. See the `EditMode`
6899
+ * schema for the per-mode semantics. Defaults to `direct`.
6586
6900
  *
6587
6901
  */
6588
6902
  edit_mode?: "direct" | "external" | "approval";
6589
6903
  /**
6590
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
6904
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
6905
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
6906
+ * they are ignored for `approval` mode, which resolves via explicit
6907
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
6908
+ *
6591
6909
  */
6592
6910
  edit_mode_config?: {
6593
6911
  match_strategy?: /**
6594
- * Strategy for auto-clearing the changeset when an external update is received.
6912
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
6913
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
6914
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
6915
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
6595
6916
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
6596
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
6917
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
6597
6918
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
6598
6919
  *
6599
6920
  */
6600
6921
  MatchStrategy;
6601
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
6922
+ fuzzy_config?: /**
6923
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
6924
+ * Not used for `edit_mode: approval`.
6925
+ *
6926
+ * Type compatibility with attribute shape is enforced at schema save time:
6927
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
6928
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
6929
+ * - relation attributes: `relation_set`
6930
+ *
6931
+ */
6932
+ FuzzyConfig;
6602
6933
  };
6603
6934
  type: "link";
6604
6935
  }
@@ -6611,9 +6942,12 @@ declare namespace Components {
6611
6942
  results?: /* A saved entity view */ SavedViewItem[];
6612
6943
  }
6613
6944
  /**
6614
- * Strategy for auto-clearing the changeset when an external update is received.
6945
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
6946
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
6947
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
6948
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
6615
6949
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
6616
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
6950
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
6617
6951
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
6618
6952
  *
6619
6953
  */
@@ -6772,32 +7106,131 @@ declare namespace Components {
6772
7106
  repeatable?: boolean;
6773
7107
  has_primary?: boolean;
6774
7108
  /**
6775
- * Controls how updates to this attribute are handled.
6776
- * - `direct` (default): update is applied immediately. No changeset created.
6777
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
6778
- * - `approval`: update creates a changeset, requires explicit human approval.
7109
+ * Controls how updates to this attribute are handled. See the `EditMode`
7110
+ * schema for the per-mode semantics. Defaults to `direct`.
6779
7111
  *
6780
7112
  */
6781
7113
  edit_mode?: "direct" | "external" | "approval";
6782
7114
  /**
6783
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
7115
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
7116
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
7117
+ * they are ignored for `approval` mode, which resolves via explicit
7118
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
7119
+ *
6784
7120
  */
6785
7121
  edit_mode_config?: {
6786
7122
  match_strategy?: /**
6787
- * Strategy for auto-clearing the changeset when an external update is received.
7123
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
7124
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
7125
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
7126
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
6788
7127
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
6789
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
7128
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
6790
7129
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
6791
7130
  *
6792
7131
  */
6793
7132
  MatchStrategy;
6794
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
7133
+ fuzzy_config?: /**
7134
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
7135
+ * Not used for `edit_mode: approval`.
7136
+ *
7137
+ * Type compatibility with attribute shape is enforced at schema save time:
7138
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
7139
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
7140
+ * - relation attributes: `relation_set`
7141
+ *
7142
+ */
7143
+ FuzzyConfig;
6795
7144
  };
6796
7145
  type: "message_email_address";
6797
7146
  address?: string;
6798
7147
  send_status?: string;
6799
7148
  email_type?: string;
6800
7149
  }
7150
+ /**
7151
+ * A meter readings changeset entry — service-managed by metering-api.
7152
+ * Stored on `Meter._meter_readings_changeset` array attribute. Each entry mirrors a
7153
+ * ClickHouse meter reading row plus a changeset metadata overlay.
7154
+ *
7155
+ * Note: `org_id` is NOT stored on the entry. The entries live on the Meter entity,
7156
+ * which is already org-scoped (`_org`). Round-tripping it would only invite drift;
7157
+ * downstream consumers receive the org from the meter / handler context.
7158
+ *
7159
+ */
7160
+ export interface MeterReadingChangesetEntry {
7161
+ value: number;
7162
+ direction?: "feed-in" | "feed-out";
7163
+ timestamp?: string; // date-time
7164
+ meter_id: string; // uuid
7165
+ counter_id: string; // uuid
7166
+ source?: string;
7167
+ reason?: string;
7168
+ read_by?: string;
7169
+ status?: "valid" | "in-validation" | "implausible";
7170
+ external_id?: string;
7171
+ remark?: string;
7172
+ metadata?: {
7173
+ [name: string]: string;
7174
+ };
7175
+ /**
7176
+ * Unique changeset identifier (UUID v4).
7177
+ */
7178
+ changeset_id: string;
7179
+ edit_mode: "external" | "approval";
7180
+ match_strategy?: "exact" | "fuzzy";
7181
+ /**
7182
+ * Slack on `reading.timestamp` when metering-api auto-clear matches an
7183
+ * incoming reading against this pending changeset.
7184
+ *
7185
+ * Variants:
7186
+ * - `'exact'`: strict millisecond equality.
7187
+ * - `{ type: 'same-day', timezone? }`: strip the time component and
7188
+ * compare year-month-day. Optional `timezone` is an IANA name
7189
+ * (e.g. `'Europe/Berlin'`); the day is bucketed in that zone.
7190
+ * Defaults to UTC when omitted.
7191
+ * - `{ type: 'within-seconds', seconds }`: symmetric ±N-second window.
7192
+ *
7193
+ */
7194
+ timestamp_tolerance?: /**
7195
+ * Slack on `reading.timestamp` when metering-api auto-clear matches an
7196
+ * incoming reading against this pending changeset.
7197
+ *
7198
+ * Variants:
7199
+ * - `'exact'`: strict millisecond equality.
7200
+ * - `{ type: 'same-day', timezone? }`: strip the time component and
7201
+ * compare year-month-day. Optional `timezone` is an IANA name
7202
+ * (e.g. `'Europe/Berlin'`); the day is bucketed in that zone.
7203
+ * Defaults to UTC when omitted.
7204
+ * - `{ type: 'within-seconds', seconds }`: symmetric ±N-second window.
7205
+ *
7206
+ */
7207
+ ("exact") | {
7208
+ type: "same-day";
7209
+ /**
7210
+ * IANA timezone identifier (e.g. `'Europe/Berlin'`, `'UTC'`).
7211
+ * When omitted, the day is bucketed in UTC.
7212
+ *
7213
+ */
7214
+ timezone?: string;
7215
+ } | {
7216
+ type: "within-seconds";
7217
+ /**
7218
+ * Tolerance in seconds. e.g. 60 = ±1 minute, 3600 = ±1 hour.
7219
+ */
7220
+ seconds: number;
7221
+ };
7222
+ fuzzy_config?: {
7223
+ percentage_threshold?: number;
7224
+ absolute_threshold?: number;
7225
+ };
7226
+ created_at: string; // date-time
7227
+ created_by?: /* Identifies the actor that created the changeset. */ ChangesetCreator;
7228
+ previous?: {
7229
+ value?: number;
7230
+ direction?: "feed-in" | "feed-out";
7231
+ timestamp?: string; // date-time
7232
+ };
7233
+ }
6801
7234
  /**
6802
7235
  * Multi Choice Selection
6803
7236
  */
@@ -6952,26 +7385,41 @@ declare namespace Components {
6952
7385
  repeatable?: boolean;
6953
7386
  has_primary?: boolean;
6954
7387
  /**
6955
- * Controls how updates to this attribute are handled.
6956
- * - `direct` (default): update is applied immediately. No changeset created.
6957
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
6958
- * - `approval`: update creates a changeset, requires explicit human approval.
7388
+ * Controls how updates to this attribute are handled. See the `EditMode`
7389
+ * schema for the per-mode semantics. Defaults to `direct`.
6959
7390
  *
6960
7391
  */
6961
7392
  edit_mode?: "direct" | "external" | "approval";
6962
7393
  /**
6963
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
7394
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
7395
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
7396
+ * they are ignored for `approval` mode, which resolves via explicit
7397
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
7398
+ *
6964
7399
  */
6965
7400
  edit_mode_config?: {
6966
7401
  match_strategy?: /**
6967
- * Strategy for auto-clearing the changeset when an external update is received.
7402
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
7403
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
7404
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
7405
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
6968
7406
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
6969
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
7407
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
6970
7408
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
6971
7409
  *
6972
7410
  */
6973
7411
  MatchStrategy;
6974
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
7412
+ fuzzy_config?: /**
7413
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
7414
+ * Not used for `edit_mode: approval`.
7415
+ *
7416
+ * Type compatibility with attribute shape is enforced at schema save time:
7417
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
7418
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
7419
+ * - relation attributes: `relation_set`
7420
+ *
7421
+ */
7422
+ FuzzyConfig;
6975
7423
  };
6976
7424
  type: "multiselect" | "checkbox";
6977
7425
  /**
@@ -7074,8 +7522,12 @@ declare namespace Components {
7074
7522
  _manifest?: string /* uuid */[] | null;
7075
7523
  /**
7076
7524
  * Pending attribute changesets for attributes configured with external or approval edit mode.
7077
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
7078
- * Use the changeset management endpoints to apply or dismiss changesets.
7525
+ *
7526
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
7527
+ * and is what `:apply` / `:dismiss` operate on.
7528
+ *
7529
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
7530
+ * from request bodies. Use the changeset management endpoints to mutate this field.
7079
7531
  *
7080
7532
  */
7081
7533
  _changesets?: {
@@ -7236,26 +7688,41 @@ declare namespace Components {
7236
7688
  repeatable?: boolean;
7237
7689
  has_primary?: boolean;
7238
7690
  /**
7239
- * Controls how updates to this attribute are handled.
7240
- * - `direct` (default): update is applied immediately. No changeset created.
7241
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
7242
- * - `approval`: update creates a changeset, requires explicit human approval.
7691
+ * Controls how updates to this attribute are handled. See the `EditMode`
7692
+ * schema for the per-mode semantics. Defaults to `direct`.
7243
7693
  *
7244
7694
  */
7245
7695
  edit_mode?: "direct" | "external" | "approval";
7246
7696
  /**
7247
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
7697
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
7698
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
7699
+ * they are ignored for `approval` mode, which resolves via explicit
7700
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
7701
+ *
7248
7702
  */
7249
7703
  edit_mode_config?: {
7250
7704
  match_strategy?: /**
7251
- * Strategy for auto-clearing the changeset when an external update is received.
7705
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
7706
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
7707
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
7708
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
7252
7709
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
7253
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
7710
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
7254
7711
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
7255
7712
  *
7256
7713
  */
7257
7714
  MatchStrategy;
7258
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
7715
+ fuzzy_config?: /**
7716
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
7717
+ * Not used for `edit_mode: approval`.
7718
+ *
7719
+ * Type compatibility with attribute shape is enforced at schema save time:
7720
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
7721
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
7722
+ * - relation attributes: `relation_set`
7723
+ *
7724
+ */
7725
+ FuzzyConfig;
7259
7726
  };
7260
7727
  type: "number";
7261
7728
  /**
@@ -7422,26 +7889,41 @@ declare namespace Components {
7422
7889
  repeatable?: boolean;
7423
7890
  has_primary?: boolean;
7424
7891
  /**
7425
- * Controls how updates to this attribute are handled.
7426
- * - `direct` (default): update is applied immediately. No changeset created.
7427
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
7428
- * - `approval`: update creates a changeset, requires explicit human approval.
7892
+ * Controls how updates to this attribute are handled. See the `EditMode`
7893
+ * schema for the per-mode semantics. Defaults to `direct`.
7429
7894
  *
7430
7895
  */
7431
7896
  edit_mode?: "direct" | "external" | "approval";
7432
7897
  /**
7433
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
7898
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
7899
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
7900
+ * they are ignored for `approval` mode, which resolves via explicit
7901
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
7902
+ *
7434
7903
  */
7435
7904
  edit_mode_config?: {
7436
7905
  match_strategy?: /**
7437
- * Strategy for auto-clearing the changeset when an external update is received.
7906
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
7907
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
7908
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
7909
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
7438
7910
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
7439
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
7911
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
7440
7912
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
7441
7913
  *
7442
7914
  */
7443
7915
  MatchStrategy;
7444
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
7916
+ fuzzy_config?: /**
7917
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
7918
+ * Not used for `edit_mode: approval`.
7919
+ *
7920
+ * Type compatibility with attribute shape is enforced at schema save time:
7921
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
7922
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
7923
+ * - relation attributes: `relation_set`
7924
+ *
7925
+ */
7926
+ FuzzyConfig;
7445
7927
  };
7446
7928
  type: "ordered_list";
7447
7929
  }
@@ -7599,26 +8081,41 @@ declare namespace Components {
7599
8081
  repeatable?: boolean;
7600
8082
  has_primary?: boolean;
7601
8083
  /**
7602
- * Controls how updates to this attribute are handled.
7603
- * - `direct` (default): update is applied immediately. No changeset created.
7604
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
7605
- * - `approval`: update creates a changeset, requires explicit human approval.
8084
+ * Controls how updates to this attribute are handled. See the `EditMode`
8085
+ * schema for the per-mode semantics. Defaults to `direct`.
7606
8086
  *
7607
8087
  */
7608
8088
  edit_mode?: "direct" | "external" | "approval";
7609
8089
  /**
7610
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
8090
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
8091
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
8092
+ * they are ignored for `approval` mode, which resolves via explicit
8093
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
8094
+ *
7611
8095
  */
7612
8096
  edit_mode_config?: {
7613
8097
  match_strategy?: /**
7614
- * Strategy for auto-clearing the changeset when an external update is received.
8098
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
8099
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
8100
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
8101
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
7615
8102
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
7616
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
8103
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
7617
8104
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
7618
8105
  *
7619
8106
  */
7620
8107
  MatchStrategy;
7621
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
8108
+ fuzzy_config?: /**
8109
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
8110
+ * Not used for `edit_mode: approval`.
8111
+ *
8112
+ * Type compatibility with attribute shape is enforced at schema save time:
8113
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
8114
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
8115
+ * - relation attributes: `relation_set`
8116
+ *
8117
+ */
8118
+ FuzzyConfig;
7622
8119
  };
7623
8120
  type: "partner_organisation";
7624
8121
  }
@@ -7776,26 +8273,41 @@ declare namespace Components {
7776
8273
  repeatable?: boolean;
7777
8274
  has_primary?: boolean;
7778
8275
  /**
7779
- * Controls how updates to this attribute are handled.
7780
- * - `direct` (default): update is applied immediately. No changeset created.
7781
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
7782
- * - `approval`: update creates a changeset, requires explicit human approval.
8276
+ * Controls how updates to this attribute are handled. See the `EditMode`
8277
+ * schema for the per-mode semantics. Defaults to `direct`.
7783
8278
  *
7784
8279
  */
7785
8280
  edit_mode?: "direct" | "external" | "approval";
7786
8281
  /**
7787
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
8282
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
8283
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
8284
+ * they are ignored for `approval` mode, which resolves via explicit
8285
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
8286
+ *
7788
8287
  */
7789
8288
  edit_mode_config?: {
7790
8289
  match_strategy?: /**
7791
- * Strategy for auto-clearing the changeset when an external update is received.
8290
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
8291
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
8292
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
8293
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
7792
8294
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
7793
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
8295
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
7794
8296
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
7795
8297
  *
7796
8298
  */
7797
8299
  MatchStrategy;
7798
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
8300
+ fuzzy_config?: /**
8301
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
8302
+ * Not used for `edit_mode: approval`.
8303
+ *
8304
+ * Type compatibility with attribute shape is enforced at schema save time:
8305
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
8306
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
8307
+ * - relation attributes: `relation_set`
8308
+ *
8309
+ */
8310
+ FuzzyConfig;
7799
8311
  };
7800
8312
  type: "partner_status";
7801
8313
  }
@@ -7953,26 +8465,41 @@ declare namespace Components {
7953
8465
  repeatable?: boolean;
7954
8466
  has_primary?: boolean;
7955
8467
  /**
7956
- * Controls how updates to this attribute are handled.
7957
- * - `direct` (default): update is applied immediately. No changeset created.
7958
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
7959
- * - `approval`: update creates a changeset, requires explicit human approval.
8468
+ * Controls how updates to this attribute are handled. See the `EditMode`
8469
+ * schema for the per-mode semantics. Defaults to `direct`.
7960
8470
  *
7961
8471
  */
7962
8472
  edit_mode?: "direct" | "external" | "approval";
7963
8473
  /**
7964
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
8474
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
8475
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
8476
+ * they are ignored for `approval` mode, which resolves via explicit
8477
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
8478
+ *
7965
8479
  */
7966
8480
  edit_mode_config?: {
7967
8481
  match_strategy?: /**
7968
- * Strategy for auto-clearing the changeset when an external update is received.
8482
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
8483
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
8484
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
8485
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
7969
8486
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
7970
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
8487
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
7971
8488
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
7972
8489
  *
7973
8490
  */
7974
8491
  MatchStrategy;
7975
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
8492
+ fuzzy_config?: /**
8493
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
8494
+ * Not used for `edit_mode: approval`.
8495
+ *
8496
+ * Type compatibility with attribute shape is enforced at schema save time:
8497
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
8498
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
8499
+ * - relation attributes: `relation_set`
8500
+ *
8501
+ */
8502
+ FuzzyConfig;
7976
8503
  };
7977
8504
  type: "payment";
7978
8505
  }
@@ -8130,26 +8657,41 @@ declare namespace Components {
8130
8657
  repeatable?: boolean;
8131
8658
  has_primary?: boolean;
8132
8659
  /**
8133
- * Controls how updates to this attribute are handled.
8134
- * - `direct` (default): update is applied immediately. No changeset created.
8135
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
8136
- * - `approval`: update creates a changeset, requires explicit human approval.
8660
+ * Controls how updates to this attribute are handled. See the `EditMode`
8661
+ * schema for the per-mode semantics. Defaults to `direct`.
8137
8662
  *
8138
8663
  */
8139
8664
  edit_mode?: "direct" | "external" | "approval";
8140
8665
  /**
8141
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
8666
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
8667
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
8668
+ * they are ignored for `approval` mode, which resolves via explicit
8669
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
8670
+ *
8142
8671
  */
8143
8672
  edit_mode_config?: {
8144
8673
  match_strategy?: /**
8145
- * Strategy for auto-clearing the changeset when an external update is received.
8674
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
8675
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
8676
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
8677
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
8146
8678
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
8147
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
8679
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
8148
8680
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
8149
8681
  *
8150
8682
  */
8151
8683
  MatchStrategy;
8152
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
8684
+ fuzzy_config?: /**
8685
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
8686
+ * Not used for `edit_mode: approval`.
8687
+ *
8688
+ * Type compatibility with attribute shape is enforced at schema save time:
8689
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
8690
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
8691
+ * - relation attributes: `relation_set`
8692
+ *
8693
+ */
8694
+ FuzzyConfig;
8153
8695
  };
8154
8696
  type: "relation_payment_method";
8155
8697
  }
@@ -8307,26 +8849,41 @@ declare namespace Components {
8307
8849
  repeatable?: boolean;
8308
8850
  has_primary?: boolean;
8309
8851
  /**
8310
- * Controls how updates to this attribute are handled.
8311
- * - `direct` (default): update is applied immediately. No changeset created.
8312
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
8313
- * - `approval`: update creates a changeset, requires explicit human approval.
8852
+ * Controls how updates to this attribute are handled. See the `EditMode`
8853
+ * schema for the per-mode semantics. Defaults to `direct`.
8314
8854
  *
8315
8855
  */
8316
8856
  edit_mode?: "direct" | "external" | "approval";
8317
8857
  /**
8318
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
8858
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
8859
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
8860
+ * they are ignored for `approval` mode, which resolves via explicit
8861
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
8862
+ *
8319
8863
  */
8320
8864
  edit_mode_config?: {
8321
8865
  match_strategy?: /**
8322
- * Strategy for auto-clearing the changeset when an external update is received.
8866
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
8867
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
8868
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
8869
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
8323
8870
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
8324
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
8871
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
8325
8872
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
8326
8873
  *
8327
8874
  */
8328
8875
  MatchStrategy;
8329
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
8876
+ fuzzy_config?: /**
8877
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
8878
+ * Not used for `edit_mode: approval`.
8879
+ *
8880
+ * Type compatibility with attribute shape is enforced at schema save time:
8881
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
8882
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
8883
+ * - relation attributes: `relation_set`
8884
+ *
8885
+ */
8886
+ FuzzyConfig;
8330
8887
  };
8331
8888
  type: "phone";
8332
8889
  }
@@ -8484,26 +9041,41 @@ declare namespace Components {
8484
9041
  repeatable?: boolean;
8485
9042
  has_primary?: boolean;
8486
9043
  /**
8487
- * Controls how updates to this attribute are handled.
8488
- * - `direct` (default): update is applied immediately. No changeset created.
8489
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
8490
- * - `approval`: update creates a changeset, requires explicit human approval.
9044
+ * Controls how updates to this attribute are handled. See the `EditMode`
9045
+ * schema for the per-mode semantics. Defaults to `direct`.
8491
9046
  *
8492
9047
  */
8493
9048
  edit_mode?: "direct" | "external" | "approval";
8494
9049
  /**
8495
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
9050
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
9051
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
9052
+ * they are ignored for `approval` mode, which resolves via explicit
9053
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
9054
+ *
8496
9055
  */
8497
9056
  edit_mode_config?: {
8498
9057
  match_strategy?: /**
8499
- * Strategy for auto-clearing the changeset when an external update is received.
9058
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
9059
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
9060
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
9061
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
8500
9062
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
8501
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
9063
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
8502
9064
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
8503
9065
  *
8504
9066
  */
8505
9067
  MatchStrategy;
8506
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
9068
+ fuzzy_config?: /**
9069
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
9070
+ * Not used for `edit_mode: approval`.
9071
+ *
9072
+ * Type compatibility with attribute shape is enforced at schema save time:
9073
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
9074
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
9075
+ * - relation attributes: `relation_set`
9076
+ *
9077
+ */
9078
+ FuzzyConfig;
8507
9079
  };
8508
9080
  type: "portal_access";
8509
9081
  }
@@ -8661,26 +9233,41 @@ declare namespace Components {
8661
9233
  repeatable?: boolean;
8662
9234
  has_primary?: boolean;
8663
9235
  /**
8664
- * Controls how updates to this attribute are handled.
8665
- * - `direct` (default): update is applied immediately. No changeset created.
8666
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
8667
- * - `approval`: update creates a changeset, requires explicit human approval.
9236
+ * Controls how updates to this attribute are handled. See the `EditMode`
9237
+ * schema for the per-mode semantics. Defaults to `direct`.
8668
9238
  *
8669
9239
  */
8670
9240
  edit_mode?: "direct" | "external" | "approval";
8671
9241
  /**
8672
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
9242
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
9243
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
9244
+ * they are ignored for `approval` mode, which resolves via explicit
9245
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
9246
+ *
8673
9247
  */
8674
9248
  edit_mode_config?: {
8675
9249
  match_strategy?: /**
8676
- * Strategy for auto-clearing the changeset when an external update is received.
9250
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
9251
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
9252
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
9253
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
8677
9254
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
8678
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
9255
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
8679
9256
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
8680
9257
  *
8681
9258
  */
8682
9259
  MatchStrategy;
8683
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
9260
+ fuzzy_config?: /**
9261
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
9262
+ * Not used for `edit_mode: approval`.
9263
+ *
9264
+ * Type compatibility with attribute shape is enforced at schema save time:
9265
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
9266
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
9267
+ * - relation attributes: `relation_set`
9268
+ *
9269
+ */
9270
+ FuzzyConfig;
8684
9271
  };
8685
9272
  type: "price_component";
8686
9273
  }
@@ -8838,26 +9425,41 @@ declare namespace Components {
8838
9425
  repeatable?: boolean;
8839
9426
  has_primary?: boolean;
8840
9427
  /**
8841
- * Controls how updates to this attribute are handled.
8842
- * - `direct` (default): update is applied immediately. No changeset created.
8843
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
8844
- * - `approval`: update creates a changeset, requires explicit human approval.
9428
+ * Controls how updates to this attribute are handled. See the `EditMode`
9429
+ * schema for the per-mode semantics. Defaults to `direct`.
8845
9430
  *
8846
9431
  */
8847
9432
  edit_mode?: "direct" | "external" | "approval";
8848
9433
  /**
8849
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
9434
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
9435
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
9436
+ * they are ignored for `approval` mode, which resolves via explicit
9437
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
9438
+ *
8850
9439
  */
8851
9440
  edit_mode_config?: {
8852
9441
  match_strategy?: /**
8853
- * Strategy for auto-clearing the changeset when an external update is received.
9442
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
9443
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
9444
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
9445
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
8854
9446
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
8855
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
9447
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
8856
9448
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
8857
9449
  *
8858
9450
  */
8859
9451
  MatchStrategy;
8860
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
9452
+ fuzzy_config?: /**
9453
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
9454
+ * Not used for `edit_mode: approval`.
9455
+ *
9456
+ * Type compatibility with attribute shape is enforced at schema save time:
9457
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
9458
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
9459
+ * - relation attributes: `relation_set`
9460
+ *
9461
+ */
9462
+ FuzzyConfig;
8861
9463
  };
8862
9464
  type: "purpose";
8863
9465
  }
@@ -9030,26 +9632,41 @@ declare namespace Components {
9030
9632
  repeatable?: boolean;
9031
9633
  has_primary?: boolean;
9032
9634
  /**
9033
- * Controls how updates to this attribute are handled.
9034
- * - `direct` (default): update is applied immediately. No changeset created.
9035
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
9036
- * - `approval`: update creates a changeset, requires explicit human approval.
9635
+ * Controls how updates to this attribute are handled. See the `EditMode`
9636
+ * schema for the per-mode semantics. Defaults to `direct`.
9037
9637
  *
9038
9638
  */
9039
9639
  edit_mode?: "direct" | "external" | "approval" | "list-view";
9040
9640
  /**
9041
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
9641
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
9642
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
9643
+ * they are ignored for `approval` mode, which resolves via explicit
9644
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
9645
+ *
9042
9646
  */
9043
9647
  edit_mode_config?: {
9044
9648
  match_strategy?: /**
9045
- * Strategy for auto-clearing the changeset when an external update is received.
9649
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
9650
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
9651
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
9652
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
9046
9653
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
9047
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
9654
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
9048
9655
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
9049
9656
  *
9050
9657
  */
9051
9658
  MatchStrategy;
9052
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
9659
+ fuzzy_config?: /**
9660
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
9661
+ * Not used for `edit_mode: approval`.
9662
+ *
9663
+ * Type compatibility with attribute shape is enforced at schema save time:
9664
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
9665
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
9666
+ * - relation attributes: `relation_set`
9667
+ *
9668
+ */
9669
+ FuzzyConfig;
9053
9670
  };
9054
9671
  type: "relation";
9055
9672
  relation_type?: "has_many" | "has_one";
@@ -9247,8 +9864,12 @@ declare namespace Components {
9247
9864
  _manifest?: string /* uuid */[] | null;
9248
9865
  /**
9249
9866
  * Pending attribute changesets for attributes configured with external or approval edit mode.
9250
- * Read-only via normal entity PATCH/PUT operations — cannot be set directly.
9251
- * Use the changeset management endpoints to apply or dismiss changesets.
9867
+ *
9868
+ * The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...)
9869
+ * and is what `:apply` / `:dismiss` operate on.
9870
+ *
9871
+ * Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets`
9872
+ * from request bodies. Use the changeset management endpoints to mutate this field.
9252
9873
  *
9253
9874
  */
9254
9875
  _changesets?: {
@@ -9429,26 +10050,41 @@ declare namespace Components {
9429
10050
  repeatable?: boolean;
9430
10051
  has_primary?: boolean;
9431
10052
  /**
9432
- * Controls how updates to this attribute are handled.
9433
- * - `direct` (default): update is applied immediately. No changeset created.
9434
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
9435
- * - `approval`: update creates a changeset, requires explicit human approval.
10053
+ * Controls how updates to this attribute are handled. See the `EditMode`
10054
+ * schema for the per-mode semantics. Defaults to `direct`.
9436
10055
  *
9437
10056
  */
9438
10057
  edit_mode?: "direct" | "external" | "approval";
9439
10058
  /**
9440
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
10059
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
10060
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
10061
+ * they are ignored for `approval` mode, which resolves via explicit
10062
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
10063
+ *
9441
10064
  */
9442
10065
  edit_mode_config?: {
9443
10066
  match_strategy?: /**
9444
- * Strategy for auto-clearing the changeset when an external update is received.
10067
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
10068
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
10069
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
10070
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
9445
10071
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
9446
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
10072
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
9447
10073
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
9448
10074
  *
9449
10075
  */
9450
10076
  MatchStrategy;
9451
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
10077
+ fuzzy_config?: /**
10078
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
10079
+ * Not used for `edit_mode: approval`.
10080
+ *
10081
+ * Type compatibility with attribute shape is enforced at schema save time:
10082
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
10083
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
10084
+ * - relation attributes: `relation_set`
10085
+ *
10086
+ */
10087
+ FuzzyConfig;
9452
10088
  };
9453
10089
  }
9454
10090
  /**
@@ -10010,26 +10646,41 @@ declare namespace Components {
10010
10646
  repeatable?: boolean;
10011
10647
  has_primary?: boolean;
10012
10648
  /**
10013
- * Controls how updates to this attribute are handled.
10014
- * - `direct` (default): update is applied immediately. No changeset created.
10015
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
10016
- * - `approval`: update creates a changeset, requires explicit human approval.
10649
+ * Controls how updates to this attribute are handled. See the `EditMode`
10650
+ * schema for the per-mode semantics. Defaults to `direct`.
10017
10651
  *
10018
10652
  */
10019
10653
  edit_mode?: "direct" | "external" | "approval";
10020
10654
  /**
10021
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
10655
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
10656
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
10657
+ * they are ignored for `approval` mode, which resolves via explicit
10658
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
10659
+ *
10022
10660
  */
10023
10661
  edit_mode_config?: {
10024
10662
  match_strategy?: /**
10025
- * Strategy for auto-clearing the changeset when an external update is received.
10663
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
10664
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
10665
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
10666
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
10026
10667
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
10027
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
10668
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
10028
10669
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
10029
10670
  *
10030
10671
  */
10031
10672
  MatchStrategy;
10032
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
10673
+ fuzzy_config?: /**
10674
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
10675
+ * Not used for `edit_mode: approval`.
10676
+ *
10677
+ * Type compatibility with attribute shape is enforced at schema save time:
10678
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
10679
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
10680
+ * - relation attributes: `relation_set`
10681
+ *
10682
+ */
10683
+ FuzzyConfig;
10033
10684
  };
10034
10685
  type: "select" | "radio";
10035
10686
  options?: ({
@@ -10195,26 +10846,41 @@ declare namespace Components {
10195
10846
  repeatable?: boolean;
10196
10847
  has_primary?: boolean;
10197
10848
  /**
10198
- * Controls how updates to this attribute are handled.
10199
- * - `direct` (default): update is applied immediately. No changeset created.
10200
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
10201
- * - `approval`: update creates a changeset, requires explicit human approval.
10849
+ * Controls how updates to this attribute are handled. See the `EditMode`
10850
+ * schema for the per-mode semantics. Defaults to `direct`.
10202
10851
  *
10203
10852
  */
10204
10853
  edit_mode?: "direct" | "external" | "approval";
10205
10854
  /**
10206
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
10855
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
10856
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
10857
+ * they are ignored for `approval` mode, which resolves via explicit
10858
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
10859
+ *
10207
10860
  */
10208
10861
  edit_mode_config?: {
10209
10862
  match_strategy?: /**
10210
- * Strategy for auto-clearing the changeset when an external update is received.
10863
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
10864
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
10865
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
10866
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
10211
10867
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
10212
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
10868
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
10213
10869
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
10214
10870
  *
10215
10871
  */
10216
10872
  MatchStrategy;
10217
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
10873
+ fuzzy_config?: /**
10874
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
10875
+ * Not used for `edit_mode: approval`.
10876
+ *
10877
+ * Type compatibility with attribute shape is enforced at schema save time:
10878
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
10879
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
10880
+ * - relation attributes: `relation_set`
10881
+ *
10882
+ */
10883
+ FuzzyConfig;
10218
10884
  };
10219
10885
  type: "sequence";
10220
10886
  /**
@@ -10389,26 +11055,41 @@ declare namespace Components {
10389
11055
  repeatable?: boolean;
10390
11056
  has_primary?: boolean;
10391
11057
  /**
10392
- * Controls how updates to this attribute are handled.
10393
- * - `direct` (default): update is applied immediately. No changeset created.
10394
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
10395
- * - `approval`: update creates a changeset, requires explicit human approval.
11058
+ * Controls how updates to this attribute are handled. See the `EditMode`
11059
+ * schema for the per-mode semantics. Defaults to `direct`.
10396
11060
  *
10397
11061
  */
10398
11062
  edit_mode?: "direct" | "external" | "approval";
10399
11063
  /**
10400
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
11064
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
11065
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
11066
+ * they are ignored for `approval` mode, which resolves via explicit
11067
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
11068
+ *
10401
11069
  */
10402
11070
  edit_mode_config?: {
10403
11071
  match_strategy?: /**
10404
- * Strategy for auto-clearing the changeset when an external update is received.
11072
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
11073
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
11074
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
11075
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
10405
11076
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
10406
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
11077
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
10407
11078
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
10408
11079
  *
10409
11080
  */
10410
11081
  MatchStrategy;
10411
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
11082
+ fuzzy_config?: /**
11083
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
11084
+ * Not used for `edit_mode: approval`.
11085
+ *
11086
+ * Type compatibility with attribute shape is enforced at schema save time:
11087
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
11088
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
11089
+ * - relation attributes: `relation_set`
11090
+ *
11091
+ */
11092
+ FuzzyConfig;
10412
11093
  };
10413
11094
  type: "status";
10414
11095
  options?: ((string | null) | {
@@ -10662,26 +11343,41 @@ declare namespace Components {
10662
11343
  repeatable?: boolean;
10663
11344
  has_primary?: boolean;
10664
11345
  /**
10665
- * Controls how updates to this attribute are handled.
10666
- * - `direct` (default): update is applied immediately. No changeset created.
10667
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
10668
- * - `approval`: update creates a changeset, requires explicit human approval.
11346
+ * Controls how updates to this attribute are handled. See the `EditMode`
11347
+ * schema for the per-mode semantics. Defaults to `direct`.
10669
11348
  *
10670
11349
  */
10671
11350
  edit_mode?: "direct" | "external" | "approval";
10672
11351
  /**
10673
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
11352
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
11353
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
11354
+ * they are ignored for `approval` mode, which resolves via explicit
11355
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
11356
+ *
10674
11357
  */
10675
11358
  edit_mode_config?: {
10676
11359
  match_strategy?: /**
10677
- * Strategy for auto-clearing the changeset when an external update is received.
11360
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
11361
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
11362
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
11363
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
10678
11364
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
10679
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
11365
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
10680
11366
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
10681
11367
  *
10682
11368
  */
10683
11369
  MatchStrategy;
10684
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
11370
+ fuzzy_config?: /**
11371
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
11372
+ * Not used for `edit_mode: approval`.
11373
+ *
11374
+ * Type compatibility with attribute shape is enforced at schema save time:
11375
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
11376
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
11377
+ * - relation attributes: `relation_set`
11378
+ *
11379
+ */
11380
+ FuzzyConfig;
10685
11381
  };
10686
11382
  type: "table";
10687
11383
  /**
@@ -10895,26 +11591,41 @@ declare namespace Components {
10895
11591
  repeatable?: boolean;
10896
11592
  has_primary?: boolean;
10897
11593
  /**
10898
- * Controls how updates to this attribute are handled.
10899
- * - `direct` (default): update is applied immediately. No changeset created.
10900
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
10901
- * - `approval`: update creates a changeset, requires explicit human approval.
11594
+ * Controls how updates to this attribute are handled. See the `EditMode`
11595
+ * schema for the per-mode semantics. Defaults to `direct`.
10902
11596
  *
10903
11597
  */
10904
11598
  edit_mode?: "direct" | "external" | "approval";
10905
11599
  /**
10906
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
11600
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
11601
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
11602
+ * they are ignored for `approval` mode, which resolves via explicit
11603
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
11604
+ *
10907
11605
  */
10908
11606
  edit_mode_config?: {
10909
11607
  match_strategy?: /**
10910
- * Strategy for auto-clearing the changeset when an external update is received.
11608
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
11609
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
11610
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
11611
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
10911
11612
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
10912
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
11613
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
10913
11614
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
10914
11615
  *
10915
11616
  */
10916
11617
  MatchStrategy;
10917
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
11618
+ fuzzy_config?: /**
11619
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
11620
+ * Not used for `edit_mode: approval`.
11621
+ *
11622
+ * Type compatibility with attribute shape is enforced at schema save time:
11623
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
11624
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
11625
+ * - relation attributes: `relation_set`
11626
+ *
11627
+ */
11628
+ FuzzyConfig;
10918
11629
  };
10919
11630
  type: "tags";
10920
11631
  options?: string[];
@@ -11274,26 +11985,41 @@ declare namespace Components {
11274
11985
  repeatable?: boolean;
11275
11986
  has_primary?: boolean;
11276
11987
  /**
11277
- * Controls how updates to this attribute are handled.
11278
- * - `direct` (default): update is applied immediately. No changeset created.
11279
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
11280
- * - `approval`: update creates a changeset, requires explicit human approval.
11988
+ * Controls how updates to this attribute are handled. See the `EditMode`
11989
+ * schema for the per-mode semantics. Defaults to `direct`.
11281
11990
  *
11282
11991
  */
11283
11992
  edit_mode?: "direct" | "external" | "approval";
11284
11993
  /**
11285
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
11994
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
11995
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
11996
+ * they are ignored for `approval` mode, which resolves via explicit
11997
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
11998
+ *
11286
11999
  */
11287
12000
  edit_mode_config?: {
11288
12001
  match_strategy?: /**
11289
- * Strategy for auto-clearing the changeset when an external update is received.
12002
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
12003
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
12004
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
12005
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
11290
12006
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
11291
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
12007
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
11292
12008
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
11293
12009
  *
11294
12010
  */
11295
12011
  MatchStrategy;
11296
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
12012
+ fuzzy_config?: /**
12013
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
12014
+ * Not used for `edit_mode: approval`.
12015
+ *
12016
+ * Type compatibility with attribute shape is enforced at schema save time:
12017
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
12018
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
12019
+ * - relation attributes: `relation_set`
12020
+ *
12021
+ */
12022
+ FuzzyConfig;
11297
12023
  };
11298
12024
  type: "string";
11299
12025
  multiline?: boolean;
@@ -11464,26 +12190,41 @@ declare namespace Components {
11464
12190
  repeatable?: boolean;
11465
12191
  has_primary?: boolean;
11466
12192
  /**
11467
- * Controls how updates to this attribute are handled.
11468
- * - `direct` (default): update is applied immediately. No changeset created.
11469
- * - `external`: update creates a changeset, auto-cleared on matching external update (e.g. ERP inbound sync via ?direct=true).
11470
- * - `approval`: update creates a changeset, requires explicit human approval.
12193
+ * Controls how updates to this attribute are handled. See the `EditMode`
12194
+ * schema for the per-mode semantics. Defaults to `direct`.
11471
12195
  *
11472
12196
  */
11473
12197
  edit_mode?: "direct" | "external" | "approval";
11474
12198
  /**
11475
- * Configuration for non-direct edit modes. Required when edit_mode is external or approval with fuzzy match strategy.
12199
+ * Configuration for auto-clear matching on `edit_mode: external` attributes.
12200
+ * `match_strategy` and `fuzzy_config` are only consulted for `external` mode —
12201
+ * they are ignored for `approval` mode, which resolves via explicit
12202
+ * `:apply` / `:dismiss` endpoints and never auto-clears.
12203
+ *
11476
12204
  */
11477
12205
  edit_mode_config?: {
11478
12206
  match_strategy?: /**
11479
- * Strategy for auto-clearing the changeset when an external update is received.
12207
+ * Strategy for auto-clearing a changeset on an `edit_mode: external` attribute
12208
+ * when a direct write (`?direct=true`) arrives — typically an ERP inbound sync.
12209
+ * Ignored for `edit_mode: approval`, which does not auto-clear and is resolved
12210
+ * exclusively via the `:apply` / `:dismiss` changeset endpoints.
11480
12211
  * - `exact`: The inbound value must exactly match the proposed value (deep equality).
11481
- * - `fuzzy`: The inbound value is compared using the configured fuzzy algorithm.
12212
+ * - `fuzzy`: The inbound value is compared using the configured `fuzzy_config` algorithm.
11482
12213
  * - `any`: Any update to the attribute clears the changeset, regardless of value.
11483
12214
  *
11484
12215
  */
11485
12216
  MatchStrategy;
11486
- fuzzy_config?: /* Configuration for fuzzy match strategies on changeset auto-clearing. */ FuzzyConfig;
12217
+ fuzzy_config?: /**
12218
+ * Configuration for fuzzy auto-clear matching on `edit_mode: external` attributes.
12219
+ * Not used for `edit_mode: approval`.
12220
+ *
12221
+ * Type compatibility with attribute shape is enforced at schema save time:
12222
+ * - scalar string attributes: `suffix`, `digits_only`, `regex`
12223
+ * - repeatable attributes: `set_equivalent`, `entry_match`, `ignore_fields`, `normalize_phone`
12224
+ * - relation attributes: `relation_set`
12225
+ *
12226
+ */
12227
+ FuzzyConfig;
11487
12228
  };
11488
12229
  type: "relation_user";
11489
12230
  multiple?: boolean;
@@ -17691,6 +18432,7 @@ export type CurrencyAttribute = Components.Schemas.CurrencyAttribute;
17691
18432
  export type DateAttribute = Components.Schemas.DateAttribute;
17692
18433
  export type DefaultAddressFields = Components.Schemas.DefaultAddressFields;
17693
18434
  export type ESClusterAssignment = Components.Schemas.ESClusterAssignment;
18435
+ export type EditMode = Components.Schemas.EditMode;
17694
18436
  export type EditModeConfig = Components.Schemas.EditModeConfig;
17695
18437
  export type EmailAttribute = Components.Schemas.EmailAttribute;
17696
18438
  export type Entity = Components.Schemas.Entity;
@@ -17756,6 +18498,7 @@ export type LinkAttribute = Components.Schemas.LinkAttribute;
17756
18498
  export type ListSavedViewsResults = Components.Schemas.ListSavedViewsResults;
17757
18499
  export type MatchStrategy = Components.Schemas.MatchStrategy;
17758
18500
  export type MessageEmailAddressAttribute = Components.Schemas.MessageEmailAddressAttribute;
18501
+ export type MeterReadingChangesetEntry = Components.Schemas.MeterReadingChangesetEntry;
17759
18502
  export type MultiSelectAttribute = Components.Schemas.MultiSelectAttribute;
17760
18503
  export type NullableEntity = Components.Schemas.NullableEntity;
17761
18504
  export type NumberAttribute = Components.Schemas.NumberAttribute;