sinfactura-types 1.10.445 → 1.10.447
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/cjs/favorite.js +2 -1
- package/dist/customer.d.ts +27 -0
- package/dist/favorite.d.ts +12 -3
- package/dist/favorite.js +2 -1
- package/dist/store.d.ts +15 -0
- package/package.json +1 -1
package/dist/cjs/favorite.js
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
// existed still carries the LEGACY `Customer.favorites` array on the CUSTOMER
|
|
6
6
|
// row; `GET /favorites` reads both (rows win on a shared `productId`) and the
|
|
7
7
|
// first `add`/`remove`/`merge` for that customer materializes the array into
|
|
8
|
-
// rows and then drops it. Nothing backfills
|
|
8
|
+
// rows and then drops it. Nothing backfills, and nothing writes the array any
|
|
9
|
+
// more — the mode-less whole-array `POST /favorites` is retired (400).
|
|
9
10
|
//
|
|
10
11
|
// ⚠️ A row stores ids and a timestamp, never a product snapshot. Name, price and
|
|
11
12
|
// pictures are resolved at READ time against the live catalogue and the
|
package/dist/customer.d.ts
CHANGED
|
@@ -201,6 +201,20 @@ declare global {
|
|
|
201
201
|
* already revoked.
|
|
202
202
|
*/
|
|
203
203
|
appleRelayEmail?: string;
|
|
204
|
+
/**
|
|
205
|
+
* @deprecated The LEGACY whole-array wishlist, superseded by the
|
|
206
|
+
* `FAVORITE#` rows (`GET /favorites`). Nothing writes it any more, and
|
|
207
|
+
* `sanitizeCustomerRow` strips it at every CUSTOMER wire boundary, so it
|
|
208
|
+
* never arrives — it survives only as storage on rows not yet
|
|
209
|
+
* materialized, read raw by the favorites dual reader.
|
|
210
|
+
*
|
|
211
|
+
* ⚠️ Still PUBLISHED, as the one exception to "a field the sanitizer
|
|
212
|
+
* strips moves to `CustomerRow`": the storefront's `useFavorites` still
|
|
213
|
+
* reads `AuthCustomer.favorites` as a fallback, and moving the field
|
|
214
|
+
* would break its typecheck on the next types bump. Once that fallback is
|
|
215
|
+
* gone the field moves to `CustomerRow`.
|
|
216
|
+
* TODO(storefront#686): move to `CustomerRow` after the fallback is dropped.
|
|
217
|
+
*/
|
|
204
218
|
favorites?: Partial<Product>[];
|
|
205
219
|
fullName: string;
|
|
206
220
|
lastBuy?: number;
|
|
@@ -777,6 +791,13 @@ declare global {
|
|
|
777
791
|
* carries the contact and its dates only.
|
|
778
792
|
*/
|
|
779
793
|
contacts?: CustomerContactExportEntry[];
|
|
794
|
+
/**
|
|
795
|
+
* The subject's favorites, newest first. On BOTH surfaces — it is the
|
|
796
|
+
* subject's own data. Read from the `FAVORITE#` rows UNIONED with a legacy
|
|
797
|
+
* `Customer.favorites` array not yet materialized (rows win), because the
|
|
798
|
+
* `customer` object above no longer carries that array.
|
|
799
|
+
*/
|
|
800
|
+
favorites: CustomerFavoriteExportEntry[];
|
|
780
801
|
/**
|
|
781
802
|
* Per COLLECTION, and honest: `true` means the read stopped before the
|
|
782
803
|
* end of that partition and rows are MISSING from this export.
|
|
@@ -793,6 +814,7 @@ declare global {
|
|
|
793
814
|
addresses: boolean;
|
|
794
815
|
/** Present exactly when `contacts` is. */
|
|
795
816
|
contacts?: boolean;
|
|
817
|
+
favorites: boolean;
|
|
796
818
|
};
|
|
797
819
|
}
|
|
798
820
|
/**
|
|
@@ -917,6 +939,11 @@ declare global {
|
|
|
917
939
|
* are dropped there too, and neither is declared on `Customer` any more —
|
|
918
940
|
* they live on the api-internal `CustomerRow`, because a field this body
|
|
919
941
|
* never carries has no business being published.
|
|
942
|
+
*
|
|
943
|
+
* ⚠️ ONE EXCEPTION: the deprecated `favorites` array is stripped there too
|
|
944
|
+
* and so never arrives, yet stays declared on `Customer` until the
|
|
945
|
+
* storefront's `useFavorites` fallback that reads it is removed; the field
|
|
946
|
+
* then moves to `CustomerRow` (the follow-up is tracked on that docblock).
|
|
920
947
|
*/
|
|
921
948
|
interface AuthCustomer extends Customer {
|
|
922
949
|
accessToken: string;
|
package/dist/favorite.d.ts
CHANGED
|
@@ -35,9 +35,9 @@ declare global {
|
|
|
35
35
|
* The `'favorites'` socket frame from `POST /favorites { mode: 'add' }` and
|
|
36
36
|
* `DELETE /favorites` — a DELTA, one per change, to the one customer.
|
|
37
37
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* The old whole-array `{ storeId, customerId, favorites }` shape on the same
|
|
39
|
+
* action is no longer emitted: its only producer, the mode-less legacy
|
|
40
|
+
* `POST /favorites`, is retired. Every `'favorites'` frame carries `op`.
|
|
41
41
|
*/
|
|
42
42
|
interface FavoritesChangedPayload {
|
|
43
43
|
storeId: string;
|
|
@@ -71,6 +71,15 @@ declare global {
|
|
|
71
71
|
productId: string;
|
|
72
72
|
removed: boolean;
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* One favorite in the art. 14 data-rights export (`CustomerDataExport.favorites`):
|
|
76
|
+
* what is HELD, never a priced catalogue view. `addedAt` is `0` for an entry
|
|
77
|
+
* that came from the legacy array (materialized or not), which never recorded one.
|
|
78
|
+
*/
|
|
79
|
+
interface CustomerFavoriteExportEntry {
|
|
80
|
+
productId: string;
|
|
81
|
+
addedAt: number;
|
|
82
|
+
}
|
|
74
83
|
/** Why a `merge` id was not added. */
|
|
75
84
|
type FavoriteMergeSkipReason = 'PRODUCT_NOT_FOUND' | 'FAVORITES_LIMIT_REACHED';
|
|
76
85
|
/**
|
package/dist/favorite.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
// existed still carries the LEGACY `Customer.favorites` array on the CUSTOMER
|
|
5
5
|
// row; `GET /favorites` reads both (rows win on a shared `productId`) and the
|
|
6
6
|
// first `add`/`remove`/`merge` for that customer materializes the array into
|
|
7
|
-
// rows and then drops it. Nothing backfills
|
|
7
|
+
// rows and then drops it. Nothing backfills, and nothing writes the array any
|
|
8
|
+
// more — the mode-less whole-array `POST /favorites` is retired (400).
|
|
8
9
|
//
|
|
9
10
|
// ⚠️ A row stores ids and a timestamp, never a product snapshot. Name, price and
|
|
10
11
|
// pictures are resolved at READ time against the live catalogue and the
|
package/dist/store.d.ts
CHANGED
|
@@ -1071,6 +1071,15 @@ declare global {
|
|
|
1071
1071
|
* leg, so stock continues publishing while it is set.
|
|
1072
1072
|
*/
|
|
1073
1073
|
pricePaused?: boolean;
|
|
1074
|
+
/**
|
|
1075
|
+
* The depósitos whose stock feeds MercadoLibre on a store whose
|
|
1076
|
+
* `stockAuthority` is `'depositos'`: the push quantity is
|
|
1077
|
+
* `max(0, Σ available)` over the ACTIVE ones, before the knobs above.
|
|
1078
|
+
* Absent means the ML depósito from the sale ladder —
|
|
1079
|
+
* `config.channelWarehouses.mercadolibre`, then the primary. Ignored
|
|
1080
|
+
* while the switch is off, where the push keeps reading `Product.stock`.
|
|
1081
|
+
*/
|
|
1082
|
+
warehouseIds?: string[];
|
|
1074
1083
|
};
|
|
1075
1084
|
/**
|
|
1076
1085
|
* Unix ms of the last FULLY DRAINED run of the daily Conciliación
|
|
@@ -1128,6 +1137,12 @@ declare global {
|
|
|
1128
1137
|
paused?: boolean | null;
|
|
1129
1138
|
/** WRITE side of `pricePaused` — `null` clears it, same convention as the knobs above. */
|
|
1130
1139
|
pricePaused?: boolean | null;
|
|
1140
|
+
/**
|
|
1141
|
+
* WRITE side of `warehouseIds`. Each id must name an active depósito of
|
|
1142
|
+
* this store and the array must not be empty (both `400`); `null` clears
|
|
1143
|
+
* it, returning the feed to the sale ladder's ML depósito.
|
|
1144
|
+
*/
|
|
1145
|
+
warehouseIds?: string[] | null;
|
|
1131
1146
|
}
|
|
1132
1147
|
/**
|
|
1133
1148
|
* Full write shape for the `mercadolibre` key of `PATCH /store`'s body.
|