@lyxa.ai/core 1.4.52 → 1.4.54

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.
Files changed (27) hide show
  1. package/dist/libraries/event/EventEnums.d.ts +2 -1
  2. package/dist/libraries/event/EventEnums.js +1 -0
  3. package/dist/libraries/event/EventEnums.js.map +1 -1
  4. package/dist/libraries/event/events/rider/scoring/index.d.ts +1 -0
  5. package/dist/libraries/event/events/rider/scoring/index.js +3 -1
  6. package/dist/libraries/event/events/rider/scoring/index.js.map +1 -1
  7. package/dist/libraries/event/events/rider/scoring/rider-order-completed.event.d.ts +19 -0
  8. package/dist/libraries/event/events/rider/scoring/rider-order-completed.event.js +37 -0
  9. package/dist/libraries/event/events/rider/scoring/rider-order-completed.event.js.map +1 -0
  10. package/dist/libraries/mongo/models/embedded/service-booking-finance.model.d.ts +5 -2
  11. package/dist/libraries/mongo/models/embedded/service-booking-finance.model.js +11 -5
  12. package/dist/libraries/mongo/models/embedded/service-booking-finance.model.js.map +1 -1
  13. package/dist/libraries/mongo/models/finance-settlement.model.d.ts +6 -1
  14. package/dist/libraries/mongo/models/finance-settlement.model.js +20 -0
  15. package/dist/libraries/mongo/models/finance-settlement.model.js.map +1 -1
  16. package/dist/libraries/socket/events/chatlist-message-send.socket.event.d.ts +13 -0
  17. package/dist/libraries/socket/events/chatlist-message-send.socket.event.js +1 -0
  18. package/dist/libraries/socket/events/chatlist-message-send.socket.event.js.map +1 -1
  19. package/dist/types/README.md +1 -1
  20. package/dist/types/package.json +1 -1
  21. package/dist/types/utilities/enum.d.ts +5 -2
  22. package/dist/types/utilities/enum.js +3 -0
  23. package/dist/types/utilities/enum.js.map +1 -1
  24. package/dist/utilities/enum.d.ts +5 -2
  25. package/dist/utilities/enum.js +3 -0
  26. package/dist/utilities/enum.js.map +1 -1
  27. package/package.json +1 -1
@@ -16,5 +16,6 @@ export declare enum PublishEventEnums {
16
16
  SYNC_ALL_CUSTOMIZED_SHOP_SECTIONS_CACHE_EVENT = "sync_all_customized_shop_sections_cache_event",
17
17
  SYNC_ALL_USERS_PUNCH_MARKETING_HISTORY_CACHE_EVENT = "sync_all_users_punch_marketing_history_cache_event",
18
18
  SYNC_USER_SHOP_PUNCH_MARKETING_HISTORY_CACHE_EVENT = "sync_user_shop_punch_marketing_history_cache_event",
19
- RIDER_SCORE_EVENT = "rider_score_event"
19
+ RIDER_SCORE_EVENT = "rider_score_event",
20
+ RIDER_ORDER_COMPLETED_EVENT = "rider_order_completed_event"
20
21
  }
@@ -21,5 +21,6 @@ var PublishEventEnums;
21
21
  PublishEventEnums["SYNC_ALL_USERS_PUNCH_MARKETING_HISTORY_CACHE_EVENT"] = "sync_all_users_punch_marketing_history_cache_event";
22
22
  PublishEventEnums["SYNC_USER_SHOP_PUNCH_MARKETING_HISTORY_CACHE_EVENT"] = "sync_user_shop_punch_marketing_history_cache_event";
23
23
  PublishEventEnums["RIDER_SCORE_EVENT"] = "rider_score_event";
24
+ PublishEventEnums["RIDER_ORDER_COMPLETED_EVENT"] = "rider_order_completed_event";
24
25
  })(PublishEventEnums || (exports.PublishEventEnums = PublishEventEnums = {}));
25
26
  //# sourceMappingURL=EventEnums.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventEnums.js","sourceRoot":"/","sources":["libraries/event/EventEnums.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAmBX;AAnBD,WAAY,iBAAiB;IAC5B,4EAAuD,CAAA;IACvD,sEAAiD,CAAA;IACjD,4EAAuD,CAAA;IACvD,sEAAiD,CAAA;IACjD,wGAAmF,CAAA;IACnF,sHAAiG,CAAA;IACjG,oGAA+E,CAAA;IAC/E,sFAAiE,CAAA;IACjE,8FAAyE,CAAA;IACzE,sHAAiG,CAAA;IACjG,4GAAuF,CAAA;IACvF,kFAA6D,CAAA;IAC7D,0GAAqF,CAAA;IACrF,oGAA+E,CAAA;IAC/E,oHAA+F,CAAA;IAC/F,8HAAyG,CAAA;IACzG,8HAAyG,CAAA;IACzG,4DAAuC,CAAA;AACxC,CAAC,EAnBW,iBAAiB,iCAAjB,iBAAiB,QAmB5B","sourcesContent":["export enum PublishEventEnums {\n\tADMIN_ACTIVITY_LOGS_EVENT = 'admin_activity_logs_event',\n\tMESSAGE_RECEIVED_EVENT = 'message_received_event',\n\tTICKET_NOTIFICATION_EVENT = 'ticket_notification_event',\n\tCART_ITEM_UPSERT_EVENT = 'cart_item_upsert_event',\n\tSHOP_ACTIVE_TIMINGS_BATCH_PROCESS_EVENT = 'shop_active_timings_batch_process_event',\n\tMONGO_STREAM_CHANGES_BATCH_PROCESS_SHOPS_EVENT = 'mongo_stream_changes_batch_process_shops_event',\n\tBULK_UPDATE_SHOPS_SEARCH_FIELDS_EVENT = 'bulk_update_shops_search_fields_event',\n\tSOCKET_PUSH_NOTIFICATION_EVENT = 'socket_push_notification_event',\n\tBULK_UPDATE_SHOP_ZONE_STATUS_EVENT = 'bulk_update_shop_zone_status_event',\n\tSYNC_ALL_PRODUCTS_PRODUCT_MARKETING_INFO_EVENT = 'sync_all_products_product_marketing_info_event',\n\tSYNC_ALL_SHOPS_AVG_PREPARATION_TIME_EVENT = 'sync_all_shops_avg_preperation_time_event',\n\tSYNC_SINGLE_SHOP_CACHE_EVENT = 'sync_single_shop_cache_event',\n\tSYNC_SINGLE_SHOP_ORDER_AGAIN_CACHE_EVENT = 'sync_single_shop_order_again_cache_event',\n\tSYNC_SINGLE_SHOP_SECTIONS_CACHE_EVENT = 'sync_single_shop_sections_cache_event',\n\tSYNC_ALL_CUSTOMIZED_SHOP_SECTIONS_CACHE_EVENT = 'sync_all_customized_shop_sections_cache_event',\n\tSYNC_ALL_USERS_PUNCH_MARKETING_HISTORY_CACHE_EVENT = 'sync_all_users_punch_marketing_history_cache_event',\n\tSYNC_USER_SHOP_PUNCH_MARKETING_HISTORY_CACHE_EVENT = 'sync_user_shop_punch_marketing_history_cache_event',\n\tRIDER_SCORE_EVENT = 'rider_score_event',\n}\n \n"]}
