@lyxa.ai/core 1.4.311 → 1.4.313-alpha-2
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/dist/libraries/llm/interfaces/common-llm-interfaces.d.ts +0 -1
- package/dist/libraries/llm/interfaces/common-llm-interfaces.js.map +1 -1
- package/dist/libraries/llm/llm-provider-service.js +1 -1
- package/dist/libraries/llm/llm-provider-service.js.map +1 -1
- package/dist/libraries/map/providers/osrm.js.map +1 -1
- package/dist/libraries/mongo/models/banner.model.d.ts +6 -6
- package/dist/libraries/mongo/models/banner.model.js +6 -6
- package/dist/libraries/mongo/models/banner.model.js.map +1 -1
- package/dist/libraries/mongo/models/cart.model.d.ts +2 -2
- package/dist/libraries/mongo/models/cart.model.js +1 -1
- package/dist/libraries/mongo/models/cart.model.js.map +1 -1
- package/dist/libraries/mongo/models/category.model.d.ts +2 -2
- package/dist/libraries/mongo/models/category.model.js +1 -1
- package/dist/libraries/mongo/models/category.model.js.map +1 -1
- package/dist/libraries/mongo/models/deal-setting.model.d.ts +1 -2
- package/dist/libraries/mongo/models/deal-setting.model.js +1 -2
- package/dist/libraries/mongo/models/deal-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/service-control-product-config.model.d.ts +9 -0
- package/dist/libraries/mongo/models/embedded/service-control-product-config.model.js +52 -0
- package/dist/libraries/mongo/models/embedded/service-control-product-config.model.js.map +1 -0
- package/dist/libraries/mongo/models/featured-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/filter-container.model.d.ts +2 -2
- package/dist/libraries/mongo/models/filter-container.model.js +1 -1
- package/dist/libraries/mongo/models/filter-container.model.js.map +1 -1
- package/dist/libraries/mongo/models/finance-settlement.model.js.map +1 -1
- package/dist/libraries/mongo/models/line-item.model.d.ts +2 -2
- package/dist/libraries/mongo/models/line-item.model.js +1 -1
- package/dist/libraries/mongo/models/line-item.model.js.map +1 -1
- package/dist/libraries/mongo/models/list-container.model.d.ts +2 -2
- package/dist/libraries/mongo/models/list-container.model.js +1 -1
- package/dist/libraries/mongo/models/list-container.model.js.map +1 -1
- package/dist/libraries/mongo/models/order.model.js.map +1 -1
- package/dist/libraries/mongo/models/parent.model.d.ts +2 -2
- package/dist/libraries/mongo/models/parent.model.js +1 -1
- package/dist/libraries/mongo/models/parent.model.js.map +1 -1
- package/dist/libraries/mongo/models/product.model.d.ts +2 -2
- package/dist/libraries/mongo/models/product.model.js +1 -1
- package/dist/libraries/mongo/models/product.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/custom-coupon.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/individual-store-coupon.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/individual-user-coupon.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/shops-categories-coupon.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-control.model.d.ts +11 -2
- package/dist/libraries/mongo/models/service-control.model.js +47 -6
- package/dist/libraries/mongo/models/service-control.model.js.map +1 -1
- package/dist/libraries/mongo/models/shop.model.d.ts +2 -2
- package/dist/libraries/mongo/models/shop.model.js +1 -1
- package/dist/libraries/mongo/models/shop.model.js.map +1 -1
- package/dist/libraries/mongo/models/tag.model.d.ts +2 -2
- package/dist/libraries/mongo/models/tag.model.js +1 -1
- package/dist/libraries/mongo/models/tag.model.js.map +1 -1
- package/dist/libraries/mongo/models/user-app-section-setting.model.d.ts +2 -2
- package/dist/libraries/mongo/models/user-app-section-setting.model.js +1 -1
- package/dist/libraries/mongo/models/user-app-section-setting.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/index.js.map +1 -0
- package/dist/types/libraries/auth/index.d.ts +77 -0
- package/dist/types/libraries/auth/index.js +270 -0
- package/dist/types/libraries/auth/index.js.map +1 -0
- package/dist/types/libraries/auth/refreshtoken.d.ts +15 -0
- package/dist/types/libraries/auth/refreshtoken.js +91 -0
- package/dist/types/libraries/auth/refreshtoken.js.map +1 -0
- package/dist/types/libraries/auth/repository.d.ts +18 -0
- package/dist/types/libraries/auth/repository.js +43 -0
- package/dist/types/libraries/auth/repository.js.map +1 -0
- package/dist/types/libraries/bullmq/bull-mq-service.d.ts +9 -0
- package/dist/types/libraries/bullmq/bull-mq-service.js +42 -0
- package/dist/types/libraries/bullmq/bull-mq-service.js.map +1 -0
- package/dist/types/libraries/cache/settings/index.d.ts +7 -0
- package/dist/types/libraries/cache/settings/index.js +56 -0
- package/dist/types/libraries/cache/settings/index.js.map +1 -0
- package/dist/types/libraries/cash-settlement/cashSettlementService.d.ts +16 -0
- package/dist/types/libraries/cash-settlement/cashSettlementService.js +53 -0
- package/dist/types/libraries/cash-settlement/cashSettlementService.js.map +1 -0
- package/dist/types/libraries/cash-settlement/index.d.ts +2 -0
- package/dist/types/libraries/cash-settlement/index.js +19 -0
- package/dist/types/libraries/cash-settlement/index.js.map +1 -0
- package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.d.ts +24 -0
- package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.js +10 -0
- package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.js.map +1 -0
- package/dist/types/libraries/cash-settlement/providers/bob.d.ts +45 -0
- package/dist/types/libraries/cash-settlement/providers/bob.js +634 -0
- package/dist/types/libraries/cash-settlement/providers/bob.js.map +1 -0
- package/dist/types/libraries/cash-settlement/providers/index.d.ts +1 -0
- package/dist/types/libraries/cash-settlement/providers/index.js +18 -0
- package/dist/types/libraries/cash-settlement/providers/index.js.map +1 -0
- package/dist/types/libraries/cloud-storage/CloudStorageFactory.d.ts +7 -0
- package/dist/types/libraries/cloud-storage/CloudStorageFactory.js +18 -0
- package/dist/types/libraries/cloud-storage/CloudStorageFactory.js.map +1 -0
- package/dist/types/libraries/cloud-storage/index.d.ts +4 -0
- package/dist/types/libraries/cloud-storage/index.js +21 -0
- package/dist/types/libraries/cloud-storage/index.js.map +1 -0
- package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.d.ts +8 -0
- package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.js +3 -0
- package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.js.map +1 -0
- package/dist/types/libraries/cloud-storage/providers/GcsStorageService.d.ts +11 -0
- package/dist/types/libraries/cloud-storage/providers/GcsStorageService.js +63 -0
- package/dist/types/libraries/cloud-storage/providers/GcsStorageService.js.map +1 -0
- package/dist/types/libraries/cloud-storage/types/FileUploadResult.d.ts +11 -0
- package/dist/types/libraries/cloud-storage/types/FileUploadResult.js +3 -0
- package/dist/types/libraries/cloud-storage/types/FileUploadResult.js.map +1 -0
- package/dist/types/libraries/configuration/index.d.ts +39 -0
- package/dist/types/libraries/configuration/index.js +84 -0
- package/dist/types/libraries/configuration/index.js.map +1 -0
- package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.d.ts +9 -0
- package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.js +14 -0
- package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.js.map +1 -0
- package/dist/types/libraries/dispatcher/index.d.ts +10 -0
- package/dist/types/libraries/dispatcher/index.js +43 -0
- package/dist/types/libraries/dispatcher/index.js.map +1 -0
- package/dist/types/libraries/event/BaseEvent.d.ts +7 -0
- package/dist/types/libraries/event/BaseEvent.js +19 -0
- package/dist/types/libraries/event/BaseEvent.js.map +1 -0
- package/dist/types/libraries/event/EventEnums.d.ts +26 -0
- package/dist/types/libraries/event/EventEnums.js +31 -0
- package/dist/types/libraries/event/EventEnums.js.map +1 -0
- package/dist/types/libraries/event/events/index.d.ts +2 -0
- package/dist/types/libraries/event/events/index.js +19 -0
- package/dist/types/libraries/event/events/index.js.map +1 -0
- package/dist/types/libraries/event/events/payout/index.d.ts +1 -0
- package/dist/types/libraries/event/events/payout/index.js +18 -0
- package/dist/types/libraries/event/events/payout/index.js.map +1 -0
- package/dist/types/libraries/event/events/payout/payout-schedule.event.d.ts +9 -0
- package/dist/types/libraries/event/events/payout/payout-schedule.event.js +12 -0
- package/dist/types/libraries/event/events/payout/payout-schedule.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/cash/index.d.ts +5 -0
- package/dist/types/libraries/event/events/rider/cash/index.js +14 -0
- package/dist/types/libraries/event/events/rider/cash/index.js.map +1 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.d.ts +11 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.js +19 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-event.d.ts +11 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-event.js +18 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.d.ts +10 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.js +17 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.d.ts +11 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.js +19 -0
- package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.d.ts +10 -0
- package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.js +17 -0
- package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/index.d.ts +2 -0
- package/dist/types/libraries/event/events/rider/index.js +19 -0
- package/dist/types/libraries/event/events/rider/index.js.map +1 -0
- package/dist/types/libraries/event/events/rider/scoring/index.d.ts +7 -0
- package/dist/types/libraries/event/events/rider/scoring/index.js +18 -0
- package/dist/types/libraries/event/events/rider/scoring/index.js.map +1 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.d.ts +11 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.js +20 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.d.ts +13 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.js +24 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.d.ts +11 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.js +20 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.d.ts +13 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.js +24 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.d.ts +19 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.js +36 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.d.ts +13 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.js +18 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.js.map +1 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-score-event.d.ts +14 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-score-event.js +21 -0
- package/dist/types/libraries/event/events/rider/scoring/rider-score-event.js.map +1 -0
- package/dist/types/libraries/event/index.d.ts +11 -0
- package/dist/types/libraries/event/index.js +152 -0
- package/dist/types/libraries/event/index.js.map +1 -0
- package/dist/types/libraries/event/registry/SubscriptionRegistry.d.ts +11 -0
- package/dist/types/libraries/event/registry/SubscriptionRegistry.js +14 -0
- package/dist/types/libraries/event/registry/SubscriptionRegistry.js.map +1 -0
- package/dist/types/libraries/firebase/index.d.ts +16 -0
- package/dist/types/libraries/firebase/index.js +107 -0
- package/dist/types/libraries/firebase/index.js.map +1 -0
- package/dist/types/libraries/google-translate/google-translate.client.d.ts +5 -0
- package/dist/types/libraries/google-translate/google-translate.client.js +44 -0
- package/dist/types/libraries/google-translate/google-translate.client.js.map +1 -0
- package/dist/types/libraries/google-translate/google-translate.dto.d.ts +13 -0
- package/dist/types/libraries/google-translate/google-translate.dto.js +3 -0
- package/dist/types/libraries/google-translate/google-translate.dto.js.map +1 -0
- package/dist/types/libraries/google-translate/google-translate.service.d.ts +9 -0
- package/dist/types/libraries/google-translate/google-translate.service.js +102 -0
- package/dist/types/libraries/google-translate/google-translate.service.js.map +1 -0
- package/dist/types/libraries/google-translate/index.d.ts +1 -0
- package/dist/types/libraries/google-translate/index.js +18 -0
- package/dist/types/libraries/google-translate/index.js.map +1 -0
- package/dist/types/libraries/index.d.ts +49 -0
- package/dist/types/libraries/index.js +133 -0
- package/dist/types/libraries/index.js.map +1 -0
- package/dist/types/libraries/llm/interfaces/common-llm-interfaces.d.ts +28 -0
- package/dist/types/libraries/llm/interfaces/common-llm-interfaces.js +3 -0
- package/dist/types/libraries/llm/interfaces/common-llm-interfaces.js.map +1 -0
- package/dist/types/libraries/llm/llm-provider-service.d.ts +13 -0
- package/dist/types/libraries/llm/llm-provider-service.js +47 -0
- package/dist/types/libraries/llm/llm-provider-service.js.map +1 -0
- package/dist/types/libraries/llm/providers/openai-provider.d.ts +19 -0
- package/dist/types/libraries/llm/providers/openai-provider.js +223 -0
- package/dist/types/libraries/llm/providers/openai-provider.js.map +1 -0
- package/dist/types/libraries/logger/index.d.ts +8 -0
- package/dist/types/libraries/logger/index.js +75 -0
- package/dist/types/libraries/logger/index.js.map +1 -0
- package/dist/types/libraries/logger-kit/index.d.ts +3 -0
- package/dist/types/libraries/logger-kit/index.js +22 -0
- package/dist/types/libraries/logger-kit/index.js.map +1 -0
- package/dist/types/libraries/logger-kit/logger.service.d.ts +117 -0
- package/dist/types/libraries/logger-kit/logger.service.js +304 -0
- package/dist/types/libraries/logger-kit/logger.service.js.map +1 -0
- package/dist/types/libraries/logger-kit/types.d.ts +34 -0
- package/dist/types/libraries/logger-kit/types.js +3 -0
- package/dist/types/libraries/logger-kit/types.js.map +1 -0
- package/dist/types/libraries/map/index.d.ts +2 -0
- package/dist/types/libraries/map/index.js +19 -0
- package/dist/types/libraries/map/index.js.map +1 -0
- package/dist/types/libraries/map/interfaces/IMapService.d.ts +43 -0
- package/dist/types/libraries/map/interfaces/IMapService.js +9 -0
- package/dist/types/libraries/map/interfaces/IMapService.js.map +1 -0
- package/dist/types/libraries/map/mapService.d.ts +21 -0
- package/dist/types/libraries/map/mapService.js +57 -0
- package/dist/types/libraries/map/mapService.js.map +1 -0
- package/dist/types/libraries/map/providers/google-maps.d.ts +27 -0
- package/dist/types/libraries/map/providers/google-maps.js +462 -0
- package/dist/types/libraries/map/providers/google-maps.js.map +1 -0
- package/dist/types/libraries/map/providers/index.d.ts +1 -0
- package/dist/types/libraries/map/providers/index.js +18 -0
- package/dist/types/libraries/map/providers/index.js.map +1 -0
- package/dist/types/libraries/map/providers/osrm.d.ts +13 -0
- package/dist/types/libraries/map/providers/osrm.js +137 -0
- package/dist/types/libraries/map/providers/osrm.js.map +1 -0
- package/dist/types/libraries/mongo/index.d.ts +7 -0
- package/dist/types/libraries/mongo/index.js +87 -0
- package/dist/types/libraries/mongo/index.js.map +1 -0
- package/dist/types/libraries/mongo/models/activity-log.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/activity-log.model.js +48 -0
- package/dist/types/libraries/mongo/models/activity-log.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/admin-access-control.model.d.ts +11 -0
- package/dist/types/libraries/mongo/models/admin-access-control.model.js +75 -0
- package/dist/types/libraries/mongo/models/admin-access-control.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/admin.model.d.ts +11 -0
- package/dist/types/libraries/mongo/models/admin.model.js +65 -0
- package/dist/types/libraries/mongo/models/admin.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/agent-performance.model.d.ts +15 -0
- package/dist/types/libraries/mongo/models/agent-performance.model.js +73 -0
- package/dist/types/libraries/mongo/models/agent-performance.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/app-appearance.model.d.ts +25 -0
- package/dist/types/libraries/mongo/models/app-appearance.model.js +102 -0
- package/dist/types/libraries/mongo/models/app-appearance.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/app-instance.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/app-instance.model.js +54 -0
- package/dist/types/libraries/mongo/models/app-instance.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/attribute.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/attribute.model.js +58 -0
- package/dist/types/libraries/mongo/models/attribute.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/banner.model.d.ts +27 -0
- package/dist/types/libraries/mongo/models/banner.model.js +118 -0
- package/dist/types/libraries/mongo/models/banner.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/base/base-coupon.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/base/base-coupon.model.js +90 -0
- package/dist/types/libraries/mongo/models/base/base-coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/bob-finance.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/bob-finance.model.js +85 -0
- package/dist/types/libraries/mongo/models/bob-finance.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.js +48 -0
- package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/brand.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/brand.model.js +32 -0
- package/dist/types/libraries/mongo/models/brand.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/cancellation-reason.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/cancellation-reason.model.js +55 -0
- package/dist/types/libraries/mongo/models/cancellation-reason.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/card.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/card.model.js +88 -0
- package/dist/types/libraries/mongo/models/card.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/cart-participant.model.d.ts +29 -0
- package/dist/types/libraries/mongo/models/cart-participant.model.js +130 -0
- package/dist/types/libraries/mongo/models/cart-participant.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/cart.model.d.ts +39 -0
- package/dist/types/libraries/mongo/models/cart.model.js +184 -0
- package/dist/types/libraries/mongo/models/cart.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/category.model.d.ts +12 -0
- package/dist/types/libraries/mongo/models/category.model.js +68 -0
- package/dist/types/libraries/mongo/models/category.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/chat-room.model.d.ts +28 -0
- package/dist/types/libraries/mongo/models/chat-room.model.js +99 -0
- package/dist/types/libraries/mongo/models/chat-room.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/copy-attribute-map.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/copy-attribute-map.model.js +38 -0
- package/dist/types/libraries/mongo/models/copy-attribute-map.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/copy-product-job.model.d.ts +21 -0
- package/dist/types/libraries/mongo/models/copy-product-job.model.js +101 -0
- package/dist/types/libraries/mongo/models/copy-product-job.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/copy-product-map.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/copy-product-map.model.js +38 -0
- package/dist/types/libraries/mongo/models/copy-product-map.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/copy-shop-category-map.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/copy-shop-category-map.model.js +38 -0
- package/dist/types/libraries/mongo/models/copy-shop-category-map.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/core-auth-identity.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/core-auth-identity.model.js +32 -0
- package/dist/types/libraries/mongo/models/core-auth-identity.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/core-user.model.d.ts +16 -0
- package/dist/types/libraries/mongo/models/core-user.model.js +85 -0
- package/dist/types/libraries/mongo/models/core-user.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/counter.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/counter.model.js +42 -0
- package/dist/types/libraries/mongo/models/counter.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/coupon.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/coupon.model.js +60 -0
- package/dist/types/libraries/mongo/models/coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/deal-setting.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/deal-setting.model.js +51 -0
- package/dist/types/libraries/mongo/models/deal-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/default-chat.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/default-chat.model.js +26 -0
- package/dist/types/libraries/mongo/models/default-chat.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/delivery-charges.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/delivery-charges.model.js +63 -0
- package/dist/types/libraries/mongo/models/delivery-charges.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/dish.model.d.ts +18 -0
- package/dist/types/libraries/mongo/models/dish.model.js +92 -0
- package/dist/types/libraries/mongo/models/dish.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/address-change-history.model.d.ts +25 -0
- package/dist/types/libraries/mongo/models/embedded/address-change-history.model.js +112 -0
- package/dist/types/libraries/mongo/models/embedded/address-change-history.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.d.ts +33 -0
- package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.js +133 -0
- package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/app-force-update.d.ts +9 -0
- package/dist/types/libraries/mongo/models/embedded/app-force-update.js +52 -0
- package/dist/types/libraries/mongo/models/embedded/app-force-update.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/attribute-item.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/attribute-item.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/attribute-item.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/attribute-map.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/embedded/attribute-map.model.js +29 -0
- package/dist/types/libraries/mongo/models/embedded/attribute-map.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.js +52 -0
- package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/charge.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/charge.model.js +28 -0
- package/dist/types/libraries/mongo/models/embedded/charge.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/chat-participant.model.d.ts +18 -0
- package/dist/types/libraries/mongo/models/embedded/chat-participant.model.js +64 -0
- package/dist/types/libraries/mongo/models/embedded/chat-participant.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/company-info.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/embedded/company-info.model.js +37 -0
- package/dist/types/libraries/mongo/models/embedded/company-info.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.js +36 -0
- package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/courier-setting.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/courier-setting.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/courier-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/currency-setting.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/embedded/currency-setting.model.js +38 -0
- package/dist/types/libraries/mongo/models/embedded/currency-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/currency.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/currency.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/currency.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.js +51 -0
- package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/delivery-info.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/delivery-info.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/delivery-info.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/external-ref.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/external-ref.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/external-ref.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/featured-item.mode.d.ts +6 -0
- package/dist/types/libraries/mongo/models/embedded/featured-item.mode.js +33 -0
- package/dist/types/libraries/mongo/models/embedded/featured-item.mode.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.js +38 -0
- package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.d.ts +17 -0
- package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.js +63 -0
- package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.d.ts +46 -0
- package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.js +178 -0
- package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/order-cancel.model.d.ts +26 -0
- package/dist/types/libraries/mongo/models/embedded/order-cancel.model.js +110 -0
- package/dist/types/libraries/mongo/models/embedded/order-cancel.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.d.ts +12 -0
- package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.js +67 -0
- package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/order-finance.model.d.ts +18 -0
- package/dist/types/libraries/mongo/models/embedded/order-finance.model.js +64 -0
- package/dist/types/libraries/mongo/models/embedded/order-finance.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/order-pricing.model.d.ts +34 -0
- package/dist/types/libraries/mongo/models/embedded/order-pricing.model.js +163 -0
- package/dist/types/libraries/mongo/models/embedded/order-pricing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/order-refund.model.d.ts +28 -0
- package/dist/types/libraries/mongo/models/embedded/order-refund.model.js +113 -0
- package/dist/types/libraries/mongo/models/embedded/order-refund.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/otp-fields.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/embedded/otp-fields.model.js +46 -0
- package/dist/types/libraries/mongo/models/embedded/otp-fields.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/package.model.d.ts +25 -0
- package/dist/types/libraries/mongo/models/embedded/package.model.js +86 -0
- package/dist/types/libraries/mongo/models/embedded/package.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/parent-document.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/parent-document.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/parent-document.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.js +38 -0
- package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/payment-record.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/embedded/payment-record.model.js +53 -0
- package/dist/types/libraries/mongo/models/embedded/payment-record.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/payout-setting.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/payout-setting.model.js +28 -0
- package/dist/types/libraries/mongo/models/embedded/payout-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/plus-settings.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/embedded/plus-settings.model.js +33 -0
- package/dist/types/libraries/mongo/models/embedded/plus-settings.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/preparing-time.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/preparing-time.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/preparing-time.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.d.ts +16 -0
- package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.js +80 -0
- package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/product-category.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/product-category.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/product-category.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.d.ts +17 -0
- package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.js +72 -0
- package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.d.ts +12 -0
- package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.js +60 -0
- package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/product-snap.model.d.ts +16 -0
- package/dist/types/libraries/mongo/models/embedded/product-snap.model.js +79 -0
- package/dist/types/libraries/mongo/models/embedded/product-snap.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/profit.model.d.ts +22 -0
- package/dist/types/libraries/mongo/models/embedded/profit.model.js +96 -0
- package/dist/types/libraries/mongo/models/embedded/profit.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.js +38 -0
- package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.js +78 -0
- package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/replacement-order.model.d.ts +28 -0
- package/dist/types/libraries/mongo/models/embedded/replacement-order.model.js +109 -0
- package/dist/types/libraries/mongo/models/embedded/replacement-order.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/rest-password.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/rest-password.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/rest-password.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.js +44 -0
- package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/rider-batches.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/rider-batches.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/rider-batches.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/rider-setting.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/embedded/rider-setting.model.js +52 -0
- package/dist/types/libraries/mongo/models/embedded/rider-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/rider-statistics.d.ts +11 -0
- package/dist/types/libraries/mongo/models/embedded/rider-statistics.js +62 -0
- package/dist/types/libraries/mongo/models/embedded/rider-statistics.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.d.ts +18 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.js +77 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.d.ts +23 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.js +85 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.d.ts +24 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.js +127 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.d.ts +16 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.js +70 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.js +76 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.js +57 -0
- package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-control-product-config.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/embedded/service-control-product-config.model.js +52 -0
- package/dist/types/libraries/mongo/models/embedded/service-control-product-config.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.js +28 -0
- package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/service-line-item.model.d.ts +40 -0
- package/dist/types/libraries/mongo/models/embedded/service-line-item.model.js +164 -0
- package/dist/types/libraries/mongo/models/embedded/service-line-item.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.d.ts +12 -0
- package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.js +47 -0
- package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/shop-document.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/embedded/shop-document.model.js +37 -0
- package/dist/types/libraries/mongo/models/embedded/shop-document.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.d.ts +15 -0
- package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.js +75 -0
- package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.js +43 -0
- package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/status-timeline.model.d.ts +25 -0
- package/dist/types/libraries/mongo/models/embedded/status-timeline.model.js +97 -0
- package/dist/types/libraries/mongo/models/embedded/status-timeline.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.js +47 -0
- package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.js +27 -0
- package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.d.ts +28 -0
- package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.js +134 -0
- package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/vat.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/vat.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/vat.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/wallet.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/wallet.model.js +32 -0
- package/dist/types/libraries/mongo/models/embedded/wallet.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.d.ts +5 -0
- package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.js +28 -0
- package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.js.map +1 -0
- package/dist/types/libraries/mongo/models/favourite.model.d.ts +14 -0
- package/dist/types/libraries/mongo/models/favourite.model.js +52 -0
- package/dist/types/libraries/mongo/models/favourite.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/featured-setting.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/featured-setting.model.js +33 -0
- package/dist/types/libraries/mongo/models/featured-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/filter-container.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/filter-container.model.js +63 -0
- package/dist/types/libraries/mongo/models/filter-container.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/finance-settlement.model.d.ts +41 -0
- package/dist/types/libraries/mongo/models/finance-settlement.model.js +175 -0
- package/dist/types/libraries/mongo/models/finance-settlement.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/flag.model.d.ts +22 -0
- package/dist/types/libraries/mongo/models/flag.model.js +83 -0
- package/dist/types/libraries/mongo/models/flag.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/gallery-upload.model.d.ts +17 -0
- package/dist/types/libraries/mongo/models/gallery-upload.model.js +77 -0
- package/dist/types/libraries/mongo/models/gallery-upload.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/gallery.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/gallery.model.js +59 -0
- package/dist/types/libraries/mongo/models/gallery.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/google-maps-usage.model.d.ts +21 -0
- package/dist/types/libraries/mongo/models/google-maps-usage.model.js +255 -0
- package/dist/types/libraries/mongo/models/google-maps-usage.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/index.d.ts +398 -0
- package/dist/types/libraries/mongo/models/index.js +488 -0
- package/dist/types/libraries/mongo/models/index.js.map +1 -0
- package/dist/types/libraries/mongo/models/integration-configuration.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/integration-configuration.model.js +33 -0
- package/dist/types/libraries/mongo/models/integration-configuration.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.js +45 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.d.ts +14 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.js +76 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-config.d.ts +6 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-config.js +36 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-config.js.map +1 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.d.ts +22 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.js +96 -0
- package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/line-item.model.d.ts +47 -0
- package/dist/types/libraries/mongo/models/line-item.model.js +205 -0
- package/dist/types/libraries/mongo/models/line-item.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/list-container.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/list-container.model.js +92 -0
- package/dist/types/libraries/mongo/models/list-container.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/log.model.d.ts +35 -0
- package/dist/types/libraries/mongo/models/log.model.js +163 -0
- package/dist/types/libraries/mongo/models/log.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/marketing.model.d.ts +18 -0
- package/dist/types/libraries/mongo/models/marketing.model.js +88 -0
- package/dist/types/libraries/mongo/models/marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/meal-plan.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/meal-plan.model.js +51 -0
- package/dist/types/libraries/mongo/models/meal-plan.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/message.model.d.ts +25 -0
- package/dist/types/libraries/mongo/models/message.model.js +105 -0
- package/dist/types/libraries/mongo/models/message.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/notification.model.d.ts +53 -0
- package/dist/types/libraries/mongo/models/notification.model.js +201 -0
- package/dist/types/libraries/mongo/models/notification.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/nutrition.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/nutrition.model.js +33 -0
- package/dist/types/libraries/mongo/models/nutrition.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/order.model.d.ts +67 -0
- package/dist/types/libraries/mongo/models/order.model.js +355 -0
- package/dist/types/libraries/mongo/models/order.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/parent.model.d.ts +29 -0
- package/dist/types/libraries/mongo/models/parent.model.js +144 -0
- package/dist/types/libraries/mongo/models/parent.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/payment-configuration.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/payment-configuration.model.js +33 -0
- package/dist/types/libraries/mongo/models/payment-configuration.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/payment-intent.model.d.ts +17 -0
- package/dist/types/libraries/mongo/models/payment-intent.model.js +79 -0
- package/dist/types/libraries/mongo/models/payment-intent.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/payout.model.d.ts +15 -0
- package/dist/types/libraries/mongo/models/payout.model.js +86 -0
- package/dist/types/libraries/mongo/models/payout.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/product-brand.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/product-brand.model.js +38 -0
- package/dist/types/libraries/mongo/models/product-brand.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/product-marketing.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/product-marketing.model.js +57 -0
- package/dist/types/libraries/mongo/models/product-marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/product-stock-tracker.model.d.ts +15 -0
- package/dist/types/libraries/mongo/models/product-stock-tracker.model.js +57 -0
- package/dist/types/libraries/mongo/models/product-stock-tracker.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/product-upload.model.d.ts +25 -0
- package/dist/types/libraries/mongo/models/product-upload.model.js +105 -0
- package/dist/types/libraries/mongo/models/product-upload.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/product.model.d.ts +63 -0
- package/dist/types/libraries/mongo/models/product.model.js +339 -0
- package/dist/types/libraries/mongo/models/product.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/professional-blocked-time.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/professional-blocked-time.model.js +49 -0
- package/dist/types/libraries/mongo/models/professional-blocked-time.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/professional.model.d.ts +17 -0
- package/dist/types/libraries/mongo/models/professional.model.js +91 -0
- package/dist/types/libraries/mongo/models/professional.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.d.ts +16 -0
- package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.js +62 -0
- package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.js +28 -0
- package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.js +69 -0
- package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.js +28 -0
- package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.js +29 -0
- package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/courier-order.model.d.ts +41 -0
- package/dist/types/libraries/mongo/models/providers/courier-order.model.js +151 -0
- package/dist/types/libraries/mongo/models/providers/courier-order.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/custom-coupon.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/providers/custom-coupon.model.js +43 -0
- package/dist/types/libraries/mongo/models/providers/custom-coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/discount-marketing.model.d.ts +22 -0
- package/dist/types/libraries/mongo/models/providers/discount-marketing.model.js +92 -0
- package/dist/types/libraries/mongo/models/providers/discount-marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/featured-marketing.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/providers/featured-marketing.model.js +25 -0
- package/dist/types/libraries/mongo/models/providers/featured-marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.d.ts +7 -0
- package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.js +30 -0
- package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/global-coupon.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/providers/global-coupon.model.js +10 -0
- package/dist/types/libraries/mongo/models/providers/global-coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.d.ts +12 -0
- package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.js +42 -0
- package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.js +43 -0
- package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/new-user-discount-marketing.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/providers/new-user-discount-marketing.model.js +73 -0
- package/dist/types/libraries/mongo/models/providers/new-user-discount-marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/punch-marketing.model.d.ts +11 -0
- package/dist/types/libraries/mongo/models/providers/punch-marketing.model.js +50 -0
- package/dist/types/libraries/mongo/models/providers/punch-marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.d.ts +9 -0
- package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.js +27 -0
- package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.js +43 -0
- package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/regular-order.model.d.ts +54 -0
- package/dist/types/libraries/mongo/models/providers/regular-order.model.js +204 -0
- package/dist/types/libraries/mongo/models/providers/regular-order.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/rider-payout.model.d.ts +23 -0
- package/dist/types/libraries/mongo/models/providers/rider-payout.model.js +94 -0
- package/dist/types/libraries/mongo/models/providers/rider-payout.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/rider-review.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/providers/rider-review.model.js +32 -0
- package/dist/types/libraries/mongo/models/providers/rider-review.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/service-package-review.model.d.ts +14 -0
- package/dist/types/libraries/mongo/models/providers/service-package-review.model.js +44 -0
- package/dist/types/libraries/mongo/models/providers/service-package-review.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/shop-courier.model.d.ts +26 -0
- package/dist/types/libraries/mongo/models/providers/shop-courier.model.js +93 -0
- package/dist/types/libraries/mongo/models/providers/shop-courier.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/shop-payout.model.d.ts +62 -0
- package/dist/types/libraries/mongo/models/providers/shop-payout.model.js +244 -0
- package/dist/types/libraries/mongo/models/providers/shop-payout.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/shop-review.model.d.ts +12 -0
- package/dist/types/libraries/mongo/models/providers/shop-review.model.js +38 -0
- package/dist/types/libraries/mongo/models/providers/shop-review.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.js +47 -0
- package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.d.ts +11 -0
- package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.js +46 -0
- package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/vendor-payout.model.d.ts +50 -0
- package/dist/types/libraries/mongo/models/providers/vendor-payout.model.js +192 -0
- package/dist/types/libraries/mongo/models/providers/vendor-payout.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/providers/vendor-review.model.d.ts +12 -0
- package/dist/types/libraries/mongo/models/providers/vendor-review.model.js +38 -0
- package/dist/types/libraries/mongo/models/providers/vendor-review.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/punch-marketing-history.model.d.ts +24 -0
- package/dist/types/libraries/mongo/models/punch-marketing-history.model.js +101 -0
- package/dist/types/libraries/mongo/models/punch-marketing-history.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/rating-setting.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/rating-setting.model.js +46 -0
- package/dist/types/libraries/mongo/models/rating-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/referral-setting.model.d.ts +6 -0
- package/dist/types/libraries/mongo/models/referral-setting.model.js +32 -0
- package/dist/types/libraries/mongo/models/referral-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/request-area.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/request-area.model.js +33 -0
- package/dist/types/libraries/mongo/models/request-area.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/review.model.d.ts +15 -0
- package/dist/types/libraries/mongo/models/review.model.js +68 -0
- package/dist/types/libraries/mongo/models/review.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/reward.model.d.ts +16 -0
- package/dist/types/libraries/mongo/models/reward.model.js +70 -0
- package/dist/types/libraries/mongo/models/reward.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/rider-timeout.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/rider-timeout.model.js +47 -0
- package/dist/types/libraries/mongo/models/rider-timeout.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/rider-tracking.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/rider-tracking.model.js +47 -0
- package/dist/types/libraries/mongo/models/rider-tracking.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/rider.model.d.ts +70 -0
- package/dist/types/libraries/mongo/models/rider.model.js +358 -0
- package/dist/types/libraries/mongo/models/rider.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service-addon.model.d.ts +16 -0
- package/dist/types/libraries/mongo/models/service-addon.model.js +86 -0
- package/dist/types/libraries/mongo/models/service-addon.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service-booking.model.d.ts +69 -0
- package/dist/types/libraries/mongo/models/service-booking.model.js +315 -0
- package/dist/types/libraries/mongo/models/service-booking.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service-cart.model.d.ts +14 -0
- package/dist/types/libraries/mongo/models/service-cart.model.js +51 -0
- package/dist/types/libraries/mongo/models/service-cart.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service-category.model.d.ts +14 -0
- package/dist/types/libraries/mongo/models/service-category.model.js +87 -0
- package/dist/types/libraries/mongo/models/service-category.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service-control.model.d.ts +17 -0
- package/dist/types/libraries/mongo/models/service-control.model.js +91 -0
- package/dist/types/libraries/mongo/models/service-control.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service-flag.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/service-flag.model.js +72 -0
- package/dist/types/libraries/mongo/models/service-flag.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service-package.model.d.ts +27 -0
- package/dist/types/libraries/mongo/models/service-package.model.js +142 -0
- package/dist/types/libraries/mongo/models/service-package.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service-promotion.model.d.ts +27 -0
- package/dist/types/libraries/mongo/models/service-promotion.model.js +120 -0
- package/dist/types/libraries/mongo/models/service-promotion.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/service.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/service.model.js +43 -0
- package/dist/types/libraries/mongo/models/service.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/setting.model.d.ts +50 -0
- package/dist/types/libraries/mongo/models/setting.model.js +196 -0
- package/dist/types/libraries/mongo/models/setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shared/address.model.d.ts +38 -0
- package/dist/types/libraries/mongo/models/shared/address.model.js +158 -0
- package/dist/types/libraries/mongo/models/shared/address.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shared/duration.model.d.ts +14 -0
- package/dist/types/libraries/mongo/models/shared/duration.model.js +59 -0
- package/dist/types/libraries/mongo/models/shared/duration.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shared/geo-location.model.d.ts +5 -0
- package/dist/types/libraries/mongo/models/shared/geo-location.model.js +28 -0
- package/dist/types/libraries/mongo/models/shared/geo-location.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shared/work-hour.model.d.ts +19 -0
- package/dist/types/libraries/mongo/models/shared/work-hour.model.js +81 -0
- package/dist/types/libraries/mongo/models/shared/work-hour.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shop-access-control.model.d.ts +16 -0
- package/dist/types/libraries/mongo/models/shop-access-control.model.js +81 -0
- package/dist/types/libraries/mongo/models/shop-access-control.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shop-category.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/shop-category.model.js +64 -0
- package/dist/types/libraries/mongo/models/shop-category.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shop-meal-plan.model.d.ts +12 -0
- package/dist/types/libraries/mongo/models/shop-meal-plan.model.js +45 -0
- package/dist/types/libraries/mongo/models/shop-meal-plan.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shop-section.model.d.ts +18 -0
- package/dist/types/libraries/mongo/models/shop-section.model.js +89 -0
- package/dist/types/libraries/mongo/models/shop-section.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/shop.model.d.ts +65 -0
- package/dist/types/libraries/mongo/models/shop.model.js +304 -0
- package/dist/types/libraries/mongo/models/shop.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/spend-to-get-history.model.d.ts +13 -0
- package/dist/types/libraries/mongo/models/spend-to-get-history.model.js +51 -0
- package/dist/types/libraries/mongo/models/spend-to-get-history.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/subscription.model.d.ts +20 -0
- package/dist/types/libraries/mongo/models/subscription.model.js +93 -0
- package/dist/types/libraries/mongo/models/subscription.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/support-reason.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/support-reason.model.js +61 -0
- package/dist/types/libraries/mongo/models/support-reason.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/tag.model.d.ts +10 -0
- package/dist/types/libraries/mongo/models/tag.model.js +64 -0
- package/dist/types/libraries/mongo/models/tag.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/terms-and-conditions.model.d.ts +8 -0
- package/dist/types/libraries/mongo/models/terms-and-conditions.model.js +51 -0
- package/dist/types/libraries/mongo/models/terms-and-conditions.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/ticket-action.model.d.ts +4 -0
- package/dist/types/libraries/mongo/models/ticket-action.model.js +31 -0
- package/dist/types/libraries/mongo/models/ticket-action.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/ticket.model.d.ts +35 -0
- package/dist/types/libraries/mongo/models/ticket.model.js +144 -0
- package/dist/types/libraries/mongo/models/ticket.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/tournament-participant.model.d.ts +22 -0
- package/dist/types/libraries/mongo/models/tournament-participant.model.js +84 -0
- package/dist/types/libraries/mongo/models/tournament-participant.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/tournament.model.d.ts +65 -0
- package/dist/types/libraries/mongo/models/tournament.model.js +273 -0
- package/dist/types/libraries/mongo/models/tournament.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/user-action.model.d.ts +29 -0
- package/dist/types/libraries/mongo/models/user-action.model.js +113 -0
- package/dist/types/libraries/mongo/models/user-action.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/user-app-section-setting.model.d.ts +24 -0
- package/dist/types/libraries/mongo/models/user-app-section-setting.model.js +103 -0
- package/dist/types/libraries/mongo/models/user-app-section-setting.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/user.model.d.ts +40 -0
- package/dist/types/libraries/mongo/models/user.model.js +155 -0
- package/dist/types/libraries/mongo/models/user.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/vendor-access-control.model.d.ts +14 -0
- package/dist/types/libraries/mongo/models/vendor-access-control.model.js +75 -0
- package/dist/types/libraries/mongo/models/vendor-access-control.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/vendor-parent.model.d.ts +25 -0
- package/dist/types/libraries/mongo/models/vendor-parent.model.js +121 -0
- package/dist/types/libraries/mongo/models/vendor-parent.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/vendor.model.d.ts +33 -0
- package/dist/types/libraries/mongo/models/vendor.model.js +150 -0
- package/dist/types/libraries/mongo/models/vendor.model.js.map +1 -0
- package/dist/types/libraries/mongo/models/zone-extra-time.d.ts +12 -0
- package/dist/types/libraries/mongo/models/zone-extra-time.js +54 -0
- package/dist/types/libraries/mongo/models/zone-extra-time.js.map +1 -0
- package/dist/types/libraries/mongo/models/zone.model.d.ts +17 -0
- package/dist/types/libraries/mongo/models/zone.model.js +80 -0
- package/dist/types/libraries/mongo/models/zone.model.js.map +1 -0
- package/dist/types/libraries/mongo/plugins/normalize-field.plugin.d.ts +4 -0
- package/dist/types/libraries/mongo/plugins/normalize-field.plugin.js +42 -0
- package/dist/types/libraries/mongo/plugins/normalize-field.plugin.js.map +1 -0
- package/dist/types/libraries/mongo/plugins/soft-delete-plugin.d.ts +32 -0
- package/dist/types/libraries/mongo/plugins/soft-delete-plugin.js +145 -0
- package/dist/types/libraries/mongo/plugins/soft-delete-plugin.js.map +1 -0
- package/dist/types/libraries/mongo/utilities/shop.hooks.d.ts +9 -0
- package/dist/types/libraries/mongo/utilities/shop.hooks.js +11 -0
- package/dist/types/libraries/mongo/utilities/shop.hooks.js.map +1 -0
- package/dist/types/libraries/mongo/utilities/sorting-order.hooks.d.ts +14 -0
- package/dist/types/libraries/mongo/utilities/sorting-order.hooks.js +58 -0
- package/dist/types/libraries/mongo/utilities/sorting-order.hooks.js.map +1 -0
- package/dist/types/libraries/mongo/utilities/unique-id.hooks.d.ts +6 -0
- package/dist/types/libraries/mongo/utilities/unique-id.hooks.js +17 -0
- package/dist/types/libraries/mongo/utilities/unique-id.hooks.js.map +1 -0
- package/dist/types/libraries/notification/firebase-fcm.service.d.ts +7 -0
- package/dist/types/libraries/notification/firebase-fcm.service.js +40 -0
- package/dist/types/libraries/notification/firebase-fcm.service.js.map +1 -0
- package/dist/types/libraries/notification/firebase-message.builder.d.ts +22 -0
- package/dist/types/libraries/notification/firebase-message.builder.js +107 -0
- package/dist/types/libraries/notification/firebase-message.builder.js.map +1 -0
- package/dist/types/libraries/notification/lyxa-fcm-sender.d.ts +19 -0
- package/dist/types/libraries/notification/lyxa-fcm-sender.js +127 -0
- package/dist/types/libraries/notification/lyxa-fcm-sender.js.map +1 -0
- package/dist/types/libraries/notification/lyxa-fcm.service.d.ts +40 -0
- package/dist/types/libraries/notification/lyxa-fcm.service.js +177 -0
- package/dist/types/libraries/notification/lyxa-fcm.service.js.map +1 -0
- package/dist/types/libraries/redis/index.d.ts +25 -0
- package/dist/types/libraries/redis/index.js +137 -0
- package/dist/types/libraries/redis/index.js.map +1 -0
- package/dist/types/libraries/secrets/index.d.ts +10 -0
- package/dist/types/libraries/secrets/index.js +64 -0
- package/dist/types/libraries/secrets/index.js.map +1 -0
- package/dist/types/libraries/socket/connections/cache.d.ts +9 -0
- package/dist/types/libraries/socket/connections/cache.js +36 -0
- package/dist/types/libraries/socket/connections/cache.js.map +1 -0
- package/dist/types/libraries/socket/connections/instance-disconnect.d.ts +2 -0
- package/dist/types/libraries/socket/connections/instance-disconnect.js +43 -0
- package/dist/types/libraries/socket/connections/instance-disconnect.js.map +1 -0
- package/dist/types/libraries/socket/connections/keys.d.ts +10 -0
- package/dist/types/libraries/socket/connections/keys.js +23 -0
- package/dist/types/libraries/socket/connections/keys.js.map +1 -0
- package/dist/types/libraries/socket/connections/redis-helpers.d.ts +2 -0
- package/dist/types/libraries/socket/connections/redis-helpers.js +14 -0
- package/dist/types/libraries/socket/connections/redis-helpers.js.map +1 -0
- package/dist/types/libraries/trpc/context.d.ts +37 -0
- package/dist/types/libraries/trpc/context.js +43 -0
- package/dist/types/libraries/trpc/context.js.map +1 -0
- package/dist/types/libraries/trpc/index.d.ts +75 -0
- package/dist/types/libraries/trpc/index.js +80 -0
- package/dist/types/libraries/trpc/index.js.map +1 -0
- package/dist/types/libraries/twilio/index.d.ts +6 -0
- package/dist/types/libraries/twilio/index.js +42 -0
- package/dist/types/libraries/twilio/index.js.map +1 -0
- package/dist/types/libraries/upload/index.d.ts +50 -0
- package/dist/types/libraries/upload/index.js +312 -0
- package/dist/types/libraries/upload/index.js.map +1 -0
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/auth-ref.mapper.d.ts +4 -0
- package/dist/types/utilities/auth-ref.mapper.js +22 -0
- package/dist/types/utilities/auth-ref.mapper.js.map +1 -0
- package/dist/types/utilities/dayjs/dayjs.d.ts +14 -0
- package/dist/types/utilities/dayjs/dayjs.js +47 -0
- package/dist/types/utilities/dayjs/dayjs.js.map +1 -0
- package/dist/types/utilities/dayjs/index.d.ts +2 -0
- package/dist/types/utilities/dayjs/index.js +9 -0
- package/dist/types/utilities/dayjs/index.js.map +1 -0
- package/dist/types/utilities/enum.d.ts +9 -0
- package/dist/types/utilities/enum.js +15 -4
- package/dist/types/utilities/enum.js.map +1 -1
- package/dist/types/utilities/environment/rabbitmq-environments.d.ts +2 -0
- package/dist/types/utilities/environment/rabbitmq-environments.js +14 -0
- package/dist/types/utilities/environment/rabbitmq-environments.js.map +1 -0
- package/dist/types/utilities/environment/redis-environments.d.ts +2 -0
- package/dist/types/utilities/environment/redis-environments.js +14 -0
- package/dist/types/utilities/environment/redis-environments.js.map +1 -0
- package/dist/types/utilities/error-common.d.ts +10 -0
- package/dist/types/utilities/error-common.js +76 -0
- package/dist/types/utilities/error-common.js.map +1 -0
- package/dist/types/utilities/id-generator.d.ts +6 -0
- package/dist/types/utilities/id-generator.js +161 -0
- package/dist/types/utilities/id-generator.js.map +1 -0
- package/dist/types/utilities/instance.utils.d.ts +1 -0
- package/dist/types/utilities/instance.utils.js +12 -0
- package/dist/types/utilities/instance.utils.js.map +1 -0
- package/dist/types/utilities/normalize.d.ts +6 -0
- package/dist/types/utilities/normalize.js +51 -0
- package/dist/types/utilities/normalize.js.map +1 -0
- package/dist/types/utilities/password.d.ts +2 -0
- package/dist/types/utilities/password.js +20 -0
- package/dist/types/utilities/password.js.map +1 -0
- package/dist/types/utilities/projection.d.ts +8 -0
- package/dist/types/utilities/projection.js +37 -0
- package/dist/types/utilities/projection.js.map +1 -0
- package/dist/types/utilities/shared/common-methods.d.ts +4 -3
- package/dist/types/utilities/shared/common-methods.js +59 -10
- package/dist/types/utilities/shared/common-methods.js.map +1 -1
- package/dist/types/utilities/time.d.ts +13 -0
- package/dist/types/utilities/time.js +128 -0
- package/dist/types/utilities/time.js.map +1 -0
- package/dist/utilities/enum.d.ts +9 -0
- package/dist/utilities/enum.js +15 -4
- package/dist/utilities/enum.js.map +1 -1
- package/dist/utilities/shared/common-methods.d.ts +4 -3
- package/dist/utilities/shared/common-methods.js +59 -10
- package/dist/utilities/shared/common-methods.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
45
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.GoogleMapsService = void 0;
|
|
52
|
+
const axios_1 = __importDefault(require("axios"));
|
|
53
|
+
const polyline = __importStar(require("@mapbox/polyline"));
|
|
54
|
+
const server_1 = require("@trpc/server");
|
|
55
|
+
const redis_1 = require("../../redis");
|
|
56
|
+
const crypto_1 = require("crypto");
|
|
57
|
+
const typedi_1 = require("typedi");
|
|
58
|
+
const models_1 = require("../../mongo/models");
|
|
59
|
+
let GoogleMapsService = class GoogleMapsService {
|
|
60
|
+
redisService;
|
|
61
|
+
_apiKey;
|
|
62
|
+
logModel;
|
|
63
|
+
_routeURL = 'https://routes.googleapis.com/directions/v2:computeRoutes';
|
|
64
|
+
_routeMatrixURL = 'https://routes.googleapis.com/distanceMatrix/v2:computeRouteMatrix';
|
|
65
|
+
constructor(redisService, apiKey) {
|
|
66
|
+
this.redisService = redisService;
|
|
67
|
+
this._apiKey = apiKey;
|
|
68
|
+
this.logModel = models_1.GoogleMapsUsageModel;
|
|
69
|
+
}
|
|
70
|
+
createCacheKey(origin, destination, waypoints = []) {
|
|
71
|
+
const originKey = `${origin.latitude},${origin.longitude}`;
|
|
72
|
+
const destinationKey = `${destination.latitude},${destination.longitude}`;
|
|
73
|
+
let keyData = { origin: originKey, destination: destinationKey, waypoints: [] };
|
|
74
|
+
if (waypoints && waypoints.length > 0) {
|
|
75
|
+
keyData.waypoints = waypoints.map(point => `${point.latitude},${point.longitude}`).sort();
|
|
76
|
+
}
|
|
77
|
+
return (0, crypto_1.createHash)('md5').update(JSON.stringify(keyData)).digest('hex');
|
|
78
|
+
}
|
|
79
|
+
async acquireDistributedLock(key, ttl = 10) {
|
|
80
|
+
const token = (0, crypto_1.randomBytes)(16).toString('hex');
|
|
81
|
+
const lockKey = `lock:${key}`;
|
|
82
|
+
const result = await this.redisService.redisClient.set(lockKey, token, 'EX', ttl, 'NX');
|
|
83
|
+
return result ? { token, lockKey } : null;
|
|
84
|
+
}
|
|
85
|
+
async releaseDistributedLock(lockKey, token) {
|
|
86
|
+
const lua = `
|
|
87
|
+
if redis.call("get", KEYS[1]) == ARGV[1] then
|
|
88
|
+
return redis.call("del", KEYS[1])
|
|
89
|
+
else
|
|
90
|
+
return 0
|
|
91
|
+
end
|
|
92
|
+
`;
|
|
93
|
+
return this.redisService.redisClient.eval(lua, 1, lockKey, token);
|
|
94
|
+
}
|
|
95
|
+
async logApiUsage(endpoint, cacheHit = false, metadata = {}, responseTime, error) {
|
|
96
|
+
try {
|
|
97
|
+
await this.logModel.create({
|
|
98
|
+
endpoint,
|
|
99
|
+
cacheHit,
|
|
100
|
+
error: error ? error.message : null,
|
|
101
|
+
responseTime: responseTime,
|
|
102
|
+
metadata: {
|
|
103
|
+
origin: metadata.origin || null,
|
|
104
|
+
destination: metadata.destination || null,
|
|
105
|
+
waypoints: metadata.waypoints || null,
|
|
106
|
+
ipAddress: metadata.ipAddress || null,
|
|
107
|
+
userAgent: metadata.userAgent || null,
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
catch (logError) {
|
|
112
|
+
console.error('Failed to log API usage:', logError);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
clearRouteCache = async (origin, destination, waypoints = []) => {
|
|
116
|
+
const cacheKey = waypoints
|
|
117
|
+
? `distance_waypoints:${this.createCacheKey(origin, destination, waypoints)}`
|
|
118
|
+
: `distance:${this.createCacheKey(origin, destination)}`;
|
|
119
|
+
return await this.redisService.deleteCachedObject(cacheKey);
|
|
120
|
+
};
|
|
121
|
+
getCacheStats = async () => {
|
|
122
|
+
const keys = await this.redisService.redisClient.keys('distance*');
|
|
123
|
+
return {
|
|
124
|
+
totalCachedRoutes: keys.length,
|
|
125
|
+
cacheKeys: keys,
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
async getDistanceInfo(origin, destination) {
|
|
129
|
+
const startTime = Date.now();
|
|
130
|
+
const cacheKey = `distance:${this.createCacheKey(origin, destination)}`;
|
|
131
|
+
const cacheTTL = 3600;
|
|
132
|
+
try {
|
|
133
|
+
const cachedData = await this.redisService.getCachedObject(cacheKey);
|
|
134
|
+
if (cachedData) {
|
|
135
|
+
const responseTime = Date.now() - startTime;
|
|
136
|
+
await this.logApiUsage('DistanceInfoGoogle', true, {
|
|
137
|
+
origin,
|
|
138
|
+
destination,
|
|
139
|
+
}, responseTime);
|
|
140
|
+
return cachedData;
|
|
141
|
+
}
|
|
142
|
+
const lock = await this.acquireDistributedLock(cacheKey);
|
|
143
|
+
try {
|
|
144
|
+
const cachedDataAfterLock = await this.redisService.getCachedObject(cacheKey);
|
|
145
|
+
if (cachedDataAfterLock) {
|
|
146
|
+
const responseTime = Date.now() - startTime;
|
|
147
|
+
await this.logApiUsage('DistanceInfoGoogle', true, {
|
|
148
|
+
origin,
|
|
149
|
+
destination,
|
|
150
|
+
}, responseTime);
|
|
151
|
+
return cachedDataAfterLock;
|
|
152
|
+
}
|
|
153
|
+
const result = await this.getDistanceInfoFromGoogle(origin, destination);
|
|
154
|
+
await this.redisService.cacheObject(cacheKey, result, cacheTTL);
|
|
155
|
+
const responseTime = Date.now() - startTime;
|
|
156
|
+
await this.logApiUsage('DistanceInfoGoogle', false, {
|
|
157
|
+
origin,
|
|
158
|
+
destination,
|
|
159
|
+
}, responseTime);
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
finally {
|
|
163
|
+
if (lock) {
|
|
164
|
+
await this.releaseDistributedLock(lock.lockKey, lock.token);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
const responseTime = Date.now() - startTime;
|
|
170
|
+
await this.logApiUsage('DistanceInfoGoogle', false, {
|
|
171
|
+
origin,
|
|
172
|
+
destination,
|
|
173
|
+
}, responseTime, error);
|
|
174
|
+
throw new server_1.TRPCError({
|
|
175
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
176
|
+
message: 'Failed to fetch distance information from Maps API.',
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async getDistanceInfoFromGoogle_DEPRECATED(origin, destination) {
|
|
181
|
+
try {
|
|
182
|
+
const url = `https://maps.googleapis.com/maps/api/directions/json?origin=${origin.latitude}, ${origin.longitude}&destination=${destination.latitude}, ${destination.longitude}&key=${this._apiKey}&mode=DRIVING`;
|
|
183
|
+
const { data } = await axios_1.default.get(url);
|
|
184
|
+
const legs = data?.routes[0]?.legs[0];
|
|
185
|
+
const distance = legs?.distance;
|
|
186
|
+
const duration = legs?.duration;
|
|
187
|
+
if (!distance || !duration) {
|
|
188
|
+
throw new server_1.TRPCError({
|
|
189
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
190
|
+
message: 'No path exists from origin to destination.',
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
return { distance, duration };
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
console.error(`Error in getDistanceInfo: ${error}`);
|
|
197
|
+
throw new server_1.TRPCError({
|
|
198
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
199
|
+
message: 'Failed to fetch distance information from Google Maps API.',
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
async getWaypointsDistanceInfo(origin, destination, waypoints) {
|
|
204
|
+
const startTime = Date.now();
|
|
205
|
+
const cacheKey = `distance_waypoints:${this.createCacheKey(origin, destination, waypoints)}`;
|
|
206
|
+
const cacheTTL = 3600;
|
|
207
|
+
try {
|
|
208
|
+
const cachedData = await this.redisService.getCachedObject(cacheKey);
|
|
209
|
+
if (cachedData) {
|
|
210
|
+
const responseTime = Date.now() - startTime;
|
|
211
|
+
await this.logApiUsage('DistanceInfoGoogleWithWayPoints', true, {
|
|
212
|
+
origin,
|
|
213
|
+
destination,
|
|
214
|
+
waypoints,
|
|
215
|
+
}, responseTime);
|
|
216
|
+
return cachedData;
|
|
217
|
+
}
|
|
218
|
+
const lock = await this.acquireDistributedLock(cacheKey);
|
|
219
|
+
try {
|
|
220
|
+
const cachedDataAfterLock = await this.redisService.getCachedObject(cacheKey);
|
|
221
|
+
if (cachedDataAfterLock) {
|
|
222
|
+
const responseTime = Date.now() - startTime;
|
|
223
|
+
await this.logApiUsage('DistanceInfoGoogleWithWayPoints', true, {
|
|
224
|
+
origin,
|
|
225
|
+
destination,
|
|
226
|
+
waypoints,
|
|
227
|
+
}, responseTime);
|
|
228
|
+
return cachedDataAfterLock;
|
|
229
|
+
}
|
|
230
|
+
const result = await this.getWaypointsDistanceInfoFromGoogle(origin, destination, waypoints);
|
|
231
|
+
await this.redisService.cacheObject(cacheKey, result, cacheTTL);
|
|
232
|
+
const responseTime = Date.now() - startTime;
|
|
233
|
+
await this.logApiUsage('DistanceInfoGoogleWithWayPoints', false, {
|
|
234
|
+
origin,
|
|
235
|
+
destination,
|
|
236
|
+
waypoints,
|
|
237
|
+
}, responseTime);
|
|
238
|
+
return result;
|
|
239
|
+
}
|
|
240
|
+
finally {
|
|
241
|
+
if (lock) {
|
|
242
|
+
await this.releaseDistributedLock(lock.lockKey, lock.token);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
catch (error) {
|
|
247
|
+
const responseTime = Date.now() - startTime;
|
|
248
|
+
await this.logApiUsage('DistanceInfoGoogleWithWayPoints', false, {
|
|
249
|
+
origin,
|
|
250
|
+
destination,
|
|
251
|
+
waypoints,
|
|
252
|
+
}, responseTime, error);
|
|
253
|
+
throw new server_1.TRPCError({
|
|
254
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
255
|
+
message: 'Failed to fetch waypoint distance information from Maps API.',
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
async getWaypointsDistanceInfoFromGoogle_DEPRECATED(origin, destination, waypoints) {
|
|
260
|
+
try {
|
|
261
|
+
const waypointsStr = waypoints.map(point => `${point.latitude},${point.longitude}`).join('|');
|
|
262
|
+
const url = `https://maps.googleapis.com/maps/api/directions/json?origin=${origin.latitude},${origin.longitude}&destination=${destination.latitude},${destination.longitude}&waypoints=${waypointsStr}&key=${this._apiKey}&mode=DRIVING`;
|
|
263
|
+
const { data } = await axios_1.default.get(url);
|
|
264
|
+
const routes = data?.routes[0];
|
|
265
|
+
const overviewPolyline = polyline.decode(routes?.overview_polyline?.points);
|
|
266
|
+
const legs = (routes?.legs ?? []).map((leg) => {
|
|
267
|
+
const overviewPolyline = leg?.steps?.flatMap(step => polyline.decode(step?.polyline?.points));
|
|
268
|
+
return {
|
|
269
|
+
distance: leg.distance,
|
|
270
|
+
duration: leg.duration,
|
|
271
|
+
overviewPolyline,
|
|
272
|
+
};
|
|
273
|
+
});
|
|
274
|
+
const totalDistance = legs?.reduce((acc, curr) => acc + curr.distance.value, 0);
|
|
275
|
+
const distance = {
|
|
276
|
+
text: `${(totalDistance / 1000).toFixed(2)} km`,
|
|
277
|
+
value: totalDistance,
|
|
278
|
+
};
|
|
279
|
+
const totalDuration = legs?.reduce((acc, curr) => acc + curr.duration.value, 0);
|
|
280
|
+
const duration = {
|
|
281
|
+
text: `${Math.round(totalDuration / 60)} mins`,
|
|
282
|
+
value: totalDuration,
|
|
283
|
+
};
|
|
284
|
+
if (!distance || !duration) {
|
|
285
|
+
throw new server_1.TRPCError({
|
|
286
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
287
|
+
message: 'No path exists from origin to destination.',
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return { distance, duration, legs, overviewPolyline };
|
|
291
|
+
}
|
|
292
|
+
catch (error) {
|
|
293
|
+
console.error(`Error in getWaypointsDistanceInfo: ${error}`);
|
|
294
|
+
throw new server_1.TRPCError({
|
|
295
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
296
|
+
message: 'Failed to fetch waypoint distance information from Google Maps API.',
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
async getDistanceMatrix(origins, destinations) {
|
|
301
|
+
try {
|
|
302
|
+
const body = {
|
|
303
|
+
origins: origins.map(this.toWaypoint),
|
|
304
|
+
destinations: destinations.map(this.toWaypoint),
|
|
305
|
+
travelMode: 'DRIVE',
|
|
306
|
+
routingPreference: 'TRAFFIC_AWARE',
|
|
307
|
+
};
|
|
308
|
+
const fieldMask = 'originIndex,destinationIndex,duration,distanceMeters,condition';
|
|
309
|
+
const response = await axios_1.default.post(this._routeMatrixURL, body, {
|
|
310
|
+
headers: {
|
|
311
|
+
'Content-Type': 'application/json',
|
|
312
|
+
'X-Goog-Api-Key': this._apiKey,
|
|
313
|
+
'X-Goog-FieldMask': fieldMask,
|
|
314
|
+
},
|
|
315
|
+
});
|
|
316
|
+
const results = response.data.map((item) => {
|
|
317
|
+
const distance = this.toDistanceDTO(item.distanceMeters ?? 0);
|
|
318
|
+
const duration = this.toDurationDTO(item.duration ?? '0s');
|
|
319
|
+
return {
|
|
320
|
+
distance,
|
|
321
|
+
duration,
|
|
322
|
+
condition: item.condition,
|
|
323
|
+
originIndex: item.originIndex,
|
|
324
|
+
destinationIndex: item.destinationIndex,
|
|
325
|
+
};
|
|
326
|
+
});
|
|
327
|
+
return results;
|
|
328
|
+
}
|
|
329
|
+
catch (error) {
|
|
330
|
+
console.error(`Error in getDistanceMatrix: ${error}`);
|
|
331
|
+
}
|
|
332
|
+
return [];
|
|
333
|
+
}
|
|
334
|
+
async getDistanceInfoFromGoogle(origin, destination) {
|
|
335
|
+
try {
|
|
336
|
+
const body = {
|
|
337
|
+
origin: this.toLocation(origin),
|
|
338
|
+
destination: this.toLocation(destination),
|
|
339
|
+
travelMode: 'DRIVE',
|
|
340
|
+
routingPreference: 'TRAFFIC_AWARE',
|
|
341
|
+
computeAlternativeRoutes: false,
|
|
342
|
+
routeModifiers: {
|
|
343
|
+
avoidTolls: false,
|
|
344
|
+
avoidHighways: false,
|
|
345
|
+
avoidFerries: false,
|
|
346
|
+
},
|
|
347
|
+
languageCode: 'en-US',
|
|
348
|
+
units: 'METRIC',
|
|
349
|
+
};
|
|
350
|
+
const fieldMask = 'routes.duration,routes.distanceMeters';
|
|
351
|
+
const response = await axios_1.default.post(this._routeURL, body, {
|
|
352
|
+
headers: {
|
|
353
|
+
'Content-Type': 'application/json',
|
|
354
|
+
'X-Goog-Api-Key': this._apiKey,
|
|
355
|
+
'X-Goog-FieldMask': fieldMask,
|
|
356
|
+
},
|
|
357
|
+
});
|
|
358
|
+
const route = response.data.routes[0];
|
|
359
|
+
const distance = this.toDistanceDTO(route.distanceMeters);
|
|
360
|
+
const duration = this.toDurationDTO(route.duration);
|
|
361
|
+
return { distance, duration };
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
console.error(`Error in getDistanceInfo V2: ${error}`);
|
|
365
|
+
throw new server_1.TRPCError({
|
|
366
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
367
|
+
message: 'Failed to fetch distance information from Google Maps API.',
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
async getWaypointsDistanceInfoFromGoogle(origin, destination, waypoints) {
|
|
372
|
+
try {
|
|
373
|
+
const body = {
|
|
374
|
+
origin: this.toLocation(origin),
|
|
375
|
+
destination: this.toLocation(destination),
|
|
376
|
+
intermediates: waypoints.map(this.toLocation),
|
|
377
|
+
travelMode: 'DRIVE',
|
|
378
|
+
routingPreference: 'TRAFFIC_AWARE',
|
|
379
|
+
computeAlternativeRoutes: false,
|
|
380
|
+
routeModifiers: {
|
|
381
|
+
avoidTolls: false,
|
|
382
|
+
avoidHighways: false,
|
|
383
|
+
avoidFerries: false,
|
|
384
|
+
},
|
|
385
|
+
languageCode: 'en-US',
|
|
386
|
+
units: 'METRIC',
|
|
387
|
+
};
|
|
388
|
+
const fieldMask = 'routes';
|
|
389
|
+
const response = await axios_1.default.post(this._routeURL, body, {
|
|
390
|
+
headers: {
|
|
391
|
+
'Content-Type': 'application/json',
|
|
392
|
+
'X-Goog-Api-Key': this._apiKey,
|
|
393
|
+
'X-Goog-FieldMask': fieldMask,
|
|
394
|
+
},
|
|
395
|
+
});
|
|
396
|
+
const route = response.data.routes[0];
|
|
397
|
+
const distance = this.toDistanceDTO(route.distanceMeters);
|
|
398
|
+
const duration = this.toDurationDTO(route.duration);
|
|
399
|
+
const overviewPolyline = polyline.decode(route.polyline.encodedPolyline);
|
|
400
|
+
const legs = (route?.legs ?? []).map((leg) => {
|
|
401
|
+
const overviewPolyline = polyline.decode(leg.polyline.encodedPolyline);
|
|
402
|
+
const legDistance = this.toDistanceDTO(leg.distanceMeters);
|
|
403
|
+
const legDuration = this.toDurationDTO(leg.duration);
|
|
404
|
+
return {
|
|
405
|
+
distance: legDistance,
|
|
406
|
+
duration: legDuration,
|
|
407
|
+
overviewPolyline,
|
|
408
|
+
};
|
|
409
|
+
});
|
|
410
|
+
return { distance, duration, overviewPolyline, legs };
|
|
411
|
+
}
|
|
412
|
+
catch (error) {
|
|
413
|
+
console.error(`Error in getWaypointDistanceInfo V2: ${error}`);
|
|
414
|
+
throw new server_1.TRPCError({
|
|
415
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
416
|
+
message: 'Failed to fetch waypoint distance information from Google Maps API.',
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
toLocation(coord) {
|
|
421
|
+
return { location: { latLng: { latitude: coord.latitude, longitude: coord.longitude } } };
|
|
422
|
+
}
|
|
423
|
+
toWaypoint(coord) {
|
|
424
|
+
return { waypoint: { location: { latLng: { latitude: coord.latitude, longitude: coord.longitude } } } };
|
|
425
|
+
}
|
|
426
|
+
toDurationDTO(duration) {
|
|
427
|
+
const durationSeconds = parseInt(duration.replace('s', ''));
|
|
428
|
+
const hours = Math.floor(durationSeconds / 3600);
|
|
429
|
+
const minutes = Math.ceil((durationSeconds % 3600) / 60);
|
|
430
|
+
const durationText = durationSeconds
|
|
431
|
+
? durationSeconds < 60
|
|
432
|
+
? `1 min`
|
|
433
|
+
: durationSeconds < 3600
|
|
434
|
+
? minutes === 1
|
|
435
|
+
? '1 min'
|
|
436
|
+
: `${minutes} mins`
|
|
437
|
+
: hours === 1
|
|
438
|
+
? minutes === 0
|
|
439
|
+
? '1 hour'
|
|
440
|
+
: minutes === 1
|
|
441
|
+
? '1 hour 1 min'
|
|
442
|
+
: `1 hour ${minutes} mins`
|
|
443
|
+
: minutes === 0
|
|
444
|
+
? `${hours} hours`
|
|
445
|
+
: minutes === 1
|
|
446
|
+
? `${hours} hours 1 min`
|
|
447
|
+
: `${hours} hours ${minutes} mins`
|
|
448
|
+
: '1 min';
|
|
449
|
+
return { value: durationSeconds, text: durationText };
|
|
450
|
+
}
|
|
451
|
+
toDistanceDTO(distanceMeters) {
|
|
452
|
+
const distanceValue = distanceMeters ?? 0;
|
|
453
|
+
const distanceText = `${(distanceValue / 1000).toFixed(1)} km`;
|
|
454
|
+
return { value: distanceValue, text: distanceText };
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
exports.GoogleMapsService = GoogleMapsService;
|
|
458
|
+
exports.GoogleMapsService = GoogleMapsService = __decorate([
|
|
459
|
+
__param(0, (0, typedi_1.Inject)(() => redis_1.RedisService)),
|
|
460
|
+
__metadata("design:paramtypes", [redis_1.RedisService, String])
|
|
461
|
+
], GoogleMapsService);
|
|
462
|
+
//# sourceMappingURL=google-maps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-maps.js","sourceRoot":"/","sources":["libraries/map/providers/google-maps.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAW1B,2DAA6C;AAC7C,yCAAyC;AACzC,uCAA2C;AAC3C,mCAAiD;AACjD,mCAAgC;AAChC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C,GAAG,KAAK,UAAU,OAAO,OAAO;YACvC,CAAC,CAAC,OAAO,CAAC;QAEX,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IACvD,CAAC;IAOO,aAAa,CAAC,cAAsB;QAC3C,MAAM,aAAa,GAAG,cAAc,IAAI,CAAC,CAAC;QAC1C,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;QAE/D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IACrD,CAAC;CACD,CAAA;AArjBY,8CAAiB;4BAAjB,iBAAiB;IAO3B,WAAA,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,oBAAY,CAAC,CAAA;qCAAuB,oBAAY;GAPnD,iBAAiB,CAqjB7B","sourcesContent":["import axios from 'axios';\nimport {\n\tIMapService,\n\tICoordinate,\n\tIDistance,\n\tIDuration,\n\tILeg,\n\tIDistanceInfo,\n\tIWaypointDistanceInfo,\n\tIRouteMatrixDTO,\n} from '../interfaces/IMapService';\nimport * as polyline from '@mapbox/polyline';\nimport { TRPCError } from '@trpc/server';\nimport { RedisService } from '../../redis';\nimport { createHash, randomBytes } from 'crypto';\nimport { Inject } from 'typedi';\nimport { GoogleMapsUsageModel } from '../../mongo/models';\n\ninterface RouteMatrixItem {\n\toriginIndex: number;\n\tdestinationIndex: number;\n\tdistanceMeters?: number;\n\tduration?: string;\n\tcondition: string;\n}\n\nexport class GoogleMapsService implements IMapService {\n\tprivate _apiKey: string | undefined;\n\tprivate logModel: typeof GoogleMapsUsageModel;\n\tprivate _routeURL: string = 'https://routes.googleapis.com/directions/v2:computeRoutes';\n\tprivate _routeMatrixURL: string = 'https://routes.googleapis.com/distanceMatrix/v2:computeRouteMatrix';\n\n\tconstructor(\n\t\t@Inject(() => RedisService) private redisService: RedisService,\n\t\tapiKey: string\n\t) {\n\t\tthis._apiKey = apiKey;\n\t\tthis.logModel = GoogleMapsUsageModel as typeof GoogleMapsUsageModel;\n\t}\n\n\tprivate createCacheKey(origin: ICoordinate, destination: ICoordinate, waypoints: ICoordinate[] = []) {\n\t\tconst originKey = `${origin.latitude},${origin.longitude}`;\n\t\tconst destinationKey = `${destination.latitude},${destination.longitude}`;\n\n\t\tlet keyData = { origin: originKey, destination: destinationKey, waypoints: [] as string[] };\n\n\t\tif (waypoints && waypoints.length > 0) {\n\t\t\tkeyData.waypoints = waypoints.map(point => `${point.latitude},${point.longitude}`).sort();\n\t\t}\n\n\t\treturn createHash('md5').update(JSON.stringify(keyData)).digest('hex');\n\t}\n\n\tprivate async acquireDistributedLock(key: string, ttl = 10) {\n\t\tconst token = randomBytes(16).toString('hex');\n\t\tconst lockKey = `lock:${key}`;\n\n\t\tconst result = await this.redisService.redisClient.set(lockKey, token, 'EX', ttl, 'NX');\n\t\treturn result ? { token, lockKey } : null;\n\t}\n\n\tprivate async releaseDistributedLock(lockKey: string, token: string) {\n\t\tconst lua = `\n if redis.call(\"get\", KEYS[1]) == ARGV[1] then\n return redis.call(\"del\", KEYS[1])\n else\n return 0\n end\n `;\n\t\treturn this.redisService.redisClient.eval(lua, 1, lockKey, token);\n\t}\n\n\tprivate async logApiUsage(\n\t\tendpoint: string,\n\t\tcacheHit = false,\n\t\tmetadata: {\n\t\t\torigin?: ICoordinate;\n\t\t\tdestination?: ICoordinate;\n\t\t\twaypoints?: ICoordinate[];\n\t\t\tipAddress?: string;\n\t\t\tuserAgent?: string;\n\t\t} = {},\n\t\tresponseTime: number,\n\t\terror?: Error\n\t) {\n\t\ttry {\n\t\t\tawait this.logModel.create({\n\t\t\t\tendpoint,\n\t\t\t\tcacheHit,\n\t\t\t\terror: error ? error.message : null,\n\t\t\t\tresponseTime: responseTime,\n\t\t\t\tmetadata: {\n\t\t\t\t\torigin: metadata.origin || null,\n\t\t\t\t\tdestination: metadata.destination || null,\n\t\t\t\t\twaypoints: metadata.waypoints || null,\n\t\t\t\t\tipAddress: metadata.ipAddress || null,\n\t\t\t\t\tuserAgent: metadata.userAgent || null,\n\t\t\t\t},\n\t\t\t});\n\t\t} catch (logError) {\n\t\t\tconsole.error('Failed to log API usage:', logError);\n\t\t}\n\t}\n\n\tprivate clearRouteCache = async (origin: ICoordinate, destination: ICoordinate, waypoints = []) => {\n\t\tconst cacheKey = waypoints\n\t\t\t? `distance_waypoints:${this.createCacheKey(origin, destination, waypoints)}`\n\t\t\t: `distance:${this.createCacheKey(origin, destination)}`;\n\n\t\treturn await this.redisService.deleteCachedObject(cacheKey);\n\t};\n\n\tprivate getCacheStats = async () => {\n\t\tconst keys = await this.redisService.redisClient.keys('distance*');\n\t\treturn {\n\t\t\ttotalCachedRoutes: keys.length,\n\t\t\tcacheKeys: keys,\n\t\t};\n\t};\n\n\tpublic async getDistanceInfo(origin: ICoordinate, destination: ICoordinate): Promise<IDistanceInfo> {\n\t\tconst startTime = Date.now();\n\t\tconst cacheKey = `distance:${this.createCacheKey(origin, destination)}`;\n\t\tconst cacheTTL = 3600;\n\n\t\ttry {\n\t\t\tconst cachedData: IDistanceInfo | undefined = await this.redisService.getCachedObject(cacheKey);\n\t\t\tif (cachedData) {\n\t\t\t\tconst responseTime = Date.now() - startTime;\n\t\t\t\tawait this.logApiUsage(\n\t\t\t\t\t'DistanceInfoGoogle',\n\t\t\t\t\ttrue,\n\t\t\t\t\t{\n\t\t\t\t\t\torigin,\n\t\t\t\t\t\tdestination,\n\t\t\t\t\t},\n\t\t\t\t\tresponseTime\n\t\t\t\t);\n\t\t\t\treturn cachedData;\n\t\t\t}\n\n\t\t\tconst lock = await this.acquireDistributedLock(cacheKey);\n\n\t\t\ttry {\n\t\t\t\tconst cachedDataAfterLock: IDistanceInfo | undefined =\n\t\t\t\t\tawait this.redisService.getCachedObject(cacheKey);\n\t\t\t\tif (cachedDataAfterLock) {\n\t\t\t\t\tconst responseTime = Date.now() - startTime;\n\t\t\t\t\tawait this.logApiUsage(\n\t\t\t\t\t\t'DistanceInfoGoogle',\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\torigin,\n\t\t\t\t\t\t\tdestination,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tresponseTime\n\t\t\t\t\t);\n\t\t\t\t\treturn cachedDataAfterLock;\n\t\t\t\t}\n\n\t\t\t\tconst result = await this.getDistanceInfoFromGoogle(origin, destination);\n\n\t\t\t\tawait this.redisService.cacheObject(cacheKey, result, cacheTTL);\n\n\t\t\t\tconst responseTime = Date.now() - startTime;\n\t\t\t\tawait this.logApiUsage(\n\t\t\t\t\t'DistanceInfoGoogle',\n\t\t\t\t\tfalse,\n\t\t\t\t\t{\n\t\t\t\t\t\torigin,\n\t\t\t\t\t\tdestination,\n\t\t\t\t\t},\n\t\t\t\t\tresponseTime\n\t\t\t\t);\n\n\t\t\t\treturn result;\n\t\t\t} finally {\n\t\t\t\tif (lock) {\n\t\t\t\t\tawait this.releaseDistributedLock(lock.lockKey, lock.token);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error: any) {\n\t\t\tconst responseTime = Date.now() - startTime;\n\t\t\tawait this.logApiUsage(\n\t\t\t\t'DistanceInfoGoogle',\n\t\t\t\tfalse,\n\t\t\t\t{\n\t\t\t\t\torigin,\n\t\t\t\t\tdestination,\n\t\t\t\t},\n\t\t\t\tresponseTime,\n\t\t\t\terror\n\t\t\t);\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\tmessage: 'Failed to fetch distance information from Maps API.',\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate async getDistanceInfoFromGoogle_DEPRECATED(\n\t\torigin: ICoordinate,\n\t\tdestination: ICoordinate\n\t): Promise<IDistanceInfo> {\n\t\ttry {\n\t\t\tconst url = `https://maps.googleapis.com/maps/api/directions/json?origin=${origin.latitude}, ${origin.longitude}&destination=${destination.latitude}, ${destination.longitude}&key=${this._apiKey}&mode=DRIVING`;\n\n\t\t\tconst { data } = await axios.get(url);\n\n\t\t\tconst legs = data?.routes[0]?.legs[0];\n\n\t\t\tconst distance = legs?.distance;\n\t\t\tconst duration = legs?.duration;\n\n\t\t\tif (!distance || !duration) {\n\t\t\t\tthrow new TRPCError({\n\t\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\t\tmessage: 'No path exists from origin to destination.',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn { distance, duration };\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error in getDistanceInfo: ${error}`);\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\tmessage: 'Failed to fetch distance information from Google Maps API.',\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic async getWaypointsDistanceInfo(\n\t\torigin: ICoordinate,\n\t\tdestination: ICoordinate,\n\t\twaypoints: Array<ICoordinate>\n\t): Promise<IWaypointDistanceInfo> {\n\t\tconst startTime = Date.now();\n\t\tconst cacheKey = `distance_waypoints:${this.createCacheKey(origin, destination, waypoints)}`;\n\t\tconst cacheTTL = 3600;\n\t\ttry {\n\t\t\tconst cachedData: IWaypointDistanceInfo | undefined = await this.redisService.getCachedObject(cacheKey);\n\t\t\tif (cachedData) {\n\t\t\t\tconst responseTime = Date.now() - startTime;\n\t\t\t\tawait this.logApiUsage(\n\t\t\t\t\t'DistanceInfoGoogleWithWayPoints',\n\t\t\t\t\ttrue,\n\t\t\t\t\t{\n\t\t\t\t\t\torigin,\n\t\t\t\t\t\tdestination,\n\t\t\t\t\t\twaypoints,\n\t\t\t\t\t},\n\t\t\t\t\tresponseTime\n\t\t\t\t);\n\t\t\t\treturn cachedData;\n\t\t\t}\n\n\t\t\tconst lock = await this.acquireDistributedLock(cacheKey);\n\n\t\t\ttry {\n\t\t\t\tconst cachedDataAfterLock: IWaypointDistanceInfo | undefined =\n\t\t\t\t\tawait this.redisService.getCachedObject(cacheKey);\n\t\t\t\tif (cachedDataAfterLock) {\n\t\t\t\t\tconst responseTime = Date.now() - startTime;\n\t\t\t\t\tawait this.logApiUsage(\n\t\t\t\t\t\t'DistanceInfoGoogleWithWayPoints',\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\torigin,\n\t\t\t\t\t\t\tdestination,\n\t\t\t\t\t\t\twaypoints,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tresponseTime\n\t\t\t\t\t);\n\t\t\t\t\treturn cachedDataAfterLock;\n\t\t\t\t}\n\n\t\t\t\tconst result = await this.getWaypointsDistanceInfoFromGoogle(origin, destination, waypoints);\n\n\t\t\t\tawait this.redisService.cacheObject(cacheKey, result, cacheTTL);\n\n\t\t\t\tconst responseTime = Date.now() - startTime;\n\t\t\t\tawait this.logApiUsage(\n\t\t\t\t\t'DistanceInfoGoogleWithWayPoints',\n\t\t\t\t\tfalse,\n\t\t\t\t\t{\n\t\t\t\t\t\torigin,\n\t\t\t\t\t\tdestination,\n\t\t\t\t\t\twaypoints,\n\t\t\t\t\t},\n\t\t\t\t\tresponseTime\n\t\t\t\t);\n\n\t\t\t\treturn result;\n\t\t\t} finally {\n\t\t\t\tif (lock) {\n\t\t\t\t\tawait this.releaseDistributedLock(lock.lockKey, lock.token);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error: any) {\n\t\t\tconst responseTime = Date.now() - startTime;\n\t\t\tawait this.logApiUsage(\n\t\t\t\t'DistanceInfoGoogleWithWayPoints',\n\t\t\t\tfalse,\n\t\t\t\t{\n\t\t\t\t\torigin,\n\t\t\t\t\tdestination,\n\t\t\t\t\twaypoints,\n\t\t\t\t},\n\t\t\t\tresponseTime,\n\t\t\t\terror\n\t\t\t);\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\tmessage: 'Failed to fetch waypoint distance information from Maps API.',\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate async getWaypointsDistanceInfoFromGoogle_DEPRECATED(\n\t\torigin: ICoordinate,\n\t\tdestination: ICoordinate,\n\t\twaypoints: Array<ICoordinate>\n\t): Promise<IWaypointDistanceInfo> {\n\t\ttry {\n\t\t\tconst waypointsStr = waypoints.map(point => `${point.latitude},${point.longitude}`).join('|');\n\n\t\t\tconst url = `https://maps.googleapis.com/maps/api/directions/json?origin=${origin.latitude},${origin.longitude}&destination=${destination.latitude},${destination.longitude}&waypoints=${waypointsStr}&key=${this._apiKey}&mode=DRIVING`;\n\n\t\t\tconst { data } = await axios.get(url);\n\n\t\t\tconst routes = data?.routes[0];\n\n\t\t\tconst overviewPolyline = polyline.decode(routes?.overview_polyline?.points);\n\n\t\t\tconst legs = (routes?.legs ?? []).map((leg: { steps: any[]; distance: any; duration: any }) => {\n\t\t\t\tconst overviewPolyline = leg?.steps?.flatMap(step => polyline.decode(step?.polyline?.points));\n\n\t\t\t\treturn {\n\t\t\t\t\tdistance: leg.distance,\n\t\t\t\t\tduration: leg.duration,\n\t\t\t\t\toverviewPolyline,\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tconst totalDistance = legs?.reduce(\n\t\t\t\t(acc: any, curr: { distance: { value: any } }) => acc + curr.distance.value,\n\t\t\t\t0\n\t\t\t);\n\t\t\tconst distance = {\n\t\t\t\ttext: `${(totalDistance / 1000).toFixed(2)} km`,\n\t\t\t\tvalue: totalDistance,\n\t\t\t};\n\n\t\t\tconst totalDuration = legs?.reduce(\n\t\t\t\t(acc: any, curr: { duration: { value: any } }) => acc + curr.duration.value,\n\t\t\t\t0\n\t\t\t);\n\t\t\tconst duration = {\n\t\t\t\ttext: `${Math.round(totalDuration / 60)} mins`,\n\t\t\t\tvalue: totalDuration,\n\t\t\t};\n\n\t\t\tif (!distance || !duration) {\n\t\t\t\tthrow new TRPCError({\n\t\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\t\tmessage: 'No path exists from origin to destination.',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn { distance, duration, legs, overviewPolyline };\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error in getWaypointsDistanceInfo: ${error}`);\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\tmessage: 'Failed to fetch waypoint distance information from Google Maps API.',\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic async getDistanceMatrix(\n\t\torigins: Array<ICoordinate>,\n\t\tdestinations: Array<ICoordinate>\n\t): Promise<IRouteMatrixDTO[]> {\n\t\ttry {\n\t\t\tconst body = {\n\t\t\t\torigins: origins.map(this.toWaypoint),\n\t\t\t\tdestinations: destinations.map(this.toWaypoint),\n\t\t\t\ttravelMode: 'DRIVE',\n\t\t\t\troutingPreference: 'TRAFFIC_AWARE',\n\t\t\t};\n\n\t\t\tconst fieldMask = 'originIndex,destinationIndex,duration,distanceMeters,condition';\n\n\t\t\tconst response = await axios.post(this._routeMatrixURL, body, {\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t'X-Goog-Api-Key': this._apiKey,\n\t\t\t\t\t'X-Goog-FieldMask': fieldMask,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\t// The API returns an array of route elements\n\t\t\tconst results: IRouteMatrixDTO[] = response.data.map((item: RouteMatrixItem) => {\n\t\t\t\tconst distance = this.toDistanceDTO(item.distanceMeters ?? 0);\n\t\t\t\tconst duration = this.toDurationDTO(item.duration ?? '0s');\n\n\t\t\t\treturn {\n\t\t\t\t\tdistance,\n\t\t\t\t\tduration,\n\t\t\t\t\tcondition: item.condition,\n\t\t\t\t\toriginIndex: item.originIndex,\n\t\t\t\t\tdestinationIndex: item.destinationIndex,\n\t\t\t\t};\n\t\t\t});\n\n\t\t\treturn results;\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error in getDistanceMatrix: ${error}`);\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tprivate async getDistanceInfoFromGoogle(origin: ICoordinate, destination: ICoordinate): Promise<IDistanceInfo> {\n\t\ttry {\n\t\t\tconst body = {\n\t\t\t\torigin: this.toLocation(origin),\n\t\t\t\tdestination: this.toLocation(destination),\n\t\t\t\ttravelMode: 'DRIVE',\n\t\t\t\troutingPreference: 'TRAFFIC_AWARE',\n\t\t\t\tcomputeAlternativeRoutes: false,\n\t\t\t\trouteModifiers: {\n\t\t\t\t\tavoidTolls: false,\n\t\t\t\t\tavoidHighways: false,\n\t\t\t\t\tavoidFerries: false,\n\t\t\t\t},\n\t\t\t\tlanguageCode: 'en-US',\n\t\t\t\tunits: 'METRIC',\n\t\t\t};\n\n\t\t\tconst fieldMask = 'routes.duration,routes.distanceMeters';\n\n\t\t\tconst response = await axios.post(this._routeURL, body, {\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t'X-Goog-Api-Key': this._apiKey,\n\t\t\t\t\t'X-Goog-FieldMask': fieldMask,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tconst route = response.data.routes[0];\n\n\t\t\tconst distance = this.toDistanceDTO(route.distanceMeters);\n\t\t\tconst duration = this.toDurationDTO(route.duration);\n\n\t\t\treturn { distance, duration };\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error in getDistanceInfo V2: ${error}`);\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\tmessage: 'Failed to fetch distance information from Google Maps API.',\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate async getWaypointsDistanceInfoFromGoogle(\n\t\torigin: ICoordinate,\n\t\tdestination: ICoordinate,\n\t\twaypoints: Array<ICoordinate>\n\t): Promise<IWaypointDistanceInfo> {\n\t\ttry {\n\t\t\tconst body = {\n\t\t\t\torigin: this.toLocation(origin),\n\t\t\t\tdestination: this.toLocation(destination),\n\t\t\t\tintermediates: waypoints.map(this.toLocation),\n\t\t\t\ttravelMode: 'DRIVE',\n\t\t\t\troutingPreference: 'TRAFFIC_AWARE',\n\t\t\t\tcomputeAlternativeRoutes: false,\n\t\t\t\trouteModifiers: {\n\t\t\t\t\tavoidTolls: false,\n\t\t\t\t\tavoidHighways: false,\n\t\t\t\t\tavoidFerries: false,\n\t\t\t\t},\n\t\t\t\tlanguageCode: 'en-US',\n\t\t\t\tunits: 'METRIC',\n\t\t\t};\n\n\t\t\tconst fieldMask = 'routes';\n\n\t\t\tconst response = await axios.post(this._routeURL, body, {\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t'X-Goog-Api-Key': this._apiKey,\n\t\t\t\t\t'X-Goog-FieldMask': fieldMask,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tconst route = response.data.routes[0];\n\n\t\t\tconst distance = this.toDistanceDTO(route.distanceMeters);\n\t\t\tconst duration = this.toDurationDTO(route.duration);\n\t\t\tconst overviewPolyline = polyline.decode(route.polyline.encodedPolyline);\n\n\t\t\tconst legs = (route?.legs ?? []).map(\n\t\t\t\t(leg: { polyline: { encodedPolyline: string }; distanceMeters: number; duration: string }) => {\n\t\t\t\t\tconst overviewPolyline = polyline.decode(leg.polyline.encodedPolyline);\n\n\t\t\t\t\tconst legDistance = this.toDistanceDTO(leg.distanceMeters);\n\t\t\t\t\tconst legDuration = this.toDurationDTO(leg.duration);\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdistance: legDistance,\n\t\t\t\t\t\tduration: legDuration,\n\t\t\t\t\t\toverviewPolyline,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t);\n\n\t\t\treturn { distance, duration, overviewPolyline, legs };\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error in getWaypointDistanceInfo V2: ${error}`);\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\tmessage: 'Failed to fetch waypoint distance information from Google Maps API.',\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Converts an ICoordinate to a location object for Google Maps API\n\t * @param coord - ICoordinate object\n\t * @returns Location object for Google Maps API\n\t */\n\tprivate toLocation(coord: ICoordinate) {\n\t\treturn { location: { latLng: { latitude: coord.latitude, longitude: coord.longitude } } };\n\t}\n\n\t/**\n\t * Converts an ICoordinate to a waypoint object for Google Maps API\n\t * @param coord - ICoordinate object\n\t * @returns Waypoint object for Google Maps API\n\t */\n\tprivate toWaypoint(coord: ICoordinate) {\n\t\treturn { waypoint: { location: { latLng: { latitude: coord.latitude, longitude: coord.longitude } } } };\n\t}\n\n\t/**\n\t * Converts a duration string from Google Maps API to an IDuration object\n\t * @param duration in format \"Xs\" where X is number of seconds\n\t * @returns IDuration object\n\t */\n\tprivate toDurationDTO(duration: string): IDuration {\n\t\tconst durationSeconds = parseInt(duration.replace('s', ''));\n\n\t\tconst hours = Math.floor(durationSeconds / 3600);\n\t\tconst minutes = Math.ceil((durationSeconds % 3600) / 60);\n\n\t\tconst durationText = durationSeconds\n\t\t\t? durationSeconds < 60\n\t\t\t\t? `1 min`\n\t\t\t\t: durationSeconds < 3600\n\t\t\t\t\t? minutes === 1\n\t\t\t\t\t\t? '1 min'\n\t\t\t\t\t\t: `${minutes} mins`\n\t\t\t\t\t: hours === 1\n\t\t\t\t\t\t? minutes === 0\n\t\t\t\t\t\t\t? '1 hour'\n\t\t\t\t\t\t\t: minutes === 1\n\t\t\t\t\t\t\t\t? '1 hour 1 min'\n\t\t\t\t\t\t\t\t: `1 hour ${minutes} mins`\n\t\t\t\t\t\t: minutes === 0\n\t\t\t\t\t\t\t? `${hours} hours`\n\t\t\t\t\t\t\t: minutes === 1\n\t\t\t\t\t\t\t\t? `${hours} hours 1 min`\n\t\t\t\t\t\t\t\t: `${hours} hours ${minutes} mins`\n\t\t\t: '1 min';\n\n\t\treturn { value: durationSeconds, text: durationText };\n\t}\n\n\t/**\n\t * Converts a distance in meters from Google Maps API to an IDistance object\n\t * @param distanceMeters distance in meters\n\t * @returns IDistance object\n\t */\n\tprivate toDistanceDTO(distanceMeters: number): IDistance {\n\t\tconst distanceValue = distanceMeters ?? 0;\n\t\tconst distanceText = `${(distanceValue / 1000).toFixed(1)} km`;\n\n\t\treturn { value: distanceValue, text: distanceText };\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './google-maps';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./google-maps"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/map/providers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B","sourcesContent":["export * from './google-maps';\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ICoordinate, IDistanceInfo, IMapService, IRouteMatrixDTO, IWaypointDistanceInfo } from '../interfaces/IMapService';
|
|
2
|
+
export declare class OsrmMapService implements IMapService {
|
|
3
|
+
private zoneModel;
|
|
4
|
+
private zoneExtraTimeModel;
|
|
5
|
+
private readonly DEFAULT_EXTRA_TIME;
|
|
6
|
+
private readonly _url;
|
|
7
|
+
constructor();
|
|
8
|
+
getDistanceInfo(origin: ICoordinate, destination: ICoordinate): Promise<IDistanceInfo>;
|
|
9
|
+
getDistanceMatrix(origins: ICoordinate[], destinations: ICoordinate[]): Promise<IRouteMatrixDTO[]>;
|
|
10
|
+
getWaypointsDistanceInfo(origin: ICoordinate, destination: ICoordinate, waypoints: ICoordinate[]): Promise<IWaypointDistanceInfo>;
|
|
11
|
+
private getExtraTimeForZones;
|
|
12
|
+
private findZonesByPoints;
|
|
13
|
+
}
|