platform-types 1.10.723 → 1.10.724
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 +6 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/systemCustomer.js +31 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/systemCustomer.d.ts +27 -0
- package/dist/systemCustomer.js +27 -0
- package/package.json +1 -1
package/dist/account.d.ts
CHANGED
|
@@ -198,6 +198,12 @@ declare global {
|
|
|
198
198
|
* and attach the token here. The approval binds the raw body minus the token,
|
|
199
199
|
* which is why the keys marked accepted and IGNORED below are declared at all.
|
|
200
200
|
*
|
|
201
|
+
* A `customerId` equal to `SYSTEM_CUSTOMER_ID` (the walk-in, see
|
|
202
|
+
* `isSystemCustomer`) is refused `403 SYSTEM_CUSTOMER_PROTECTED`, credit and
|
|
203
|
+
* debit alike, with no business row read or written: the walk-in has no cuenta
|
|
204
|
+
* corriente. Collect a walk-in order's cash through
|
|
205
|
+
* `POST /orders { mode: 'tender' }` instead.
|
|
206
|
+
*
|
|
201
207
|
* Held to its schema by `AssertAccountPostRequestMatchesSchema`.
|
|
202
208
|
*/
|
|
203
209
|
interface AccountPostRequest extends TerminalElevationAuthorization {
|
package/dist/cjs/index.js
CHANGED
|
@@ -114,6 +114,7 @@ __exportStar(require("./terminal.js"), exports);
|
|
|
114
114
|
__exportStar(require("./supplier.js"), exports);
|
|
115
115
|
__exportStar(require("./supplierClaim.js"), exports);
|
|
116
116
|
__exportStar(require("./survey.js"), exports);
|
|
117
|
+
__exportStar(require("./systemCustomer.js"), exports);
|
|
117
118
|
__exportStar(require("./user.js"), exports);
|
|
118
119
|
__exportStar(require("./userActivity.js"), exports);
|
|
119
120
|
__exportStar(require("./valuation.js"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isSystemCustomer = exports.SYSTEM_CUSTOMER_ID = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The walk-in ("Consumidor Final") system customer — the ONE definition.
|
|
6
|
+
*
|
|
7
|
+
* Every store mints a single CUSTOMER row under this fixed id the first time it
|
|
8
|
+
* records a walk-in POS sale, so a walk-in order still carries a non-null
|
|
9
|
+
* `Order.customerId`. It carries no real identity and has no cuenta corriente.
|
|
10
|
+
* Operator writes that refuse it with `403 SYSTEM_CUSTOMER_PROTECTED` include
|
|
11
|
+
* `POST /customers` and its merge mode, the address book, contacts and notes
|
|
12
|
+
* (create and edit), a movement or a balance reprojection on `POST /account`,
|
|
13
|
+
* a payment link whose target is the customer, and the customer data-rights
|
|
14
|
+
* modes (data export, anonymize). Map the code wherever it appears; this is
|
|
15
|
+
* not a closed list.
|
|
16
|
+
*
|
|
17
|
+
* A client routes on it instead of hard-coding the literal: collecting cash on a
|
|
18
|
+
* delivered walk-in order is `POST /orders { mode: 'tender' }`, never a
|
|
19
|
+
* cuenta-corriente movement.
|
|
20
|
+
*
|
|
21
|
+
* ⚠️ Zero imports, deliberately: the server re-exports it from the leaf
|
|
22
|
+
* `stacks/helpers/protectSystemCustomer.ts` (imported by services and crons),
|
|
23
|
+
* and a client bundles it without any other contract module.
|
|
24
|
+
*
|
|
25
|
+
* The id sits outside the mintable range: the customer counter starts at 1 and
|
|
26
|
+
* a store's seeded placeholder rows hold `CUST000001`–`CUST000006`.
|
|
27
|
+
*/
|
|
28
|
+
exports.SYSTEM_CUSTOMER_ID = 'CUST000000';
|
|
29
|
+
/** `true` exactly when `customerId` is the walk-in system customer. */
|
|
30
|
+
const isSystemCustomer = (customerId) => customerId === exports.SYSTEM_CUSTOMER_ID;
|
|
31
|
+
exports.isSystemCustomer = isSystemCustomer;
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from './terminal.ts';
|
|
|
90
90
|
export * from './supplier.ts';
|
|
91
91
|
export * from './supplierClaim.ts';
|
|
92
92
|
export * from './survey.ts';
|
|
93
|
+
export * from './systemCustomer.ts';
|
|
93
94
|
export * from './user.ts';
|
|
94
95
|
export * from './userActivity.ts';
|
|
95
96
|
export * from './valuation.ts';
|
package/dist/index.js
CHANGED
|
@@ -98,6 +98,7 @@ export * from "./terminal.js";
|
|
|
98
98
|
export * from "./supplier.js";
|
|
99
99
|
export * from "./supplierClaim.js";
|
|
100
100
|
export * from "./survey.js";
|
|
101
|
+
export * from "./systemCustomer.js";
|
|
101
102
|
export * from "./user.js";
|
|
102
103
|
export * from "./userActivity.js";
|
|
103
104
|
export * from "./valuation.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The walk-in ("Consumidor Final") system customer — the ONE definition.
|
|
3
|
+
*
|
|
4
|
+
* Every store mints a single CUSTOMER row under this fixed id the first time it
|
|
5
|
+
* records a walk-in POS sale, so a walk-in order still carries a non-null
|
|
6
|
+
* `Order.customerId`. It carries no real identity and has no cuenta corriente.
|
|
7
|
+
* Operator writes that refuse it with `403 SYSTEM_CUSTOMER_PROTECTED` include
|
|
8
|
+
* `POST /customers` and its merge mode, the address book, contacts and notes
|
|
9
|
+
* (create and edit), a movement or a balance reprojection on `POST /account`,
|
|
10
|
+
* a payment link whose target is the customer, and the customer data-rights
|
|
11
|
+
* modes (data export, anonymize). Map the code wherever it appears; this is
|
|
12
|
+
* not a closed list.
|
|
13
|
+
*
|
|
14
|
+
* A client routes on it instead of hard-coding the literal: collecting cash on a
|
|
15
|
+
* delivered walk-in order is `POST /orders { mode: 'tender' }`, never a
|
|
16
|
+
* cuenta-corriente movement.
|
|
17
|
+
*
|
|
18
|
+
* ⚠️ Zero imports, deliberately: the server re-exports it from the leaf
|
|
19
|
+
* `stacks/helpers/protectSystemCustomer.ts` (imported by services and crons),
|
|
20
|
+
* and a client bundles it without any other contract module.
|
|
21
|
+
*
|
|
22
|
+
* The id sits outside the mintable range: the customer counter starts at 1 and
|
|
23
|
+
* a store's seeded placeholder rows hold `CUST000001`–`CUST000006`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SYSTEM_CUSTOMER_ID: "CUST000000";
|
|
26
|
+
/** `true` exactly when `customerId` is the walk-in system customer. */
|
|
27
|
+
export declare const isSystemCustomer: (customerId: string | undefined | null) => customerId is typeof SYSTEM_CUSTOMER_ID;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The walk-in ("Consumidor Final") system customer — the ONE definition.
|
|
3
|
+
*
|
|
4
|
+
* Every store mints a single CUSTOMER row under this fixed id the first time it
|
|
5
|
+
* records a walk-in POS sale, so a walk-in order still carries a non-null
|
|
6
|
+
* `Order.customerId`. It carries no real identity and has no cuenta corriente.
|
|
7
|
+
* Operator writes that refuse it with `403 SYSTEM_CUSTOMER_PROTECTED` include
|
|
8
|
+
* `POST /customers` and its merge mode, the address book, contacts and notes
|
|
9
|
+
* (create and edit), a movement or a balance reprojection on `POST /account`,
|
|
10
|
+
* a payment link whose target is the customer, and the customer data-rights
|
|
11
|
+
* modes (data export, anonymize). Map the code wherever it appears; this is
|
|
12
|
+
* not a closed list.
|
|
13
|
+
*
|
|
14
|
+
* A client routes on it instead of hard-coding the literal: collecting cash on a
|
|
15
|
+
* delivered walk-in order is `POST /orders { mode: 'tender' }`, never a
|
|
16
|
+
* cuenta-corriente movement.
|
|
17
|
+
*
|
|
18
|
+
* ⚠️ Zero imports, deliberately: the server re-exports it from the leaf
|
|
19
|
+
* `stacks/helpers/protectSystemCustomer.ts` (imported by services and crons),
|
|
20
|
+
* and a client bundles it without any other contract module.
|
|
21
|
+
*
|
|
22
|
+
* The id sits outside the mintable range: the customer counter starts at 1 and
|
|
23
|
+
* a store's seeded placeholder rows hold `CUST000001`–`CUST000006`.
|
|
24
|
+
*/
|
|
25
|
+
export const SYSTEM_CUSTOMER_ID = 'CUST000000';
|
|
26
|
+
/** `true` exactly when `customerId` is the walk-in system customer. */
|
|
27
|
+
export const isSystemCustomer = (customerId) => customerId === SYSTEM_CUSTOMER_ID;
|