platform-types 1.10.672 → 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/attributes.d.ts +1 -1
- package/dist/attributes.js +1 -1
- package/dist/cash.d.ts +8 -1
- package/dist/categories.d.ts +1 -1
- package/dist/categories.js +1 -1
- package/dist/cjs/attributes.js +1 -1
- package/dist/cjs/categories.js +1 -1
- package/dist/cjs/order.js +1 -1
- package/dist/cjs/print.js +1 -1
- package/dist/cjs/roles.js +1 -1
- package/dist/cjs/socket.js +1 -1
- package/dist/order.js +1 -1
- package/dist/print.d.ts +1 -1
- package/dist/print.js +1 -1
- package/dist/roles.d.ts +1 -1
- package/dist/roles.js +1 -1
- package/dist/sentry.d.ts +1 -1
- package/dist/socket.d.ts +1 -1
- package/dist/socket.js +1 -1
- package/package.json +3 -3
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/attributes.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The five value types an attribute definition can declare. Fixed once the
|
|
3
3
|
* definition exists. A runtime value, so import it:
|
|
4
|
-
* `import { ATTRIBUTE_TYPES } from '
|
|
4
|
+
* `import { ATTRIBUTE_TYPES } from 'platform-types'`.
|
|
5
5
|
*/
|
|
6
6
|
export declare const ATTRIBUTE_TYPES: readonly ["text", "number", "select", "multiselect", "boolean"];
|
|
7
7
|
/**
|
package/dist/attributes.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The five value types an attribute definition can declare. Fixed once the
|
|
3
3
|
* definition exists. A runtime value, so import it:
|
|
4
|
-
* `import { ATTRIBUTE_TYPES } from '
|
|
4
|
+
* `import { ATTRIBUTE_TYPES } from 'platform-types'`.
|
|
5
5
|
*/
|
|
6
6
|
export const ATTRIBUTE_TYPES = [
|
|
7
7
|
'text',
|
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
|
/**
|
package/dist/categories.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The deepest a category tree may go, counted in breadcrumb SEGMENTS: a root is
|
|
3
3
|
* depth 1, so a four-level tree has depth 4 at its leaves. A runtime value, so
|
|
4
|
-
* import it: `import { CATEGORY_MAX_DEPTH } from '
|
|
4
|
+
* import it: `import { CATEGORY_MAX_DEPTH } from 'platform-types'`.
|
|
5
5
|
*/
|
|
6
6
|
export declare const CATEGORY_MAX_DEPTH = 4;
|
|
7
7
|
declare global {
|
package/dist/categories.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The deepest a category tree may go, counted in breadcrumb SEGMENTS: a root is
|
|
3
3
|
* depth 1, so a four-level tree has depth 4 at its leaves. A runtime value, so
|
|
4
|
-
* import it: `import { CATEGORY_MAX_DEPTH } from '
|
|
4
|
+
* import it: `import { CATEGORY_MAX_DEPTH } from 'platform-types'`.
|
|
5
5
|
*/
|
|
6
6
|
export const CATEGORY_MAX_DEPTH = 4;
|
package/dist/cjs/attributes.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.ATTRIBUTE_OPTIONS_MAX = exports.ATTRIBUTE_TEXT_VALUE_MAX = exports.MAX_P
|
|
|
4
4
|
/**
|
|
5
5
|
* The five value types an attribute definition can declare. Fixed once the
|
|
6
6
|
* definition exists. A runtime value, so import it:
|
|
7
|
-
* `import { ATTRIBUTE_TYPES } from '
|
|
7
|
+
* `import { ATTRIBUTE_TYPES } from 'platform-types'`.
|
|
8
8
|
*/
|
|
9
9
|
exports.ATTRIBUTE_TYPES = [
|
|
10
10
|
'text',
|
package/dist/cjs/categories.js
CHANGED
|
@@ -4,6 +4,6 @@ exports.CATEGORY_MAX_DEPTH = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* The deepest a category tree may go, counted in breadcrumb SEGMENTS: a root is
|
|
6
6
|
* depth 1, so a four-level tree has depth 4 at its leaves. A runtime value, so
|
|
7
|
-
* import it: `import { CATEGORY_MAX_DEPTH } from '
|
|
7
|
+
* import it: `import { CATEGORY_MAX_DEPTH } from 'platform-types'`.
|
|
8
8
|
*/
|
|
9
9
|
exports.CATEGORY_MAX_DEPTH = 4;
|
package/dist/cjs/order.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.ORDER_ERROR_CODES = exports.orderFulfilmentProgress = exports.isTerminal
|
|
|
9
9
|
* it:
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
|
-
* import { ORDER_FULFILMENT_TRANSITIONS, ORDER_FULFILMENT_STATUSES } from '
|
|
12
|
+
* import { ORDER_FULFILMENT_TRANSITIONS, ORDER_FULFILMENT_STATUSES } from 'platform-types';
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
* Both tables are `Record<Status, …>` over the whole union, so adding a status
|
package/dist/cjs/print.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.LABEL_TEMPLATE_IDS = void 0;
|
|
|
12
12
|
* That means it is IMPORTED, not ambient:
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
|
-
* import { LABEL_TEMPLATE_IDS, type LabelTemplateId } from '
|
|
15
|
+
* import { LABEL_TEMPLATE_IDS, type LabelTemplateId } from 'platform-types';
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
* Order is the operator-facing display order and is load-bearing for neither
|
package/dist/cjs/roles.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.PRINT_AGENT_ROLE = exports.USER_ROLES = void 0;
|
|
|
10
10
|
* so import them:
|
|
11
11
|
*
|
|
12
12
|
* ```ts
|
|
13
|
-
* import { USER_ROLES, type UserRole } from '
|
|
13
|
+
* import { USER_ROLES, type UserRole } from 'platform-types';
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* ⚠️ **`User.roles` is a delimited STRING, not one of these.** The wire shape
|
package/dist/cjs/socket.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* import them:
|
|
9
9
|
*
|
|
10
10
|
* ```ts
|
|
11
|
-
* import { SOCKET_ACTIONS, type SocketAction } from '
|
|
11
|
+
* import { SOCKET_ACTIONS, type SocketAction } from 'platform-types';
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
14
14
|
* Producers/consumers: `api` (`stacks/wss/lambdas/socket/default.ts` +
|
package/dist/order.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* it:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
|
-
* import { ORDER_FULFILMENT_TRANSITIONS, ORDER_FULFILMENT_STATUSES } from '
|
|
9
|
+
* import { ORDER_FULFILMENT_TRANSITIONS, ORDER_FULFILMENT_STATUSES } from 'platform-types';
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
12
|
* Both tables are `Record<Status, …>` over the whole union, so adding a status
|
package/dist/print.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* That means it is IMPORTED, not ambient:
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
|
-
* import { LABEL_TEMPLATE_IDS, type LabelTemplateId } from '
|
|
12
|
+
* import { LABEL_TEMPLATE_IDS, type LabelTemplateId } from 'platform-types';
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
* Order is the operator-facing display order and is load-bearing for neither
|
package/dist/print.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* That means it is IMPORTED, not ambient:
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
|
-
* import { LABEL_TEMPLATE_IDS, type LabelTemplateId } from '
|
|
12
|
+
* import { LABEL_TEMPLATE_IDS, type LabelTemplateId } from 'platform-types';
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
* Order is the operator-facing display order and is load-bearing for neither
|
package/dist/roles.d.ts
CHANGED
package/dist/roles.js
CHANGED
package/dist/sentry.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* value-level RTK endpoint, so a named import is what the consumer wants.
|
|
20
20
|
*
|
|
21
21
|
* ```ts
|
|
22
|
-
* import type { SentryIssue, SentryIssuesQuery } from '
|
|
22
|
+
* import type { SentryIssue, SentryIssuesQuery } from 'platform-types';
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
export interface SentryIssue {
|
package/dist/socket.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* import them:
|
|
8
8
|
*
|
|
9
9
|
* ```ts
|
|
10
|
-
* import { SOCKET_ACTIONS, type SocketAction } from '
|
|
10
|
+
* import { SOCKET_ACTIONS, type SocketAction } from 'platform-types';
|
|
11
11
|
* ```
|
|
12
12
|
*
|
|
13
13
|
* Producers/consumers: `api` (`stacks/wss/lambdas/socket/default.ts` +
|
package/dist/socket.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* import them:
|
|
8
8
|
*
|
|
9
9
|
* ```ts
|
|
10
|
-
* import { SOCKET_ACTIONS, type SocketAction } from '
|
|
10
|
+
* import { SOCKET_ACTIONS, type SocketAction } from 'platform-types';
|
|
11
11
|
* ```
|
|
12
12
|
*
|
|
13
13
|
* Producers/consumers: `api` (`stacks/wss/lambdas/socket/default.ts` +
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "platform-types",
|
|
3
|
-
"version": "1.10.
|
|
4
|
-
"description": "Shared wire and entity contracts for the
|
|
3
|
+
"version": "1.10.674",
|
|
4
|
+
"description": "Shared wire and entity contracts for the platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "Moises Samuel Maison Maison",
|
|
20
|
-
"homepage": "https://
|
|
20
|
+
"homepage": "https://github.com/trastienda/api/tree/main/contracts",
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
23
|
"url": "git+https://github.com/trastienda/api",
|