@deliverart/sdk-js-order 2.48.0 → 2.48.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/README.md +7 -0
- package/dist/index.cjs +12 -2
- package/dist/index.d.cts +2005 -2005
- package/dist/index.d.ts +2005 -2005
- package/dist/index.js +12 -2
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -73,6 +73,13 @@ type OrderPlanningMode = 'PLANNED' | 'FORCED'
|
|
|
73
73
|
|
|
74
74
|
`UpdateOrderInput` keeps common editable fields and enforces mutually exclusive delivery / collection scheduling fields.
|
|
75
75
|
|
|
76
|
+
Order list and detail responses allow `address.city` and `address.postalCode` to be
|
|
77
|
+
`null`, because delivery partners can provide only an address label and geographic
|
|
78
|
+
coordinates. Missing locality values remain `null`; clients should omit them from
|
|
79
|
+
display text. Other address checks remain unchanged. `orderAddressSchema`, order
|
|
80
|
+
creation, updates, and fee calculation still require non-empty city and postal
|
|
81
|
+
code strings whenever an address object is supplied.
|
|
82
|
+
|
|
76
83
|
## Order Requests
|
|
77
84
|
|
|
78
85
|
### CreateOrder
|
package/dist/index.cjs
CHANGED
|
@@ -909,6 +909,10 @@ var orderAddressSchema = import_sdk_js_global_types5.addressSchema.extend({
|
|
|
909
909
|
city: import_zod8.z.string().min(1, "address.city.required"),
|
|
910
910
|
postalCode: import_zod8.z.string().min(1, "address.postalCode.required")
|
|
911
911
|
});
|
|
912
|
+
var readableOrderAddressSchema = orderAddressSchema.extend({
|
|
913
|
+
city: orderAddressSchema.shape.city.nullable(),
|
|
914
|
+
postalCode: orderAddressSchema.shape.postalCode.nullable()
|
|
915
|
+
});
|
|
912
916
|
var EMPTY_ORDER_CUSTOMER_INFO = {
|
|
913
917
|
firstName: null,
|
|
914
918
|
lastName: null,
|
|
@@ -1017,7 +1021,10 @@ var normalizeCollectionOrderType = (value) => {
|
|
|
1017
1021
|
};
|
|
1018
1022
|
var deliveryOrderFieldsSchema = import_zod8.z.object({
|
|
1019
1023
|
type: import_zod8.z.literal("delivery"),
|
|
1020
|
-
address: import_zod8.z.preprocess(
|
|
1024
|
+
address: import_zod8.z.preprocess(
|
|
1025
|
+
normalizeEmptyPhpJsonStructureToNull,
|
|
1026
|
+
readableOrderAddressSchema.nullable()
|
|
1027
|
+
),
|
|
1021
1028
|
location: import_zod8.z.preprocess(normalizeEmptyPhpJsonStructureToNull, import_sdk_js_global_types5.locationSchema.nullable()),
|
|
1022
1029
|
requestedDeliveryTime: import_sdk_js_global_types5.datetimeSchema.nullable(),
|
|
1023
1030
|
finalDeliveryTime: import_sdk_js_global_types5.datetimeSchema.nullable(),
|
|
@@ -1041,7 +1048,10 @@ var collectionOrderFieldsSchema = import_zod8.z.object({
|
|
|
1041
1048
|
});
|
|
1042
1049
|
var kitchenOrderFieldsSchema = import_zod8.z.object({
|
|
1043
1050
|
type: import_zod8.z.literal("kitchen"),
|
|
1044
|
-
address: import_zod8.z.preprocess(
|
|
1051
|
+
address: import_zod8.z.preprocess(
|
|
1052
|
+
normalizeEmptyPhpJsonStructureToNull,
|
|
1053
|
+
readableOrderAddressSchema.nullable()
|
|
1054
|
+
),
|
|
1045
1055
|
location: import_zod8.z.preprocess(normalizeEmptyPhpJsonStructureToNull, import_sdk_js_global_types5.locationSchema.nullable()),
|
|
1046
1056
|
requestedDeliveryTime: import_sdk_js_global_types5.datetimeSchema.nullable(),
|
|
1047
1057
|
finalDeliveryTime: import_sdk_js_global_types5.datetimeSchema.nullable(),
|