platform-types 1.10.754 → 1.10.756
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/customer.js +8 -1
- package/dist/cjs/notification.js +18 -1
- package/dist/customer.d.ts +12 -0
- package/dist/customer.js +7 -0
- package/dist/notification.d.ts +33 -1
- package/dist/notification.js +18 -1
- package/package.json +1 -1
package/dist/cjs/customer.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CUSTOMER_ACQUISITION_CHANNELS = exports.CUSTOMER_LIFECYCLE_STAGES = exports.CUSTOMER_KINDS = void 0;
|
|
3
|
+
exports.CUSTOMER_DISCOUNT_MAX = exports.CUSTOMER_ACQUISITION_CHANNELS = exports.CUSTOMER_LIFECYCLE_STAGES = exports.CUSTOMER_KINDS = void 0;
|
|
4
4
|
exports.CUSTOMER_KINDS = ['person', 'company'];
|
|
5
5
|
exports.CUSTOMER_LIFECYCLE_STAGES = ['lead', 'active', 'inactive'];
|
|
6
6
|
exports.CUSTOMER_ACQUISITION_CHANNELS = ['storefront', 'pos', 'marketplace', 'import', 'manual'];
|
|
7
|
+
/**
|
|
8
|
+
* The highest standing `Customer.discount` (percent) a write may SET. A higher
|
|
9
|
+
* value is refused `400 CUSTOMER_DISCOUNT_OVER_MAX` by `POST /customers` and the
|
|
10
|
+
* customer import. A stored legacy value above it is kept: a write that leaves
|
|
11
|
+
* `discount` unchanged (or omits it) still saves.
|
|
12
|
+
*/
|
|
13
|
+
exports.CUSTOMER_DISCOUNT_MAX = 50;
|
package/dist/cjs/notification.js
CHANGED
|
@@ -5,7 +5,8 @@ exports.NotificationTypeEnum = void 0;
|
|
|
5
5
|
// Indexed producers resolve candidates through `getNotificationSubscribers`:
|
|
6
6
|
// legacy opt-ins and explicit channel maps remain source data on USER rows.
|
|
7
7
|
// Addressed ERROR / ML_FACTURADOR_COLLISION / ML_SELLER_SWITCHED /
|
|
8
|
-
// ML_CONNECTION_BROKEN / MENTION do not select a
|
|
8
|
+
// ML_CONNECTION_BROKEN / MENTION / CUSTOMER_PENDING_APPROVAL do not select a
|
|
9
|
+
// producer subscriber audience;
|
|
9
10
|
// the consumer still reads the live USER row for each delivery channel.
|
|
10
11
|
// AFIP_CERT_EXPIRY is seeded on the founding user and uses the subscriber index.
|
|
11
12
|
// Exported as a real enum consumed by api and app; adding an indexed type
|
|
@@ -157,4 +158,20 @@ var NotificationTypeEnum;
|
|
|
157
158
|
* click-through targets.
|
|
158
159
|
*/
|
|
159
160
|
NotificationTypeEnum["EXPIRY_ALERT"] = "EXPIRY_ALERT";
|
|
161
|
+
/**
|
|
162
|
+
* A shopper registered on the storefront while the store's
|
|
163
|
+
* `ecommerce.config.registrationMode` is `'approval'`, and the account waits
|
|
164
|
+
* for an operator to approve or reject it. Names the registrant by name only.
|
|
165
|
+
*
|
|
166
|
+
* ⚠️ Additive, on the same grounds as `ABANDONED_CART`. The producer fans out
|
|
167
|
+
* to every non-disabled ADMIN-tier user with no legacy opt-in scan, as for
|
|
168
|
+
* `ML_SELLER_SWITCHED` (a new key is seeded nowhere). The consumer enforces
|
|
169
|
+
* explicit type/channel preferences, default-on when absent. No backfill or
|
|
170
|
+
* consumer migration is owed.
|
|
171
|
+
*
|
|
172
|
+
* ⚠️ Carries `pendingCustomerRef` and NEVER a top-level `customerId` (an
|
|
173
|
+
* audience — the operator bell would reach the pending registrant's own
|
|
174
|
+
* storefront socket), and never the registrant's email address.
|
|
175
|
+
*/
|
|
176
|
+
NotificationTypeEnum["CUSTOMER_PENDING_APPROVAL"] = "CUSTOMER_PENDING_APPROVAL";
|
|
160
177
|
})(NotificationTypeEnum || (exports.NotificationTypeEnum = NotificationTypeEnum = {}));
|
package/dist/customer.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export declare const CUSTOMER_KINDS: readonly ["person", "company"];
|
|
2
2
|
export declare const CUSTOMER_LIFECYCLE_STAGES: readonly ["lead", "active", "inactive"];
|
|
3
3
|
export declare const CUSTOMER_ACQUISITION_CHANNELS: readonly ["storefront", "pos", "marketplace", "import", "manual"];
|
|
4
|
+
/**
|
|
5
|
+
* The highest standing `Customer.discount` (percent) a write may SET. A higher
|
|
6
|
+
* value is refused `400 CUSTOMER_DISCOUNT_OVER_MAX` by `POST /customers` and the
|
|
7
|
+
* customer import. A stored legacy value above it is kept: a write that leaves
|
|
8
|
+
* `discount` unchanged (or omits it) still saves.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CUSTOMER_DISCOUNT_MAX = 50;
|
|
4
11
|
declare global {
|
|
5
12
|
/** Exact identity matches within the token's store; no stored identity fields are returned. */
|
|
6
13
|
interface CustomerDuplicateCandidate {
|
|
@@ -285,6 +292,11 @@ declare global {
|
|
|
285
292
|
* that reason whatever this says.
|
|
286
293
|
*/
|
|
287
294
|
accessState?: 'pending' | 'rejected';
|
|
295
|
+
/**
|
|
296
|
+
* Standing discount percent, pre-filled on every pre-order for this customer.
|
|
297
|
+
* Writes cap it at `CUSTOMER_DISCOUNT_MAX` (50); rows written before the cap
|
|
298
|
+
* may hold up to 100 and are never rewritten.
|
|
299
|
+
*/
|
|
288
300
|
discount: number;
|
|
289
301
|
/** Absent after erasure or the final merge flip; registration still requires an address. */
|
|
290
302
|
email?: string;
|
package/dist/customer.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export const CUSTOMER_KINDS = ['person', 'company'];
|
|
2
2
|
export const CUSTOMER_LIFECYCLE_STAGES = ['lead', 'active', 'inactive'];
|
|
3
3
|
export const CUSTOMER_ACQUISITION_CHANNELS = ['storefront', 'pos', 'marketplace', 'import', 'manual'];
|
|
4
|
+
/**
|
|
5
|
+
* The highest standing `Customer.discount` (percent) a write may SET. A higher
|
|
6
|
+
* value is refused `400 CUSTOMER_DISCOUNT_OVER_MAX` by `POST /customers` and the
|
|
7
|
+
* customer import. A stored legacy value above it is kept: a write that leaves
|
|
8
|
+
* `discount` unchanged (or omits it) still saves.
|
|
9
|
+
*/
|
|
10
|
+
export const CUSTOMER_DISCOUNT_MAX = 50;
|
package/dist/notification.d.ts
CHANGED
|
@@ -136,7 +136,23 @@ export declare enum NotificationTypeEnum {
|
|
|
136
136
|
* on a store until a user turns it on. Carries `productId` and `lotId` as its
|
|
137
137
|
* click-through targets.
|
|
138
138
|
*/
|
|
139
|
-
EXPIRY_ALERT = "EXPIRY_ALERT"
|
|
139
|
+
EXPIRY_ALERT = "EXPIRY_ALERT",
|
|
140
|
+
/**
|
|
141
|
+
* A shopper registered on the storefront while the store's
|
|
142
|
+
* `ecommerce.config.registrationMode` is `'approval'`, and the account waits
|
|
143
|
+
* for an operator to approve or reject it. Names the registrant by name only.
|
|
144
|
+
*
|
|
145
|
+
* ⚠️ Additive, on the same grounds as `ABANDONED_CART`. The producer fans out
|
|
146
|
+
* to every non-disabled ADMIN-tier user with no legacy opt-in scan, as for
|
|
147
|
+
* `ML_SELLER_SWITCHED` (a new key is seeded nowhere). The consumer enforces
|
|
148
|
+
* explicit type/channel preferences, default-on when absent. No backfill or
|
|
149
|
+
* consumer migration is owed.
|
|
150
|
+
*
|
|
151
|
+
* ⚠️ Carries `pendingCustomerRef` and NEVER a top-level `customerId` (an
|
|
152
|
+
* audience — the operator bell would reach the pending registrant's own
|
|
153
|
+
* storefront socket), and never the registrant's email address.
|
|
154
|
+
*/
|
|
155
|
+
CUSTOMER_PENDING_APPROVAL = "CUSTOMER_PENDING_APPROVAL"
|
|
140
156
|
}
|
|
141
157
|
declare global {
|
|
142
158
|
type CustomerNotificationPreferences = Partial<Record<'reminder-scheduled' | 'appointment-reminder', {
|
|
@@ -183,6 +199,17 @@ declare global {
|
|
|
183
199
|
*/
|
|
184
200
|
cartId?: string;
|
|
185
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Which registration a `CUSTOMER_PENDING_APPROVAL` operator bell is about. A
|
|
204
|
+
* POINTER, never an audience — the same reason as {@link AbandonedCartRef}:
|
|
205
|
+
* the top-level `customerId` would deliver the bell to the registrant.
|
|
206
|
+
* Operator surfaces only.
|
|
207
|
+
*/
|
|
208
|
+
interface PendingCustomerRef {
|
|
209
|
+
customerId: string;
|
|
210
|
+
/** The row's `emailVerified` at registration — `false` when the address is still unproven. */
|
|
211
|
+
emailVerified: boolean;
|
|
212
|
+
}
|
|
186
213
|
interface NotificationInterface {
|
|
187
214
|
storeId: string;
|
|
188
215
|
notificationId: string;
|
|
@@ -224,6 +251,11 @@ declare global {
|
|
|
224
251
|
* on bells written before it existed.
|
|
225
252
|
*/
|
|
226
253
|
cartRef?: AbandonedCartRef;
|
|
254
|
+
/**
|
|
255
|
+
* `CUSTOMER_PENDING_APPROVAL` only: which pending registration to open. A
|
|
256
|
+
* POINTER, not an audience — see {@link PendingCustomerRef}.
|
|
257
|
+
*/
|
|
258
|
+
pendingCustomerRef?: PendingCustomerRef;
|
|
227
259
|
/** `MENTION` only: the colleague who wrote the mention (a snapshot). */
|
|
228
260
|
actor?: NotificationActor;
|
|
229
261
|
userId?: string;
|
package/dist/notification.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Indexed producers resolve candidates through `getNotificationSubscribers`:
|
|
3
3
|
// legacy opt-ins and explicit channel maps remain source data on USER rows.
|
|
4
4
|
// Addressed ERROR / ML_FACTURADOR_COLLISION / ML_SELLER_SWITCHED /
|
|
5
|
-
// ML_CONNECTION_BROKEN / MENTION do not select a
|
|
5
|
+
// ML_CONNECTION_BROKEN / MENTION / CUSTOMER_PENDING_APPROVAL do not select a
|
|
6
|
+
// producer subscriber audience;
|
|
6
7
|
// the consumer still reads the live USER row for each delivery channel.
|
|
7
8
|
// AFIP_CERT_EXPIRY is seeded on the founding user and uses the subscriber index.
|
|
8
9
|
// Exported as a real enum consumed by api and app; adding an indexed type
|
|
@@ -154,4 +155,20 @@ export var NotificationTypeEnum;
|
|
|
154
155
|
* click-through targets.
|
|
155
156
|
*/
|
|
156
157
|
NotificationTypeEnum["EXPIRY_ALERT"] = "EXPIRY_ALERT";
|
|
158
|
+
/**
|
|
159
|
+
* A shopper registered on the storefront while the store's
|
|
160
|
+
* `ecommerce.config.registrationMode` is `'approval'`, and the account waits
|
|
161
|
+
* for an operator to approve or reject it. Names the registrant by name only.
|
|
162
|
+
*
|
|
163
|
+
* ⚠️ Additive, on the same grounds as `ABANDONED_CART`. The producer fans out
|
|
164
|
+
* to every non-disabled ADMIN-tier user with no legacy opt-in scan, as for
|
|
165
|
+
* `ML_SELLER_SWITCHED` (a new key is seeded nowhere). The consumer enforces
|
|
166
|
+
* explicit type/channel preferences, default-on when absent. No backfill or
|
|
167
|
+
* consumer migration is owed.
|
|
168
|
+
*
|
|
169
|
+
* ⚠️ Carries `pendingCustomerRef` and NEVER a top-level `customerId` (an
|
|
170
|
+
* audience — the operator bell would reach the pending registrant's own
|
|
171
|
+
* storefront socket), and never the registrant's email address.
|
|
172
|
+
*/
|
|
173
|
+
NotificationTypeEnum["CUSTOMER_PENDING_APPROVAL"] = "CUSTOMER_PENDING_APPROVAL";
|
|
157
174
|
})(NotificationTypeEnum || (NotificationTypeEnum = {}));
|