platform-types 1.10.673 → 1.10.674
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/account.d.ts +41 -2
- package/dist/cash.d.ts +8 -1
- package/package.json +1 -1
package/dist/account.d.ts
CHANGED
|
@@ -188,14 +188,15 @@ declare global {
|
|
|
188
188
|
* `POST /account` — a new customer-ledger movement. Mirrors the request side of
|
|
189
189
|
* the insert schema in `stacks/lambdas/account/_post.ts`; the schema strips
|
|
190
190
|
* unknown keys, so the root `elevationToken` is read off the raw body. A body
|
|
191
|
-
* carrying a non-empty `accountId` is
|
|
191
|
+
* carrying a non-empty `accountId` is {@link AccountMetadataEditRequest}, and
|
|
192
192
|
* `mode: 'reproject-balance'` is {@link CustomerBalanceReprojectRequest} —
|
|
193
193
|
* neither is this shape.
|
|
194
194
|
*
|
|
195
195
|
* From a PIN operator session, a `debit` that moves cash (`source: 'cash'`,
|
|
196
196
|
* else an EFECTIVO `subject`) is the `'account.cash-debit'` elevated action:
|
|
197
197
|
* mint it with no `subjectId` (see {@link TerminalElevationRequest.subjectId})
|
|
198
|
-
* and attach the token here.
|
|
198
|
+
* and attach the token here. The approval binds the raw body minus the token,
|
|
199
|
+
* which is why the keys marked accepted and IGNORED below are declared at all.
|
|
199
200
|
*
|
|
200
201
|
* Held to its schema by `AssertAccountPostRequestMatchesSchema`.
|
|
201
202
|
*/
|
|
@@ -219,6 +220,44 @@ declare global {
|
|
|
219
220
|
source?: Account['source'];
|
|
220
221
|
/** A `Store.paymentMethods` id, frozen on the row. */
|
|
221
222
|
method?: number;
|
|
223
|
+
/** Accepted and IGNORED, whatever its type: the server mints its own write clock. */
|
|
224
|
+
createdAt?: number;
|
|
225
|
+
/** Accepted and IGNORED, whatever its type: the server derives it from its own `createdAt`. */
|
|
226
|
+
dated?: number;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* `POST /account` with a non-empty `accountId` — a metadata-only edit of that
|
|
230
|
+
* movement. Mirrors `accountUpdateSchema` (`stacks/lambdas/account/_post.ts`):
|
|
231
|
+
* only `subject` and `details` are written. No money moves, so there is no
|
|
232
|
+
* FX conversion, balance delta, cash mirror or elevation. An `accountId`
|
|
233
|
+
* naming no movement — or a `BALANCE-` checkpoint — is refused
|
|
234
|
+
* `404 ACCOUNT_MOVEMENT_NOT_FOUND`, with nothing written.
|
|
235
|
+
*
|
|
236
|
+
* Not {@link AccountPostRequest}: the presence of `accountId` is what routes
|
|
237
|
+
* a body here, so the insert shape never carries one.
|
|
238
|
+
*
|
|
239
|
+
* Held to its schema by `AssertAccountMetadataEditRequestMatchesSchema`.
|
|
240
|
+
*/
|
|
241
|
+
interface AccountMetadataEditRequest {
|
|
242
|
+
/** The movement's `SK`. Any non-empty string: two id formats coexist. */
|
|
243
|
+
accountId: string;
|
|
244
|
+
subject?: string;
|
|
245
|
+
details?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Accepted and IGNORED, never written: the stored row's `customerId` is the
|
|
248
|
+
* composite `${customerId}#${createdAt}`, so a bare id would corrupt it.
|
|
249
|
+
*/
|
|
250
|
+
customerId?: string;
|
|
251
|
+
/** Echoed by an edit form. Accepted and IGNORED, whatever its type, never written. */
|
|
252
|
+
fullName?: AccountPostRequest['fullName'];
|
|
253
|
+
/** Echoed by an edit form. Accepted and IGNORED, whatever its type, never written. */
|
|
254
|
+
type?: AccountPostRequest['type'];
|
|
255
|
+
/** Echoed by an edit form. Accepted and IGNORED, whatever its type: no money moves. */
|
|
256
|
+
amount?: AccountPostRequest['amount'];
|
|
257
|
+
/** Echoed by an edit form. Accepted and IGNORED, whatever its type: no money moves. */
|
|
258
|
+
currency?: AccountPostRequest['currency'];
|
|
259
|
+
/** Echoed by an edit form. Accepted and IGNORED, whatever its type: no money moves. */
|
|
260
|
+
currencyValueOverride?: AccountPostRequest['currencyValueOverride'];
|
|
222
261
|
}
|
|
223
262
|
/**
|
|
224
263
|
* The STORED carried-forward checkpoint row, at `PK: ACCOUNT#{storeId}` /
|
package/dist/cash.d.ts
CHANGED
|
@@ -70,7 +70,9 @@ declare global {
|
|
|
70
70
|
* From a PIN operator session, an insert with `outcome > 0`, or an edit that
|
|
71
71
|
* changes `outcome` to another value above zero, is the `'cash.withdrawal'`
|
|
72
72
|
* elevated action: mint it with no `subjectId` (see
|
|
73
|
-
* {@link TerminalElevationRequest.subjectId}) and attach the token here.
|
|
73
|
+
* {@link TerminalElevationRequest.subjectId}) and attach the token here. The
|
|
74
|
+
* approval binds the raw body minus the token, which is why `createdAt` is
|
|
75
|
+
* declared at all.
|
|
74
76
|
*
|
|
75
77
|
* Held to its schema by `AssertCashPostRequestMatchesSchema`.
|
|
76
78
|
*/
|
|
@@ -87,6 +89,11 @@ declare global {
|
|
|
87
89
|
dated?: number;
|
|
88
90
|
/** A platform catalog id (`ars`, `usd-oficial`, …) or an ISO code (`ARS`, `USD`, …). */
|
|
89
91
|
currency?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Accepted and IGNORED, whatever its type: an insert mints its own (the row's
|
|
94
|
+
* `SK`), and an edit keeps the stored one.
|
|
95
|
+
*/
|
|
96
|
+
createdAt?: number;
|
|
90
97
|
}
|
|
91
98
|
type CashShiftStatus = 'OPEN' | 'CLOSED' | 'RECONCILED' | 'REJECTED';
|
|
92
99
|
/**
|