platform-types 1.10.848 → 1.10.849
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/customer.d.ts +124 -0
- package/package.json +1 -1
package/dist/customer.d.ts
CHANGED
|
@@ -1257,6 +1257,88 @@ declare global {
|
|
|
1257
1257
|
productId: string;
|
|
1258
1258
|
lastOrderedAt: number;
|
|
1259
1259
|
}
|
|
1260
|
+
/**
|
|
1261
|
+
* One entry of `CustomerDataExport.serviceOrders`: a service ticket as the
|
|
1262
|
+
* customer was told about it — an ALLOW-LIST of the `ServiceOrder` row, never
|
|
1263
|
+
* the row itself. The diagnosis, the work logs, the parts and their cost, the
|
|
1264
|
+
* technician, the operator status notes and who moved each status, the quote's
|
|
1265
|
+
* approver/rejecter and rejection note, the hold, the deposits and the
|
|
1266
|
+
* pictures are the workshop's own record and are NOT here.
|
|
1267
|
+
*/
|
|
1268
|
+
interface CustomerDataExportServiceOrder {
|
|
1269
|
+
serviceOrderId: string;
|
|
1270
|
+
ticketNumber: string;
|
|
1271
|
+
serviceType: ServiceType;
|
|
1272
|
+
status: ServiceStatus;
|
|
1273
|
+
/** The status timeline, oldest first: each status and when it was entered, nothing else. */
|
|
1274
|
+
statusHistory: {
|
|
1275
|
+
status: ServiceStatus;
|
|
1276
|
+
timestamp: number;
|
|
1277
|
+
}[];
|
|
1278
|
+
/** The equipment as received. Absent when the ticket recorded none (or an erasure removed it). */
|
|
1279
|
+
equipment?: {
|
|
1280
|
+
type?: string;
|
|
1281
|
+
brand?: string;
|
|
1282
|
+
model?: string;
|
|
1283
|
+
serialNumber?: string;
|
|
1284
|
+
accessories?: string[];
|
|
1285
|
+
condition?: string;
|
|
1286
|
+
reportedIssue?: string;
|
|
1287
|
+
};
|
|
1288
|
+
/** Every quote version, oldest first — the customer-facing fields only. */
|
|
1289
|
+
quote?: {
|
|
1290
|
+
quoteId: string;
|
|
1291
|
+
version: number;
|
|
1292
|
+
status: ServiceQuoteStatus;
|
|
1293
|
+
amount: number;
|
|
1294
|
+
currency?: string;
|
|
1295
|
+
quotedAt?: number;
|
|
1296
|
+
expiresAt?: number;
|
|
1297
|
+
/** When and through which channel the customer approved — never who recorded it. */
|
|
1298
|
+
approval?: {
|
|
1299
|
+
at: number;
|
|
1300
|
+
channel: ServiceQuoteChannel;
|
|
1301
|
+
};
|
|
1302
|
+
/** When and why the customer declined — never the operator's note or who recorded it. */
|
|
1303
|
+
rejection?: {
|
|
1304
|
+
at: number;
|
|
1305
|
+
reason: ServiceQuoteRejectionReason;
|
|
1306
|
+
};
|
|
1307
|
+
}[];
|
|
1308
|
+
total?: number;
|
|
1309
|
+
currency: string;
|
|
1310
|
+
createdAt: number;
|
|
1311
|
+
promisedAt?: number;
|
|
1312
|
+
readyAt?: number;
|
|
1313
|
+
deliveredAt?: number;
|
|
1314
|
+
/** `true` on a ticket the store soft-deleted; absent on a live one. */
|
|
1315
|
+
disabled?: boolean;
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* `CustomerDataExport.loyalty`: the subject's points account and ledger. Never
|
|
1319
|
+
* the acting user (`createdBy`) of a ledger row — a third party's id.
|
|
1320
|
+
*/
|
|
1321
|
+
interface CustomerDataExportLoyalty {
|
|
1322
|
+
/** Absent when nothing ever credited or debited the customer (no account row exists). */
|
|
1323
|
+
account?: {
|
|
1324
|
+
balance: number;
|
|
1325
|
+
lifetimePoints: number;
|
|
1326
|
+
tierId?: string;
|
|
1327
|
+
updatedAt: number;
|
|
1328
|
+
};
|
|
1329
|
+
/** The ledger, newest first. */
|
|
1330
|
+
transactions: {
|
|
1331
|
+
transactionId: string;
|
|
1332
|
+
kind: LoyaltyTransactionKind;
|
|
1333
|
+
/** Signed, as written: an `earn` positive, a `redeem` negative, an `adjust` either. */
|
|
1334
|
+
points: number;
|
|
1335
|
+
currency: string;
|
|
1336
|
+
createdAt: number;
|
|
1337
|
+
orderId?: string;
|
|
1338
|
+
couponCode?: string;
|
|
1339
|
+
rewardId?: string;
|
|
1340
|
+
}[];
|
|
1341
|
+
}
|
|
1260
1342
|
/**
|
|
1261
1343
|
* Supported customer, CRM, order, invoice, ledger and directly customer-linked
|
|
1262
1344
|
* payment collections, assembled for the SUBJECT
|
|
@@ -1364,6 +1446,20 @@ declare global {
|
|
|
1364
1446
|
* storefront quote requests).
|
|
1365
1447
|
*/
|
|
1366
1448
|
quoteRequests?: QuoteRequest[];
|
|
1449
|
+
/**
|
|
1450
|
+
* The subject's service tickets, newest first, on BOTH surfaces: live and
|
|
1451
|
+
* soft-deleted (`disabled: true`), under their own id plus any merged-away id
|
|
1452
|
+
* folded into them (the same folded ids, and the same cap, as the financial
|
|
1453
|
+
* collections). At most 200 live and 200 soft-deleted per id. Absent when
|
|
1454
|
+
* there is none (and from servers predating this section).
|
|
1455
|
+
*/
|
|
1456
|
+
serviceOrders?: CustomerDataExportServiceOrder[];
|
|
1457
|
+
/**
|
|
1458
|
+
* The subject's loyalty account and points ledger (at most 1,000 rows), on
|
|
1459
|
+
* BOTH surfaces, under their OWN id only. Absent when there is neither an
|
|
1460
|
+
* account nor a ledger row (and from servers predating this section).
|
|
1461
|
+
*/
|
|
1462
|
+
loyalty?: CustomerDataExportLoyalty;
|
|
1367
1463
|
/**
|
|
1368
1464
|
* Per COLLECTION, and honest: `true` means the read stopped before the
|
|
1369
1465
|
* end of a partition, folded financial IDs were omitted at the cap, or whole
|
|
@@ -1399,6 +1495,15 @@ declare global {
|
|
|
1399
1495
|
* past the per-export request cap, may be missing.
|
|
1400
1496
|
*/
|
|
1401
1497
|
quoteRequests?: boolean;
|
|
1498
|
+
/**
|
|
1499
|
+
* Present when `serviceOrders` is, or when merged-away ids were cut at the
|
|
1500
|
+
* folded-id cap — then `true`: a ticket under an omitted id, past the
|
|
1501
|
+
* per-id cap or the read budget, or cut by the response-byte bound, may be
|
|
1502
|
+
* missing.
|
|
1503
|
+
*/
|
|
1504
|
+
serviceOrders?: boolean;
|
|
1505
|
+
/** Present exactly when `loyalty` is: `true` when ledger rows past the cap, or the byte bound, are missing. */
|
|
1506
|
+
loyalty?: boolean;
|
|
1402
1507
|
};
|
|
1403
1508
|
}
|
|
1404
1509
|
/**
|
|
@@ -1737,6 +1842,25 @@ declare global {
|
|
|
1737
1842
|
* (`CUSTOMER_ANONYMIZE_CREDIT_NOTE_MARKER_INCOMPLETE`).
|
|
1738
1843
|
*/
|
|
1739
1844
|
creditNoteMarkerEraseComplete?: boolean;
|
|
1845
|
+
/**
|
|
1846
|
+
* `SERVICE#` tickets of this customer, live and soft-deleted, whose
|
|
1847
|
+
* customer-describing free text this erasure took off: `equipment`'s
|
|
1848
|
+
* `serialNumber`, `reportedIssue`, `condition` and `accessories` REMOVEd, and
|
|
1849
|
+
* `search` rebuilt without the serial and the customer's name. The ticket's
|
|
1850
|
+
* operational and fiscal skeleton is kept. Both wires carry it: it counts the
|
|
1851
|
+
* subject's own rows. A re-issue counts only the tickets an earlier pass did
|
|
1852
|
+
* not reach. Optional only so the field is additive.
|
|
1853
|
+
*/
|
|
1854
|
+
serviceOrdersScrubbed?: number;
|
|
1855
|
+
/**
|
|
1856
|
+
* `false` when those tickets could not be read or written to the end, so a
|
|
1857
|
+
* serial or a reported fault may remain. Re-issuing the erasure re-runs the
|
|
1858
|
+
* step (it reads at most 1,000 of the subject's tickets, so past that a
|
|
1859
|
+
* re-issue cannot finish it); BOTH erasure handlers write a deduped `ERROR` row
|
|
1860
|
+
* (`CUSTOMER_ANONYMIZE_SERVICE_ORDERS_INCOMPLETE`). Only a measured `true` is
|
|
1861
|
+
* a finished step.
|
|
1862
|
+
*/
|
|
1863
|
+
serviceOrderScrubComplete?: boolean;
|
|
1740
1864
|
/**
|
|
1741
1865
|
* Storefront quote requests the subject sent signed in
|
|
1742
1866
|
* (`QUOTEREQUEST#{storeId}`), DELETED by this erasure — the whole row goes:
|