sinfactura-types 1.10.641 → 1.10.643
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/socket.js +1 -1
- package/dist/cjs/store.js +18 -0
- package/dist/socket.d.ts +8 -0
- package/dist/socket.js +1 -1
- package/dist/store.d.ts +138 -33
- package/dist/store.js +17 -1
- package/package.json +1 -1
package/dist/cjs/socket.js
CHANGED
|
@@ -581,7 +581,7 @@ exports.SOCKET_ACTIONS = [
|
|
|
581
581
|
// ⚠️ A frame for a period whose `periodStatus` is `'OPEN'` carries numbers
|
|
582
582
|
// ML will still restate; a consumer must not render one as final.
|
|
583
583
|
'mercadolibre_settlement_period',
|
|
584
|
-
// BE → all store users when an
|
|
584
|
+
// BE → all store users when an avanzado custom domain's provisioning state
|
|
585
585
|
// moves (`CustomDomainSocketPayload`). Status only: the row's
|
|
586
586
|
// `verificationToken` is an ownership credential and is never re-sent here.
|
|
587
587
|
'customDomain',
|
package/dist/cjs/store.js
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CUSTOM_DOMAIN_ROW_LIMIT = exports.CUSTOM_DOMAIN_SLOT_LIMIT = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* How many custom-domain rows a store may hold that count: one active domain
|
|
6
|
+
* and one spare, so a replacement can be verified and provisioned before the
|
|
7
|
+
* current domain is revoked. `www` and the apex are one row. REVOKED rows and
|
|
8
|
+
* expired PENDING claims never count. `POST /store/domains { mode: 'register' }`
|
|
9
|
+
* refuses the next one `409 DOMAIN_SLOT_LIMIT` with this value as `limit`.
|
|
10
|
+
*/
|
|
11
|
+
exports.CUSTOM_DOMAIN_SLOT_LIMIT = 2;
|
|
12
|
+
/**
|
|
13
|
+
* How many DOMAIN rows a store may hold in total, whatever their status:
|
|
14
|
+
* REVOKED rows free their `CUSTOM_DOMAIN_SLOT_LIMIT` slot but a
|
|
15
|
+
* VERIFIED-then-revoked row is kept, so without this ceiling a store cycling
|
|
16
|
+
* register → verify → revoke over fresh hosts would grow its rows without
|
|
17
|
+
* bound. `POST /store/domains { mode: 'register' }` refuses the next one
|
|
18
|
+
* `409 DOMAIN_ROW_LIMIT` with this value as `limit`.
|
|
19
|
+
*/
|
|
20
|
+
exports.CUSTOM_DOMAIN_ROW_LIMIT = 10;
|
package/dist/socket.d.ts
CHANGED
|
@@ -42,7 +42,15 @@ export interface CustomDomainSocketPayload {
|
|
|
42
42
|
host: string;
|
|
43
43
|
provisioning: {
|
|
44
44
|
state: DomainProvisioningState;
|
|
45
|
+
/** 1-based; see `DomainProvisioning.step`. */
|
|
46
|
+
step?: number;
|
|
47
|
+
/** See `DomainProvisioning.total`. */
|
|
48
|
+
total?: number;
|
|
49
|
+
/** See `DomainProvisioning.records`. */
|
|
50
|
+
records?: DomainDnsRecord[];
|
|
51
|
+
/** @deprecated Read `records`; see `DomainProvisioning.certificateVerificationDnsRecord`. */
|
|
45
52
|
certificateVerificationDnsRecord?: string;
|
|
53
|
+
/** @deprecated Read `records`; see `DomainProvisioning.subDomains`. */
|
|
46
54
|
subDomains?: DomainSubDomainRecord[];
|
|
47
55
|
/** Unix MILLISECONDS. Present once `state` reaches `active`. */
|
|
48
56
|
activatedAt?: number;
|
package/dist/socket.js
CHANGED
|
@@ -578,7 +578,7 @@ export const SOCKET_ACTIONS = [
|
|
|
578
578
|
// ⚠️ A frame for a period whose `periodStatus` is `'OPEN'` carries numbers
|
|
579
579
|
// ML will still restate; a consumer must not render one as final.
|
|
580
580
|
'mercadolibre_settlement_period',
|
|
581
|
-
// BE → all store users when an
|
|
581
|
+
// BE → all store users when an avanzado custom domain's provisioning state
|
|
582
582
|
// moves (`CustomDomainSocketPayload`). Status only: the row's
|
|
583
583
|
// `verificationToken` is an ownership credential and is never re-sent here.
|
|
584
584
|
'customDomain',
|
package/dist/store.d.ts
CHANGED
|
@@ -98,6 +98,20 @@ declare global {
|
|
|
98
98
|
* never sent to shoppers.
|
|
99
99
|
*/
|
|
100
100
|
platformDisabled?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* The shop's grace deadline, Unix ms: a shop that is on and has lost the
|
|
103
|
+
* `storefront` entitlement (or whose subscription is `readonly` /
|
|
104
|
+
* `canceled`) stays open to shoppers until this instant, then reads as
|
|
105
|
+
* unavailable. `null` or absent = not in grace.
|
|
106
|
+
*
|
|
107
|
+
* Server-owned: written only by the api's `reconcileShopGrace`, never by
|
|
108
|
+
* a request — `PATCH /store` refuses it and `PUT /platform/stores/{storeId}`
|
|
109
|
+
* strips it. It keeps its past value after the deadline until the store is
|
|
110
|
+
* durably entitled again, then becomes `null`. Sent on the app `GET /store`
|
|
111
|
+
* and in every `stores` frame that carries `ecommerce` (explicit `null`
|
|
112
|
+
* there); never sent to shoppers.
|
|
113
|
+
*/
|
|
114
|
+
deactivatesAt?: number | null;
|
|
101
115
|
config?: {
|
|
102
116
|
showDefaultPriceList?: number;
|
|
103
117
|
showStocks?: boolean;
|
|
@@ -858,11 +872,12 @@ declare global {
|
|
|
858
872
|
* always sent and is `null` only when the shop has no ACTIVE slug or the
|
|
859
873
|
* public links global is off.
|
|
860
874
|
* - `stores` frames: carried by the frames of the tenant switch
|
|
861
|
-
* (`setActive`), the platform force-off (`platformDisabled` change)
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
*
|
|
865
|
-
*
|
|
875
|
+
* (`setActive`), the platform force-off (`platformDisabled` change), a
|
|
876
|
+
* slug claim or rename, a change of `ecommerce.deactivatesAt` (the shop
|
|
877
|
+
* grace) and the grace expiry (explicit `null`). Any other plan or
|
|
878
|
+
* entitlement change, the public links global flip and the expiry of a
|
|
879
|
+
* rename's redirect emit no frame carrying it — a client holding the
|
|
880
|
+
* value refetches `GET /store` to see those.
|
|
866
881
|
*/
|
|
867
882
|
publicStorefront?: PublicStorefront | null;
|
|
868
883
|
photoURL: string;
|
|
@@ -1500,28 +1515,45 @@ declare global {
|
|
|
1500
1515
|
* Lifecycle of a tenant custom-domain claim.
|
|
1501
1516
|
*
|
|
1502
1517
|
* `REVOKED` is terminal but reclaimable BY THE SAME STORE only: re-registering
|
|
1503
|
-
* a REVOKED host the caller already owns succeeds
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1518
|
+
* a REVOKED or PENDING host the caller already owns succeeds (a PENDING one is
|
|
1519
|
+
* re-minted with a fresh token and a fresh seven-day claim), while a PENDING
|
|
1520
|
+
* or VERIFIED row owned by anyone else — or the caller's own VERIFIED row —
|
|
1521
|
+
* refuses the write. A row revoked AFTER verification is kept for audit and
|
|
1522
|
+
* squatter-protection and does NOT count against the store's domain slots
|
|
1523
|
+
* (`CUSTOM_DOMAIN_SLOT_LIMIT`): revoking a row frees its slot. It does count
|
|
1524
|
+
* against `CUSTOM_DOMAIN_ROW_LIMIT`. A claim revoked by its store BEFORE
|
|
1525
|
+
* verification is deleted instead — it proved no ownership, so it protects
|
|
1526
|
+
* nothing — and stops appearing in the listing.
|
|
1527
|
+
* A PENDING row counts while its seven-day claim is unexpired, and cannot be
|
|
1528
|
+
* verified once that claim has expired; a VERIFIED row always counts — see
|
|
1529
|
+
* `DomainErrorCode`.
|
|
1507
1530
|
*/
|
|
1508
1531
|
type DomainStatus = 'PENDING' | 'VERIFIED' | 'REVOKED';
|
|
1509
1532
|
/**
|
|
1510
|
-
* Where
|
|
1511
|
-
*
|
|
1512
|
-
* provisioning is what the platform does with a host once it is proven.
|
|
1533
|
+
* Where custom-domain provisioning stands for a VERIFIED host. The ownership
|
|
1534
|
+
* flow (register → DNS-TXT verify) is unchanged and precedes this;
|
|
1535
|
+
* provisioning is what the platform does with a host once it is proven. The
|
|
1536
|
+
* states name no hosting provider and keep their meaning whichever one serves
|
|
1537
|
+
* the host.
|
|
1513
1538
|
*
|
|
1514
|
-
* - `pending_dns` —
|
|
1515
|
-
*
|
|
1539
|
+
* - `pending_dns` — provisioning has started; waiting on the tenant to publish
|
|
1540
|
+
* the DNS records in `DomainProvisioning.records`.
|
|
1516
1541
|
* - `in_progress` — DNS looks right; the certificate is being issued and the
|
|
1517
1542
|
* domain deployed.
|
|
1518
|
-
* - `active` — the
|
|
1519
|
-
* - `failed` —
|
|
1520
|
-
*
|
|
1521
|
-
*
|
|
1543
|
+
* - `active` — the domain is live.
|
|
1544
|
+
* - `failed` — provisioning failed, including the certificate not issuing
|
|
1545
|
+
* within 72 h. A new `provision` call starts a fresh attempt.
|
|
1546
|
+
* - `unconfigured` — this stage cannot onboard custom domains. A deployment
|
|
1547
|
+
* fact, not a tenant fault: offer no retry.
|
|
1522
1548
|
*/
|
|
1523
1549
|
type DomainProvisioningState = 'pending_dns' | 'in_progress' | 'active' | 'failed' | 'unconfigured';
|
|
1524
|
-
/**
|
|
1550
|
+
/**
|
|
1551
|
+
* One sub-domain of a provisioned host, mirroring a hosting provider's own
|
|
1552
|
+
* per-prefix record.
|
|
1553
|
+
*
|
|
1554
|
+
* @deprecated Read `DomainProvisioning.records` (`DomainDnsRecord`). Kept
|
|
1555
|
+
* readable until rows written in this shape are gone; no new writer.
|
|
1556
|
+
*/
|
|
1525
1557
|
interface DomainSubDomainRecord {
|
|
1526
1558
|
/** `''` for the apex, `'www'` etc. */
|
|
1527
1559
|
prefix: string;
|
|
@@ -1532,18 +1564,54 @@ declare global {
|
|
|
1532
1564
|
dnsRecord?: string;
|
|
1533
1565
|
verified: boolean;
|
|
1534
1566
|
}
|
|
1567
|
+
/**
|
|
1568
|
+
* One DNS record the tenant must publish for a custom domain to provision.
|
|
1569
|
+
* Show `name` and `value` verbatim; never re-derive or re-prefix either.
|
|
1570
|
+
*/
|
|
1571
|
+
interface DomainDnsRecord {
|
|
1572
|
+
/**
|
|
1573
|
+
* The normalised host this record serves (`www.example.com`,
|
|
1574
|
+
* `example.com`). Group the records by it.
|
|
1575
|
+
*/
|
|
1576
|
+
host: string;
|
|
1577
|
+
type: 'CNAME' | 'TXT' | 'ALIAS';
|
|
1578
|
+
/** Fully qualified: most DNS forms append the zone, so say so when showing it. */
|
|
1579
|
+
name: string;
|
|
1580
|
+
value: string;
|
|
1581
|
+
/** The per-record DNS check. */
|
|
1582
|
+
status: 'pending' | 'verified';
|
|
1583
|
+
}
|
|
1535
1584
|
/**
|
|
1536
1585
|
* Provisioning sub-state carried on the SAME `DomainRecord` row — a domain is
|
|
1537
1586
|
* one entity, not two. Absent until provisioning has been attempted for the
|
|
1538
1587
|
* host, which is every row written before this shipped.
|
|
1539
1588
|
*
|
|
1589
|
+
* Provider-neutral: `step`/`total` and `records` describe progress without
|
|
1590
|
+
* naming who serves the host. A row may carry neither, in which case show no
|
|
1591
|
+
* step counter and no record list — never a client-side step constant.
|
|
1592
|
+
*
|
|
1540
1593
|
* Timestamps are **Unix MILLISECONDS**, the same unit as `createdAt` /
|
|
1541
1594
|
* `verifiedAt` on the enclosing row.
|
|
1542
1595
|
*/
|
|
1543
1596
|
interface DomainProvisioning {
|
|
1544
1597
|
state: DomainProvisioningState;
|
|
1545
|
-
/**
|
|
1598
|
+
/** 1-based position of the current step. Hide the counter when this or `total` is absent. */
|
|
1599
|
+
step?: number;
|
|
1600
|
+
/** Number of steps, decided by the server. */
|
|
1601
|
+
total?: number;
|
|
1602
|
+
/** The DNS records the tenant must publish, one or more per host. */
|
|
1603
|
+
records?: DomainDnsRecord[];
|
|
1604
|
+
/**
|
|
1605
|
+
* A certificate-validation CNAME instruction — shown to the tenant once, verbatim.
|
|
1606
|
+
*
|
|
1607
|
+
* @deprecated Read `records`. Kept readable until rows written in this
|
|
1608
|
+
* shape are gone; no new writer.
|
|
1609
|
+
*/
|
|
1546
1610
|
certificateVerificationDnsRecord?: string;
|
|
1611
|
+
/**
|
|
1612
|
+
* @deprecated Read `records`. Kept readable until rows written in this
|
|
1613
|
+
* shape are gone; no new writer.
|
|
1614
|
+
*/
|
|
1547
1615
|
subDomains?: DomainSubDomainRecord[];
|
|
1548
1616
|
/** Unix MILLISECONDS — last time the poller checked the provider. Operator diagnostic, not tenant-facing. */
|
|
1549
1617
|
lastCheckedAt?: number;
|
|
@@ -1589,7 +1657,7 @@ declare global {
|
|
|
1589
1657
|
verifiedAt?: number;
|
|
1590
1658
|
/** Unix MILLISECONDS. Present once the claim has been revoked. */
|
|
1591
1659
|
revokedAt?: number;
|
|
1592
|
-
/** Present only once
|
|
1660
|
+
/** Present only once avanzado provisioning has been attempted for this VERIFIED host. */
|
|
1593
1661
|
provisioning?: DomainProvisioning;
|
|
1594
1662
|
}
|
|
1595
1663
|
/**
|
|
@@ -1685,9 +1753,18 @@ declare global {
|
|
|
1685
1753
|
* deliberately NOT gated by the unclaimable-host guard that `register` and
|
|
1686
1754
|
* `verify` apply — a row that should never have existed can always be undone.
|
|
1687
1755
|
*
|
|
1688
|
-
*
|
|
1689
|
-
* audit and squatter-protection
|
|
1690
|
-
*
|
|
1756
|
+
* Revoking frees the row's domain slot: a VERIFIED row survives as
|
|
1757
|
+
* `REVOKED` for audit and squatter-protection but no longer counts against
|
|
1758
|
+
* `CUSTOM_DOMAIN_SLOT_LIMIT`, so revoking clears `DOMAIN_SLOT_LIMIT`. A
|
|
1759
|
+
* claim that was never verified is deleted rather than kept — the same 200,
|
|
1760
|
+
* and the host is gone from the next listing — which also gives back its
|
|
1761
|
+
* `CUSTOM_DOMAIN_ROW_LIMIT` row.
|
|
1762
|
+
*
|
|
1763
|
+
* Revoking a provisioned row deprovisions it first, in the same request —
|
|
1764
|
+
* there is no refusal asking the tenant to deprovision before revoking. When
|
|
1765
|
+
* the revoked row was the store's public custom domain, `publicStorefront`
|
|
1766
|
+
* moves to the next active row, else back to the slug host, and one `stores`
|
|
1767
|
+
* frame announces it.
|
|
1691
1768
|
*/
|
|
1692
1769
|
interface DomainRevokeResult {
|
|
1693
1770
|
/**
|
|
@@ -1706,14 +1783,24 @@ declare global {
|
|
|
1706
1783
|
* `body.error` codes a `POST /store/domains` refusal can carry, each verified
|
|
1707
1784
|
* against a return site in the handler.
|
|
1708
1785
|
*
|
|
1709
|
-
* - `
|
|
1710
|
-
*
|
|
1711
|
-
*
|
|
1712
|
-
*
|
|
1713
|
-
*
|
|
1714
|
-
*
|
|
1786
|
+
* - `DOMAIN_SLOT_LIMIT` (**409**, `register`) — the store already holds
|
|
1787
|
+
* `CUSTOM_DOMAIN_SLOT_LIMIT` rows that count: every row that is not REVOKED,
|
|
1788
|
+
* except a PENDING row whose seven-day claim has expired and the row of the
|
|
1789
|
+
* host being registered. Body `{ message, error, limit }`, `limit` being
|
|
1790
|
+
* `CUSTOM_DOMAIN_SLOT_LIMIT`. Revoking a row frees its slot.
|
|
1791
|
+
* - `DOMAIN_ROW_LIMIT` (**409**, `register`) — the store already holds
|
|
1792
|
+
* `CUSTOM_DOMAIN_ROW_LIMIT` DOMAIN rows of any status, REVOKED and expired
|
|
1793
|
+
* PENDING included, other than the row of the host being registered.
|
|
1794
|
+
* Body `{ message, error, limit }`, `limit` being `CUSTOM_DOMAIN_ROW_LIMIT`.
|
|
1795
|
+
* Checked before `DOMAIN_SLOT_LIMIT`. Revoking a VERIFIED row does not
|
|
1796
|
+
* clear it (that row is kept); revoking a never-verified claim does
|
|
1797
|
+
* (that row is deleted). Otherwise it needs support, not a retry.
|
|
1798
|
+
* - `DOMAIN_LIMIT_REACHED` (**429**, `register`) — the previous cap's code.
|
|
1799
|
+
* No current writer; a stage one release behind still answers it, with a
|
|
1800
|
+
* `message` and a numeric `limit`, and counted REVOKED rows too.
|
|
1715
1801
|
* - `DOMAIN_OWNED_BY_OTHER_STORE` (**409**, `register`) — a PENDING or
|
|
1716
|
-
* VERIFIED row for this host belongs to a different store
|
|
1802
|
+
* VERIFIED row for this host belongs to a different store, or the host is
|
|
1803
|
+
* already this store's VERIFIED domain.
|
|
1717
1804
|
* - `DOMAIN_NOT_CLAIMABLE` (**409**, `register` AND `verify`) — the host is
|
|
1718
1805
|
* not any single store's: a storefront apex serving many tenants, or a
|
|
1719
1806
|
* platform origin already on the static CORS allowlist. Permanent for that
|
|
@@ -1728,6 +1815,24 @@ declare global {
|
|
|
1728
1815
|
* present at all. A consumer switching on `body.error` alone silently misses
|
|
1729
1816
|
* the verify case and falls through to a generic message.
|
|
1730
1817
|
*/
|
|
1731
|
-
type DomainErrorCode = '
|
|
1818
|
+
type DomainErrorCode = 'DOMAIN_SLOT_LIMIT' | 'DOMAIN_ROW_LIMIT'
|
|
1819
|
+
/** @deprecated No writer; answered only by a stage one release behind. Map it like `DOMAIN_SLOT_LIMIT`. */
|
|
1820
|
+
| 'DOMAIN_LIMIT_REACHED' | 'DOMAIN_OWNED_BY_OTHER_STORE' | 'DOMAIN_NOT_CLAIMABLE' | 'NOT_OWNER';
|
|
1732
1821
|
}
|
|
1733
|
-
|
|
1822
|
+
/**
|
|
1823
|
+
* How many custom-domain rows a store may hold that count: one active domain
|
|
1824
|
+
* and one spare, so a replacement can be verified and provisioned before the
|
|
1825
|
+
* current domain is revoked. `www` and the apex are one row. REVOKED rows and
|
|
1826
|
+
* expired PENDING claims never count. `POST /store/domains { mode: 'register' }`
|
|
1827
|
+
* refuses the next one `409 DOMAIN_SLOT_LIMIT` with this value as `limit`.
|
|
1828
|
+
*/
|
|
1829
|
+
export declare const CUSTOM_DOMAIN_SLOT_LIMIT = 2;
|
|
1830
|
+
/**
|
|
1831
|
+
* How many DOMAIN rows a store may hold in total, whatever their status:
|
|
1832
|
+
* REVOKED rows free their `CUSTOM_DOMAIN_SLOT_LIMIT` slot but a
|
|
1833
|
+
* VERIFIED-then-revoked row is kept, so without this ceiling a store cycling
|
|
1834
|
+
* register → verify → revoke over fresh hosts would grow its rows without
|
|
1835
|
+
* bound. `POST /store/domains { mode: 'register' }` refuses the next one
|
|
1836
|
+
* `409 DOMAIN_ROW_LIMIT` with this value as `limit`.
|
|
1837
|
+
*/
|
|
1838
|
+
export declare const CUSTOM_DOMAIN_ROW_LIMIT = 10;
|
package/dist/store.js
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* How many custom-domain rows a store may hold that count: one active domain
|
|
3
|
+
* and one spare, so a replacement can be verified and provisioned before the
|
|
4
|
+
* current domain is revoked. `www` and the apex are one row. REVOKED rows and
|
|
5
|
+
* expired PENDING claims never count. `POST /store/domains { mode: 'register' }`
|
|
6
|
+
* refuses the next one `409 DOMAIN_SLOT_LIMIT` with this value as `limit`.
|
|
7
|
+
*/
|
|
8
|
+
export const CUSTOM_DOMAIN_SLOT_LIMIT = 2;
|
|
9
|
+
/**
|
|
10
|
+
* How many DOMAIN rows a store may hold in total, whatever their status:
|
|
11
|
+
* REVOKED rows free their `CUSTOM_DOMAIN_SLOT_LIMIT` slot but a
|
|
12
|
+
* VERIFIED-then-revoked row is kept, so without this ceiling a store cycling
|
|
13
|
+
* register → verify → revoke over fresh hosts would grow its rows without
|
|
14
|
+
* bound. `POST /store/domains { mode: 'register' }` refuses the next one
|
|
15
|
+
* `409 DOMAIN_ROW_LIMIT` with this value as `limit`.
|
|
16
|
+
*/
|
|
17
|
+
export const CUSTOM_DOMAIN_ROW_LIMIT = 10;
|