picker-db 5.0.10 → 5.0.12

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,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## v5.0.12
6
+ ### Added
7
+ * DP-14414: Added `guideID` (ObjectId, indexed) and `guideNumericId` (number) fields to Booking schema for guide-booking relationships.
8
+
9
+ ## v5.0.11
10
+ ### Added
11
+ * DP-14315: Added `searchType` field to Booking schema with enum `ON_DEMAND | EXPRESS | GROUND` (default `ON_DEMAND`, indexed). Backbone for Ground Delivery epic.
12
+ * Added `BOOKING.SEARCH_TYPES` constant.
13
+
5
14
  ## v3.6.0
6
15
  ### Added
7
16
  * Mongo Atlas Connection: Added configuration for connection with MongoAtlas database
package/CLAUDE.md CHANGED
@@ -84,4 +84,4 @@ npm test
84
84
 
85
85
  ## Recent Context
86
86
 
87
- The repository is on the `feature/CT-187-index-optimizations` branch with uncommitted changes to `modules/picker/schemas/bookings.js`. This work is focused on database index optimizations.
87
+ The repository is on the `feature/DP-14414-guide-booking-support` branch. Recent work added guide-related fields (guideID and guideNumericId) to the Bookings schema to support guide-booking relationships. Version has been bumped to 5.0.12.
package/constants.js CHANGED
@@ -470,6 +470,11 @@ module.exports = {
470
470
  PICKUP_AND_DELIVER: "PICKUP_AND_DELIVER",
471
471
  MULTI_PICKING: "MULTI_PICKING",
472
472
  },
473
+ SEARCH_TYPES: {
474
+ ON_DEMAND: "ON_DEMAND",
475
+ EXPRESS: "EXPRESS",
476
+ GROUND: "GROUND",
477
+ },
473
478
  BOOKING_STOP_STATUSES: {
474
479
  PENDING: "PENDING",
475
480
  ACCEPTED: "ACCEPTED",
@@ -265,6 +265,17 @@ module.exports = (connection) => {
265
265
  },
266
266
  driverAccountingType: { type: String },
267
267
  // #endregion Driver Info
268
+ // #region Guide Info
269
+ guideID: {
270
+ type: connection.base.Schema.ObjectId,
271
+ default: null,
272
+ index: true,
273
+ sparse: true,
274
+ },
275
+ guideNumericId: {
276
+ type: Number,
277
+ },
278
+ // #endregion Guide Info
268
279
  // #region Delivery location Info
269
280
  deliveryCity: {
270
281
  type: String,
@@ -383,6 +394,16 @@ module.exports = (connection) => {
383
394
  ],
384
395
  default: BOOKING.SUBTYPES.PICKUP_AND_DELIVER,
385
396
  },
397
+ searchType: {
398
+ type: String,
399
+ enum: [
400
+ BOOKING.SEARCH_TYPES.ON_DEMAND,
401
+ BOOKING.SEARCH_TYPES.EXPRESS,
402
+ BOOKING.SEARCH_TYPES.GROUND,
403
+ ],
404
+ default: BOOKING.SEARCH_TYPES.ON_DEMAND,
405
+ index: true,
406
+ },
386
407
  transactionDetails: {
387
408
  itemCharge: {
388
409
  type: connection.base.Schema.ObjectId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picker-db",
3
- "version": "5.0.10",
3
+ "version": "5.0.12",
4
4
  "description": "Picker DB services",
5
5
  "main": "index.js",
6
6
  "scripts": {