picker-db 4.7.0 → 4.9.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.
@@ -24,6 +24,7 @@ const BookingRequestSchema = require("../schemas/bookingRequest");
24
24
  const BookingLiteSchema = require("../schemas/bookingsLite");
25
25
  const MiniBookingSchema = require("../schemas/miniBooking");
26
26
  const BookingDriverDetailsSchema = require("../schemas/bookingDriverDetails");
27
+ const ConversationSchema = require("../schemas/conversation");
27
28
 
28
29
  /** @param {import("mongoose")} connection */
29
30
  module.exports = (connection) => {
@@ -54,5 +55,6 @@ module.exports = (connection) => {
54
55
  Review: connection.model("Review", ReviewSchema(connection)),
55
56
  MiniBooking: connection.model("MiniBooking", MiniBookingSchema(connection)),
56
57
  BookingDriverDetails: connection.model("BookingDriverDetails", BookingDriverDetailsSchema(connection)),
58
+ Conversation: connection.model("Conversation", ConversationSchema(connection)),
57
59
  };
58
60
  };
@@ -902,9 +902,15 @@ module.exports = (connection) => {
902
902
  PNF_REASON.PROVIDER_ERROR,
903
903
  ],
904
904
  },
905
+ deliveryAddressExists: {
906
+ type: Boolean,
907
+ },
905
908
  deliveryAddressRequired: {
906
909
  type: Boolean,
907
910
  },
911
+ paymentInfoExists: {
912
+ type: Boolean,
913
+ },
908
914
  paymentInfoRequired: {
909
915
  type: Boolean,
910
916
  },
@@ -0,0 +1,19 @@
1
+ /** @param {import("mongoose")} connection */
2
+ module.exports = (connection) => {
3
+ const ConversationSchema = new connection.base.Schema({
4
+ bookingID: {
5
+ type: connection.base.Schema.ObjectId,
6
+ required: true,
7
+ index: true,
8
+ },
9
+ status: {
10
+ type: String,
11
+ enum: ["PENDING", "ACTIVE"],
12
+ default: "PENDING",
13
+ required: true,
14
+ index: true,
15
+ },
16
+ }, { timestamps: true });
17
+
18
+ return ConversationSchema;
19
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picker-db",
3
- "version": "4.7.0",
3
+ "version": "4.9.0",
4
4
  "description": "Picker DB services",
5
5
  "main": "index.js",
6
6
  "scripts": {