sinfactura-types 1.10.652 → 1.10.654
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 +2 -1
- package/dist/inventory.d.ts +1 -1
- package/dist/platform.d.ts +37 -2
- package/dist/socket.d.ts +12 -2
- package/dist/socket.js +2 -1
- package/package.json +1 -1
package/dist/cjs/socket.js
CHANGED
|
@@ -584,7 +584,8 @@ exports.SOCKET_ACTIONS = [
|
|
|
584
584
|
// ML will still restate; a consumer must not render one as final.
|
|
585
585
|
'mercadolibre_settlement_period',
|
|
586
586
|
// BE → the store's OPERATOR sockets when an avanzado custom domain's provisioning state
|
|
587
|
-
// moves,
|
|
587
|
+
// moves, a teardown removes it (`provisioning: null`), or a revoke lands (`status: 'REVOKED'`)
|
|
588
|
+
// (`CustomDomainSocketPayload`). Status only: the row's
|
|
588
589
|
// `verificationToken` is an ownership credential and is never re-sent here.
|
|
589
590
|
'customDomain',
|
|
590
591
|
// BE → all store users on every purchase-order write: create, update, cancel,
|
package/dist/inventory.d.ts
CHANGED
|
@@ -326,7 +326,7 @@ declare global {
|
|
|
326
326
|
* mixture could never be unpicked afterwards.
|
|
327
327
|
*
|
|
328
328
|
* ⚠️ **The same segment is what makes the partition reachable by a tenant
|
|
329
|
-
* purge.**
|
|
329
|
+
* purge.** The tenant-operation coordinator's row sweep selects a row only when the storeId is a
|
|
330
330
|
* `#`-DELIMITED PK segment or the whole SK (`pkBelongsToStore`,
|
|
331
331
|
* `@helpers/tenantPartitions`), so a key carrying no storeId anywhere is
|
|
332
332
|
* invisible to delete-tenant and reset-tenant alike. The delimiters are load
|
package/dist/platform.d.ts
CHANGED
|
@@ -125,14 +125,35 @@ export interface ResetCashOpResult {
|
|
|
125
125
|
/** Present only when `complete` is `false`. */
|
|
126
126
|
cursor?: string;
|
|
127
127
|
}
|
|
128
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* `POST /platform/operations { mode: 'delete-tenant' | 'reset-tenant' }` — both tenant wipes take the same body.
|
|
130
|
+
* The wipe runs asynchronously; poll `GET /platform/tenant-operations/{operationId}` for its
|
|
131
|
+
* `TenantOperationStatus`. The body carries no `requestId`: the server DERIVES one from the stage,
|
|
132
|
+
* the operator, the action, the store and its audit-lifecycle generation, so a repeat replays:
|
|
133
|
+
*
|
|
134
|
+
* - a new admission answers `202 { message, data: TenantOperationAdmission }`;
|
|
135
|
+
* - a repeat while the operation is live answers `200` with that same operation;
|
|
136
|
+
* - a repeat of an operation that `failed` before its business phase finished requeues it and
|
|
137
|
+
* answers `200` (the legacy shape's restart);
|
|
138
|
+
* - a repeat of a finished delete answers `200` with the completed operation;
|
|
139
|
+
* - a finished reset rotates the generation, so the next reset is a fresh `202` — also when that
|
|
140
|
+
* reset's observation stage later `failed`: the legacy shape cannot restart it, and the fresh
|
|
141
|
+
* reset's own archive closure re-cleans the residue. A caller that needs to restart such an
|
|
142
|
+
* operation admits through `TenantOperationV2Body` and repeats its own `requestId`.
|
|
143
|
+
*
|
|
144
|
+
* `reason` is not part of the replay match — the first admission's is the one recorded. Another
|
|
145
|
+
* MANAGER's call is a new admission, refused `409 TENANT_OPERATION_IN_PROGRESS` while one is live.
|
|
146
|
+
*/
|
|
129
147
|
export interface TenantWipeOpBody extends PlatformOperatorReason {
|
|
130
148
|
mode: 'delete-tenant' | 'reset-tenant';
|
|
131
149
|
storeId: string;
|
|
132
150
|
/** Must equal `storeId`. */
|
|
133
151
|
confirm: string;
|
|
134
152
|
}
|
|
135
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* `POST /platform/operations { mode: 'tenant-operation-v2' }` — the replayable admission: the same
|
|
155
|
+
* `requestId` and payload answer `200` with the same operation, a changed payload `409`; a new one `202`.
|
|
156
|
+
*/
|
|
136
157
|
export interface TenantOperationV2Body extends PlatformOperatorReason {
|
|
137
158
|
mode: 'tenant-operation-v2';
|
|
138
159
|
action: 'delete-tenant' | 'reset-tenant';
|
|
@@ -140,6 +161,19 @@ export interface TenantOperationV2Body extends PlatformOperatorReason {
|
|
|
140
161
|
storeId: string;
|
|
141
162
|
confirm: string;
|
|
142
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* - `queued`, `running`, `uncertain` — NOT terminal: the business phase is pending, in progress, or
|
|
166
|
+
* its last attempt threw and will be retried; the store stays quiesced.
|
|
167
|
+
* - `business-completed` — the business data and the entity chain are gone and the store can be
|
|
168
|
+
* recreated; the archives and derivatives are still being closed. It lasts at least the
|
|
169
|
+
* cold-delivery window (24 h 15 min from admission) and is NOT final — but it may also be where
|
|
170
|
+
* the operation stops: when the observation stage gives up on residue it cannot prove, the status
|
|
171
|
+
* stays `business-completed` for good, the open classes `pending`/`unresolved`, and never reaches
|
|
172
|
+
* `completed`. No field tells the two apart; a poller bounds its wait.
|
|
173
|
+
* - `completed` — terminal: every class is final (none `pending` or `unresolved`).
|
|
174
|
+
* - `failed` — terminal until restarted: the stall ceiling was reached. A replay of the admitting
|
|
175
|
+
* request requeues it (`queued`, or `business-completed` once the business phase had finished).
|
|
176
|
+
*/
|
|
143
177
|
export type TenantOperationState = 'queued' | 'running' | 'uncertain' | 'business-completed' | 'completed' | 'failed';
|
|
144
178
|
export interface TenantOperationClassReport {
|
|
145
179
|
classId: string;
|
|
@@ -153,6 +187,7 @@ export interface TenantOperationAdmission {
|
|
|
153
187
|
action: 'delete-tenant' | 'reset-tenant';
|
|
154
188
|
targetStoreId: string;
|
|
155
189
|
}
|
|
190
|
+
/** `GET /platform/tenant-operations/{operationId}` → `{ message, data }`; `status` is a `TenantOperationState`. */
|
|
156
191
|
export interface TenantOperationStatus extends TenantOperationAdmission {
|
|
157
192
|
createdAt: number;
|
|
158
193
|
updatedAt: number;
|
package/dist/socket.d.ts
CHANGED
|
@@ -43,8 +43,10 @@ export interface CustomDomainSocketPayload {
|
|
|
43
43
|
/**
|
|
44
44
|
* The attempt as it now stands, or `null` when a teardown (a deprovision, a
|
|
45
45
|
* revoke, the grace-expiry sweep) removed it — whatever state it was in.
|
|
46
|
-
* Merge the `null` over a cached row: the attempt is gone
|
|
47
|
-
* be provisioned again
|
|
46
|
+
* Merge the `null` over a cached row: the attempt is gone. Whether the host
|
|
47
|
+
* can be provisioned again depends on `status`: absent (a deprovision, the
|
|
48
|
+
* grace sweep), the row is still VERIFIED and it can; `'REVOKED'`, the host
|
|
49
|
+
* is gone from the store and must not be offered for publishing.
|
|
48
50
|
*/
|
|
49
51
|
provisioning: {
|
|
50
52
|
state: DomainProvisioningState;
|
|
@@ -69,6 +71,14 @@ export interface CustomDomainSocketPayload {
|
|
|
69
71
|
* still type-checks.
|
|
70
72
|
*/
|
|
71
73
|
deactivatesAt?: number | null;
|
|
74
|
+
/**
|
|
75
|
+
* The row's status, sent only when the frame follows a status change: a
|
|
76
|
+
* revoke posts ONE frame after its REVOKED write lands —
|
|
77
|
+
* `{ provisioning: null, deactivatesAt: null, status: 'REVOKED' }` — never the
|
|
78
|
+
* bare teardown frame before it. Absent means the status did not move; keep
|
|
79
|
+
* the cached one.
|
|
80
|
+
*/
|
|
81
|
+
status?: DomainStatus;
|
|
72
82
|
}
|
|
73
83
|
/**
|
|
74
84
|
* `data` of the BULK-IMPORT `customers` frame: "drop your cached customer list
|
package/dist/socket.js
CHANGED
|
@@ -581,7 +581,8 @@ export const SOCKET_ACTIONS = [
|
|
|
581
581
|
// ML will still restate; a consumer must not render one as final.
|
|
582
582
|
'mercadolibre_settlement_period',
|
|
583
583
|
// BE → the store's OPERATOR sockets when an avanzado custom domain's provisioning state
|
|
584
|
-
// moves,
|
|
584
|
+
// moves, a teardown removes it (`provisioning: null`), or a revoke lands (`status: 'REVOKED'`)
|
|
585
|
+
// (`CustomDomainSocketPayload`). Status only: the row's
|
|
585
586
|
// `verificationToken` is an ownership credential and is never re-sent here.
|
|
586
587
|
'customDomain',
|
|
587
588
|
// BE → all store users on every purchase-order write: create, update, cancel,
|