@01.software/sdk 0.36.0 → 0.37.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/README.md +71 -6
- package/dist/analytics/react.cjs +33 -9
- package/dist/analytics/react.cjs.map +1 -1
- package/dist/analytics/react.d.cts +1 -1
- package/dist/analytics/react.d.ts +1 -1
- package/dist/analytics/react.js +33 -9
- package/dist/analytics/react.js.map +1 -1
- package/dist/analytics.cjs +30 -8
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.d.cts +6 -0
- package/dist/analytics.d.ts +6 -0
- package/dist/analytics.js +30 -8
- package/dist/analytics.js.map +1 -1
- package/dist/client.cjs +94 -114
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +94 -114
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-Bq5Zd7p7.d.ts → collection-client-DyELGUcL.d.ts} +3 -3
- package/dist/{collection-client-Cv0D2w1Q.d.cts → collection-client-zOmnxwdA.d.cts} +3 -3
- package/dist/{const-DVcM7Ac_.d.cts → const-CK_FPaIn.d.cts} +3 -3
- package/dist/{const-BDUKFP9w.d.ts → const-Dqz05oaG.d.ts} +3 -3
- package/dist/{image-BDz2-AaO.d.cts → image-BDjHp03R.d.cts} +13 -9
- package/dist/{image-BDz2-AaO.d.ts → image-BDjHp03R.d.ts} +13 -9
- package/dist/{index-DTSXUYkr.d.ts → index-DRJs7QIh.d.cts} +9 -6
- package/dist/{index-BHDKJ6B3.d.cts → index-DTqoUZk_.d.ts} +9 -6
- package/dist/index.cjs +172 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.js +172 -132
- package/dist/index.js.map +1 -1
- package/dist/metadata.cjs +5 -3
- package/dist/metadata.cjs.map +1 -1
- package/dist/metadata.js +5 -3
- package/dist/metadata.js.map +1 -1
- package/dist/{payload-types-BCui2Oml.d.cts → payload-types-CREOjFNT.d.cts} +281 -108
- package/dist/{payload-types-BCui2Oml.d.ts → payload-types-CREOjFNT.d.ts} +281 -108
- package/dist/query.cjs +5 -3
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +5 -3
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +84 -69
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.js +84 -69
- package/dist/server.js.map +1 -1
- package/dist/{types-Dib-zdK6.d.cts → types-BWMUr3Zw.d.cts} +195 -71
- package/dist/{types-CEzLf3PX.d.cts → types-BkZNhuBh.d.cts} +1 -1
- package/dist/{types-3qV6sY7T.d.ts → types-CxzWHspI.d.ts} +1 -1
- package/dist/{types-DK9EnLwJ.d.ts → types-DMvVHdb1.d.ts} +195 -71
- package/dist/ui/canvas.cjs +15 -5
- package/dist/ui/canvas.cjs.map +1 -1
- package/dist/ui/canvas.d.cts +1 -1
- package/dist/ui/canvas.d.ts +1 -1
- package/dist/ui/canvas.js +15 -5
- package/dist/ui/canvas.js.map +1 -1
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/image.cjs +15 -5
- package/dist/ui/image.cjs.map +1 -1
- package/dist/ui/image.d.cts +1 -1
- package/dist/ui/image.d.ts +1 -1
- package/dist/ui/image.js +15 -5
- package/dist/ui/image.js.map +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.cjs +5 -1
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +4 -4
- package/dist/webhook.d.ts +4 -4
- package/dist/webhook.js +5 -1
- package/dist/webhook.js.map +1 -1
- package/package.json +1 -1
|
@@ -50,6 +50,8 @@ interface Config {
|
|
|
50
50
|
transactions: Transaction;
|
|
51
51
|
'order-status-logs': OrderStatusLog;
|
|
52
52
|
'inventory-reservations': InventoryReservation;
|
|
53
|
+
'fulfillment-orders': FulfillmentOrder;
|
|
54
|
+
'fulfillment-order-items': FulfillmentOrderItem;
|
|
53
55
|
fulfillments: Fulfillment;
|
|
54
56
|
'fulfillment-items': FulfillmentItem;
|
|
55
57
|
returns: Return;
|
|
@@ -137,10 +139,14 @@ interface Config {
|
|
|
137
139
|
};
|
|
138
140
|
orders: {
|
|
139
141
|
items: 'order-items';
|
|
140
|
-
|
|
142
|
+
fulfillmentOrders: 'fulfillment-orders';
|
|
141
143
|
fulfillments: 'fulfillments';
|
|
144
|
+
transactions: 'transactions';
|
|
142
145
|
returns: 'returns';
|
|
143
146
|
};
|
|
147
|
+
'fulfillment-orders': {
|
|
148
|
+
items: 'fulfillment-order-items';
|
|
149
|
+
};
|
|
144
150
|
fulfillments: {
|
|
145
151
|
items: 'fulfillment-items';
|
|
146
152
|
};
|
|
@@ -219,6 +225,8 @@ interface Config {
|
|
|
219
225
|
transactions: TransactionsSelect<false> | TransactionsSelect<true>;
|
|
220
226
|
'order-status-logs': OrderStatusLogsSelect<false> | OrderStatusLogsSelect<true>;
|
|
221
227
|
'inventory-reservations': InventoryReservationsSelect<false> | InventoryReservationsSelect<true>;
|
|
228
|
+
'fulfillment-orders': FulfillmentOrdersSelect<false> | FulfillmentOrdersSelect<true>;
|
|
229
|
+
'fulfillment-order-items': FulfillmentOrderItemsSelect<false> | FulfillmentOrderItemsSelect<true>;
|
|
222
230
|
fulfillments: FulfillmentsSelect<false> | FulfillmentsSelect<true>;
|
|
223
231
|
'fulfillment-items': FulfillmentItemsSelect<false> | FulfillmentItemsSelect<true>;
|
|
224
232
|
returns: ReturnsSelect<false> | ReturnsSelect<true>;
|
|
@@ -847,37 +855,22 @@ interface Order {
|
|
|
847
855
|
id: string;
|
|
848
856
|
tenant?: (string | null) | Tenant;
|
|
849
857
|
orderNumber: string;
|
|
850
|
-
cartToken?: string | null;
|
|
851
|
-
status: 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned';
|
|
852
|
-
totalAmount?: number | null;
|
|
853
|
-
discountCode?: string | null;
|
|
854
|
-
discountAmount?: number | null;
|
|
855
858
|
/**
|
|
856
|
-
*
|
|
859
|
+
* Display status derived from payment, fulfillment order, shipment, and return state.
|
|
857
860
|
*/
|
|
858
|
-
|
|
861
|
+
displayStatus?: ('pending' | 'paid' | 'failed' | 'canceled' | 'refunded' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned') | null;
|
|
859
862
|
/**
|
|
860
|
-
*
|
|
863
|
+
* Primary order lifecycle display status excluding the return axis.
|
|
861
864
|
*/
|
|
862
|
-
|
|
865
|
+
primaryDisplayStatus?: ('pending' | 'paid' | 'failed' | 'canceled' | 'refunded' | 'preparing' | 'shipped' | 'delivered' | 'confirmed') | null;
|
|
863
866
|
/**
|
|
864
|
-
*
|
|
867
|
+
* Return display status derived only when a return is active.
|
|
865
868
|
*/
|
|
866
|
-
|
|
867
|
-
taxAmount?: number | null;
|
|
868
|
-
source?: ('web' | 'app' | 'manual') | null;
|
|
869
|
-
currency?: string | null;
|
|
869
|
+
returnDisplayStatus?: ('return_requested' | 'return_processing' | 'returned') | null;
|
|
870
870
|
/**
|
|
871
|
-
*
|
|
871
|
+
* Deprecated: compatibility alias for displayStatus.
|
|
872
872
|
*/
|
|
873
|
-
|
|
874
|
-
cancelReason?: string | null;
|
|
875
|
-
canceledAt?: string | null;
|
|
876
|
-
completedAt?: string | null;
|
|
877
|
-
/**
|
|
878
|
-
* Note left by customer at checkout
|
|
879
|
-
*/
|
|
880
|
-
customerNote?: string | null;
|
|
873
|
+
status: 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned';
|
|
881
874
|
customer?: (string | null) | Customer;
|
|
882
875
|
/**
|
|
883
876
|
* Customer info at the time of order
|
|
@@ -887,6 +880,11 @@ interface Order {
|
|
|
887
880
|
email?: string | null;
|
|
888
881
|
phone?: string | null;
|
|
889
882
|
};
|
|
883
|
+
items?: {
|
|
884
|
+
docs?: (string | OrderItem)[];
|
|
885
|
+
hasNextPage?: boolean;
|
|
886
|
+
totalDocs?: number;
|
|
887
|
+
};
|
|
890
888
|
shippingAddress?: {
|
|
891
889
|
recipientName?: string | null;
|
|
892
890
|
phone?: string | null;
|
|
@@ -895,33 +893,72 @@ interface Order {
|
|
|
895
893
|
detailAddress?: string | null;
|
|
896
894
|
deliveryMessage?: string | null;
|
|
897
895
|
};
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
businessRegistrationNumber?: string | null;
|
|
901
|
-
email?: string | null;
|
|
902
|
-
phone?: string | null;
|
|
903
|
-
address?: string | null;
|
|
904
|
-
};
|
|
905
|
-
items?: {
|
|
906
|
-
docs?: (string | OrderItem)[];
|
|
896
|
+
fulfillmentOrders?: {
|
|
897
|
+
docs?: (string | FulfillmentOrder)[];
|
|
907
898
|
hasNextPage?: boolean;
|
|
908
899
|
totalDocs?: number;
|
|
909
900
|
};
|
|
910
|
-
|
|
911
|
-
docs?: (string |
|
|
901
|
+
fulfillments?: {
|
|
902
|
+
docs?: (string | Fulfillment)[];
|
|
912
903
|
hasNextPage?: boolean;
|
|
913
904
|
totalDocs?: number;
|
|
914
905
|
};
|
|
915
|
-
|
|
916
|
-
|
|
906
|
+
totalAmount?: number | null;
|
|
907
|
+
/**
|
|
908
|
+
* Shipping amount at time of order
|
|
909
|
+
*/
|
|
910
|
+
shippingAmount?: number | null;
|
|
911
|
+
/**
|
|
912
|
+
* Note left by customer at checkout
|
|
913
|
+
*/
|
|
914
|
+
customerNote?: string | null;
|
|
915
|
+
transactions?: {
|
|
916
|
+
docs?: (string | Transaction)[];
|
|
917
917
|
hasNextPage?: boolean;
|
|
918
918
|
totalDocs?: number;
|
|
919
919
|
};
|
|
920
|
+
financialStatus: 'pending' | 'paid' | 'failed' | 'canceled' | 'partially_refunded' | 'refunded';
|
|
921
|
+
/**
|
|
922
|
+
* Item subtotal (excl. shipping & discount)
|
|
923
|
+
*/
|
|
924
|
+
subtotalAmount?: number | null;
|
|
925
|
+
discountCode?: string | null;
|
|
926
|
+
discountAmount?: number | null;
|
|
927
|
+
/**
|
|
928
|
+
* Cumulative refunded amount
|
|
929
|
+
*/
|
|
930
|
+
refundedAmount?: number | null;
|
|
931
|
+
taxAmount?: number | null;
|
|
932
|
+
/**
|
|
933
|
+
* Initial shipping refund policy snapshot at order time
|
|
934
|
+
*/
|
|
935
|
+
returnShippingRefundPolicySnapshot?: {
|
|
936
|
+
[k: string]: unknown;
|
|
937
|
+
} | unknown[] | string | number | boolean | null;
|
|
920
938
|
returns?: {
|
|
921
939
|
docs?: (string | Return)[];
|
|
922
940
|
hasNextPage?: boolean;
|
|
923
941
|
totalDocs?: number;
|
|
924
942
|
};
|
|
943
|
+
confirmationStatus: 'unconfirmed' | 'confirmed';
|
|
944
|
+
confirmedAt?: string | null;
|
|
945
|
+
cancelReason?: string | null;
|
|
946
|
+
canceledAt?: string | null;
|
|
947
|
+
completedAt?: string | null;
|
|
948
|
+
billingAddress?: {
|
|
949
|
+
recipientName?: string | null;
|
|
950
|
+
businessRegistrationNumber?: string | null;
|
|
951
|
+
email?: string | null;
|
|
952
|
+
phone?: string | null;
|
|
953
|
+
address?: string | null;
|
|
954
|
+
};
|
|
955
|
+
/**
|
|
956
|
+
* Internal admin notes (not visible to customers)
|
|
957
|
+
*/
|
|
958
|
+
adminNotes?: string | null;
|
|
959
|
+
source?: ('web' | 'app' | 'manual') | null;
|
|
960
|
+
currency?: string | null;
|
|
961
|
+
cartToken?: string | null;
|
|
925
962
|
metadata?: {
|
|
926
963
|
[k: string]: unknown;
|
|
927
964
|
} | unknown[] | string | number | boolean | null;
|
|
@@ -1972,6 +2009,10 @@ interface ProductTag {
|
|
|
1972
2009
|
* Single representative taxonomy image. Add domain-specific fields for multiple images such as thumbnail and hero variants.
|
|
1973
2010
|
*/
|
|
1974
2011
|
image?: (string | null) | Image;
|
|
2012
|
+
/**
|
|
2013
|
+
* Optional #RRGGBB hex color for taxonomy badges or filter UI. This does not replace the representative image.
|
|
2014
|
+
*/
|
|
2015
|
+
color?: string | null;
|
|
1975
2016
|
updatedAt: string;
|
|
1976
2017
|
createdAt: string;
|
|
1977
2018
|
deletedAt?: string | null;
|
|
@@ -2326,62 +2367,43 @@ interface ProductCollection {
|
|
|
2326
2367
|
}
|
|
2327
2368
|
/**
|
|
2328
2369
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
2329
|
-
* via the `definition` "
|
|
2370
|
+
* via the `definition` "fulfillment-orders".
|
|
2330
2371
|
*/
|
|
2331
|
-
interface
|
|
2372
|
+
interface FulfillmentOrder {
|
|
2332
2373
|
id: string;
|
|
2333
2374
|
tenant?: (string | null) | Tenant;
|
|
2334
|
-
_title?: string | null;
|
|
2335
|
-
type: 'payment' | 'refund';
|
|
2336
|
-
status: 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded';
|
|
2337
2375
|
order: string | Order;
|
|
2338
|
-
|
|
2376
|
+
status: 'open' | 'in_progress' | 'on_hold' | 'canceled' | 'closed';
|
|
2377
|
+
holdReason?: string | null;
|
|
2339
2378
|
/**
|
|
2340
|
-
*
|
|
2341
|
-
*/
|
|
2342
|
-
paymentMethod?: string | null;
|
|
2343
|
-
/**
|
|
2344
|
-
* Installment months (0 = lump sum)
|
|
2379
|
+
* Warehouse, store, or external location identifier assigned to this fulfillment order.
|
|
2345
2380
|
*/
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
confirmedAmount?: number | null;
|
|
2354
|
-
confirmedCurrency?: string | null;
|
|
2355
|
-
confirmedAt?: string | null;
|
|
2356
|
-
confirmationSource?: ('provider_webhook' | 'provider_lookup' | 'provider_api_confirm' | 'manual_server') | null;
|
|
2357
|
-
cashReceipt?: {
|
|
2358
|
-
issuanceType?: ('none' | 'personal' | 'business') | null;
|
|
2359
|
-
/**
|
|
2360
|
-
* Personal: phone or cash receipt card number / Business: business registration number
|
|
2361
|
-
*/
|
|
2362
|
-
registrationNumber?: string | null;
|
|
2363
|
-
issueNumber?: string | null;
|
|
2364
|
-
issuedAt?: string | null;
|
|
2365
|
-
};
|
|
2366
|
-
cardInfo?: {
|
|
2367
|
-
brand?: string | null;
|
|
2368
|
-
last4?: string | null;
|
|
2369
|
-
expMonth?: number | null;
|
|
2370
|
-
expYear?: number | null;
|
|
2371
|
-
issuerCode?: string | null;
|
|
2372
|
-
type?: ('credit' | 'debit' | 'gift') | null;
|
|
2373
|
-
owner?: string | null;
|
|
2381
|
+
assignedLocation?: string | null;
|
|
2382
|
+
preparedAt?: string | null;
|
|
2383
|
+
closedAt?: string | null;
|
|
2384
|
+
items?: {
|
|
2385
|
+
docs?: (string | FulfillmentOrderItem)[];
|
|
2386
|
+
hasNextPage?: boolean;
|
|
2387
|
+
totalDocs?: number;
|
|
2374
2388
|
};
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2389
|
+
adminNotes?: string | null;
|
|
2390
|
+
metadata?: {
|
|
2391
|
+
[k: string]: unknown;
|
|
2392
|
+
} | unknown[] | string | number | boolean | null;
|
|
2393
|
+
updatedAt: string;
|
|
2394
|
+
createdAt: string;
|
|
2395
|
+
deletedAt?: string | null;
|
|
2396
|
+
}
|
|
2397
|
+
/**
|
|
2398
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
2399
|
+
* via the `definition` "fulfillment-order-items".
|
|
2400
|
+
*/
|
|
2401
|
+
interface FulfillmentOrderItem {
|
|
2402
|
+
id: string;
|
|
2403
|
+
tenant?: (string | null) | Tenant;
|
|
2404
|
+
fulfillmentOrder: string | FulfillmentOrder;
|
|
2405
|
+
orderItem: string | OrderItem;
|
|
2406
|
+
quantity: number;
|
|
2385
2407
|
metadata?: {
|
|
2386
2408
|
[k: string]: unknown;
|
|
2387
2409
|
} | unknown[] | string | number | boolean | null;
|
|
@@ -2397,7 +2419,8 @@ interface Fulfillment {
|
|
|
2397
2419
|
id: string;
|
|
2398
2420
|
tenant?: (string | null) | Tenant;
|
|
2399
2421
|
order: string | Order;
|
|
2400
|
-
status: 'pending' | 'packed' | 'shipped' | 'delivered' | 'failed';
|
|
2422
|
+
status: 'pending' | 'packed' | 'shipped' | 'delivered' | 'canceled' | 'failed';
|
|
2423
|
+
fulfillmentOrder: string | FulfillmentOrder;
|
|
2401
2424
|
/**
|
|
2402
2425
|
* Carrier name (e.g. CJ Logistics, FedEx)
|
|
2403
2426
|
*/
|
|
@@ -2443,6 +2466,71 @@ interface FulfillmentItem {
|
|
|
2443
2466
|
createdAt: string;
|
|
2444
2467
|
deletedAt?: string | null;
|
|
2445
2468
|
}
|
|
2469
|
+
/**
|
|
2470
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
2471
|
+
* via the `definition` "transactions".
|
|
2472
|
+
*/
|
|
2473
|
+
interface Transaction {
|
|
2474
|
+
id: string;
|
|
2475
|
+
tenant?: (string | null) | Tenant;
|
|
2476
|
+
_title?: string | null;
|
|
2477
|
+
type: 'payment' | 'refund';
|
|
2478
|
+
status: 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded';
|
|
2479
|
+
order: string | Order;
|
|
2480
|
+
amount?: number | null;
|
|
2481
|
+
/**
|
|
2482
|
+
* Payment method snapshot returned by the provider. Not edited directly.
|
|
2483
|
+
*/
|
|
2484
|
+
paymentMethod?: string | null;
|
|
2485
|
+
/**
|
|
2486
|
+
* Installment months (0 = lump sum)
|
|
2487
|
+
*/
|
|
2488
|
+
installmentMonths?: number | null;
|
|
2489
|
+
approvedAt?: string | null;
|
|
2490
|
+
receiptUrl?: string | null;
|
|
2491
|
+
pgPaymentId?: string | null;
|
|
2492
|
+
pgOrderId?: string | null;
|
|
2493
|
+
providerEventId?: string | null;
|
|
2494
|
+
providerStatus?: string | null;
|
|
2495
|
+
confirmedAmount?: number | null;
|
|
2496
|
+
confirmedCurrency?: string | null;
|
|
2497
|
+
confirmedAt?: string | null;
|
|
2498
|
+
confirmationSource?: ('provider_webhook' | 'provider_lookup' | 'provider_api_confirm' | 'manual_server') | null;
|
|
2499
|
+
cashReceipt?: {
|
|
2500
|
+
issuanceType?: ('none' | 'personal' | 'business') | null;
|
|
2501
|
+
/**
|
|
2502
|
+
* Personal: phone or cash receipt card number / Business: business registration number
|
|
2503
|
+
*/
|
|
2504
|
+
registrationNumber?: string | null;
|
|
2505
|
+
issueNumber?: string | null;
|
|
2506
|
+
issuedAt?: string | null;
|
|
2507
|
+
};
|
|
2508
|
+
cardInfo?: {
|
|
2509
|
+
brand?: string | null;
|
|
2510
|
+
last4?: string | null;
|
|
2511
|
+
expMonth?: number | null;
|
|
2512
|
+
expYear?: number | null;
|
|
2513
|
+
issuerCode?: string | null;
|
|
2514
|
+
type?: ('credit' | 'debit' | 'gift') | null;
|
|
2515
|
+
owner?: string | null;
|
|
2516
|
+
};
|
|
2517
|
+
failureCode?: string | null;
|
|
2518
|
+
failureMessage?: string | null;
|
|
2519
|
+
/**
|
|
2520
|
+
* Payment gateway (e.g. toss, stripe)
|
|
2521
|
+
*/
|
|
2522
|
+
pgProvider?: string | null;
|
|
2523
|
+
/**
|
|
2524
|
+
* Legal retention deadline (5 years, Electronic Financial Transactions Act)
|
|
2525
|
+
*/
|
|
2526
|
+
retainUntil?: string | null;
|
|
2527
|
+
metadata?: {
|
|
2528
|
+
[k: string]: unknown;
|
|
2529
|
+
} | unknown[] | string | number | boolean | null;
|
|
2530
|
+
updatedAt: string;
|
|
2531
|
+
createdAt: string;
|
|
2532
|
+
deletedAt?: string | null;
|
|
2533
|
+
}
|
|
2446
2534
|
/**
|
|
2447
2535
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
2448
2536
|
* via the `definition` "returns".
|
|
@@ -2485,6 +2573,18 @@ interface Return {
|
|
|
2485
2573
|
* Return shipping fee deducted from refundAmount
|
|
2486
2574
|
*/
|
|
2487
2575
|
returnShippingFee?: number | null;
|
|
2576
|
+
/**
|
|
2577
|
+
* Initial order shipping amount refunded
|
|
2578
|
+
*/
|
|
2579
|
+
initialShippingRefundAmount?: number | null;
|
|
2580
|
+
initialShippingRefundSuggestedAmount?: number | null;
|
|
2581
|
+
/**
|
|
2582
|
+
* Audit note for overriding the initial shipping refund suggestion
|
|
2583
|
+
*/
|
|
2584
|
+
initialShippingRefundOverrideNote?: string | null;
|
|
2585
|
+
initialShippingRefundPolicySnapshot?: {
|
|
2586
|
+
[k: string]: unknown;
|
|
2587
|
+
} | unknown[] | string | number | boolean | null;
|
|
2488
2588
|
/**
|
|
2489
2589
|
* Exchange balance (positive: extra charge, negative: extra refund)
|
|
2490
2590
|
*/
|
|
@@ -2754,7 +2854,7 @@ interface Webhook {
|
|
|
2754
2854
|
/**
|
|
2755
2855
|
* HMAC signing secret (encrypted at rest, never returned on read). Reveal or rotate in Admin.
|
|
2756
2856
|
*/
|
|
2757
|
-
secret
|
|
2857
|
+
secret?: string | null;
|
|
2758
2858
|
/**
|
|
2759
2859
|
* When the signing secret was first revealed to a tenant-admin (one time).
|
|
2760
2860
|
*/
|
|
@@ -2774,7 +2874,7 @@ interface Webhook {
|
|
|
2774
2874
|
/**
|
|
2775
2875
|
* Receives create/update events for this collection.
|
|
2776
2876
|
*/
|
|
2777
|
-
collection: 'tenant-metadata' | 'tenant-logos' | 'images' | 'products' | 'product-variants' | 'product-options' | 'product-option-values' | 'product-categories' | 'product-tags' | 'product-collections' | 'brands' | 'brand-logos' | 'orders' | 'order-items' | 'transactions' | 'fulfillments' | 'fulfillment-items' | 'returns' | 'return-items' | 'carts' | 'cart-items' | 'discounts' | 'shipping-policies' | 'shipping-zones' | 'customers' | 'customer-profiles' | 'customer-addresses' | 'playlists' | 'playlist-categories' | 'playlist-tags' | 'tracks' | 'track-categories' | 'track-tags' | 'galleries' | 'gallery-items' | 'gallery-categories' | 'gallery-tags' | 'links' | 'link-categories' | 'link-tags' | 'forms' | 'form-submissions' | 'articles' | 'article-authors' | 'article-categories' | 'article-tags' | 'documents' | 'document-categories' | 'document-types' | 'canvases' | 'canvas-node-types' | 'canvas-edge-types' | 'canvas-categories' | 'canvas-tags' | 'canvas-nodes' | 'canvas-edges' | 'videos' | 'video-categories' | 'video-tags' | 'live-streams' | 'posts' | 'comments' | 'reactions' | 'reaction-types' | 'bookmarks' | 'post-categories' | 'customer-profile-lists' | 'event-calendars' | 'events' | 'event-categories' | 'event-occurrences' | 'event-tags';
|
|
2877
|
+
collection: 'tenant-metadata' | 'tenant-logos' | 'images' | 'products' | 'product-variants' | 'product-options' | 'product-option-values' | 'product-categories' | 'product-tags' | 'product-collections' | 'brands' | 'brand-logos' | 'orders' | 'order-items' | 'transactions' | 'fulfillment-orders' | 'fulfillment-order-items' | 'fulfillments' | 'fulfillment-items' | 'returns' | 'return-items' | 'carts' | 'cart-items' | 'discounts' | 'shipping-policies' | 'shipping-zones' | 'customers' | 'customer-profiles' | 'customer-addresses' | 'playlists' | 'playlist-categories' | 'playlist-tags' | 'tracks' | 'track-categories' | 'track-tags' | 'galleries' | 'gallery-items' | 'gallery-categories' | 'gallery-tags' | 'links' | 'link-categories' | 'link-tags' | 'forms' | 'form-submissions' | 'articles' | 'article-authors' | 'article-categories' | 'article-tags' | 'documents' | 'document-categories' | 'document-types' | 'canvases' | 'canvas-node-types' | 'canvas-edge-types' | 'canvas-categories' | 'canvas-tags' | 'canvas-nodes' | 'canvas-edges' | 'videos' | 'video-categories' | 'video-tags' | 'live-streams' | 'posts' | 'comments' | 'reactions' | 'reaction-types' | 'bookmarks' | 'post-categories' | 'post-tags' | 'customer-profile-lists' | 'event-calendars' | 'events' | 'event-categories' | 'event-occurrences' | 'event-tags';
|
|
2778
2878
|
id?: string | null;
|
|
2779
2879
|
}[] | null;
|
|
2780
2880
|
isActive?: boolean | null;
|
|
@@ -2933,6 +3033,15 @@ interface TenantMetadatum {
|
|
|
2933
3033
|
*/
|
|
2934
3034
|
twitterImage?: (string | null) | Image;
|
|
2935
3035
|
};
|
|
3036
|
+
ecommerceReturnPolicy?: {
|
|
3037
|
+
initialShippingRefundMode?: ('full_order_only' | 'never') | null;
|
|
3038
|
+
eligibleInitialShippingRefundReasons?: ('change_of_mind' | 'defective' | 'wrong_delivery' | 'damaged' | 'other')[] | null;
|
|
3039
|
+
returnShippingFeeDefaultMode?: 'manual_only' | null;
|
|
3040
|
+
manualOverrideAllowed?: boolean | null;
|
|
3041
|
+
overrideNoteRequired?: boolean | null;
|
|
3042
|
+
multiReturnInitialShippingRefund?: 'once_only' | null;
|
|
3043
|
+
legacyOrderPolicyMode?: 'shipping_amount_manual_cap' | null;
|
|
3044
|
+
};
|
|
2936
3045
|
/**
|
|
2937
3046
|
* Reusable option name and value lists for the Product Editor. Up to 20 presets.
|
|
2938
3047
|
*/
|
|
@@ -3489,7 +3598,13 @@ interface OrderStatusLog {
|
|
|
3489
3598
|
id: string;
|
|
3490
3599
|
tenant?: (string | null) | Tenant;
|
|
3491
3600
|
order: string | Order;
|
|
3601
|
+
/**
|
|
3602
|
+
* Previous deprecated orders.status/displayStatus alias value.
|
|
3603
|
+
*/
|
|
3492
3604
|
fromStatus: 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned';
|
|
3605
|
+
/**
|
|
3606
|
+
* Next deprecated orders.status/displayStatus alias value.
|
|
3607
|
+
*/
|
|
3493
3608
|
toStatus: 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned';
|
|
3494
3609
|
/**
|
|
3495
3610
|
* 'user:{id}' | 'api:updateOrder' | 'system:transaction:{paymentId}' | 'system:fulfillment:{id}' | 'system:return:{id}'
|
|
@@ -5196,6 +5311,7 @@ interface PostCategory {
|
|
|
5196
5311
|
interface PostTag {
|
|
5197
5312
|
id: string;
|
|
5198
5313
|
_order?: string | null;
|
|
5314
|
+
tenant?: (string | null) | Tenant;
|
|
5199
5315
|
title?: string | null;
|
|
5200
5316
|
/**
|
|
5201
5317
|
* When enabled, the slug will auto-generate from the title field on save and autosave.
|
|
@@ -6580,6 +6696,15 @@ interface TenantMetadataSelect<T extends boolean = true> {
|
|
|
6580
6696
|
twitterDescription?: T;
|
|
6581
6697
|
twitterImage?: T;
|
|
6582
6698
|
};
|
|
6699
|
+
ecommerceReturnPolicy?: T | {
|
|
6700
|
+
initialShippingRefundMode?: T;
|
|
6701
|
+
eligibleInitialShippingRefundReasons?: T;
|
|
6702
|
+
returnShippingFeeDefaultMode?: T;
|
|
6703
|
+
manualOverrideAllowed?: T;
|
|
6704
|
+
overrideNoteRequired?: T;
|
|
6705
|
+
multiReturnInitialShippingRefund?: T;
|
|
6706
|
+
legacyOrderPolicyMode?: T;
|
|
6707
|
+
};
|
|
6583
6708
|
optionPresets?: T | {
|
|
6584
6709
|
name?: T;
|
|
6585
6710
|
options?: T | {
|
|
@@ -7138,6 +7263,7 @@ interface ProductTagsSelect<T extends boolean = true> {
|
|
|
7138
7263
|
slug?: T;
|
|
7139
7264
|
description?: T;
|
|
7140
7265
|
image?: T;
|
|
7266
|
+
color?: T;
|
|
7141
7267
|
updatedAt?: T;
|
|
7142
7268
|
createdAt?: T;
|
|
7143
7269
|
deletedAt?: T;
|
|
@@ -7320,28 +7446,17 @@ interface BrandLogosSelect<T extends boolean = true> {
|
|
|
7320
7446
|
interface OrdersSelect<T extends boolean = true> {
|
|
7321
7447
|
tenant?: T;
|
|
7322
7448
|
orderNumber?: T;
|
|
7323
|
-
|
|
7449
|
+
displayStatus?: T;
|
|
7450
|
+
primaryDisplayStatus?: T;
|
|
7451
|
+
returnDisplayStatus?: T;
|
|
7324
7452
|
status?: T;
|
|
7325
|
-
totalAmount?: T;
|
|
7326
|
-
discountCode?: T;
|
|
7327
|
-
discountAmount?: T;
|
|
7328
|
-
refundedAmount?: T;
|
|
7329
|
-
shippingAmount?: T;
|
|
7330
|
-
subtotalAmount?: T;
|
|
7331
|
-
taxAmount?: T;
|
|
7332
|
-
source?: T;
|
|
7333
|
-
currency?: T;
|
|
7334
|
-
adminNotes?: T;
|
|
7335
|
-
cancelReason?: T;
|
|
7336
|
-
canceledAt?: T;
|
|
7337
|
-
completedAt?: T;
|
|
7338
|
-
customerNote?: T;
|
|
7339
7453
|
customer?: T;
|
|
7340
7454
|
customerSnapshot?: T | {
|
|
7341
7455
|
name?: T;
|
|
7342
7456
|
email?: T;
|
|
7343
7457
|
phone?: T;
|
|
7344
7458
|
};
|
|
7459
|
+
items?: T;
|
|
7345
7460
|
shippingAddress?: T | {
|
|
7346
7461
|
recipientName?: T;
|
|
7347
7462
|
phone?: T;
|
|
@@ -7350,6 +7465,25 @@ interface OrdersSelect<T extends boolean = true> {
|
|
|
7350
7465
|
detailAddress?: T;
|
|
7351
7466
|
deliveryMessage?: T;
|
|
7352
7467
|
};
|
|
7468
|
+
fulfillmentOrders?: T;
|
|
7469
|
+
fulfillments?: T;
|
|
7470
|
+
totalAmount?: T;
|
|
7471
|
+
shippingAmount?: T;
|
|
7472
|
+
customerNote?: T;
|
|
7473
|
+
transactions?: T;
|
|
7474
|
+
financialStatus?: T;
|
|
7475
|
+
subtotalAmount?: T;
|
|
7476
|
+
discountCode?: T;
|
|
7477
|
+
discountAmount?: T;
|
|
7478
|
+
refundedAmount?: T;
|
|
7479
|
+
taxAmount?: T;
|
|
7480
|
+
returnShippingRefundPolicySnapshot?: T;
|
|
7481
|
+
returns?: T;
|
|
7482
|
+
confirmationStatus?: T;
|
|
7483
|
+
confirmedAt?: T;
|
|
7484
|
+
cancelReason?: T;
|
|
7485
|
+
canceledAt?: T;
|
|
7486
|
+
completedAt?: T;
|
|
7353
7487
|
billingAddress?: T | {
|
|
7354
7488
|
recipientName?: T;
|
|
7355
7489
|
businessRegistrationNumber?: T;
|
|
@@ -7357,10 +7491,10 @@ interface OrdersSelect<T extends boolean = true> {
|
|
|
7357
7491
|
phone?: T;
|
|
7358
7492
|
address?: T;
|
|
7359
7493
|
};
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7494
|
+
adminNotes?: T;
|
|
7495
|
+
source?: T;
|
|
7496
|
+
currency?: T;
|
|
7497
|
+
cartToken?: T;
|
|
7364
7498
|
metadata?: T;
|
|
7365
7499
|
nextRefundSeq?: T;
|
|
7366
7500
|
nextCaptureSeq?: T;
|
|
@@ -7475,6 +7609,39 @@ interface InventoryReservationsSelect<T extends boolean = true> {
|
|
|
7475
7609
|
createdAt?: T;
|
|
7476
7610
|
deletedAt?: T;
|
|
7477
7611
|
}
|
|
7612
|
+
/**
|
|
7613
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
7614
|
+
* via the `definition` "fulfillment-orders_select".
|
|
7615
|
+
*/
|
|
7616
|
+
interface FulfillmentOrdersSelect<T extends boolean = true> {
|
|
7617
|
+
tenant?: T;
|
|
7618
|
+
order?: T;
|
|
7619
|
+
status?: T;
|
|
7620
|
+
holdReason?: T;
|
|
7621
|
+
assignedLocation?: T;
|
|
7622
|
+
preparedAt?: T;
|
|
7623
|
+
closedAt?: T;
|
|
7624
|
+
items?: T;
|
|
7625
|
+
adminNotes?: T;
|
|
7626
|
+
metadata?: T;
|
|
7627
|
+
updatedAt?: T;
|
|
7628
|
+
createdAt?: T;
|
|
7629
|
+
deletedAt?: T;
|
|
7630
|
+
}
|
|
7631
|
+
/**
|
|
7632
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
7633
|
+
* via the `definition` "fulfillment-order-items_select".
|
|
7634
|
+
*/
|
|
7635
|
+
interface FulfillmentOrderItemsSelect<T extends boolean = true> {
|
|
7636
|
+
tenant?: T;
|
|
7637
|
+
fulfillmentOrder?: T;
|
|
7638
|
+
orderItem?: T;
|
|
7639
|
+
quantity?: T;
|
|
7640
|
+
metadata?: T;
|
|
7641
|
+
updatedAt?: T;
|
|
7642
|
+
createdAt?: T;
|
|
7643
|
+
deletedAt?: T;
|
|
7644
|
+
}
|
|
7478
7645
|
/**
|
|
7479
7646
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
7480
7647
|
* via the `definition` "fulfillments_select".
|
|
@@ -7483,6 +7650,7 @@ interface FulfillmentsSelect<T extends boolean = true> {
|
|
|
7483
7650
|
tenant?: T;
|
|
7484
7651
|
order?: T;
|
|
7485
7652
|
status?: T;
|
|
7653
|
+
fulfillmentOrder?: T;
|
|
7486
7654
|
carrier?: T;
|
|
7487
7655
|
trackingNumber?: T;
|
|
7488
7656
|
trackingUrl?: T;
|
|
@@ -7528,6 +7696,10 @@ interface ReturnsSelect<T extends boolean = true> {
|
|
|
7528
7696
|
refundReceiptUrl?: T;
|
|
7529
7697
|
refundAmount?: T;
|
|
7530
7698
|
returnShippingFee?: T;
|
|
7699
|
+
initialShippingRefundAmount?: T;
|
|
7700
|
+
initialShippingRefundSuggestedAmount?: T;
|
|
7701
|
+
initialShippingRefundOverrideNote?: T;
|
|
7702
|
+
initialShippingRefundPolicySnapshot?: T;
|
|
7531
7703
|
exchangeDifference?: T;
|
|
7532
7704
|
metadata?: T;
|
|
7533
7705
|
updatedAt?: T;
|
|
@@ -8817,6 +8989,7 @@ interface PostCategoriesSelect<T extends boolean = true> {
|
|
|
8817
8989
|
*/
|
|
8818
8990
|
interface PostTagsSelect<T extends boolean = true> {
|
|
8819
8991
|
_order?: T;
|
|
8992
|
+
tenant?: T;
|
|
8820
8993
|
title?: T;
|
|
8821
8994
|
generateSlug?: T;
|
|
8822
8995
|
slug?: T;
|
package/dist/query.cjs
CHANGED
|
@@ -1015,13 +1015,15 @@ var RealtimeConnection = class {
|
|
|
1015
1015
|
};
|
|
1016
1016
|
|
|
1017
1017
|
// src/utils/types.ts
|
|
1018
|
-
|
|
1018
|
+
function resolveRelation(ref) {
|
|
1019
1019
|
if (typeof ref === "string" || typeof ref === "number" || ref === null || ref === void 0)
|
|
1020
1020
|
return null;
|
|
1021
1021
|
return ref;
|
|
1022
|
-
}
|
|
1022
|
+
}
|
|
1023
1023
|
|
|
1024
1024
|
// src/core/metadata/index.ts
|
|
1025
|
+
var OPEN_GRAPH_IMAGE_SIZE = "1200";
|
|
1026
|
+
var LEGACY_OPEN_GRAPH_IMAGE_SIZE = "1536";
|
|
1025
1027
|
function extractSeo(doc) {
|
|
1026
1028
|
const seo = doc.seo ?? {};
|
|
1027
1029
|
const og = seo.openGraph ?? {};
|
|
@@ -1065,7 +1067,7 @@ function generateMetadata(input, options) {
|
|
|
1065
1067
|
function resolveMetaImage(ref) {
|
|
1066
1068
|
const image = resolveRelation(ref);
|
|
1067
1069
|
if (!image) return null;
|
|
1068
|
-
const sized = image.sizes?.[
|
|
1070
|
+
const sized = image.sizes?.[OPEN_GRAPH_IMAGE_SIZE] ?? image.sizes?.[LEGACY_OPEN_GRAPH_IMAGE_SIZE];
|
|
1069
1071
|
const url = sized?.url || image.url;
|
|
1070
1072
|
if (!url) return null;
|
|
1071
1073
|
const width = sized?.url ? sized.width : image.width;
|