@juo/blocks 1.21.0 → 1.22.0
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/core.js +81 -38
- package/dist/services/orders/adapter.d.ts +10 -0
- package/dist/services/orders/adapter.d.ts.map +1 -1
- package/dist/services/orders/adapter.test.d.ts +2 -0
- package/dist/services/orders/adapter.test.d.ts.map +1 -0
- package/dist/services/orders/index.d.ts +3 -3
- package/dist/services/orders/index.d.ts.map +1 -1
- package/dist/services/orders/ordersService.d.ts.map +1 -1
- package/dist/services/orders/types.d.ts +31 -1
- package/dist/services/orders/types.d.ts.map +1 -1
- package/dist/services/schedules/adapter.d.ts.map +1 -1
- package/dist/services/simulateLatency.d.ts +7 -0
- package/dist/services/simulateLatency.d.ts.map +1 -0
- package/dist/services/subscription/adapter.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -635,6 +635,14 @@ function createLoginService(init) {
|
|
|
635
635
|
return service;
|
|
636
636
|
}
|
|
637
637
|
const LoginServiceContext = createContext("services/login");
|
|
638
|
+
class OrderPayError extends Error {
|
|
639
|
+
constructor(status) {
|
|
640
|
+
super(`HTTP ${status}`);
|
|
641
|
+
__publicField(this, "status");
|
|
642
|
+
this.name = "OrderPayError";
|
|
643
|
+
this.status = status;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
638
646
|
function createMockOrdersAdapter() {
|
|
639
647
|
const mockOrders = [
|
|
640
648
|
{
|
|
@@ -668,7 +676,7 @@ function createMockOrdersAdapter() {
|
|
|
668
676
|
placedAt: "2024-09-20T14:15:00Z",
|
|
669
677
|
currencyCode: "USD",
|
|
670
678
|
totalPrice: 45.99,
|
|
671
|
-
financialStatus: "
|
|
679
|
+
financialStatus: "PENDING",
|
|
672
680
|
fulfillmentStatus: "PARTIALLY_FULFILLED",
|
|
673
681
|
lines: [
|
|
674
682
|
{
|
|
@@ -679,7 +687,14 @@ function createMockOrdersAdapter() {
|
|
|
679
687
|
customAttributes: []
|
|
680
688
|
}
|
|
681
689
|
],
|
|
682
|
-
customAttributes: []
|
|
690
|
+
customAttributes: [],
|
|
691
|
+
// Postpaid invoice between auto-charge attempts — theme preview shows
|
|
692
|
+
// the "Pay now" button and the "Next attempt on ..." line.
|
|
693
|
+
payment: {
|
|
694
|
+
state: "retry_scheduled",
|
|
695
|
+
nextAttemptAt: "2024-09-27T14:15:00Z",
|
|
696
|
+
actions: ["pay"]
|
|
697
|
+
}
|
|
683
698
|
}
|
|
684
699
|
];
|
|
685
700
|
return {
|
|
@@ -693,6 +708,9 @@ function createMockOrdersAdapter() {
|
|
|
693
708
|
endCursor: null
|
|
694
709
|
}
|
|
695
710
|
};
|
|
711
|
+
},
|
|
712
|
+
async payOrder(orderId) {
|
|
713
|
+
return { url: `https://example.com/mock-pay/${orderId}` };
|
|
696
714
|
}
|
|
697
715
|
};
|
|
698
716
|
}
|
|
@@ -702,7 +720,10 @@ function mapOrderLine(item) {
|
|
|
702
720
|
id: item.id,
|
|
703
721
|
title: item.title,
|
|
704
722
|
quantity: item.quantity,
|
|
705
|
-
variantImage: ((_a = item.variantImage) == null ? void 0 : _a.url) ? {
|
|
723
|
+
variantImage: ((_a = item.variantImage) == null ? void 0 : _a.url) ? {
|
|
724
|
+
url: item.variantImage.url,
|
|
725
|
+
altText: item.variantImage.altText ?? void 0
|
|
726
|
+
} : null,
|
|
706
727
|
customAttributes: item.customAttributes
|
|
707
728
|
};
|
|
708
729
|
}
|
|
@@ -716,7 +737,8 @@ function mapOrder(order) {
|
|
|
716
737
|
financialStatus: order.financialStatus,
|
|
717
738
|
fulfillmentStatus: order.fulfillmentStatus,
|
|
718
739
|
lines: order.items.map(mapOrderLine),
|
|
719
|
-
customAttributes: order.customAttributes
|
|
740
|
+
customAttributes: order.customAttributes,
|
|
741
|
+
payment: order.payment ?? null
|
|
720
742
|
};
|
|
721
743
|
}
|
|
722
744
|
function createApiOrdersAdapter(fetcher) {
|
|
@@ -727,7 +749,8 @@ function createApiOrdersAdapter(fetcher) {
|
|
|
727
749
|
if ((params == null ? void 0 : params.after) != null) query.set("after", params.after);
|
|
728
750
|
if ((params == null ? void 0 : params.before) != null) query.set("before", params.before);
|
|
729
751
|
if ((params == null ? void 0 : params.query) != null) query.set("query", params.query);
|
|
730
|
-
if ((params == null ? void 0 : params.includeOneTime) != null)
|
|
752
|
+
if ((params == null ? void 0 : params.includeOneTime) != null)
|
|
753
|
+
query.set("includeOneTime", String(params.includeOneTime));
|
|
731
754
|
if ((params == null ? void 0 : params.sort) != null) query.set("sort", params.sort);
|
|
732
755
|
const qs = query.toString();
|
|
733
756
|
const res = await fetcher(`/customer/v1/orders${qs ? `?${qs}` : ""}`);
|
|
@@ -742,6 +765,14 @@ function createApiOrdersAdapter(fetcher) {
|
|
|
742
765
|
endCursor: body.endCursor
|
|
743
766
|
}
|
|
744
767
|
};
|
|
768
|
+
},
|
|
769
|
+
async payOrder(orderId) {
|
|
770
|
+
const res = await fetcher(
|
|
771
|
+
`/customer/v1/orders/${encodeURIComponent(orderId)}/pay`,
|
|
772
|
+
{ method: "POST" }
|
|
773
|
+
);
|
|
774
|
+
if (!res.ok) throw new OrderPayError(res.status);
|
|
775
|
+
return await res.json();
|
|
745
776
|
}
|
|
746
777
|
};
|
|
747
778
|
}
|
|
@@ -754,6 +785,14 @@ function createOrdersService(adapter) {
|
|
|
754
785
|
} catch (error) {
|
|
755
786
|
return { _tag: "Failure", error };
|
|
756
787
|
}
|
|
788
|
+
},
|
|
789
|
+
async payOrder(orderId) {
|
|
790
|
+
try {
|
|
791
|
+
const data = await adapter.payOrder(orderId);
|
|
792
|
+
return { _tag: "Success", data };
|
|
793
|
+
} catch (error) {
|
|
794
|
+
return { _tag: "Failure", error };
|
|
795
|
+
}
|
|
757
796
|
}
|
|
758
797
|
};
|
|
759
798
|
}
|
|
@@ -1260,6 +1299,9 @@ const DISCOUNT_REJECTION_REASONS = [
|
|
|
1260
1299
|
"INVALID_COMBINATION",
|
|
1261
1300
|
"QUANTITY_REQUIREMENT_NOT_MET"
|
|
1262
1301
|
];
|
|
1302
|
+
function simulateLatency(ms) {
|
|
1303
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1304
|
+
}
|
|
1263
1305
|
function toAttributeArray(next) {
|
|
1264
1306
|
return Object.entries(next).map(([key, value]) => ({ key, value }));
|
|
1265
1307
|
}
|
|
@@ -1473,7 +1515,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1473
1515
|
];
|
|
1474
1516
|
return {
|
|
1475
1517
|
async getById(id) {
|
|
1476
|
-
await
|
|
1518
|
+
await simulateLatency(300);
|
|
1477
1519
|
const subscription = mockSubscriptions.find((sub) => sub.id === id);
|
|
1478
1520
|
return {
|
|
1479
1521
|
_tag: "Success",
|
|
@@ -1485,7 +1527,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1485
1527
|
};
|
|
1486
1528
|
},
|
|
1487
1529
|
async search(options2 = {}) {
|
|
1488
|
-
await
|
|
1530
|
+
await simulateLatency(300);
|
|
1489
1531
|
const pageSize = 2;
|
|
1490
1532
|
const allItems = mockSubscriptions;
|
|
1491
1533
|
let startIndex = 0;
|
|
@@ -1521,7 +1563,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1521
1563
|
},
|
|
1522
1564
|
async addItem({ subscriptionId, item }) {
|
|
1523
1565
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
1524
|
-
await
|
|
1566
|
+
await simulateLatency(300);
|
|
1525
1567
|
const subscription = mockSubscriptions.find((sub) => sub.id === subscriptionId);
|
|
1526
1568
|
if (!subscription) {
|
|
1527
1569
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
@@ -1548,7 +1590,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1548
1590
|
return { _tag: "Success", data: void 0 };
|
|
1549
1591
|
},
|
|
1550
1592
|
async removeItem({ subscriptionId, itemId }) {
|
|
1551
|
-
await
|
|
1593
|
+
await simulateLatency(300);
|
|
1552
1594
|
const subscription = mockSubscriptions.find((sub) => sub.id === subscriptionId);
|
|
1553
1595
|
if (!subscription) {
|
|
1554
1596
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
@@ -1558,7 +1600,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1558
1600
|
return { _tag: "Success", data: void 0 };
|
|
1559
1601
|
},
|
|
1560
1602
|
async updateItem({ subscriptionId, lineId, update }) {
|
|
1561
|
-
await
|
|
1603
|
+
await simulateLatency(300);
|
|
1562
1604
|
const subscription = mockSubscriptions.find((sub) => sub.id === subscriptionId);
|
|
1563
1605
|
if (!subscription) {
|
|
1564
1606
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
@@ -1574,7 +1616,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1574
1616
|
return { _tag: "Success", data: void 0 };
|
|
1575
1617
|
},
|
|
1576
1618
|
async updateItemAttributes({ subscriptionId, lineId, customAttributes }) {
|
|
1577
|
-
await
|
|
1619
|
+
await simulateLatency(300);
|
|
1578
1620
|
const subscription = mockSubscriptions.find((sub) => sub.id === subscriptionId);
|
|
1579
1621
|
if (!subscription) {
|
|
1580
1622
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
@@ -1588,7 +1630,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1588
1630
|
return { _tag: "Success", data: void 0 };
|
|
1589
1631
|
},
|
|
1590
1632
|
async updateAttributes({ subscriptionId, customAttributes }) {
|
|
1591
|
-
await
|
|
1633
|
+
await simulateLatency(300);
|
|
1592
1634
|
const subscription = mockSubscriptions.find((sub) => sub.id === subscriptionId);
|
|
1593
1635
|
if (!subscription) {
|
|
1594
1636
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
@@ -1598,14 +1640,14 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1598
1640
|
return { _tag: "Success", data: void 0 };
|
|
1599
1641
|
},
|
|
1600
1642
|
async skipLineItem() {
|
|
1601
|
-
await
|
|
1643
|
+
await simulateLatency(300);
|
|
1602
1644
|
return { _tag: "Success", data: void 0 };
|
|
1603
1645
|
},
|
|
1604
1646
|
async updateBoxItems() {
|
|
1605
1647
|
return { _tag: "Success", data: void 0 };
|
|
1606
1648
|
},
|
|
1607
1649
|
async addDiscount() {
|
|
1608
|
-
await
|
|
1650
|
+
await simulateLatency(300);
|
|
1609
1651
|
const behavior = options.addDiscountBehavior ?? { kind: "success" };
|
|
1610
1652
|
if (behavior.kind === "success") {
|
|
1611
1653
|
return { _tag: "Success", data: void 0 };
|
|
@@ -1619,7 +1661,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1619
1661
|
return { _tag: "Failure", error: { kind: behavior.error } };
|
|
1620
1662
|
},
|
|
1621
1663
|
async removeDiscount() {
|
|
1622
|
-
await
|
|
1664
|
+
await simulateLatency(300);
|
|
1623
1665
|
const behavior = options.removeDiscountBehavior ?? { kind: "success" };
|
|
1624
1666
|
if (behavior.kind === "success") {
|
|
1625
1667
|
return { _tag: "Success", data: void 0 };
|
|
@@ -1627,7 +1669,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1627
1669
|
return { _tag: "Failure", error: { kind: behavior.error } };
|
|
1628
1670
|
},
|
|
1629
1671
|
async reschedule(params) {
|
|
1630
|
-
await
|
|
1672
|
+
await simulateLatency(300);
|
|
1631
1673
|
const subscription = mockSubscriptions.find(
|
|
1632
1674
|
(sub) => sub.id === params.subscriptionId
|
|
1633
1675
|
);
|
|
@@ -1639,7 +1681,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1639
1681
|
return { _tag: "Success", data: { ...subscription } };
|
|
1640
1682
|
},
|
|
1641
1683
|
async updateCustomAttributes(params) {
|
|
1642
|
-
await
|
|
1684
|
+
await simulateLatency(300);
|
|
1643
1685
|
const subscription = mockSubscriptions.find(
|
|
1644
1686
|
(sub) => sub.id === params.subscriptionId
|
|
1645
1687
|
);
|
|
@@ -1657,7 +1699,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1657
1699
|
return { _tag: "Success", data: { ...subscription } };
|
|
1658
1700
|
},
|
|
1659
1701
|
async resume(params) {
|
|
1660
|
-
await
|
|
1702
|
+
await simulateLatency(300);
|
|
1661
1703
|
const subscription = mockSubscriptions.find(
|
|
1662
1704
|
(sub) => sub.id === params.subscriptionId
|
|
1663
1705
|
);
|
|
@@ -1669,7 +1711,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1669
1711
|
return { _tag: "Success", data: { ...subscription } };
|
|
1670
1712
|
},
|
|
1671
1713
|
async pause(params) {
|
|
1672
|
-
await
|
|
1714
|
+
await simulateLatency(300);
|
|
1673
1715
|
const subscription = mockSubscriptions.find(
|
|
1674
1716
|
(sub) => sub.id === params.subscriptionId
|
|
1675
1717
|
);
|
|
@@ -1681,7 +1723,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1681
1723
|
return { _tag: "Success", data: { ...subscription } };
|
|
1682
1724
|
},
|
|
1683
1725
|
async reactivate(params) {
|
|
1684
|
-
await
|
|
1726
|
+
await simulateLatency(300);
|
|
1685
1727
|
const subscription = mockSubscriptions.find(
|
|
1686
1728
|
(sub) => sub.id === params.subscriptionId
|
|
1687
1729
|
);
|
|
@@ -1693,7 +1735,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1693
1735
|
return { _tag: "Success", data: { ...subscription } };
|
|
1694
1736
|
},
|
|
1695
1737
|
async cancel(params) {
|
|
1696
|
-
await
|
|
1738
|
+
await simulateLatency(300);
|
|
1697
1739
|
const subscription = mockSubscriptions.find(
|
|
1698
1740
|
(sub) => sub.id === params.subscriptionId
|
|
1699
1741
|
);
|
|
@@ -1705,7 +1747,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1705
1747
|
return { _tag: "Success", data: { ...subscription } };
|
|
1706
1748
|
},
|
|
1707
1749
|
async getAvailablePlans() {
|
|
1708
|
-
await
|
|
1750
|
+
await simulateLatency(300);
|
|
1709
1751
|
return {
|
|
1710
1752
|
_tag: "Success",
|
|
1711
1753
|
data: [
|
|
@@ -1731,7 +1773,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1731
1773
|
};
|
|
1732
1774
|
},
|
|
1733
1775
|
async getLastOrder(params) {
|
|
1734
|
-
await
|
|
1776
|
+
await simulateLatency(200);
|
|
1735
1777
|
const subscription = mockSubscriptions.find((sub) => sub.id === params.subscriptionId);
|
|
1736
1778
|
if (!subscription) return { _tag: "Success", data: null };
|
|
1737
1779
|
return {
|
|
@@ -1743,11 +1785,11 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1743
1785
|
};
|
|
1744
1786
|
},
|
|
1745
1787
|
async renewNow(_params) {
|
|
1746
|
-
await
|
|
1788
|
+
await simulateLatency(300);
|
|
1747
1789
|
return { _tag: "Success", data: { result: "success" } };
|
|
1748
1790
|
},
|
|
1749
1791
|
async changeFrequency(params) {
|
|
1750
|
-
await
|
|
1792
|
+
await simulateLatency(300);
|
|
1751
1793
|
const subscription = mockSubscriptions.find((sub) => sub.id === params.subscriptionId);
|
|
1752
1794
|
if (!subscription) {
|
|
1753
1795
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
@@ -1775,15 +1817,15 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1775
1817
|
},
|
|
1776
1818
|
async getDefaultSubscriptionId() {
|
|
1777
1819
|
var _a;
|
|
1778
|
-
await
|
|
1820
|
+
await simulateLatency(300);
|
|
1779
1821
|
return { _tag: "Success", data: ((_a = mockSubscriptions[0]) == null ? void 0 : _a.id) ?? null };
|
|
1780
1822
|
},
|
|
1781
1823
|
async getUpsellProducts() {
|
|
1782
|
-
await
|
|
1824
|
+
await simulateLatency(300);
|
|
1783
1825
|
return { _tag: "Success", data: [...mockUpsellProducts] };
|
|
1784
1826
|
},
|
|
1785
1827
|
async addUpsellProduct() {
|
|
1786
|
-
await
|
|
1828
|
+
await simulateLatency(400);
|
|
1787
1829
|
return { _tag: "Success", data: void 0 };
|
|
1788
1830
|
}
|
|
1789
1831
|
};
|
|
@@ -2607,7 +2649,7 @@ function createMockSchedulesAdapter(subscriptions = createMockSubscriptionAdapte
|
|
|
2607
2649
|
}
|
|
2608
2650
|
return {
|
|
2609
2651
|
async getUpcomingOrders({ count, subscriptionId, excludeSkipped = true }) {
|
|
2610
|
-
await
|
|
2652
|
+
await simulateLatency(200);
|
|
2611
2653
|
const subs = await subscriptionsToProject(subscriptionId);
|
|
2612
2654
|
const skipCount = new Set(
|
|
2613
2655
|
stored.filter(
|
|
@@ -2628,18 +2670,18 @@ function createMockSchedulesAdapter(subscriptions = createMockSubscriptionAdapte
|
|
|
2628
2670
|
return { _tag: "Success", data: orders.slice(0, count) };
|
|
2629
2671
|
},
|
|
2630
2672
|
async getAdjustments() {
|
|
2631
|
-
await
|
|
2673
|
+
await simulateLatency(200);
|
|
2632
2674
|
return { _tag: "Success", data: stored.map((s) => s.adjustment) };
|
|
2633
2675
|
},
|
|
2634
2676
|
async skipOrder({ subscriptionId, cycle, date }) {
|
|
2635
|
-
await
|
|
2677
|
+
await simulateLatency(300);
|
|
2636
2678
|
return recordAdjustment(subscriptionId, { cycle, date }, () => ({
|
|
2637
2679
|
type: "SKIP_ORDER",
|
|
2638
2680
|
input: { reason: "" }
|
|
2639
2681
|
}));
|
|
2640
2682
|
},
|
|
2641
2683
|
async skipItem({ subscriptionId, lineId, cycle, date, reason }) {
|
|
2642
|
-
await
|
|
2684
|
+
await simulateLatency(300);
|
|
2643
2685
|
const built = buildSkipItemMatcher({ cycle, date });
|
|
2644
2686
|
if (!built.ok) return { _tag: "Failure", error: built.error };
|
|
2645
2687
|
return recordAdjustment(
|
|
@@ -2653,7 +2695,7 @@ function createMockSchedulesAdapter(subscriptions = createMockSubscriptionAdapte
|
|
|
2653
2695
|
);
|
|
2654
2696
|
},
|
|
2655
2697
|
async changeDateAdjustment({ subscriptionId, newDate, cycle, currentDate }) {
|
|
2656
|
-
await
|
|
2698
|
+
await simulateLatency(300);
|
|
2657
2699
|
const newIso = toIsoOrNull(newDate);
|
|
2658
2700
|
if (newIso == null) {
|
|
2659
2701
|
return { _tag: "Failure", error: "newDate must be a valid date" };
|
|
@@ -2668,7 +2710,7 @@ function createMockSchedulesAdapter(subscriptions = createMockSubscriptionAdapte
|
|
|
2668
2710
|
);
|
|
2669
2711
|
},
|
|
2670
2712
|
async updateShippingAdjustment({ subscriptionId, address, cycle, date }) {
|
|
2671
|
-
await
|
|
2713
|
+
await simulateLatency(300);
|
|
2672
2714
|
return recordAdjustment(subscriptionId, { cycle, date }, () => ({
|
|
2673
2715
|
type: "UPDATE_SHIPPING",
|
|
2674
2716
|
input: { address }
|
|
@@ -2680,28 +2722,28 @@ function createMockSchedulesAdapter(subscriptions = createMockSubscriptionAdapte
|
|
|
2680
2722
|
cycle,
|
|
2681
2723
|
date
|
|
2682
2724
|
}) {
|
|
2683
|
-
await
|
|
2725
|
+
await simulateLatency(300);
|
|
2684
2726
|
return recordAdjustment(subscriptionId, { cycle, date }, () => ({
|
|
2685
2727
|
type: "UPDATE_PAYMENT_METHOD",
|
|
2686
2728
|
input: { paymentMethodId }
|
|
2687
2729
|
}));
|
|
2688
2730
|
},
|
|
2689
2731
|
async updateProductsAdjustment({ subscriptionId, lines, cycle, date }) {
|
|
2690
|
-
await
|
|
2732
|
+
await simulateLatency(300);
|
|
2691
2733
|
return recordAdjustment(subscriptionId, { cycle, date }, () => ({
|
|
2692
2734
|
type: "UPDATE_PRODUCTS",
|
|
2693
2735
|
input: { lines }
|
|
2694
2736
|
}));
|
|
2695
2737
|
},
|
|
2696
2738
|
async applyDiscountAdjustment({ subscriptionId, discountCode, cycle }) {
|
|
2697
|
-
await
|
|
2739
|
+
await simulateLatency(300);
|
|
2698
2740
|
return recordAdjustment(subscriptionId, { cycle }, () => ({
|
|
2699
2741
|
type: "APPLY_DISCOUNT",
|
|
2700
2742
|
input: { discountSource: "code", discountCode }
|
|
2701
2743
|
}));
|
|
2702
2744
|
},
|
|
2703
2745
|
async removeAdjustment({ adjustmentId }) {
|
|
2704
|
-
await
|
|
2746
|
+
await simulateLatency(200);
|
|
2705
2747
|
stored = stored.filter((s) => s.adjustment.id !== adjustmentId);
|
|
2706
2748
|
return { _tag: "Success", data: void 0 };
|
|
2707
2749
|
}
|
|
@@ -4184,6 +4226,7 @@ export {
|
|
|
4184
4226
|
GRID_V1_ENGINE_ID,
|
|
4185
4227
|
L as LAYOUT_SCOPE_ATTR,
|
|
4186
4228
|
LoginServiceContext,
|
|
4229
|
+
OrderPayError,
|
|
4187
4230
|
OrdersServiceContext,
|
|
4188
4231
|
P as PAGE_ROOT_SLOT,
|
|
4189
4232
|
ProductServiceContext,
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { ApiFetcher } from '../../utils';
|
|
2
2
|
import { OrdersAdapter } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Thrown by `createApiOrdersAdapter`'s `payOrder` on a non-ok response.
|
|
5
|
+
* Carries the HTTP `status` so callers can cheaply distinguish a 409
|
|
6
|
+
* (charge in flight / nothing payable here right now) from other failures
|
|
7
|
+
* without parsing the message.
|
|
8
|
+
*/
|
|
9
|
+
export declare class OrderPayError extends Error {
|
|
10
|
+
status: number;
|
|
11
|
+
constructor(status: number);
|
|
12
|
+
}
|
|
3
13
|
/**
|
|
4
14
|
* Returns a mock `OrdersAdapter` with sample orders including customAttributes.
|
|
5
15
|
* Hosts can override the methods to seed real fixtures.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/orders/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/orders/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,MAAM;CAK3B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,aAAa,CAuEvD;AA6DD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,aAAa,CAsCzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.test.d.ts","sourceRoot":"","sources":["../../../src/services/orders/adapter.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { GetOrdersParams, Order, OrderLine, OrdersAdapter, OrdersService, } from './types';
|
|
2
|
-
export { createMockOrdersAdapter, createApiOrdersAdapter } from './adapter';
|
|
3
|
-
export { createOrdersService, OrdersServiceContext
|
|
1
|
+
export type { GetOrdersParams, Order, OrderLine, OrderPayment, OrderPaymentAction, OrderPaymentState, OrdersAdapter, OrdersService, } from './types';
|
|
2
|
+
export { createMockOrdersAdapter, createApiOrdersAdapter, OrderPayError, } from './adapter';
|
|
3
|
+
export { createOrdersService, OrdersServiceContext } from './ordersService';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/orders/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,KAAK,EACL,SAAS,EACT,aAAa,EACb,aAAa,GACd,MAAM,SAAS,CAAC;AAEjB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/orders/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,KAAK,EACL,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,aAAa,GACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ordersService.d.ts","sourceRoot":"","sources":["../../../src/services/orders/ordersService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"ordersService.d.ts","sourceRoot":"","sources":["../../../src/services/orders/ordersService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAmBzE;AAED,eAAO,MAAM,oBAAoB;;CACgB,CAAC"}
|
|
@@ -9,8 +9,22 @@ export interface OrderLine {
|
|
|
9
9
|
value: string;
|
|
10
10
|
}>;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Self-service action a customer can take on an order's payment right now.
|
|
14
|
+
* `update-payment-method` / `add-payment-method` are reported by the backend
|
|
15
|
+
* but not acted on by any block yet — no route exists for a subscription
|
|
16
|
+
* payment-methods panel here, so blocks only ever look for `"pay"`.
|
|
17
|
+
*/
|
|
18
|
+
export type OrderPaymentAction = "pay" | "update-payment-method" | "add-payment-method";
|
|
19
|
+
export type OrderPaymentState = "charging" | "retry_scheduled" | "awaiting_customer" | "awaiting_payment_method" | "overdue";
|
|
20
|
+
export interface OrderPayment {
|
|
21
|
+
state: OrderPaymentState;
|
|
22
|
+
/** ISO date-time of the next auto-charge attempt. Only set for `retry_scheduled`. */
|
|
23
|
+
nextAttemptAt: string | null;
|
|
24
|
+
actions: OrderPaymentAction[];
|
|
25
|
+
}
|
|
12
26
|
export interface Order {
|
|
13
|
-
/**
|
|
27
|
+
/** Local invoice id (UUID) for an open postpaid invoice, or the numeric Shopify order id (the trailing segment of the order GID) otherwise. The block prepends `#` for display. */
|
|
14
28
|
id: string;
|
|
15
29
|
createdAt: string;
|
|
16
30
|
placedAt: string | null;
|
|
@@ -25,6 +39,8 @@ export interface Order {
|
|
|
25
39
|
key: string;
|
|
26
40
|
value: string;
|
|
27
41
|
}>;
|
|
42
|
+
/** Where this order's payment stands from the customer's side, and what they can do about it. `null` when nothing is outstanding. */
|
|
43
|
+
payment?: OrderPayment | null;
|
|
28
44
|
}
|
|
29
45
|
export interface GetOrdersParams {
|
|
30
46
|
limit?: number;
|
|
@@ -53,8 +69,22 @@ export interface GetOrdersParams {
|
|
|
53
69
|
/** Adapter consumed by `createOrdersService`. Hosts (customer portal, theme, storybook) implement this. */
|
|
54
70
|
export interface OrdersAdapter {
|
|
55
71
|
getOrders(params?: GetOrdersParams): Promise<PaginatedList<Order>>;
|
|
72
|
+
/**
|
|
73
|
+
* Pay an outstanding postpaid invoice right now. Resolves the stable
|
|
74
|
+
* customer-facing pay link (a Shopify Checkout, or the Juo pay page) —
|
|
75
|
+
* callers should redirect the customer there. Throws on failure; a 409
|
|
76
|
+
* (charge already in flight, or nothing payable here) should be thrown as
|
|
77
|
+
* an error carrying a `status` property so callers can distinguish it
|
|
78
|
+
* cheaply from other failures.
|
|
79
|
+
*/
|
|
80
|
+
payOrder(orderId: string): Promise<{
|
|
81
|
+
url: string;
|
|
82
|
+
}>;
|
|
56
83
|
}
|
|
57
84
|
export interface OrdersService {
|
|
58
85
|
getOrders(params?: GetOrdersParams): Promise<Result<PaginatedList<Order>>>;
|
|
86
|
+
payOrder(orderId: string): Promise<Result<{
|
|
87
|
+
url: string;
|
|
88
|
+
}>>;
|
|
59
89
|
}
|
|
60
90
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,KAAK,GAAG,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,KAAK;IACpB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,KAAK,GAAG,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1D;AAED;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAC1B,KAAK,GACL,uBAAuB,GACvB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,iBAAiB,GACjB,mBAAmB,GACnB,yBAAyB,GACzB,SAAS,CAAC;AAEd,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,iBAAiB,CAAC;IACzB,qFAAqF;IACrF,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,KAA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AQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CAC7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAiC,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAElB,aAAa,EAEb,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAiC,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAElB,aAAa,EAEb,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAuEjB,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,CAAC,MAAM,EAAE;QACxB,KAAK,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB;;;;;WAKG;QACH,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IACrC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC;IACxD,SAAS,CAAC,MAAM,EA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pB,uBAAuB,CAAC,MAAM,EAAE;QAC9B,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpB,gBAAgB,CAAC,MAAM,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACrE;AA6DD,kEAAkE;AAClE,KAAK,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAC;AA4D1E;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,MAAM,GACZ,aAAa,EAAE,CA4CjB;AAkED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,GAAE,kBAAoD,GAClE,gBAAgB,CA6NlB;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,gBAAgB,CAmL/E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock adapters stand in for the API in Storybook and devtools, where a
|
|
3
|
+
* realistic delay shows loading states. Under Vitest (mode "test") the delay
|
|
4
|
+
* only makes tests wait: it was most of this package's test time.
|
|
5
|
+
*/
|
|
6
|
+
export declare function simulateLatency(ms: number): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=simulateLatency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulateLatency.d.ts","sourceRoot":"","sources":["../../src/services/simulateLatency.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,wBAAwB,EACxB,sBAAsB,EACtB,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,wBAAwB,EACxB,sBAAsB,EACtB,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,C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