@juo/blocks 2.0.0-alpha.6 → 2.0.0-alpha.7
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 +301 -2
- package/dist/services/order/adapter.d.ts +11 -1
- package/dist/services/order/adapter.d.ts.map +1 -1
- package/dist/services/order/adapter.test.d.ts +2 -0
- package/dist/services/order/adapter.test.d.ts.map +1 -0
- package/dist/services/order/index.d.ts +2 -2
- package/dist/services/order/index.d.ts.map +1 -1
- package/dist/services/order/types.d.ts +56 -6
- package/dist/services/order/types.d.ts.map +1 -1
- package/dist/services/subscription/adapter.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -918,7 +918,10 @@ function createMockOrderAdapter() {
|
|
|
918
918
|
currencyCode: "USD",
|
|
919
919
|
totalPrice: 89.97,
|
|
920
920
|
financialStatus: "PAID",
|
|
921
|
+
paymentStatus: "paid",
|
|
922
|
+
paidAt: "2024-10-15T09:31:00Z",
|
|
921
923
|
fulfillmentStatus: "FULFILLED",
|
|
924
|
+
subscriptionIds: ["subscription_1"],
|
|
922
925
|
lines: [
|
|
923
926
|
{
|
|
924
927
|
id: "line_1",
|
|
@@ -943,7 +946,10 @@ function createMockOrderAdapter() {
|
|
|
943
946
|
currencyCode: "USD",
|
|
944
947
|
totalPrice: 45.99,
|
|
945
948
|
financialStatus: "PAID",
|
|
949
|
+
paymentStatus: "paid",
|
|
950
|
+
paidAt: "2024-09-20T14:16:00Z",
|
|
946
951
|
fulfillmentStatus: "PARTIALLY_FULFILLED",
|
|
952
|
+
subscriptionIds: [],
|
|
947
953
|
lines: [
|
|
948
954
|
{
|
|
949
955
|
id: "line_2",
|
|
@@ -988,11 +994,28 @@ function mapOrder(order) {
|
|
|
988
994
|
currencyCode: order.currencyCode,
|
|
989
995
|
totalPrice: order.totalPrice,
|
|
990
996
|
financialStatus: order.financialStatus,
|
|
997
|
+
// Defaulted rather than required so an older backend (which returns neither
|
|
998
|
+
// field) degrades to "settled, time unknown" instead of producing an Order
|
|
999
|
+
// with holes in it. Matches the endpoint's own fallback for an order it
|
|
1000
|
+
// never tracked.
|
|
1001
|
+
paymentStatus: order.paymentStatus ?? "paid",
|
|
1002
|
+
paidAt: order.paidAt ?? null,
|
|
991
1003
|
fulfillmentStatus: order.fulfillmentStatus,
|
|
992
1004
|
lines: order.items.map(mapOrderLine),
|
|
993
|
-
customAttributes: order.customAttributes
|
|
1005
|
+
customAttributes: order.customAttributes,
|
|
1006
|
+
subscriptionIds: order.subscriptionIds ?? []
|
|
994
1007
|
};
|
|
995
1008
|
}
|
|
1009
|
+
function quoteSearchValue(value) {
|
|
1010
|
+
return `'${value.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
1011
|
+
}
|
|
1012
|
+
function buildOrdersQuery(params) {
|
|
1013
|
+
const callerQuery = (params == null ? void 0 : params.query) != null && params.query.trim() !== "" ? params.query : null;
|
|
1014
|
+
const subscriptionTerm = (params == null ? void 0 : params.subscriptionId) != null ? `subscriptionId:${quoteSearchValue(params.subscriptionId)}` : null;
|
|
1015
|
+
if (callerQuery == null) return subscriptionTerm;
|
|
1016
|
+
if (subscriptionTerm == null) return callerQuery;
|
|
1017
|
+
return `(${callerQuery}) AND ${subscriptionTerm}`;
|
|
1018
|
+
}
|
|
996
1019
|
function createApiOrderAdapter(fetcher) {
|
|
997
1020
|
return {
|
|
998
1021
|
async getOrders(params) {
|
|
@@ -1000,9 +1023,10 @@ function createApiOrderAdapter(fetcher) {
|
|
|
1000
1023
|
if ((params == null ? void 0 : params.limit) != null) query.set("limit", String(params.limit));
|
|
1001
1024
|
if ((params == null ? void 0 : params.after) != null) query.set("after", params.after);
|
|
1002
1025
|
if ((params == null ? void 0 : params.before) != null) query.set("before", params.before);
|
|
1003
|
-
if ((params == null ? void 0 : params.query) != null) query.set("query", params.query);
|
|
1004
1026
|
if ((params == null ? void 0 : params.includeOneTime) != null) query.set("includeOneTime", String(params.includeOneTime));
|
|
1005
1027
|
if ((params == null ? void 0 : params.sort) != null) query.set("sort", params.sort);
|
|
1028
|
+
const searchQuery = buildOrdersQuery(params);
|
|
1029
|
+
if (searchQuery != null) query.set("query", searchQuery);
|
|
1006
1030
|
const qs = query.toString();
|
|
1007
1031
|
const res = await fetcher(`/customer/v1/orders${qs ? `?${qs}` : ""}`);
|
|
1008
1032
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
@@ -1587,6 +1611,10 @@ function toNonEmptyAttributeArray(next) {
|
|
|
1587
1611
|
({ key, value }) => key !== "" && value !== ""
|
|
1588
1612
|
);
|
|
1589
1613
|
}
|
|
1614
|
+
const MOCK_INSTANT_ORDER_MIN_ITEMS = 1;
|
|
1615
|
+
const MOCK_INSTANT_ORDER_MAX_ITEMS = 20;
|
|
1616
|
+
const MOCK_INSTANT_ORDER_MIN_QUANTITY = 1;
|
|
1617
|
+
const MOCK_INSTANT_ORDER_MAX_QUANTITY = 10;
|
|
1590
1618
|
function createMockSubscriptionAdapter(options = {}) {
|
|
1591
1619
|
const richBase = (id, itemId, renewalId) => ({
|
|
1592
1620
|
id,
|
|
@@ -1871,6 +1899,60 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1871
1899
|
description: "Lightweight daily sun protection"
|
|
1872
1900
|
}
|
|
1873
1901
|
];
|
|
1902
|
+
const mockInstantOrderImages = {
|
|
1903
|
+
"io-product-1": "https://images.unsplash.com/photo-1447933601403-0c6688de566e?w=200",
|
|
1904
|
+
"io-product-2": "https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=200"
|
|
1905
|
+
};
|
|
1906
|
+
const mockInstantOrderProducts = [
|
|
1907
|
+
{
|
|
1908
|
+
id: "io-product-1",
|
|
1909
|
+
title: "Single-Origin Espresso",
|
|
1910
|
+
hasOnlyDefaultVariant: false,
|
|
1911
|
+
featuredImage: {
|
|
1912
|
+
url: mockInstantOrderImages["io-product-1"],
|
|
1913
|
+
altText: "Single-Origin Espresso"
|
|
1914
|
+
},
|
|
1915
|
+
variants: {
|
|
1916
|
+
items: [
|
|
1917
|
+
{
|
|
1918
|
+
id: "io-variant-1",
|
|
1919
|
+
title: "250 g",
|
|
1920
|
+
image: { url: mockInstantOrderImages["io-product-1"] },
|
|
1921
|
+
price: { amount: "12.00", currencyCode: "USD" },
|
|
1922
|
+
availableForSale: true
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
id: "io-variant-2",
|
|
1926
|
+
title: "1 kg",
|
|
1927
|
+
image: { url: mockInstantOrderImages["io-product-1"] },
|
|
1928
|
+
price: { amount: "38.00", currencyCode: "USD" },
|
|
1929
|
+
availableForSale: true
|
|
1930
|
+
}
|
|
1931
|
+
]
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
id: "io-product-2",
|
|
1936
|
+
title: "Ceramic Pour-Over Dripper",
|
|
1937
|
+
hasOnlyDefaultVariant: true,
|
|
1938
|
+
featuredImage: {
|
|
1939
|
+
url: mockInstantOrderImages["io-product-2"],
|
|
1940
|
+
altText: "Ceramic Pour-Over Dripper"
|
|
1941
|
+
},
|
|
1942
|
+
variants: {
|
|
1943
|
+
items: [
|
|
1944
|
+
{
|
|
1945
|
+
id: "io-variant-3",
|
|
1946
|
+
title: "Default Title",
|
|
1947
|
+
image: { url: mockInstantOrderImages["io-product-2"] },
|
|
1948
|
+
price: { amount: "24.50", currencyCode: "USD" },
|
|
1949
|
+
availableForSale: true
|
|
1950
|
+
}
|
|
1951
|
+
]
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
];
|
|
1955
|
+
let placedInstantOrders = 0;
|
|
1874
1956
|
return {
|
|
1875
1957
|
async getById(id) {
|
|
1876
1958
|
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
@@ -2277,6 +2359,75 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
2277
2359
|
async addUpsellProduct() {
|
|
2278
2360
|
await new Promise((resolve) => setTimeout(resolve, 400));
|
|
2279
2361
|
return { _tag: "Success", data: void 0 };
|
|
2362
|
+
},
|
|
2363
|
+
async getInstantOrderProducts({
|
|
2364
|
+
query
|
|
2365
|
+
}) {
|
|
2366
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
2367
|
+
const term = query == null ? void 0 : query.trim().toLowerCase();
|
|
2368
|
+
const products = term ? mockInstantOrderProducts.filter(
|
|
2369
|
+
(product) => product.title.toLowerCase().includes(term)
|
|
2370
|
+
) : [...mockInstantOrderProducts];
|
|
2371
|
+
return {
|
|
2372
|
+
_tag: "Success",
|
|
2373
|
+
data: {
|
|
2374
|
+
// Deliberately independent of `query`, mirroring the endpoint: a search
|
|
2375
|
+
// that matches nothing must not read as "the feature is unavailable"
|
|
2376
|
+
// and make a consumer hide its entry point mid-interaction.
|
|
2377
|
+
available: mockInstantOrderProducts.length > 0,
|
|
2378
|
+
requiresCheckout: false,
|
|
2379
|
+
products,
|
|
2380
|
+
hasNextPage: false,
|
|
2381
|
+
endCursor: null
|
|
2382
|
+
}
|
|
2383
|
+
};
|
|
2384
|
+
},
|
|
2385
|
+
async placeInstantOrder({
|
|
2386
|
+
items
|
|
2387
|
+
}) {
|
|
2388
|
+
var _a;
|
|
2389
|
+
await new Promise((resolve) => setTimeout(resolve, 400));
|
|
2390
|
+
const malformed = items.length < MOCK_INSTANT_ORDER_MIN_ITEMS || items.length > MOCK_INSTANT_ORDER_MAX_ITEMS || items.some(
|
|
2391
|
+
(item) => !Number.isInteger(item.quantity) || item.quantity < MOCK_INSTANT_ORDER_MIN_QUANTITY || item.quantity > MOCK_INSTANT_ORDER_MAX_QUANTITY
|
|
2392
|
+
);
|
|
2393
|
+
if (malformed) {
|
|
2394
|
+
return {
|
|
2395
|
+
_tag: "Failure",
|
|
2396
|
+
error: {
|
|
2397
|
+
kind: "INVALID_REQUEST",
|
|
2398
|
+
message: "Malformed item list"
|
|
2399
|
+
}
|
|
2400
|
+
};
|
|
2401
|
+
}
|
|
2402
|
+
const variants = mockInstantOrderProducts.flatMap(
|
|
2403
|
+
(product) => product.variants.items
|
|
2404
|
+
);
|
|
2405
|
+
const unknown = items.find(
|
|
2406
|
+
(item) => !variants.some((variant) => variant.id === item.variantId)
|
|
2407
|
+
);
|
|
2408
|
+
if (unknown) {
|
|
2409
|
+
return {
|
|
2410
|
+
_tag: "Failure",
|
|
2411
|
+
error: {
|
|
2412
|
+
kind: "INVALID_REQUEST",
|
|
2413
|
+
message: `Unknown variant ${unknown.variantId}`
|
|
2414
|
+
}
|
|
2415
|
+
};
|
|
2416
|
+
}
|
|
2417
|
+
const total = items.reduce((sum, item) => {
|
|
2418
|
+
const variant = variants.find((v3) => v3.id === item.variantId);
|
|
2419
|
+
return sum + Number((variant == null ? void 0 : variant.price.amount) ?? 0) * item.quantity;
|
|
2420
|
+
}, 0);
|
|
2421
|
+
placedInstantOrders += 1;
|
|
2422
|
+
return {
|
|
2423
|
+
_tag: "Success",
|
|
2424
|
+
data: {
|
|
2425
|
+
orderId: `io-order-${placedInstantOrders}`,
|
|
2426
|
+
totalPrice: total.toFixed(2),
|
|
2427
|
+
currencyCode: ((_a = variants[0]) == null ? void 0 : _a.price.currencyCode) ?? "USD",
|
|
2428
|
+
status: "paid"
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
2280
2431
|
}
|
|
2281
2432
|
};
|
|
2282
2433
|
}
|
|
@@ -2419,6 +2570,51 @@ async function readErrorBody(res) {
|
|
|
2419
2570
|
return {};
|
|
2420
2571
|
}
|
|
2421
2572
|
}
|
|
2573
|
+
async function readErrorMessage(res) {
|
|
2574
|
+
const body = await readErrorBody(res);
|
|
2575
|
+
return typeof body.message === "string" ? body.message : void 0;
|
|
2576
|
+
}
|
|
2577
|
+
const PLACE_INSTANT_ORDER_ERROR_KINDS = {
|
|
2578
|
+
400: "INVALID_REQUEST",
|
|
2579
|
+
403: "REFUSED",
|
|
2580
|
+
409: "DUPLICATE_REQUEST",
|
|
2581
|
+
429: "RATE_LIMITED"
|
|
2582
|
+
};
|
|
2583
|
+
function mapInstantOrderProducts(body) {
|
|
2584
|
+
const currencyCode = body.currencyCode;
|
|
2585
|
+
const products = (body.products ?? []).map(
|
|
2586
|
+
(product) => {
|
|
2587
|
+
const image = product.featuredImage ? {
|
|
2588
|
+
url: product.featuredImage.url,
|
|
2589
|
+
...product.featuredImage.altText != null ? { altText: product.featuredImage.altText } : {}
|
|
2590
|
+
} : null;
|
|
2591
|
+
return {
|
|
2592
|
+
id: product.productId,
|
|
2593
|
+
title: product.title,
|
|
2594
|
+
// Shopify's own flag, not a count of the variants this response happens
|
|
2595
|
+
// to carry — the two differ whenever some are filtered.
|
|
2596
|
+
hasOnlyDefaultVariant: product.hasOnlyDefaultVariant,
|
|
2597
|
+
featuredImage: image,
|
|
2598
|
+
variants: {
|
|
2599
|
+
items: (product.variants ?? []).map((variant) => ({
|
|
2600
|
+
id: variant.id,
|
|
2601
|
+
title: variant.title,
|
|
2602
|
+
image,
|
|
2603
|
+
price: { amount: variant.price, currencyCode },
|
|
2604
|
+
availableForSale: variant.availableForSale
|
|
2605
|
+
}))
|
|
2606
|
+
}
|
|
2607
|
+
};
|
|
2608
|
+
}
|
|
2609
|
+
);
|
|
2610
|
+
return {
|
|
2611
|
+
available: body.available,
|
|
2612
|
+
requiresCheckout: body.requiresCheckout,
|
|
2613
|
+
products,
|
|
2614
|
+
hasNextPage: body.hasNextPage,
|
|
2615
|
+
endCursor: body.endCursor ?? null
|
|
2616
|
+
};
|
|
2617
|
+
}
|
|
2422
2618
|
function createApiSubscriptionAdapter(fetcher) {
|
|
2423
2619
|
const adapter = {
|
|
2424
2620
|
async search(options) {
|
|
@@ -2949,6 +3145,108 @@ function createApiSubscriptionAdapter(fetcher) {
|
|
|
2949
3145
|
}
|
|
2950
3146
|
},
|
|
2951
3147
|
// Legacy endpoint — no /customer/v1 equivalent exists yet.
|
|
3148
|
+
async getInstantOrderProducts({ subscriptionId, query, after, limit }) {
|
|
3149
|
+
try {
|
|
3150
|
+
const params = new URLSearchParams();
|
|
3151
|
+
if (query) params.set("q", query);
|
|
3152
|
+
if (after != null) params.set("after", after);
|
|
3153
|
+
if (limit != null) params.set("limit", String(limit));
|
|
3154
|
+
const search = params.toString() ? `?${params.toString()}` : "";
|
|
3155
|
+
const res = await fetcher(
|
|
3156
|
+
`/customer/subscriptions/${subscriptionId}/instant-orders/products${search}`
|
|
3157
|
+
);
|
|
3158
|
+
if (!res.ok) {
|
|
3159
|
+
if (res.status === 404) {
|
|
3160
|
+
return { _tag: "Failure", error: { kind: "SUBSCRIPTION_NOT_FOUND" } };
|
|
3161
|
+
}
|
|
3162
|
+
const message = await readErrorMessage(res);
|
|
3163
|
+
return {
|
|
3164
|
+
_tag: "Failure",
|
|
3165
|
+
error: { kind: "UNKNOWN", message: message ?? `HTTP ${res.status}` }
|
|
3166
|
+
};
|
|
3167
|
+
}
|
|
3168
|
+
const body = await res.json().catch(() => null);
|
|
3169
|
+
if (body == null) {
|
|
3170
|
+
return {
|
|
3171
|
+
_tag: "Failure",
|
|
3172
|
+
error: { kind: "UNKNOWN", message: "Malformed response" }
|
|
3173
|
+
};
|
|
3174
|
+
}
|
|
3175
|
+
return { _tag: "Success", data: mapInstantOrderProducts(body) };
|
|
3176
|
+
} catch (e) {
|
|
3177
|
+
return {
|
|
3178
|
+
_tag: "Failure",
|
|
3179
|
+
error: {
|
|
3180
|
+
kind: "NETWORK",
|
|
3181
|
+
message: e instanceof Error ? e.message : void 0
|
|
3182
|
+
}
|
|
3183
|
+
};
|
|
3184
|
+
}
|
|
3185
|
+
},
|
|
3186
|
+
// Legacy endpoint — no /customer/v1 equivalent exists yet.
|
|
3187
|
+
//
|
|
3188
|
+
// No X-Last-Updated-At header: an instant order never mutates the
|
|
3189
|
+
// subscription, so the optimistic-lock preValidation (which only fires when
|
|
3190
|
+
// the header is present) has nothing to guard here.
|
|
3191
|
+
async placeInstantOrder({ subscriptionId, requestKey, items }) {
|
|
3192
|
+
try {
|
|
3193
|
+
const res = await fetcher(
|
|
3194
|
+
`/customer/subscriptions/${subscriptionId}/instant-orders`,
|
|
3195
|
+
{
|
|
3196
|
+
method: "POST",
|
|
3197
|
+
headers: { "Content-Type": "application/json" },
|
|
3198
|
+
body: JSON.stringify({
|
|
3199
|
+
requestKey,
|
|
3200
|
+
// Narrowed to what the endpoint accepts: the rest of
|
|
3201
|
+
// PostableSubscriptionItem describes a subscription line (its
|
|
3202
|
+
// billing policy, its cycle limit), and an instant order is not one.
|
|
3203
|
+
items: items.map(({ variantId, quantity }) => ({
|
|
3204
|
+
variantId,
|
|
3205
|
+
quantity
|
|
3206
|
+
}))
|
|
3207
|
+
})
|
|
3208
|
+
}
|
|
3209
|
+
);
|
|
3210
|
+
if (!res.ok) {
|
|
3211
|
+
if (res.status === 404) {
|
|
3212
|
+
return { _tag: "Failure", error: { kind: "SUBSCRIPTION_NOT_FOUND" } };
|
|
3213
|
+
}
|
|
3214
|
+
const message = await readErrorMessage(res);
|
|
3215
|
+
const kind = PLACE_INSTANT_ORDER_ERROR_KINDS[res.status] ?? "UNKNOWN";
|
|
3216
|
+
return {
|
|
3217
|
+
_tag: "Failure",
|
|
3218
|
+
error: { kind, message: message ?? `HTTP ${res.status}` }
|
|
3219
|
+
};
|
|
3220
|
+
}
|
|
3221
|
+
const body = await res.json().catch(() => null);
|
|
3222
|
+
if (body == null) {
|
|
3223
|
+
return {
|
|
3224
|
+
_tag: "Failure",
|
|
3225
|
+
error: { kind: "UNKNOWN", message: "Malformed response" }
|
|
3226
|
+
};
|
|
3227
|
+
}
|
|
3228
|
+
return {
|
|
3229
|
+
_tag: "Success",
|
|
3230
|
+
data: {
|
|
3231
|
+
orderId: body.orderId,
|
|
3232
|
+
totalPrice: body.totalPrice ?? null,
|
|
3233
|
+
currencyCode: body.currencyCode,
|
|
3234
|
+
status: body.status,
|
|
3235
|
+
...body.paymentUrl != null ? { paymentUrl: body.paymentUrl } : {},
|
|
3236
|
+
...body.reason != null ? { reason: body.reason } : {}
|
|
3237
|
+
}
|
|
3238
|
+
};
|
|
3239
|
+
} catch (e) {
|
|
3240
|
+
return {
|
|
3241
|
+
_tag: "Failure",
|
|
3242
|
+
error: {
|
|
3243
|
+
kind: "NETWORK",
|
|
3244
|
+
message: e instanceof Error ? e.message : void 0
|
|
3245
|
+
}
|
|
3246
|
+
};
|
|
3247
|
+
}
|
|
3248
|
+
},
|
|
3249
|
+
// Legacy endpoint — no /customer/v1 equivalent exists yet.
|
|
2952
3250
|
async getLastOrder({ subscriptionId }) {
|
|
2953
3251
|
try {
|
|
2954
3252
|
const res = await fetcher(
|
|
@@ -4971,6 +5269,7 @@ export {
|
|
|
4971
5269
|
c as backfillInstanceDefaults,
|
|
4972
5270
|
b2 as buildGridLayout,
|
|
4973
5271
|
j as buildLayoutCss,
|
|
5272
|
+
buildOrdersQuery,
|
|
4974
5273
|
canRemoveLine,
|
|
4975
5274
|
canvasMode,
|
|
4976
5275
|
clampRect,
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { ApiFetcher } from '../../utils';
|
|
2
|
-
import { OrderAdapter } from './types';
|
|
2
|
+
import { OrderAdapter, GetOrdersParams } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Returns a mock `OrderAdapter` with sample orders including customAttributes.
|
|
5
5
|
* Hosts can override the methods to seed real fixtures.
|
|
6
6
|
* Used as a starting point by storybook helpers (`createMockOrderService`) and theme preview.
|
|
7
7
|
*/
|
|
8
8
|
export declare function createMockOrderAdapter(): OrderAdapter;
|
|
9
|
+
/**
|
|
10
|
+
* Fold the typed options into the one `query` string the endpoint takes.
|
|
11
|
+
*
|
|
12
|
+
* `subscriptionId` is ANDed onto whatever the caller already wrote, with the
|
|
13
|
+
* caller's own query parenthesized so their `OR` cannot swallow the added term.
|
|
14
|
+
* `includeOneTime` keeps using its own parameter: the endpoint still accepts it
|
|
15
|
+
* (deprecated) and rejects it alongside any filter, so folding it into the
|
|
16
|
+
* string here would only turn a clear server-side error into a confusing one.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildOrdersQuery(params?: GetOrdersParams): string | null;
|
|
9
19
|
export declare function createApiOrderAdapter(fetcher: ApiFetcher): OrderAdapter;
|
|
10
20
|
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/order/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/order/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAGV,YAAY,EAEZ,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,YAAY,CAmErD;AA2ED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAWxE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,YAAY,CA6BvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.test.d.ts","sourceRoot":"","sources":["../../../src/services/order/adapter.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { GetOrdersParams, Order, OrderLine, OrderAdapter, OrderService, } from './types';
|
|
2
|
-
export { createMockOrderAdapter, createApiOrderAdapter } from './adapter';
|
|
1
|
+
export type { GetOrdersParams, Order, OrderLine, OrderAdapter, OrderPaymentStatus, OrderService, } from './types';
|
|
2
|
+
export { buildOrdersQuery, createMockOrderAdapter, createApiOrderAdapter, } from './adapter';
|
|
3
3
|
export { createOrderService, OrderServiceContext, } from './orderService';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/order/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,KAAK,EACL,SAAS,EACT,YAAY,EACZ,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/order/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,KAAK,EACL,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC"}
|
|
@@ -9,6 +9,16 @@ export interface OrderLine {
|
|
|
9
9
|
value: string;
|
|
10
10
|
}>;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Whether the order's money landed, normalized across payment rails.
|
|
14
|
+
*
|
|
15
|
+
* Distinct from `financialStatus`, which is Shopify's own display token and
|
|
16
|
+
* exists to be shown to a customer: it cannot express a chargeback, and reads
|
|
17
|
+
* `PENDING` for both an invoice still being collected and one Juo has given up
|
|
18
|
+
* collecting. Use this one for logic ("may this be paid?", "did this money come
|
|
19
|
+
* back?") and `financialStatus` for display.
|
|
20
|
+
*/
|
|
21
|
+
export type OrderPaymentStatus = "paid" | "unpaid" | "overdue" | "refund" | "chargeback";
|
|
12
22
|
export interface Order {
|
|
13
23
|
/** Numeric Shopify order id (the trailing segment of the order GID). The block prepends `#` for display. */
|
|
14
24
|
id: string;
|
|
@@ -18,8 +28,27 @@ export interface Order {
|
|
|
18
28
|
totalPrice: number | null;
|
|
19
29
|
/** Raw Shopify financial-status token (e.g. `PAID`, `PARTIALLY_REFUNDED`); the block humanizes it for display. `null` = unknown. */
|
|
20
30
|
financialStatus: string | null;
|
|
31
|
+
/** Normalized payment status, for logic rather than display — see `OrderPaymentStatus`. */
|
|
32
|
+
paymentStatus: OrderPaymentStatus;
|
|
33
|
+
/**
|
|
34
|
+
* ISO timestamp of when the order was paid in full, or `null` if it never was.
|
|
35
|
+
* Safe to read by its name: `paidAt != null` means the order is paid. A
|
|
36
|
+
* partially paid, authorized-but-uncaptured, pending or abandoned order
|
|
37
|
+
* reports `null` rather than a partial date.
|
|
38
|
+
*
|
|
39
|
+
* A refunded or partially refunded order keeps its date, because it was paid
|
|
40
|
+
* in full and the money went back afterwards — `financialStatus` is what tells
|
|
41
|
+
* you that happened.
|
|
42
|
+
*/
|
|
43
|
+
paidAt: string | null;
|
|
21
44
|
/** Raw Shopify fulfillment-status token (e.g. `FULFILLED`, `PARTIALLY_FULFILLED`); the block humanizes it for display. `null` = unknown. */
|
|
22
45
|
fulfillmentStatus: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Ids of the subscriptions this order belongs to, in the same id space as
|
|
48
|
+
* `Subscription.id` — so a block can link an order to a subscription it
|
|
49
|
+
* already holds without a second lookup. Empty for a one-time order.
|
|
50
|
+
*/
|
|
51
|
+
subscriptionIds: string[];
|
|
23
52
|
lines: OrderLine[];
|
|
24
53
|
customAttributes?: Array<{
|
|
25
54
|
key: string;
|
|
@@ -31,17 +60,26 @@ export interface GetOrdersParams {
|
|
|
31
60
|
after?: string;
|
|
32
61
|
before?: string;
|
|
33
62
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
63
|
+
* Search-language filter, the same one every public Juo list endpoint takes:
|
|
64
|
+
* `field:value` terms combined with `AND` / `OR` / `NOT` and parentheses, e.g.
|
|
65
|
+
* `type:recurring AND placedAt:>'2026-01-01'`. Values that are not
|
|
66
|
+
* alphanumeric must be quoted. Filterable fields are `id`, `type`,
|
|
67
|
+
* `subscriptionId`, `placedAt`, `createdAt` and `includeOneTime`.
|
|
38
68
|
*
|
|
39
|
-
*
|
|
69
|
+
* Free-text terms are rejected — orders have no search index behind them.
|
|
70
|
+
* Changing the query restarts pagination.
|
|
71
|
+
*
|
|
72
|
+
* Prefer the typed `subscriptionId` and `includeOneTime` options below for
|
|
73
|
+
* those two cases; they are translated into this string for you.
|
|
40
74
|
*/
|
|
41
75
|
query?: string;
|
|
42
76
|
/**
|
|
77
|
+
* Include the customer's one-time orders alongside their subscription orders.
|
|
43
78
|
* When `false` (default), only subscription-driven orders are returned.
|
|
44
|
-
*
|
|
79
|
+
*
|
|
80
|
+
* This widens which orders are read rather than filtering them, so it cannot
|
|
81
|
+
* be combined with any filter — including `subscriptionId`, and any term in
|
|
82
|
+
* `query`. Toggling it restarts pagination.
|
|
45
83
|
*/
|
|
46
84
|
includeOneTime?: boolean;
|
|
47
85
|
/**
|
|
@@ -49,6 +87,18 @@ export interface GetOrdersParams {
|
|
|
49
87
|
* date (newest first). When omitted, the endpoint's default sort is used.
|
|
50
88
|
*/
|
|
51
89
|
sort?: "placedAt";
|
|
90
|
+
/**
|
|
91
|
+
* Return only the orders belonging to this subscription (a `Subscription.id`,
|
|
92
|
+
* the same id `Order.subscriptionIds` carries). Filtered server-side, so
|
|
93
|
+
* pagination stays correct — unlike narrowing a page client-side on
|
|
94
|
+
* `Order.subscriptionIds`.
|
|
95
|
+
*
|
|
96
|
+
* Shorthand for a `subscriptionId:'<id>'` term in `query`, quoted and escaped
|
|
97
|
+
* for you; it is ANDed onto any `query` you also pass. Cannot be combined with
|
|
98
|
+
* `includeOneTime: true`, since a one-time order belongs to no subscription.
|
|
99
|
+
* Changing it restarts pagination.
|
|
100
|
+
*/
|
|
101
|
+
subscriptionId?: string;
|
|
52
102
|
}
|
|
53
103
|
/** Adapter consumed by `createOrderService`. Hosts (customer portal, theme, storybook) implement this. */
|
|
54
104
|
export interface OrderAdapter {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/order/types.ts"],"names":[],"mappings":"AA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EAAE,UAAU,CAAC;IAClB;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,0GAA0G;AAC1G,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,CACP,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;CAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAS,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,KAAK,EACV,YAAY,EAIZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,wBAAwB,EACxB,sBAAsB,EACtB,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EAEb,qBAAqB,EACrB,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EAEpB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,OAAO,CAAC,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