picker-db 5.0.18 → 5.0.20

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## v5.0.19
6
+ ### Added
7
+ * DP-15057: Added `searchType` field to Mini Booking schema with enum `ON_DEMAND | EXPRESS | GROUND` (default `ON_DEMAND`, indexed). Backbone for Ground Delivery epic.
8
+ * DP-15057: Added `weight` field to Mini Booking schema (Number, min: 0) for Ground Delivery package weight in pounds (LB).
9
+ * DP-15057: Added `volume` field to Mini Booking schema (String, enum `XSMALL|SMALL|MEDIUM|LARGE|XLARGE`) for Ground Delivery package size category.
10
+ * Added `BOOKING.SEARCH_TYPES` constant.
11
+
5
12
  ## v5.0.18
6
13
  ### Added
7
14
  * DP-14557: Added `externalStoreID` field to Booking and User schemas (String, default `null`) so the store's external identifier can be snapshotted onto bookings.
@@ -425,6 +425,16 @@ module.exports = (connection) => {
425
425
  labelUrl: {
426
426
  type: String,
427
427
  },
428
+ // Ground-only: expected delivery date for the Ground shipment (DP-14879).
429
+ // Initially set by the user at booking creation (required when
430
+ // searchType === GROUND, must be >= D+1 UTC). After createOrder, the
431
+ // gd-search-orchestrator-service overwrites it with the carrier-confirmed
432
+ // date when FedEx/DHL commit to a different day — this is the binding
433
+ // value the dashboard and external-api expose to the client.
434
+ expectedDeliveryDate: {
435
+ type: Date,
436
+ default: null,
437
+ },
428
438
  transactionDetails: {
429
439
  itemCharge: {
430
440
  type: connection.base.Schema.ObjectId,
@@ -56,6 +56,30 @@ module.exports = (connection) => {
56
56
  type: String,
57
57
  required: false,
58
58
  },
59
+ searchType: {
60
+ type: String,
61
+ enum: [
62
+ BOOKING.SEARCH_TYPES.ON_DEMAND,
63
+ BOOKING.SEARCH_TYPES.EXPRESS,
64
+ BOOKING.SEARCH_TYPES.GROUND,
65
+ ],
66
+ default: BOOKING.SEARCH_TYPES.ON_DEMAND,
67
+ index: true,
68
+ },
69
+ weight: {
70
+ type: Number,
71
+ min: 0,
72
+ },
73
+ volume: {
74
+ type: String,
75
+ enum: [
76
+ BOOKING.VOLUMES.XSMALL,
77
+ BOOKING.VOLUMES.SMALL,
78
+ BOOKING.VOLUMES.MEDIUM,
79
+ BOOKING.VOLUMES.LARGE,
80
+ BOOKING.VOLUMES.XLARGE,
81
+ ],
82
+ },
59
83
  }, { timestamps: false });
60
84
 
61
85
  return MiniBookingSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picker-db",
3
- "version": "5.0.18",
3
+ "version": "5.0.20",
4
4
  "description": "Picker DB services",
5
5
  "main": "index.js",
6
6
  "scripts": {