@mohasinac/appkit 4.60.0 → 4.60.1
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/.build-stamp.json +3 -3
- package/dist/_internal/server/features/orders/adapters.d.ts +20 -2
- package/dist/_internal/server/features/orders/adapters.js +18 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +3 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +5 -0
- package/package.json +1 -1
package/dist/.build-stamp.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"stampVersion": 1,
|
|
3
|
-
"version": "4.60.
|
|
4
|
-
"head": "
|
|
3
|
+
"version": "4.60.1",
|
|
4
|
+
"head": "ac867a7431db3bc6e19b100623e0be5979b1033a",
|
|
5
5
|
"branch": "main",
|
|
6
6
|
"dirty": false,
|
|
7
|
-
"builtAt": "2026-10-
|
|
7
|
+
"builtAt": "2026-10-22T00:08:17.154Z"
|
|
8
8
|
}
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
import type { Order } from "../../../../features/orders/types";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { OrderPlain } from "../../../../features/orders/schemas/firestore";
|
|
3
|
+
/**
|
|
4
|
+
* 🛑 `OrderPlain`, not `OrderDocument` — this builds the BUYER-FACING shape.
|
|
5
|
+
*
|
|
6
|
+
* `orderRepository.findById` is ciphertext-by-default, so a signature taking
|
|
7
|
+
* the raw document would invite a caller to hand over `enc:v1:` strings and
|
|
8
|
+
* have them copied straight into an API response. The one caller
|
|
9
|
+
* (`GET /api/user/orders/[id]`) already holds a revealed order; this makes the
|
|
10
|
+
* signature say so.
|
|
11
|
+
*
|
|
12
|
+
* It does not currently read any of `ORDER_PII_FIELDS` (`userName`,
|
|
13
|
+
* `userEmail`, `sellerEmail`), so nothing is leaking today — the point is that
|
|
14
|
+
* adding one of them later is correct by default rather than a new leak.
|
|
15
|
+
*
|
|
16
|
+
* Accepted residue, stated rather than hidden: `Encrypted<string>` is
|
|
17
|
+
* assignable to `string`, so a raw document still satisfies this structurally.
|
|
18
|
+
* The brand forces the choice at the REPOSITORY boundary, which is where it
|
|
19
|
+
* can actually be enforced; this parameter documents the expectation.
|
|
20
|
+
*/
|
|
21
|
+
export declare function orderDocumentToOrder(doc: OrderPlain): Order;
|
|
@@ -37,6 +37,24 @@ function toIsoOrUndefined(value) {
|
|
|
37
37
|
}
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* 🛑 `OrderPlain`, not `OrderDocument` — this builds the BUYER-FACING shape.
|
|
42
|
+
*
|
|
43
|
+
* `orderRepository.findById` is ciphertext-by-default, so a signature taking
|
|
44
|
+
* the raw document would invite a caller to hand over `enc:v1:` strings and
|
|
45
|
+
* have them copied straight into an API response. The one caller
|
|
46
|
+
* (`GET /api/user/orders/[id]`) already holds a revealed order; this makes the
|
|
47
|
+
* signature say so.
|
|
48
|
+
*
|
|
49
|
+
* It does not currently read any of `ORDER_PII_FIELDS` (`userName`,
|
|
50
|
+
* `userEmail`, `sellerEmail`), so nothing is leaking today — the point is that
|
|
51
|
+
* adding one of them later is correct by default rather than a new leak.
|
|
52
|
+
*
|
|
53
|
+
* Accepted residue, stated rather than hidden: `Encrypted<string>` is
|
|
54
|
+
* assignable to `string`, so a raw document still satisfies this structurally.
|
|
55
|
+
* The brand forces the choice at the REPOSITORY boundary, which is where it
|
|
56
|
+
* can actually be enforced; this parameter documents the expectation.
|
|
57
|
+
*/
|
|
40
58
|
export function orderDocumentToOrder(doc) {
|
|
41
59
|
const items = doc.items?.length
|
|
42
60
|
? doc.items.map((item) => ({
|
package/dist/client.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export { BUILT_IN_THEMES, DEFAULT_DARK_THEME, DEFAULT_LIGHT_THEME, REQUIRED_GRAD
|
|
|
31
31
|
export type { GradientKey, RequiredThemeToken, ThemeMode, ThemeRecord, } from "./tokens/themes";
|
|
32
32
|
export { ConfirmDeleteModal } from "./ui/components/ConfirmDeleteModal";
|
|
33
33
|
export { EmptyState } from "./ui/components/EmptyState";
|
|
34
|
+
export { FilterChipGroup } from "./ui/components/FilterChipGroup";
|
|
34
35
|
export { Skeleton } from "./ui/components/Skeleton";
|
|
35
36
|
export { IconBox } from "./ui/components/IconBox";
|
|
36
37
|
export type { IconBoxProps, IconBoxRounded, IconBoxSize, IconBoxTone, } from "./ui/components/IconBox";
|
package/dist/client.js
CHANGED
|
@@ -52,6 +52,9 @@ export { BUILT_IN_THEMES, DEFAULT_DARK_THEME, DEFAULT_LIGHT_THEME, REQUIRED_GRAD
|
|
|
52
52
|
export { ConfirmDeleteModal } from "./ui/components/ConfirmDeleteModal.js";
|
|
53
53
|
// S-STORE — pure-UI primitives + Seller view consumed by new dashboard pages
|
|
54
54
|
export { EmptyState } from "./ui/components/EmptyState.js";
|
|
55
|
+
/* FilterChipGroup — a client UI primitive that existed, was used by
|
|
56
|
+
`ProtectionClaimsClient`, and was never exported here. */
|
|
57
|
+
export { FilterChipGroup } from "./ui/components/FilterChipGroup.js";
|
|
55
58
|
export { Skeleton } from "./ui/components/Skeleton.js";
|
|
56
59
|
// IconBox — square-icon container primitive; was exported from index.ts only,
|
|
57
60
|
// missing here even though CLAUDE.md documents it as a client-usable pattern.
|
package/dist/server.d.ts
CHANGED
|
@@ -571,6 +571,7 @@ export type { ActionIndexValidationContext, ActionIndexValidationIssue, } from "
|
|
|
571
571
|
export { ActionIndexRepository, actionIndexRepository, } from "./features/search/action-index/repository";
|
|
572
572
|
export type { ActionIndexDocument } from "./features/search/action-index/repository";
|
|
573
573
|
export { REFUND_COPY } from "./_internal/shared/features/orders/refund-copy";
|
|
574
|
+
export { wouldBeFullRefund } from "./_internal/shared/checkout/refundable-base";
|
|
574
575
|
export { RETURN_REASON, FINAL_SALE_EXEMPT_REASONS, RETURN_REASON_LABEL, RETURN_REASON_GROUP_LABEL, isFinalSaleExempt, isReturnReason, selectableReturnReasons, } from "./_internal/shared/features/orders/return-reasons";
|
|
575
576
|
export type { ReturnReason } from "./_internal/shared/features/orders/return-reasons";
|
|
576
577
|
export { draftToProductInput, productToDraft, } from "./features/seller/utils/product-draft-mapping";
|
package/dist/server.js
CHANGED
|
@@ -1528,6 +1528,11 @@ export { SUBDIVISIONS, subdivisionsFor } from "./constants/geo/subdivisions.js";
|
|
|
1528
1528
|
export { validateActionIndexEntry, normaliseRoute, } from "./features/search/action-index/validate-entry.js";
|
|
1529
1529
|
export { ActionIndexRepository, actionIndexRepository, } from "./features/search/action-index/repository.js";
|
|
1530
1530
|
export { REFUND_COPY } from "./_internal/shared/features/orders/refund-copy.js";
|
|
1531
|
+
/*
|
|
1532
|
+
* `wouldBeFullRefund` — from refundable-base, NOT return-reasons. It was
|
|
1533
|
+
* never exported at all, so the admin refund route could not import it.
|
|
1534
|
+
*/
|
|
1535
|
+
export { wouldBeFullRefund } from "./_internal/shared/checkout/refundable-base.js";
|
|
1531
1536
|
// Return / refund reasons — the closed enum the final-sale gate branches on.
|
|
1532
1537
|
// See the module docstring for why the exempt set is "seller or carrier fault"
|
|
1533
1538
|
// rather than "serious reasons".
|