1
+ {"version":3,"file":"EventEnums.js","sourceRoot":"/","sources":["libraries/event/EventEnums.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAoBX;AApBD,WAAY,iBAAiB;IAC5B,4EAAuD,CAAA;IACvD,sEAAiD,CAAA;IACjD,4EAAuD,CAAA;IACvD,sEAAiD,CAAA;IACjD,wGAAmF,CAAA;IACnF,sHAAiG,CAAA;IACjG,oGAA+E,CAAA;IAC/E,sFAAiE,CAAA;IACjE,8FAAyE,CAAA;IACzE,sHAAiG,CAAA;IACjG,4GAAuF,CAAA;IACvF,kFAA6D,CAAA;IAC7D,0GAAqF,CAAA;IACrF,oGAA+E,CAAA;IAC/E,oHAA+F,CAAA;IAC/F,8HAAyG,CAAA;IACzG,8HAAyG,CAAA;IACzG,4DAAuC,CAAA;IACvC,gFAA2D,CAAA;AAC5D,CAAC,EApBW,iBAAiB,iCAAjB,iBAAiB,QAoB5B","sourcesContent":["export enum PublishEventEnums {\n\tADMIN_ACTIVITY_LOGS_EVENT = 'admin_activity_logs_event',\n\tMESSAGE_RECEIVED_EVENT = 'message_received_event',\n\tTICKET_NOTIFICATION_EVENT = 'ticket_notification_event',\n\tCART_ITEM_UPSERT_EVENT = 'cart_item_upsert_event',\n\tSHOP_ACTIVE_TIMINGS_BATCH_PROCESS_EVENT = 'shop_active_timings_batch_process_event',\n\tMONGO_STREAM_CHANGES_BATCH_PROCESS_SHOPS_EVENT = 'mongo_stream_changes_batch_process_shops_event',\n\tBULK_UPDATE_SHOPS_SEARCH_FIELDS_EVENT = 'bulk_update_shops_search_fields_event',\n\tSOCKET_PUSH_NOTIFICATION_EVENT = 'socket_push_notification_event',\n\tBULK_UPDATE_SHOP_ZONE_STATUS_EVENT = 'bulk_update_shop_zone_status_event',\n\tSYNC_ALL_PRODUCTS_PRODUCT_MARKETING_INFO_EVENT = 'sync_all_products_product_marketing_info_event',\n\tSYNC_ALL_SHOPS_AVG_PREPARATION_TIME_EVENT = 'sync_all_shops_avg_preperation_time_event',\n\tSYNC_SINGLE_SHOP_CACHE_EVENT = 'sync_single_shop_cache_event',\n\tSYNC_SINGLE_SHOP_ORDER_AGAIN_CACHE_EVENT = 'sync_single_shop_order_again_cache_event',\n\tSYNC_SINGLE_SHOP_SECTIONS_CACHE_EVENT = 'sync_single_shop_sections_cache_event',\n\tSYNC_ALL_CUSTOMIZED_SHOP_SECTIONS_CACHE_EVENT = 'sync_all_customized_shop_sections_cache_event',\n\tSYNC_ALL_USERS_PUNCH_MARKETING_HISTORY_CACHE_EVENT = 'sync_all_users_punch_marketing_history_cache_event',\n\tSYNC_USER_SHOP_PUNCH_MARKETING_HISTORY_CACHE_EVENT = 'sync_user_shop_punch_marketing_history_cache_event',\n\tRIDER_SCORE_EVENT = 'rider_score_event',\n\tRIDER_ORDER_COMPLETED_EVENT = 'rider_order_completed_event',\n}\n \n"]}
@@ -3,3 +3,4 @@ export { RiderAcceptedOrderEvent, RiderAcceptedOrderPayload } from './rider-acce
3
3
  export { RiderRejectedOrderEvent, RiderRejectedOrderPayload } from './rider-rejected-order.event';
4
4
  export { RiderArrivedAtStoreEvent, RiderArrivedAtStorePayload } from './rider-arrived-at-store.event';
5
5
  export { RiderDeliveredOrderEvent, RiderDeliveredOrderPayload } from './rider-delivered-order.event';
6
+ export { RiderOrderCompletedEvent, RiderOrderCompletedPayload } from './rider-order-completed.event';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RiderDeliveredOrderEvent = exports.RiderArrivedAtStoreEvent = exports.RiderRejectedOrderEvent = exports.RiderAcceptedOrderEvent = exports.RiderScoreEvent = void 0;
3
+ exports.RiderOrderCompletedEvent = exports.RiderDeliveredOrderEvent = exports.RiderArrivedAtStoreEvent = exports.RiderRejectedOrderEvent = exports.RiderAcceptedOrderEvent = exports.RiderScoreEvent = void 0;
4
4
  var rider_score_event_1 = require("./rider-score-event");
5
5
  Object.defineProperty(exports, "RiderScoreEvent", { enumerable: true, get: function () { return rider_score_event_1.RiderScoreEvent; } });
6
6
  var rider_accepted_order_event_1 = require("./rider-accepted-order.event");
@@ -11,4 +11,6 @@ var rider_arrived_at_store_event_1 = require("./rider-arrived-at-store.event");
11
11
  Object.defineProperty(exports, "RiderArrivedAtStoreEvent", { enumerable: true, get: function () { return rider_arrived_at_store_event_1.RiderArrivedAtStoreEvent; } });
12
12
  var rider_delivered_order_event_1 = require("./rider-delivered-order.event");
13
13
  Object.defineProperty(exports, "RiderDeliveredOrderEvent", { enumerable: true, get: function () { return rider_delivered_order_event_1.RiderDeliveredOrderEvent; } });
14
+ var rider_order_completed_event_1 = require("./rider-order-completed.event");
15
+ Object.defineProperty(exports, "RiderOrderCompletedEvent", { enumerable: true, get: function () { return rider_order_completed_event_1.RiderOrderCompletedEvent; } });
14
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/event/events/rider/scoring/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8E;AAArE,oHAAA,eAAe,OAAA;AACxB,2EAAkG;AAAzF,qIAAA,uBAAuB,OAAA;AAChC,2EAAkG;AAAzF,qIAAA,uBAAuB,OAAA;AAChC,+EAAsG;AAA7F,wIAAA,wBAAwB,OAAA;AACjC,6EAAqG;AAA5F,uIAAA,wBAAwB,OAAA","sourcesContent":["export { RiderScoreEvent, RiderScoreEventPayload } from './rider-score-event';\nexport { RiderAcceptedOrderEvent, RiderAcceptedOrderPayload } from './rider-accepted-order.event';\nexport { RiderRejectedOrderEvent, RiderRejectedOrderPayload } from './rider-rejected-order.event';\nexport { RiderArrivedAtStoreEvent, RiderArrivedAtStorePayload } from './rider-arrived-at-store.event';\nexport { RiderDeliveredOrderEvent, RiderDeliveredOrderPayload } from './rider-delivered-order.event';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/event/events/rider/scoring/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8E;AAArE,oHAAA,eAAe,OAAA;AACxB,2EAAkG;AAAzF,qIAAA,uBAAuB,OAAA;AAChC,2EAAkG;AAAzF,qIAAA,uBAAuB,OAAA;AAChC,+EAAsG;AAA7F,wIAAA,wBAAwB,OAAA;AACjC,6EAAqG;AAA5F,uIAAA,wBAAwB,OAAA;AACjC,6EAAqG;AAA5F,uIAAA,wBAAwB,OAAA","sourcesContent":["export { RiderScoreEvent, RiderScoreEventPayload } from './rider-score-event';\nexport { RiderAcceptedOrderEvent, RiderAcceptedOrderPayload } from './rider-accepted-order.event';\nexport { RiderRejectedOrderEvent, RiderRejectedOrderPayload } from './rider-rejected-order.event';\nexport { RiderArrivedAtStoreEvent, RiderArrivedAtStorePayload } from './rider-arrived-at-store.event';\nexport { RiderDeliveredOrderEvent, RiderDeliveredOrderPayload } from './rider-delivered-order.event';\nexport { RiderOrderCompletedEvent, RiderOrderCompletedPayload } from './rider-order-completed.event';\n"]}
@@ -0,0 +1,19 @@
1
+ import { Types } from 'mongoose';
2
+ import { RiderScoreEventTag } from '../../../../../utilities/enum';
3
+ import { RiderScoreEvent, RiderScoreEventPayload } from './rider-score-event';
4
+ export interface RiderOrderCompletedPayload extends RiderScoreEventPayload {
5
+ tag: RiderScoreEventTag.ORDER_COMPLETED;
6
+ acceptedAt: Date;
7
+ actualArrivalTime: Date;
8
+ expectedArrivalTime: Date;
9
+ actualDeliveryTime: Date;
10
+ expectedDeliveryTime: Date;
11
+ }
12
+ export declare class RiderOrderCompletedEvent extends RiderScoreEvent<RiderOrderCompletedPayload> {
13
+ constructor(riderId: Types.ObjectId, orderId: Types.ObjectId, acceptedAt: Date, actualArrivalTime: Date, expectedArrivalTime: Date, actualDeliveryTime: Date, expectedDeliveryTime: Date);
14
+ get acceptedAt(): Date;
15
+ get actualArrivalTime(): Date;
16
+ get expectedArrivalTime(): Date;
17
+ get actualDeliveryTime(): Date;
18
+ get expectedDeliveryTime(): Date;
19
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RiderOrderCompletedEvent = void 0;
4
+ const enum_1 = require("../../../../../utilities/enum");
5
+ const rider_score_event_1 = require("./rider-score-event");
6
+ class RiderOrderCompletedEvent extends rider_score_event_1.RiderScoreEvent {
7
+ constructor(riderId, orderId, acceptedAt, actualArrivalTime, expectedArrivalTime, actualDeliveryTime, expectedDeliveryTime) {
8
+ super({
9
+ tag: enum_1.RiderScoreEventTag.ORDER_COMPLETED,
10
+ riderId,
11
+ orderId,
12
+ timestamp: actualDeliveryTime,
13
+ acceptedAt,
14
+ actualArrivalTime,
15
+ expectedArrivalTime,
16
+ actualDeliveryTime,
17
+ expectedDeliveryTime,
18
+ });
19
+ }
20
+ get acceptedAt() {
21
+ return this.payload.acceptedAt;
22
+ }
23
+ get actualArrivalTime() {
24
+ return this.payload.actualArrivalTime;
25
+ }
26
+ get expectedArrivalTime() {
27
+ return this.payload.expectedArrivalTime;
28
+ }
29
+ get actualDeliveryTime() {
30
+ return this.payload.actualDeliveryTime;
31
+ }
32
+ get expectedDeliveryTime() {
33
+ return this.payload.expectedDeliveryTime;
34
+ }
35
+ }
36
+ exports.RiderOrderCompletedEvent = RiderOrderCompletedEvent;
37
+ //# sourceMappingURL=rider-order-completed.event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rider-order-completed.event.js","sourceRoot":"/","sources":["libraries/event/events/rider/scoring/rider-order-completed.event.ts"],"names":[],"mappings":";;;AACA,wDAAmE;AACnE,2DAA8E;AAW9E,MAAa,wBAAyB,SAAQ,mCAA2C;IACxF,YACC,OAAuB,EACvB,OAAuB,EACvB,UAAgB,EAChB,iBAAuB,EACvB,mBAAyB,EACzB,kBAAwB,EACxB,oBAA0B;QAE1B,KAAK,CAAC;YACL,GAAG,EAAE,yBAAkB,CAAC,eAAe;YACvC,OAAO;YACP,OAAO;YACP,SAAS,EAAE,kBAAkB;YAC7B,UAAU;YACV,iBAAiB;YACjB,mBAAmB;YACnB,kBAAkB;YAClB,oBAAoB;SACpB,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,IAAI,iBAAiB;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;IACvC,CAAC;IAED,IAAI,mBAAmB;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC;IACzC,CAAC;IAED,IAAI,kBAAkB;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACxC,CAAC;IAED,IAAI,oBAAoB;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;IAC1C,CAAC;CACD;AA1CD,4DA0CC","sourcesContent":["import { Types } from 'mongoose';\nimport { RiderScoreEventTag } from '../../../../../utilities/enum';\nimport { RiderScoreEvent, RiderScoreEventPayload } from './rider-score-event';\n\nexport interface RiderOrderCompletedPayload extends RiderScoreEventPayload {\n\ttag: RiderScoreEventTag.ORDER_COMPLETED;\n\tacceptedAt: Date;\n\tactualArrivalTime: Date;\n\texpectedArrivalTime: Date;\n\tactualDeliveryTime: Date;\n\texpectedDeliveryTime: Date;\n}\n\nexport class RiderOrderCompletedEvent extends RiderScoreEvent<RiderOrderCompletedPayload> {\n\tconstructor(\n\t\triderId: Types.ObjectId,\n\t\torderId: Types.ObjectId,\n\t\tacceptedAt: Date,\n\t\tactualArrivalTime: Date,\n\t\texpectedArrivalTime: Date,\n\t\tactualDeliveryTime: Date,\n\t\texpectedDeliveryTime: Date\n\t) {\n\t\tsuper({\n\t\t\ttag: RiderScoreEventTag.ORDER_COMPLETED,\n\t\t\triderId,\n\t\t\torderId,\n\t\t\ttimestamp: actualDeliveryTime,\n\t\t\tacceptedAt,\n\t\t\tactualArrivalTime,\n\t\t\texpectedArrivalTime,\n\t\t\tactualDeliveryTime,\n\t\t\texpectedDeliveryTime,\n\t\t});\n\t}\n\n\tget acceptedAt(): Date {\n\t\treturn this.payload.acceptedAt;\n\t}\n\n\tget actualArrivalTime(): Date {\n\t\treturn this.payload.actualArrivalTime;\n\t}\n\n\tget expectedArrivalTime(): Date {\n\t\treturn this.payload.expectedArrivalTime;\n\t}\n\n\tget actualDeliveryTime(): Date {\n\t\treturn this.payload.actualDeliveryTime;\n\t}\n\n\tget expectedDeliveryTime(): Date {\n\t\treturn this.payload.expectedDeliveryTime;\n\t}\n}\n"]}
@@ -1,15 +1,18 @@
1
+ import { Ref } from '@typegoose/typegoose';
1
2
  import { Vat } from './vat.model';
2
3
  import { ServiceBookingPricing } from './service-booking-pricing.model';
3
4
  import { PaymentMethod } from '../../../../utilities/enum';
4
- import { PaymentInformation } from './payment-infromation.model';
5
5
  import { ServiceBookingProfit } from './profit.model';
6
6
  import { ServiceCouponDetails, ServicePromotionCut } from './marketing-cut.model';
7
7
  import { Cashback } from './cashback-amounts.model';
8
+ import { Card } from '../card.model';
9
+ import { PaymentRecord } from './payment-record.model';
8
10
  export declare class ServiceBookingFinance {
9
11
  adminCommission: number;
10
12
  exchangeRate?: number;
11
13
  paymentMethod: PaymentMethod;
12
- paymentInformation?: PaymentInformation;
14
+ card?: Ref<Card>;
15
+ paymentRecords?: PaymentRecord[];
13
16
  pricing: ServiceBookingPricing;
14
17
  companyProfit?: ServiceBookingProfit;
15
18
  vendorProfit?: ServiceBookingProfit;
@@ -14,15 +14,17 @@ const typegoose_1 = require("@typegoose/typegoose");
14
14
  const vat_model_1 = require("./vat.model");
15
15
  const service_booking_pricing_model_1 = require("./service-booking-pricing.model");
16
16
  const enum_1 = require("../../../../utilities/enum");
17
- const payment_infromation_model_1 = require("./payment-infromation.model");
18
17
  const profit_model_1 = require("./profit.model");
19
18
  const marketing_cut_model_1 = require("./marketing-cut.model");
20
19
  const cashback_amounts_model_1 = require("./cashback-amounts.model");
20
+ const card_model_1 = require("../card.model");
21
+ const payment_record_model_1 = require("./payment-record.model");
21
22
  class ServiceBookingFinance {
22
23
  adminCommission;
23
24
  exchangeRate;
24
25
  paymentMethod;
25
- paymentInformation;
26
+ card;
27
+ paymentRecords;
26
28
  pricing;
27
29
  companyProfit;
28
30
  vendorProfit;
@@ -45,9 +47,13 @@ __decorate([
45
47
  __metadata("design:type", String)
46
48
  ], ServiceBookingFinance.prototype, "paymentMethod", void 0);
47
49
  __decorate([
48
- (0, typegoose_1.prop)({ type: () => payment_infromation_model_1.PaymentInformation, _id: false }),
49
- __metadata("design:type", payment_infromation_model_1.PaymentInformation)
50
- ], ServiceBookingFinance.prototype, "paymentInformation", void 0);
50
+ (0, typegoose_1.prop)({ ref: () => card_model_1.Card }),
51
+ __metadata("design:type", Object)
52
+ ], ServiceBookingFinance.prototype, "card", void 0);
53
+ __decorate([
54
+ (0, typegoose_1.prop)({ type: () => [payment_record_model_1.PaymentRecord], _id: false, default: [] }),
55
+ __metadata("design:type", Array)
56
+ ], ServiceBookingFinance.prototype, "paymentRecords", void 0);
51
57
  __decorate([
52
58
  (0, typegoose_1.prop)({ required: true, type: () => service_booking_pricing_model_1.ServiceBookingPricing, _id: false }),
53
59
  __metadata("design:type", service_booking_pricing_model_1.ServiceBookingPricing)
@@ -1 +1 @@
1
- {"version":3,"file":"service-booking-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-booking-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,2CAAkC;AAClC,mFAAwE;AACxE,qDAA2D;AAC3D,2EAAiE;AACjE,iDAAsD;AACtD,+DAAkF;AAClF,qEAAoD;AAEpD,MAAa,qBAAqB;IAE1B,eAAe,CAAU;IAGzB,YAAY,CAAU;IAGtB,aAAa,CAAiB;IAG9B,kBAAkB,CAAsB;IAGxC,OAAO,CAAyB;IAGhC,aAAa,CAAwB;IAGrC,YAAY,CAAwB;IAGpC,QAAQ,CAAuB;IAG/B,MAAM,CAAwB;IAG9B,GAAG,CAAO;IAGV,eAAe,CAAY;CAClC;AAjCD,sDAiCC;AA/BO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,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AAG;kDAAC;AAGV;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iCAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BAClB,iCAAQ;8DAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { Vat } from './vat.model';\nimport { ServiceBookingPricing } from './service-booking-pricing.model';\nimport { PaymentMethod } from '../../../../utilities/enum';\nimport { PaymentInformation } from './payment-infromation.model';\nimport { ServiceBookingProfit } from './profit.model';\nimport { ServiceCouponDetails, ServicePromotionCut } from './marketing-cut.model';\nimport { Cashback } from './cashback-amounts.model';\n\nexport class ServiceBookingFinance {\n\t@prop({ required: true, type: Number })\n\tpublic adminCommission!: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic exchangeRate?: number;\n\n\t@prop({ required: true, type: String, enum: PaymentMethod })\n\tpublic paymentMethod!: PaymentMethod;\n\n\t@prop({ type: () => PaymentInformation, _id: false })\n\tpublic paymentInformation?: PaymentInformation;\n\n\t@prop({ required: true, type: () => ServiceBookingPricing, _id: false })\n\tpublic pricing!: ServiceBookingPricing;\n\n\t@prop({ type: () => ServiceBookingProfit, _id: false })\n\tpublic companyProfit?: ServiceBookingProfit;\n\n\t@prop({ type: () => ServiceBookingProfit, _id: false })\n\tpublic vendorProfit?: ServiceBookingProfit;\n\n\t@prop({ type: () => ServicePromotionCut, _id: false })\n\tpublic discount?: ServicePromotionCut;\n\n\t@prop({ type: () => ServiceCouponDetails, _id: false })\n\tpublic coupon?: ServiceCouponDetails;\n\n\t@prop({ type: () => Vat, _id: false })\n\tpublic vat?: Vat;\n\n\t@prop({ type: () => Cashback, _id: false })\n\tpublic cashBackAmounts?: Cashback;\n}\n"]}
1
+ {"version":3,"file":"service-booking-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-booking-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,2CAAkC;AAClC,mFAAwE;AACxE,qDA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rC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,mCAAoB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BACjC,mCAAoB;2DAAC;AAGpC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,yCAAmB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BACpC,yCAAmB;uDAAC;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,0CAAoB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BACvC,0CAAoB;qDAAC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,eAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BACzB,eAAG;kDAAC;AAGV;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iCAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BAClB,iCAAQ;8DAAC","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Vat } from './vat.model';\nimport { ServiceBookingPricing } from './service-booking-pricing.model';\nimport { PaymentMethod } from '../../../../utilities/enum';\nimport { ServiceBookingProfit } from './profit.model';\nimport { ServiceCouponDetails, ServicePromotionCut } from './marketing-cut.model';\nimport { Cashback } from './cashback-amounts.model';\nimport { Card } from '../card.model';\nimport { PaymentRecord } from './payment-record.model';\n\nexport class ServiceBookingFinance {\n\t@prop({ required: true, type: Number })\n\tpublic adminCommission!: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic exchangeRate?: number;\n\n\t@prop({ required: true, type: String, enum: PaymentMethod })\n\tpublic paymentMethod!: PaymentMethod;\n\n\t@prop({ ref: () => Card })\n\tpublic card?: Ref<Card>;\n\n\t@prop({ type: () => [PaymentRecord], _id: false, default: [] })\n\tpublic paymentRecords?: PaymentRecord[];\n\n\t@prop({ required: true, type: () => ServiceBookingPricing, _id: false })\n\tpublic pricing!: ServiceBookingPricing;\n\n\t@prop({ type: () => ServiceBookingProfit, _id: false })\n\tpublic companyProfit?: ServiceBookingProfit;\n\n\t@prop({ type: () => ServiceBookingProfit, _id: false })\n\tpublic vendorProfit?: ServiceBookingProfit;\n\n\t@prop({ type: () => ServicePromotionCut, _id: false })\n\tpublic discount?: ServicePromotionCut;\n\n\t@prop({ type: () => ServiceCouponDetails, _id: false })\n\tpublic coupon?: ServiceCouponDetails;\n\n\t@prop({ type: () => Vat, _id: false })\n\tpublic vat?: Vat;\n\n\t@prop({ type: () => Cashback, _id: false })\n\tpublic cashBackAmounts?: Cashback;\n}\n"]}
@@ -3,18 +3,23 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
3
  import { Order } from './order.model';
4
4
  import { Shop } from './shop.model';
5
5
  import { Rider } from './rider.model';
6
- import { AccountType, ItemType, SettlementType } from '../../../utilities/enum';
6
+ import { AccountType, ItemType, ServiceType, SettlementType } from '../../../utilities/enum';
7
7
  import { User } from './user.model';
8
8
  import { Admin } from './admin.model';
9
9
  import { Parent } from './parent.model';
10
+ import { ServiceBooking, Vendor, VendorParent } from '.';
10
11
  export declare class FinanceSettlement extends TimeStamps {
11
12
  settlementId: string;
12
13
  accountType: AccountType;
13
14
  order?: Ref<Order>;
15
+ serviceBooking?: Ref<ServiceBooking>;
14
16
  orderId?: string;
15
17
  parent?: Ref<Parent>;
16
18
  shop?: Ref<Shop>;
17
19
  itemType?: ItemType;
20
+ vendorParent?: Ref<VendorParent>;
21
+ vendor?: Ref<Vendor>;
22
+ serviceType?: ServiceType;
18
23
  rider?: Ref<Rider>;
19
24
  user?: Ref<User>;
20
25
  settlementType: SettlementType;
@@ -25,10 +25,14 @@ let FinanceSettlement = class FinanceSettlement extends defaultClasses_1.TimeSta
25
25
  settlementId;
26
26
  accountType;
27
27
  order;
28
+ serviceBooking;
28
29
  orderId;
29
30
  parent;
30
31
  shop;
31
32
  itemType;
33
+ vendorParent;
34
+ vendor;
35
+ serviceType;
32
36
  rider;
33
37
  user;
34
38
  settlementType;
@@ -59,6 +63,10 @@ __decorate([
59
63
  (0, typegoose_1.prop)({ ref: () => order_model_1.Order, index: true }),
60
64
  __metadata("design:type", Object)
61
65
  ], FinanceSettlement.prototype, "order", void 0);
66
+ __decorate([
67
+ (0, typegoose_1.prop)({ ref: () => _1.ServiceBooking, index: true }),
68
+ __metadata("design:type", Object)
69
+ ], FinanceSettlement.prototype, "serviceBooking", void 0);
62
70
  __decorate([
63
71
  (0, typegoose_1.prop)({ type: String, index: true }),
64
72
  __metadata("design:type", String)
@@ -75,6 +83,18 @@ __decorate([
75
83
  (0, typegoose_1.prop)({ type: String, enum: enum_1.ItemType, index: true }),
76
84
  __metadata("design:type", String)
77
85
  ], FinanceSettlement.prototype, "itemType", void 0);
86
+ __decorate([
87
+ (0, typegoose_1.prop)({ ref: () => _1.VendorParent, index: true }),
88
+ __metadata("design:type", Object)
89
+ ], FinanceSettlement.prototype, "vendorParent", void 0);
90
+ __decorate([
91
+ (0, typegoose_1.prop)({ ref: () => _1.Vendor, index: true }),
92
+ __metadata("design:type", Object)
93
+ ], FinanceSettlement.prototype, "vendor", void 0);
94
+ __decorate([
95
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.ServiceType, index: true }),
96
+ __metadata("design:type", String)
97
+ ], FinanceSettlement.prototype, "serviceType", void 0);
78
98
  __decorate([
79
99
  (0, typegoose_1.prop)({ ref: () => rider_model_1.Rider, index: true }),
80
100
  __metadata("design:type", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"finance-settlement.model.js","sourceRoot":"/","sources":["libraries/mongo/models/finance-settlement.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,+CAAsC;AACtC,kDAA6F;AAC7F,6CAAoC;AACpC,+CAAsC;AACtC,iDAAwC;AACxC,wBAAiC;AACjC,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AC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kEACK;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACR;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DACS;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;mDACE;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;oDACb;4BApEd,iBAAiB;IAR7B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACrE,IAAA,iBAAK,EAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3C,IAAA,iBAAK,EAAC,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAA,eAAG,EAAoB,MAAM,EAAE,KAAK;QACpC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,WAAW,CAAC,CAAC;QAC7E,CAAC;IACF,CAAC,CAAC;GACW,iBAAiB,CAqE7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Order } from './order.model';\nimport { Shop } from './shop.model';\nimport { Rider } from './rider.model';\nimport { AccountType, CounterType, ItemType, SettlementType } from '../../../utilities/enum';\nimport { User } from './user.model';\nimport { Admin } from './admin.model';\nimport { Parent } from './parent.model';\nimport { CounterModel } from '.';\nimport { generateId } from '../../../utilities/id-generator';\n\n@modelOptions({ schemaOptions: { collection: 'financeSettlements' } })\n@index({ settlementType: 1, createdAt: -1 })\n@index({ accountType: 1, settlementType: 1, createdAt: -1 })\n@pre<FinanceSettlement>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.settlementId = await generateId(CounterModel, CounterType.TRANSACTION);\n\t}\n})\nexport class FinanceSettlement extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic settlementId: string;\n\n\t@prop({ required: true, type: String, enum: AccountType })\n\tpublic accountType!: AccountType;\n\n\t@prop({ ref: () => Order, index: true })\n\tpublic order?: Ref<Order>;\n\n\t@prop({ type: String, index: true })\n\tpublic orderId?: string;\n\n\t@prop({ ref: () => Parent, index: true })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, index: true })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String, enum: ItemType, index: true })\n\tpublic itemType?: ItemType;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ ref: () => User, index: true })\n\tpublic user?: Ref<User>;\n\n\t@prop({ required: true, type: String, enum: SettlementType })\n\tpublic settlementType!: SettlementType;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic cashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic secondaryCashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic companyVat?: number;\n \n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic secondaryCompanyVat?: number;\n\n\t@prop({ type: String })\n\tpublic paymentIntentId?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic settleBy?: Ref<Admin>;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic adminNote?: string;\n}\n"]}
1
+ {"version":3,"file":"finance-settlement.model.js","sourceRoot":"/","sources":["libraries/mongo/models/finance-settlement.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,+CAAsC;AACtC,kDAA0G;AAC1G,6CAAoC;AACpC,+CAAsC;AACtC,iDAAwC;AACxC,wBAAuE;AACvE,kEAA6D;AAUtD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAU;IAEzC,YAAY,CAAS;IAGrB,WAAW,CAAe;IAG1B,KAAK,CAAc;IAGnB,cAAc,CAAuB;IAGrC,OAAO,CAAU;IAGjB,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,QAAQ,CAAY;IAGpB,YAAY,CAAqB;IAGjC,MAAM,CAAe;IAGrB,WAAW,CAAe;IAG1B,KAAK,CAAc;IAGnB,IAAI,CAAa;IAGjB,cAAc,CAAkB;IAGhC,MAAM,CAAU;IAGhB,eAAe,CAAU;IAGzB,eAAe,CAAU;IAGzB,wBAAwB,CAAU;IAGlC,kBAAkB,CAAU;IAG5B,2BAA2B,CAAU;IAGrC,cAAc,CAAU;IAGxB,uBAAuB,CAAU;IAGjC,UAAU,CAAU;IAGpB,mBAAmB,CAAU;IAG7B,eAAe,CAAU;IAGzB,QAAQ,CAAc;IAGtB,SAAS,CAAU;CAC1B,CA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,CAAC;;kEACK;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACR;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DACS;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;mDACE;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;oDACb;4BAhFd,iBAAiB;IAR7B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACrE,IAAA,iBAAK,EAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3C,IAAA,iBAAK,EAAC,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAA,eAAG,EAAoB,MAAM,EAAE,KAAK;QACpC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,WAAW,CAAC,CAAC;QAC7E,CAAC;IACF,CAAC,CAAC;GACW,iBAAiB,CAiF7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Order } from './order.model';\nimport { Shop } from './shop.model';\nimport { Rider } from './rider.model';\nimport { AccountType, CounterType, ItemType, ServiceType, SettlementType } from '../../../utilities/enum';\nimport { User } from './user.model';\nimport { Admin } from './admin.model';\nimport { Parent } from './parent.model';\nimport { CounterModel, ServiceBooking, Vendor, VendorParent } from '.';\nimport { generateId } from '../../../utilities/id-generator';\n\n@modelOptions({ schemaOptions: { collection: 'financeSettlements' } })\n@index({ settlementType: 1, createdAt: -1 })\n@index({ accountType: 1, settlementType: 1, createdAt: -1 })\n@pre<FinanceSettlement>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.settlementId = await generateId(CounterModel, CounterType.TRANSACTION);\n\t}\n})\nexport class FinanceSettlement extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic settlementId: string;\n\n\t@prop({ required: true, type: String, enum: AccountType })\n\tpublic accountType!: AccountType;\n\n\t@prop({ ref: () => Order, index: true })\n\tpublic order?: Ref<Order>;\n\n\t@prop({ ref: () => ServiceBooking, index: true })\n\tpublic serviceBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: String, index: true })\n\tpublic orderId?: string;\n\n\t@prop({ ref: () => Parent, index: true })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, index: true })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String, enum: ItemType, index: true })\n\tpublic itemType?: ItemType;\n\n\t@prop({ ref: () => VendorParent, index: true })\n\tpublic vendorParent?: Ref<VendorParent>;\n\n\t@prop({ ref: () => Vendor, index: true })\n\tpublic vendor?: Ref<Vendor>;\n\n\t@prop({ type: String, enum: ServiceType, index: true })\n\tpublic serviceType?: ServiceType;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ ref: () => User, index: true })\n\tpublic user?: Ref<User>;\n\n\t@prop({ required: true, type: String, enum: SettlementType })\n\tpublic settlementType!: SettlementType;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic cashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic secondaryCashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic companyVat?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic secondaryCompanyVat?: number;\n\n\t@prop({ type: String })\n\tpublic paymentIntentId?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic settleBy?: Ref<Admin>;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic adminNote?: string;\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import z from 'zod';
2
+ import { TicketStatus } from '../../../utilities/enum';
2
3
  import { DTO } from '../../../utilities/validation';
3
4
  import { BaseSocketEvent } from '../BaseSocketEvent';
4
5
  import { NotificationSettings } from '../PushNotificationEvent';
@@ -17,9 +18,11 @@ export declare const ChatlistMessageSendSocketOutputSchema: z.ZodObject<{
17
18
  createdAt: Date;
18
19
  }>>;
19
20
  unreadCount: z.ZodNumber;
21
+ status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
20
22
  }, "strip", z.ZodTypeAny, {
21
23
  unreadCount: number;
22
24
  chatroomId: import("mongoose").Types.ObjectId;
25
+ status?: TicketStatus | undefined;
23
26
  orderId?: import("mongoose").Types.ObjectId | undefined;
24
27
  lastMessage?: {
25
28
  content: string;
@@ -28,6 +31,7 @@ export declare const ChatlistMessageSendSocketOutputSchema: z.ZodObject<{
28
31
  }, {
29
32
  unreadCount: number;
30
33
  chatroomId: import("mongoose").Types.ObjectId;
34
+ status?: TicketStatus | undefined;
31
35
  orderId?: import("mongoose").Types.ObjectId | undefined;
32
36
  lastMessage?: {
33
37
  content: string;
@@ -48,9 +52,11 @@ export declare const ChatlistMessageSendPushOutputSchema: z.ZodObject<{
48
52
  createdAt: Date;
49
53
  }>>;
50
54
  unreadCount: z.ZodNumber;
55
+ status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
51
56
  }, "strip", z.ZodTypeAny, {
52
57
  unreadCount: number;
53
58
  chatroomId: import("mongoose").Types.ObjectId;
59
+ status?: TicketStatus | undefined;
54
60
  orderId?: import("mongoose").Types.ObjectId | undefined;
55
61
  lastMessage?: {
56
62
  content: string;
@@ -59,6 +65,7 @@ export declare const ChatlistMessageSendPushOutputSchema: z.ZodObject<{
59
65
  }, {
60
66
  unreadCount: number;
61
67
  chatroomId: import("mongoose").Types.ObjectId;
68
+ status?: TicketStatus | undefined;
62
69
  orderId?: import("mongoose").Types.ObjectId | undefined;
63
70
  lastMessage?: {
64
71
  content: string;
@@ -85,9 +92,11 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
85
92
  createdAt: Date;
86
93
  }>>;
87
94
  unreadCount: z.ZodNumber;
95
+ status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
88
96
  }, "strip", z.ZodTypeAny, {
89
97
  unreadCount: number;
90
98
  chatroomId: import("mongoose").Types.ObjectId;
99
+ status?: TicketStatus | undefined;
91
100
  orderId?: import("mongoose").Types.ObjectId | undefined;
92
101
  lastMessage?: {
93
102
  content: string;
@@ -96,6 +105,7 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
96
105
  }, {
97
106
  unreadCount: number;
98
107
  chatroomId: import("mongoose").Types.ObjectId;
108
+ status?: TicketStatus | undefined;
99
109
  orderId?: import("mongoose").Types.ObjectId | undefined;
100
110
  lastMessage?: {
101
111
  content: string;
@@ -116,9 +126,11 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
116
126
  createdAt: Date;
117
127
  }>>;
118
128
  unreadCount: z.ZodNumber;
129
+ status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
119
130
  }, "strip", z.ZodTypeAny, {
120
131
  unreadCount: number;
121
132
  chatroomId: import("mongoose").Types.ObjectId;
133
+ status?: TicketStatus | undefined;
122
134
  orderId?: import("mongoose").Types.ObjectId | undefined;
123
135
  lastMessage?: {
124
136
  content: string;
@@ -127,6 +139,7 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
127
139
  }, {
128
140
  unreadCount: number;
129
141
  chatroomId: import("mongoose").Types.ObjectId;
142
+ status?: TicketStatus | undefined;
130
143
  orderId?: import("mongoose").Types.ObjectId | undefined;
131
144
  lastMessage?: {
132
145
  content: string;
@@ -19,6 +19,7 @@ exports.ChatlistMessageSendSocketOutputSchema = zod_1.default.object({
19
19
  })
20
20
  .optional(),
21
21
  unreadCount: validation_1.ZodValidation.number(),
22
+ status: validation_1.ZodValidation.enumType(enum_1.TicketStatus).optional(),
22
23
  });
23
24
  exports.ChatlistMessageSendPushOutputSchema = exports.ChatlistMessageSendSocketOutputSchema;
24
25
  class ChatlistMessageSendSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
@@ -1 +1 @@
1
- {"version":3,"file":"chatlist-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatlist-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAqE;AACrE,8DAAmE;AACnE,wDAAqD;AAIxC,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACpD,QAAA,qCAAqC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7D,UAAU,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACnD,WAAW,EAAE,aAAC;SACZ,MAAM,CAAC;QACP,OAAO,EAAE,0BAAa,CAAC,MAAM,EAAE;QAC/B,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,EAAE;KACtC,CAAC;SACD,QAAQ,EAAE;IACZ,WAAW,EAAE,0BAAa,CAAC,MAAM,EAAE;CACnC,CAAC,CAAC;AAEU,QAAA,mCAAmC,GAAG,6CAAqC,CAAC;AAMzF,MAAa,8BAA+B,SAAQ,iCAInD;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,4CAAoC;QAC3C,MAAM,EAAE,6CAAqC;QAC7C,sBAAsB,EAAE,2CAAmC;KAC3D,CAAC;IAEF,IAAW,oBAAoB;QAC9B,OAAO;YACN,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,gBAAS,CAAC,iBAAiB;SACtC,CAAC;IACH,CAAC;IAED,YAAY,OAA2C;QACtD,KAAK,CAAC,sBAAe,CAAC,yBAAyB,EAAE,8BAA8B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5G,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AAzBF,wEA0BC","sourcesContent":["import z from 'zod';\nimport { ClickType, SocketEventType } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\n\nimport { NotificationSettings } from '../PushNotificationEvent';\n\nexport const ChatlistMessageSendSocketInputSchema = z.object({});\nexport const ChatlistMessageSendSocketOutputSchema = z.object({\n\tchatroomId: ZodValidation.coerce.objectId(),\n\torderId: ZodValidation.coerce.objectId().optional(),\n\tlastMessage: z\n\t\t.object({\n\t\t\tcontent: ZodValidation.string(),\n\t\t\tcreatedAt: ZodValidation.coerce.date(),\n\t\t})\n\t\t.optional(),\n\tunreadCount: ZodValidation.number(),\n});\n\nexport const ChatlistMessageSendPushOutputSchema = ChatlistMessageSendSocketOutputSchema;\n\nexport type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatlistMessageSendPushOutputSchema>;\nexport type ChatlistMessageSendSocketOutputDTO = DTO<typeof ChatlistMessageSendSocketOutputSchema>;\nexport type ChatlistMessageSendSocketInputDTO = DTO<typeof ChatlistMessageSendSocketInputSchema>;\n\nexport class ChatlistMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatlistMessageSendSocketInputSchema,\n\ttypeof ChatlistMessageSendSocketOutputSchema,\n\ttypeof ChatlistMessageSendPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatlistMessageSendSocketInputSchema,\n\t\toutput: ChatlistMessageSendSocketOutputSchema,\n\t\tpushNotificationOutput: ChatlistMessageSendPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_MESSAGE,\n\t\t};\n\t}\n\n\tconstructor(payload: ChatlistMessageSendSocketOutputDTO) {\n\t\tsuper(SocketEventType.CHATLIST_MESSAGE_RECEIVED, ChatlistMessageSendSocketEvent.schemas, payload, payload);\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
1
+ {"version":3,"file":"chatlist-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatlist-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAmF;AACnF,8DAAmE;AACnE,wDAAqD;AAIxC,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACpD,QAAA,qCAAqC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7D,UAAU,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACnD,WAAW,EAAE,aAAC;SACZ,MAAM,CAAC;QACP,OAAO,EAAE,0BAAa,CAAC,MAAM,EAAE;QAC/B,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,EAAE;KACtC,CAAC;SACD,QAAQ,EAAE;IACZ,WAAW,EAAE,0BAAa,CAAC,MAAM,EAAE;IACnC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAEU,QAAA,mCAAmC,GAAG,6CAAqC,CAAC;AAMzF,MAAa,8BAA+B,SAAQ,iCAInD;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,4CAAoC;QAC3C,MAAM,EAAE,6CAAqC;QAC7C,sBAAsB,EAAE,2CAAmC;KAC3D,CAAC;IAEF,IAAW,oBAAoB;QAC9B,OAAO;YACN,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,gBAAS,CAAC,iBAAiB;SACtC,CAAC;IACH,CAAC;IAED,YAAY,OAA2C;QACtD,KAAK,CACJ,sBAAe,CAAC,yBAAyB,EACzC,8BAA8B,CAAC,OAAO,EACtC,OAAO,EACP,OAAO,CACP,CAAC;IACH,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AA9BF,wEA+BC","sourcesContent":["import z from 'zod';\nimport { ClickType, SocketEventType, TicketStatus } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\n\nimport { NotificationSettings } from '../PushNotificationEvent';\n\nexport const ChatlistMessageSendSocketInputSchema = z.object({});\nexport const ChatlistMessageSendSocketOutputSchema = z.object({\n\tchatroomId: ZodValidation.coerce.objectId(),\n\torderId: ZodValidation.coerce.objectId().optional(),\n\tlastMessage: z\n\t\t.object({\n\t\t\tcontent: ZodValidation.string(),\n\t\t\tcreatedAt: ZodValidation.coerce.date(),\n\t\t})\n\t\t.optional(),\n\tunreadCount: ZodValidation.number(),\n\tstatus: ZodValidation.enumType(TicketStatus).optional(),\n});\n\nexport const ChatlistMessageSendPushOutputSchema = ChatlistMessageSendSocketOutputSchema;\n\nexport type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatlistMessageSendPushOutputSchema>;\nexport type ChatlistMessageSendSocketOutputDTO = DTO<typeof ChatlistMessageSendSocketOutputSchema>;\nexport type ChatlistMessageSendSocketInputDTO = DTO<typeof ChatlistMessageSendSocketInputSchema>;\n\nexport class ChatlistMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatlistMessageSendSocketInputSchema,\n\ttypeof ChatlistMessageSendSocketOutputSchema,\n\ttypeof ChatlistMessageSendPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatlistMessageSendSocketInputSchema,\n\t\toutput: ChatlistMessageSendSocketOutputSchema,\n\t\tpushNotificationOutput: ChatlistMessageSendPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_MESSAGE,\n\t\t};\n\t}\n\n\tconstructor(payload: ChatlistMessageSendSocketOutputDTO) {\n\t\tsuper(\n\t\t\tSocketEventType.CHATLIST_MESSAGE_RECEIVED,\n\t\t\tChatlistMessageSendSocketEvent.schemas,\n\t\t\tpayload,\n\t\t\tpayload\n\t\t);\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.4.52
25
+ Version: 1.4.54
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.52",
3
+ "version": "1.4.54",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -575,7 +575,9 @@ export declare enum ServiceBookingStatusTimelineType {
575
575
  CHANGE_PROFESSIONAL = "change_professional",
576
576
  CHANGE_ADDRESS = "change_address",
577
577
  RESCHEDULE = "reschedule",
578
- ADJUST_BOOKING = "adjust_booking"
578
+ ADJUST_BOOKING = "adjust_booking",
579
+ REFUNDED = "refunded",
580
+ REPLACEMENT = "replacement"
579
581
  }
580
582
  export declare enum AdjustmentType {
581
583
  ADMIN_ADJUSTED_ORDER = "admin_adjusted_order",
@@ -1181,7 +1183,8 @@ export declare enum RiderScoreEventTag {
1181
1183
  ORDER_ACCEPTED = "order_accepted",
1182
1184
  ORDER_REJECTED = "order_rejected",
1183
1185
  ARRIVED_AT_STORE = "arrived_at_store",
1184
- ORDER_DELIVERED = "order_delivered"
1186
+ ORDER_DELIVERED = "order_delivered",
1187
+ ORDER_COMPLETED = "order_completed"
1185
1188
  }
1186
1189
  export declare enum BarcodeTypes {
1187
1190
  EAN_13 = "ean-13",
@@ -657,6 +657,8 @@ var ServiceBookingStatusTimelineType;
657
657
  ServiceBookingStatusTimelineType["CHANGE_ADDRESS"] = "change_address";
658
658
  ServiceBookingStatusTimelineType["RESCHEDULE"] = "reschedule";
659
659
  ServiceBookingStatusTimelineType["ADJUST_BOOKING"] = "adjust_booking";
660
+ ServiceBookingStatusTimelineType["REFUNDED"] = "refunded";
661
+ ServiceBookingStatusTimelineType["REPLACEMENT"] = "replacement";
660
662
  })(ServiceBookingStatusTimelineType || (exports.ServiceBookingStatusTimelineType = ServiceBookingStatusTimelineType = {}));
661
663
  var AdjustmentType;
662
664
  (function (AdjustmentType) {
@@ -1340,6 +1342,7 @@ var RiderScoreEventTag;
1340
1342
  RiderScoreEventTag["ORDER_REJECTED"] = "order_rejected";
1341
1343
  RiderScoreEventTag["ARRIVED_AT_STORE"] = "arrived_at_store";
1342
1344
  RiderScoreEventTag["ORDER_DELIVERED"] = "order_delivered";
1345
+ RiderScoreEventTag["ORDER_COMPLETED"] = "order_completed";
1343
1346
  })(RiderScoreEventTag || (exports.RiderScoreEventTag = RiderScoreEventTag = {}));
1344
1347
  var BarcodeTypes;
1345
1348
  (function (BarcodeTypes) {