addio-admin-sdk 1.6.5
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/.babelrc +17 -0
- package/.env.dev +15 -0
- package/.github/workflows/publish_coverage.yaml +69 -0
- package/addio-sdk-doc.md +1380 -0
- package/changelog.md +353 -0
- package/dist/Interfaces/Address/index.d.ts +21 -0
- package/dist/Interfaces/Address/index.js +17 -0
- package/dist/Interfaces/Address/index.js.map +1 -0
- package/dist/Interfaces/Algolia/index.d.ts +145 -0
- package/dist/Interfaces/Algolia/index.js +3 -0
- package/dist/Interfaces/Algolia/index.js.map +1 -0
- package/dist/Interfaces/Attachement/index.d.ts +5 -0
- package/dist/Interfaces/Attachement/index.js +3 -0
- package/dist/Interfaces/Attachement/index.js.map +1 -0
- package/dist/Interfaces/Attribute/index.d.ts +47 -0
- package/dist/Interfaces/Attribute/index.js +11 -0
- package/dist/Interfaces/Attribute/index.js.map +1 -0
- package/dist/Interfaces/BGJob/index.d.ts +56 -0
- package/dist/Interfaces/BGJob/index.js +37 -0
- package/dist/Interfaces/BGJob/index.js.map +1 -0
- package/dist/Interfaces/BaseClass/index.d.ts +8 -0
- package/dist/Interfaces/BaseClass/index.js +3 -0
- package/dist/Interfaces/BaseClass/index.js.map +1 -0
- package/dist/Interfaces/Blog/IBlogArticle.d.ts +18 -0
- package/dist/Interfaces/Blog/IBlogArticle.js +3 -0
- package/dist/Interfaces/Blog/IBlogArticle.js.map +1 -0
- package/dist/Interfaces/Blog/IBlogAuthor.d.ts +7 -0
- package/dist/Interfaces/Blog/IBlogAuthor.js +3 -0
- package/dist/Interfaces/Blog/IBlogAuthor.js.map +1 -0
- package/dist/Interfaces/Blog/IBlogCategory.d.ts +9 -0
- package/dist/Interfaces/Blog/IBlogCategory.js +3 -0
- package/dist/Interfaces/Blog/IBlogCategory.js.map +1 -0
- package/dist/Interfaces/Blog/IBlogComment.d.ts +13 -0
- package/dist/Interfaces/Blog/IBlogComment.js +3 -0
- package/dist/Interfaces/Blog/IBlogComment.js.map +1 -0
- package/dist/Interfaces/Blog/IBlogKeywords.d.ts +9 -0
- package/dist/Interfaces/Blog/IBlogKeywords.js +3 -0
- package/dist/Interfaces/Blog/IBlogKeywords.js.map +1 -0
- package/dist/Interfaces/Booking/index.d.ts +68 -0
- package/dist/Interfaces/Booking/index.js +18 -0
- package/dist/Interfaces/Booking/index.js.map +1 -0
- package/dist/Interfaces/Brand/index.d.ts +13 -0
- package/dist/Interfaces/Brand/index.js +3 -0
- package/dist/Interfaces/Brand/index.js.map +1 -0
- package/dist/Interfaces/CMS/Creator/index.d.ts +12 -0
- package/dist/Interfaces/CMS/Creator/index.js +3 -0
- package/dist/Interfaces/CMS/Creator/index.js.map +1 -0
- package/dist/Interfaces/CMS/Reader/index.d.ts +47 -0
- package/dist/Interfaces/CMS/Reader/index.js +3 -0
- package/dist/Interfaces/CMS/Reader/index.js.map +1 -0
- package/dist/Interfaces/CMS/index.d.ts +25 -0
- package/dist/Interfaces/CMS/index.js +3 -0
- package/dist/Interfaces/CMS/index.js.map +1 -0
- package/dist/Interfaces/Cart/IPandaPayload.d.ts +64 -0
- package/dist/Interfaces/Cart/IPandaPayload.js +19 -0
- package/dist/Interfaces/Cart/IPandaPayload.js.map +1 -0
- package/dist/Interfaces/Cart/IPaymentCard.d.ts +22 -0
- package/dist/Interfaces/Cart/IPaymentCard.js +45 -0
- package/dist/Interfaces/Cart/IPaymentCard.js.map +1 -0
- package/dist/Interfaces/Cart/IPaypalPayload.d.ts +9 -0
- package/dist/Interfaces/Cart/IPaypalPayload.js +3 -0
- package/dist/Interfaces/Cart/IPaypalPayload.js.map +1 -0
- package/dist/Interfaces/Cart/IPaysafePayload.d.ts +72 -0
- package/dist/Interfaces/Cart/IPaysafePayload.js +3 -0
- package/dist/Interfaces/Cart/IPaysafePayload.js.map +1 -0
- package/dist/Interfaces/Cart/IStripePayload.d.ts +66 -0
- package/dist/Interfaces/Cart/IStripePayload.js +3 -0
- package/dist/Interfaces/Cart/IStripePayload.js.map +1 -0
- package/dist/Interfaces/Cart/index.d.ts +395 -0
- package/dist/Interfaces/Cart/index.js +182 -0
- package/dist/Interfaces/Cart/index.js.map +1 -0
- package/dist/Interfaces/Catalogue/index.d.ts +68 -0
- package/dist/Interfaces/Catalogue/index.js +38 -0
- package/dist/Interfaces/Catalogue/index.js.map +1 -0
- package/dist/Interfaces/Category/index.d.ts +26 -0
- package/dist/Interfaces/Category/index.js +3 -0
- package/dist/Interfaces/Category/index.js.map +1 -0
- package/dist/Interfaces/Chart/index.d.ts +11 -0
- package/dist/Interfaces/Chart/index.js +3 -0
- package/dist/Interfaces/Chart/index.js.map +1 -0
- package/dist/Interfaces/Class/index.d.ts +8 -0
- package/dist/Interfaces/Class/index.js +3 -0
- package/dist/Interfaces/Class/index.js.map +1 -0
- package/dist/Interfaces/Consent/index.d.ts +6 -0
- package/dist/Interfaces/Consent/index.js +3 -0
- package/dist/Interfaces/Consent/index.js.map +1 -0
- package/dist/Interfaces/Context/IContextProps.d.ts +5 -0
- package/dist/Interfaces/Context/IContextProps.js +3 -0
- package/dist/Interfaces/Context/IContextProps.js.map +1 -0
- package/dist/Interfaces/Context/IContextState.d.ts +15 -0
- package/dist/Interfaces/Context/IContextState.js +3 -0
- package/dist/Interfaces/Context/IContextState.js.map +1 -0
- package/dist/Interfaces/Customer/ICustomerBadge.d.ts +2 -0
- package/dist/Interfaces/Customer/ICustomerBadge.js +3 -0
- package/dist/Interfaces/Customer/ICustomerBadge.js.map +1 -0
- package/dist/Interfaces/Customer/ICustomerRating.d.ts +10 -0
- package/dist/Interfaces/Customer/ICustomerRating.js +3 -0
- package/dist/Interfaces/Customer/ICustomerRating.js.map +1 -0
- package/dist/Interfaces/Customer/index.d.ts +92 -0
- package/dist/Interfaces/Customer/index.js +159 -0
- package/dist/Interfaces/Customer/index.js.map +1 -0
- package/dist/Interfaces/Declination/index.d.ts +106 -0
- package/dist/Interfaces/Declination/index.js +65 -0
- package/dist/Interfaces/Declination/index.js.map +1 -0
- package/dist/Interfaces/Delivery/CalendarDay.d.ts +9 -0
- package/dist/Interfaces/Delivery/CalendarDay.js +12 -0
- package/dist/Interfaces/Delivery/CalendarDay.js.map +1 -0
- package/dist/Interfaces/Delivery/Driver.d.ts +7 -0
- package/dist/Interfaces/Delivery/Driver.js +10 -0
- package/dist/Interfaces/Delivery/Driver.js.map +1 -0
- package/dist/Interfaces/Delivery/PlannedOrder.d.ts +26 -0
- package/dist/Interfaces/Delivery/PlannedOrder.js +20 -0
- package/dist/Interfaces/Delivery/PlannedOrder.js.map +1 -0
- package/dist/Interfaces/Delivery/ScheduledRun.d.ts +14 -0
- package/dist/Interfaces/Delivery/ScheduledRun.js +15 -0
- package/dist/Interfaces/Delivery/ScheduledRun.js.map +1 -0
- package/dist/Interfaces/Delivery/Truck.d.ts +21 -0
- package/dist/Interfaces/Delivery/Truck.js +25 -0
- package/dist/Interfaces/Delivery/Truck.js.map +1 -0
- package/dist/Interfaces/Directions/index.d.ts +72 -0
- package/dist/Interfaces/Directions/index.js +3 -0
- package/dist/Interfaces/Directions/index.js.map +1 -0
- package/dist/Interfaces/Document/index.d.ts +8 -0
- package/dist/Interfaces/Document/index.js +3 -0
- package/dist/Interfaces/Document/index.js.map +1 -0
- package/dist/Interfaces/Elastic/index.d.ts +89 -0
- package/dist/Interfaces/Elastic/index.js +3 -0
- package/dist/Interfaces/Elastic/index.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/I3DPrintEmail.d.ts +11 -0
- package/dist/Interfaces/Email/CustomGR/I3DPrintEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/I3DPrintEmail.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/IBorrowToolsEmail.d.ts +15 -0
- package/dist/Interfaces/Email/CustomGR/IBorrowToolsEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/IBorrowToolsEmail.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/IPickupMaterialsEmail.d.ts +12 -0
- package/dist/Interfaces/Email/CustomGR/IPickupMaterialsEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/IPickupMaterialsEmail.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/IPreMeetingFormEmail.d.ts +36 -0
- package/dist/Interfaces/Email/CustomGR/IPreMeetingFormEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/IPreMeetingFormEmail.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/ISponsorRequestEmail.d.ts +12 -0
- package/dist/Interfaces/Email/CustomGR/ISponsorRequestEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/ISponsorRequestEmail.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/ITransportEmail.d.ts +12 -0
- package/dist/Interfaces/Email/CustomGR/ITransportEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/ITransportEmail.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/ITransportQuoteEmail.d.ts +12 -0
- package/dist/Interfaces/Email/CustomGR/ITransportQuoteEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/ITransportQuoteEmail.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/IVegetalsEmail.d.ts +16 -0
- package/dist/Interfaces/Email/CustomGR/IVegetalsEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/IVegetalsEmail.js.map +1 -0
- package/dist/Interfaces/Email/CustomGR/IWishlistEmail.d.ts +15 -0
- package/dist/Interfaces/Email/CustomGR/IWishlistEmail.js +3 -0
- package/dist/Interfaces/Email/CustomGR/IWishlistEmail.js.map +1 -0
- package/dist/Interfaces/Email/IAbandonnedCartEmail.d.ts +29 -0
- package/dist/Interfaces/Email/IAbandonnedCartEmail.js +3 -0
- package/dist/Interfaces/Email/IAbandonnedCartEmail.js.map +1 -0
- package/dist/Interfaces/Email/IAccountConfirmationEmail.d.ts +22 -0
- package/dist/Interfaces/Email/IAccountConfirmationEmail.js +3 -0
- package/dist/Interfaces/Email/IAccountConfirmationEmail.js.map +1 -0
- package/dist/Interfaces/Email/IApplicationEmail.d.ts +19 -0
- package/dist/Interfaces/Email/IApplicationEmail.js +3 -0
- package/dist/Interfaces/Email/IApplicationEmail.js.map +1 -0
- package/dist/Interfaces/Email/IBackInStockEmail.d.ts +21 -0
- package/dist/Interfaces/Email/IBackInStockEmail.js +3 -0
- package/dist/Interfaces/Email/IBackInStockEmail.js.map +1 -0
- package/dist/Interfaces/Email/IContactEmail.d.ts +20 -0
- package/dist/Interfaces/Email/IContactEmail.js +3 -0
- package/dist/Interfaces/Email/IContactEmail.js.map +1 -0
- package/dist/Interfaces/Email/ICustomerBookingAdminEmail.d.ts +15 -0
- package/dist/Interfaces/Email/ICustomerBookingAdminEmail.js +3 -0
- package/dist/Interfaces/Email/ICustomerBookingAdminEmail.js.map +1 -0
- package/dist/Interfaces/Email/ICustomerBookingEmail.d.ts +14 -0
- package/dist/Interfaces/Email/ICustomerBookingEmail.js +3 -0
- package/dist/Interfaces/Email/ICustomerBookingEmail.js.map +1 -0
- package/dist/Interfaces/Email/IEmail.d.ts +20 -0
- package/dist/Interfaces/Email/IEmail.js +70 -0
- package/dist/Interfaces/Email/IEmail.js.map +1 -0
- package/dist/Interfaces/Email/IOrderConfirmationEmail.d.ts +47 -0
- package/dist/Interfaces/Email/IOrderConfirmationEmail.js +3 -0
- package/dist/Interfaces/Email/IOrderConfirmationEmail.js.map +1 -0
- package/dist/Interfaces/Email/IPasswordResetEmail.d.ts +17 -0
- package/dist/Interfaces/Email/IPasswordResetEmail.js +3 -0
- package/dist/Interfaces/Email/IPasswordResetEmail.js.map +1 -0
- package/dist/Interfaces/Email/IPhotoShootEmail.d.ts +14 -0
- package/dist/Interfaces/Email/IPhotoShootEmail.js +3 -0
- package/dist/Interfaces/Email/IPhotoShootEmail.js.map +1 -0
- package/dist/Interfaces/Email/IPickupConfirmation.d.ts +23 -0
- package/dist/Interfaces/Email/IPickupConfirmation.js +3 -0
- package/dist/Interfaces/Email/IPickupConfirmation.js.map +1 -0
- package/dist/Interfaces/Email/IQuoteApprobationEmail.d.ts +29 -0
- package/dist/Interfaces/Email/IQuoteApprobationEmail.js +3 -0
- package/dist/Interfaces/Email/IQuoteApprobationEmail.js.map +1 -0
- package/dist/Interfaces/Email/IShippingConfirmation.d.ts +23 -0
- package/dist/Interfaces/Email/IShippingConfirmation.js +3 -0
- package/dist/Interfaces/Email/IShippingConfirmation.js.map +1 -0
- package/dist/Interfaces/Email/IWelcomeEmail.d.ts +19 -0
- package/dist/Interfaces/Email/IWelcomeEmail.js +3 -0
- package/dist/Interfaces/Email/IWelcomeEmail.js.map +1 -0
- package/dist/Interfaces/ExportSchema/index.d.ts +7 -0
- package/dist/Interfaces/ExportSchema/index.js +3 -0
- package/dist/Interfaces/ExportSchema/index.js.map +1 -0
- package/dist/Interfaces/ExternalService/BaseExternalService.d.ts +12 -0
- package/dist/Interfaces/ExternalService/BaseExternalService.js +3 -0
- package/dist/Interfaces/ExternalService/BaseExternalService.js.map +1 -0
- package/dist/Interfaces/ExternalService/index.d.ts +9 -0
- package/dist/Interfaces/ExternalService/index.js +3 -0
- package/dist/Interfaces/ExternalService/index.js.map +1 -0
- package/dist/Interfaces/G2/index.d.ts +286 -0
- package/dist/Interfaces/G2/index.js +32 -0
- package/dist/Interfaces/G2/index.js.map +1 -0
- package/dist/Interfaces/Indexed/Product/IIndexedLastSavedProduct.d.ts +20 -0
- package/dist/Interfaces/Indexed/Product/IIndexedLastSavedProduct.js +3 -0
- package/dist/Interfaces/Indexed/Product/IIndexedLastSavedProduct.js.map +1 -0
- package/dist/Interfaces/Indexed/Product/index.d.ts +91 -0
- package/dist/Interfaces/Indexed/Product/index.js +316 -0
- package/dist/Interfaces/Indexed/Product/index.js.map +1 -0
- package/dist/Interfaces/Inventory/index.d.ts +19 -0
- package/dist/Interfaces/Inventory/index.js +9 -0
- package/dist/Interfaces/Inventory/index.js.map +1 -0
- package/dist/Interfaces/Invoice/index.d.ts +4 -0
- package/dist/Interfaces/Invoice/index.js +3 -0
- package/dist/Interfaces/Invoice/index.js.map +1 -0
- package/dist/Interfaces/MarketplacePublication/MarketplaceOrderData.d.ts +3 -0
- package/dist/Interfaces/MarketplacePublication/MarketplaceOrderData.js +3 -0
- package/dist/Interfaces/MarketplacePublication/MarketplaceOrderData.js.map +1 -0
- package/dist/Interfaces/MarketplacePublication/index.d.ts +23 -0
- package/dist/Interfaces/MarketplacePublication/index.js +34 -0
- package/dist/Interfaces/MarketplacePublication/index.js.map +1 -0
- package/dist/Interfaces/Operations/ICreatedBy.d.ts +6 -0
- package/dist/Interfaces/Operations/ICreatedBy.js +3 -0
- package/dist/Interfaces/Operations/ICreatedBy.js.map +1 -0
- package/dist/Interfaces/Operations/IUpdate.d.ts +5 -0
- package/dist/Interfaces/Operations/IUpdate.js +3 -0
- package/dist/Interfaces/Operations/IUpdate.js.map +1 -0
- package/dist/Interfaces/Order/index.d.ts +4 -0
- package/dist/Interfaces/Order/index.js +3 -0
- package/dist/Interfaces/Order/index.js.map +1 -0
- package/dist/Interfaces/Org/IRelUser.d.ts +9 -0
- package/dist/Interfaces/Org/IRelUser.js +3 -0
- package/dist/Interfaces/Org/IRelUser.js.map +1 -0
- package/dist/Interfaces/Org/index.d.ts +29 -0
- package/dist/Interfaces/Org/index.js +13 -0
- package/dist/Interfaces/Org/index.js.map +1 -0
- package/dist/Interfaces/Payment/index.d.ts +11 -0
- package/dist/Interfaces/Payment/index.js +3 -0
- package/dist/Interfaces/Payment/index.js.map +1 -0
- package/dist/Interfaces/Product/IAttributeFamily.d.ts +6 -0
- package/dist/Interfaces/Product/IAttributeFamily.js +3 -0
- package/dist/Interfaces/Product/IAttributeFamily.js.map +1 -0
- package/dist/Interfaces/Product/IImportProduct.d.ts +42 -0
- package/dist/Interfaces/Product/IImportProduct.js +967 -0
- package/dist/Interfaces/Product/IImportProduct.js.map +1 -0
- package/dist/Interfaces/Product/IInventoryItem.d.ts +81 -0
- package/dist/Interfaces/Product/IInventoryItem.js +37 -0
- package/dist/Interfaces/Product/IInventoryItem.js.map +1 -0
- package/dist/Interfaces/Product/IPricing.d.ts +177 -0
- package/dist/Interfaces/Product/IPricing.js +175 -0
- package/dist/Interfaces/Product/IPricing.js.map +1 -0
- package/dist/Interfaces/Product/index.d.ts +121 -0
- package/dist/Interfaces/Product/index.js +57 -0
- package/dist/Interfaces/Product/index.js.map +1 -0
- package/dist/Interfaces/ProductAttribute/index.d.ts +11 -0
- package/dist/Interfaces/ProductAttribute/index.js +3 -0
- package/dist/Interfaces/ProductAttribute/index.js.map +1 -0
- package/dist/Interfaces/ProductGroup/index.d.ts +20 -0
- package/dist/Interfaces/ProductGroup/index.js +3 -0
- package/dist/Interfaces/ProductGroup/index.js.map +1 -0
- package/dist/Interfaces/PromiseToPurchase/BankType.d.ts +41 -0
- package/dist/Interfaces/PromiseToPurchase/BankType.js +43 -0
- package/dist/Interfaces/PromiseToPurchase/BankType.js.map +1 -0
- package/dist/Interfaces/PromiseToPurchase/IIndexedBankUsed.d.ts +33 -0
- package/dist/Interfaces/PromiseToPurchase/IIndexedBankUsed.js +16 -0
- package/dist/Interfaces/PromiseToPurchase/IIndexedBankUsed.js.map +1 -0
- package/dist/Interfaces/PromiseToPurchase/IIndexedCustomerPromiseToPurchase.d.ts +19 -0
- package/dist/Interfaces/PromiseToPurchase/IIndexedCustomerPromiseToPurchase.js +3 -0
- package/dist/Interfaces/PromiseToPurchase/IIndexedCustomerPromiseToPurchase.js.map +1 -0
- package/dist/Interfaces/PromiseToPurchase/index.d.ts +50 -0
- package/dist/Interfaces/PromiseToPurchase/index.js +14 -0
- package/dist/Interfaces/PromiseToPurchase/index.js.map +1 -0
- package/dist/Interfaces/PurchaseOrder/index.d.ts +17 -0
- package/dist/Interfaces/PurchaseOrder/index.js +3 -0
- package/dist/Interfaces/PurchaseOrder/index.js.map +1 -0
- package/dist/Interfaces/Query/IBrandQueryOptions.d.ts +11 -0
- package/dist/Interfaces/Query/IBrandQueryOptions.js +3 -0
- package/dist/Interfaces/Query/IBrandQueryOptions.js.map +1 -0
- package/dist/Interfaces/Query/ICategoryQueryOptions.d.ts +11 -0
- package/dist/Interfaces/Query/ICategoryQueryOptions.js +3 -0
- package/dist/Interfaces/Query/ICategoryQueryOptions.js.map +1 -0
- package/dist/Interfaces/Query/IProductQueryOptions.d.ts +15 -0
- package/dist/Interfaces/Query/IProductQueryOptions.js +3 -0
- package/dist/Interfaces/Query/IProductQueryOptions.js.map +1 -0
- package/dist/Interfaces/Quote/QuoteCMS/actions.d.ts +6 -0
- package/dist/Interfaces/Quote/QuoteCMS/actions.js +50 -0
- package/dist/Interfaces/Quote/QuoteCMS/actions.js.map +1 -0
- package/dist/Interfaces/Quote/QuoteCMS/defaults.d.ts +4 -0
- package/dist/Interfaces/Quote/QuoteCMS/defaults.js +32 -0
- package/dist/Interfaces/Quote/QuoteCMS/defaults.js.map +1 -0
- package/dist/Interfaces/Quote/QuoteCMS/enums.d.ts +50 -0
- package/dist/Interfaces/Quote/QuoteCMS/enums.js +61 -0
- package/dist/Interfaces/Quote/QuoteCMS/enums.js.map +1 -0
- package/dist/Interfaces/Quote/index.d.ts +5 -0
- package/dist/Interfaces/Quote/index.js +3 -0
- package/dist/Interfaces/Quote/index.js.map +1 -0
- package/dist/Interfaces/Rules/IDiscountRule.d.ts +131 -0
- package/dist/Interfaces/Rules/IDiscountRule.js +96 -0
- package/dist/Interfaces/Rules/IDiscountRule.js.map +1 -0
- package/dist/Interfaces/Services/IAddServiceResponse.d.ts +4 -0
- package/dist/Interfaces/Services/IAddServiceResponse.js +3 -0
- package/dist/Interfaces/Services/IAddServiceResponse.js.map +1 -0
- package/dist/Interfaces/Services/IService.d.ts +12 -0
- package/dist/Interfaces/Services/IService.js +3 -0
- package/dist/Interfaces/Services/IService.js.map +1 -0
- package/dist/Interfaces/Services/IServiceSecret.d.ts +8 -0
- package/dist/Interfaces/Services/IServiceSecret.js +3 -0
- package/dist/Interfaces/Services/IServiceSecret.js.map +1 -0
- package/dist/Interfaces/Shipping/Shipstation/carriers.d.ts +10 -0
- package/dist/Interfaces/Shipping/Shipstation/carriers.js +3 -0
- package/dist/Interfaces/Shipping/Shipstation/carriers.js.map +1 -0
- package/dist/Interfaces/Shipping/Shipstation/order.d.ts +227 -0
- package/dist/Interfaces/Shipping/Shipstation/order.js +3 -0
- package/dist/Interfaces/Shipping/Shipstation/order.js.map +1 -0
- package/dist/Interfaces/Shipping/Shipstation/quote.d.ts +31 -0
- package/dist/Interfaces/Shipping/Shipstation/quote.js +3 -0
- package/dist/Interfaces/Shipping/Shipstation/quote.js.map +1 -0
- package/dist/Interfaces/Shipping/Shiptime/order.d.ts +54 -0
- package/dist/Interfaces/Shipping/Shiptime/order.js +49 -0
- package/dist/Interfaces/Shipping/Shiptime/order.js.map +1 -0
- package/dist/Interfaces/Shipping/Shiptime/quote.d.ts +111 -0
- package/dist/Interfaces/Shipping/Shiptime/quote.js +3 -0
- package/dist/Interfaces/Shipping/Shiptime/quote.js.map +1 -0
- package/dist/Interfaces/Slider/GR.d.ts +130 -0
- package/dist/Interfaces/Slider/GR.js +272 -0
- package/dist/Interfaces/Slider/GR.js.map +1 -0
- package/dist/Interfaces/Slider/index.d.ts +14 -0
- package/dist/Interfaces/Slider/index.js +3 -0
- package/dist/Interfaces/Slider/index.js.map +1 -0
- package/dist/Interfaces/Space/IMember.d.ts +16 -0
- package/dist/Interfaces/Space/IMember.js +10 -0
- package/dist/Interfaces/Space/IMember.js.map +1 -0
- package/dist/Interfaces/Space/index.d.ts +311 -0
- package/dist/Interfaces/Space/index.js +78 -0
- package/dist/Interfaces/Space/index.js.map +1 -0
- package/dist/Interfaces/Specials/bb.d.ts +27 -0
- package/dist/Interfaces/Specials/bb.js +23 -0
- package/dist/Interfaces/Specials/bb.js.map +1 -0
- package/dist/Interfaces/Specials/gr.d.ts +61 -0
- package/dist/Interfaces/Specials/gr.js +3 -0
- package/dist/Interfaces/Specials/gr.js.map +1 -0
- package/dist/Interfaces/StockNotification/index.d.ts +7 -0
- package/dist/Interfaces/StockNotification/index.js +3 -0
- package/dist/Interfaces/StockNotification/index.js.map +1 -0
- package/dist/Interfaces/Store/index.d.ts +60 -0
- package/dist/Interfaces/Store/index.js +28 -0
- package/dist/Interfaces/Store/index.js.map +1 -0
- package/dist/Interfaces/Supplier/ICommand.d.ts +11 -0
- package/dist/Interfaces/Supplier/ICommand.js +3 -0
- package/dist/Interfaces/Supplier/ICommand.js.map +1 -0
- package/dist/Interfaces/Supplier/index.d.ts +36 -0
- package/dist/Interfaces/Supplier/index.js +25 -0
- package/dist/Interfaces/Supplier/index.js.map +1 -0
- package/dist/Interfaces/Tag/index.d.ts +18 -0
- package/dist/Interfaces/Tag/index.js +3 -0
- package/dist/Interfaces/Tag/index.js.map +1 -0
- package/dist/Interfaces/Tax/index.d.ts +12 -0
- package/dist/Interfaces/Tax/index.js +3 -0
- package/dist/Interfaces/Tax/index.js.map +1 -0
- package/dist/Interfaces/TransferRequest/index.d.ts +32 -0
- package/dist/Interfaces/TransferRequest/index.js +27 -0
- package/dist/Interfaces/TransferRequest/index.js.map +1 -0
- package/dist/Interfaces/Translation/index.d.ts +4 -0
- package/dist/Interfaces/Translation/index.js +3 -0
- package/dist/Interfaces/Translation/index.js.map +1 -0
- package/dist/Interfaces/Update/index.d.ts +10 -0
- package/dist/Interfaces/Update/index.js +3 -0
- package/dist/Interfaces/Update/index.js.map +1 -0
- package/dist/Interfaces/User/IUser.d.ts +29 -0
- package/dist/Interfaces/User/IUser.js +9 -0
- package/dist/Interfaces/User/IUser.js.map +1 -0
- package/dist/Interfaces/Version/index.d.ts +11 -0
- package/dist/Interfaces/Version/index.js +3 -0
- package/dist/Interfaces/Version/index.js.map +1 -0
- package/dist/Interfaces/Wishlist/index.d.ts +7 -0
- package/dist/Interfaces/Wishlist/index.js +3 -0
- package/dist/Interfaces/Wishlist/index.js.map +1 -0
- package/dist/constants/Interfaces/IBaseApi.d.ts +15 -0
- package/dist/constants/Interfaces/IBaseApi.js +3 -0
- package/dist/constants/Interfaces/IBaseApi.js.map +1 -0
- package/dist/constants/Interfaces/IEndpointResult.d.ts +9 -0
- package/dist/constants/Interfaces/IEndpointResult.js +3 -0
- package/dist/constants/Interfaces/IEndpointResult.js.map +1 -0
- package/dist/constants/enums.d.ts +6 -0
- package/dist/constants/enums.js +11 -0
- package/dist/constants/enums.js.map +1 -0
- package/dist/constants/errors.d.ts +27 -0
- package/dist/constants/errors.js +33 -0
- package/dist/constants/errors.js.map +1 -0
- package/dist/constants/version.d.ts +2 -0
- package/dist/constants/version.js +6 -0
- package/dist/constants/version.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +417 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/Attribute/index.d.ts +14 -0
- package/dist/lib/Attribute/index.js +250 -0
- package/dist/lib/Attribute/index.js.map +1 -0
- package/dist/lib/BGJob/index.d.ts +9 -0
- package/dist/lib/BGJob/index.js +377 -0
- package/dist/lib/BGJob/index.js.map +1 -0
- package/dist/lib/BackgroundWorker/index.d.ts +34 -0
- package/dist/lib/BackgroundWorker/index.js +73 -0
- package/dist/lib/BackgroundWorker/index.js.map +1 -0
- package/dist/lib/Blog/BlogArticle.d.ts +5 -0
- package/dist/lib/Blog/BlogArticle.js +29 -0
- package/dist/lib/Blog/BlogArticle.js.map +1 -0
- package/dist/lib/Blog/BlogAuthor.d.ts +5 -0
- package/dist/lib/Blog/BlogAuthor.js +29 -0
- package/dist/lib/Blog/BlogAuthor.js.map +1 -0
- package/dist/lib/Blog/BlogCategory.d.ts +5 -0
- package/dist/lib/Blog/BlogCategory.js +29 -0
- package/dist/lib/Blog/BlogCategory.js.map +1 -0
- package/dist/lib/Blog/BlogKeyword.d.ts +5 -0
- package/dist/lib/Blog/BlogKeyword.js +29 -0
- package/dist/lib/Blog/BlogKeyword.js.map +1 -0
- package/dist/lib/Booking/index.d.ts +63 -0
- package/dist/lib/Booking/index.js +814 -0
- package/dist/lib/Booking/index.js.map +1 -0
- package/dist/lib/Brand/index.d.ts +17 -0
- package/dist/lib/Brand/index.js +274 -0
- package/dist/lib/Brand/index.js.map +1 -0
- package/dist/lib/CMS/Creator/index.d.ts +38 -0
- package/dist/lib/CMS/Creator/index.js +625 -0
- package/dist/lib/CMS/Creator/index.js.map +1 -0
- package/dist/lib/CMS/Reader/index.d.ts +64 -0
- package/dist/lib/CMS/Reader/index.js +1174 -0
- package/dist/lib/CMS/Reader/index.js.map +1 -0
- package/dist/lib/CMS/Utils.d.ts +1 -0
- package/dist/lib/CMS/Utils.js +30 -0
- package/dist/lib/CMS/Utils.js.map +1 -0
- package/dist/lib/CMS/Writer/index.d.ts +6 -0
- package/dist/lib/CMS/Writer/index.js +91 -0
- package/dist/lib/CMS/Writer/index.js.map +1 -0
- package/dist/lib/Cart/index.d.ts +184 -0
- package/dist/lib/Cart/index.js +3644 -0
- package/dist/lib/Cart/index.js.map +1 -0
- package/dist/lib/Catalogue/index.d.ts +11 -0
- package/dist/lib/Catalogue/index.js +205 -0
- package/dist/lib/Catalogue/index.js.map +1 -0
- package/dist/lib/Category/index.d.ts +26 -0
- package/dist/lib/Category/index.js +358 -0
- package/dist/lib/Category/index.js.map +1 -0
- package/dist/lib/Class/index.d.ts +12 -0
- package/dist/lib/Class/index.js +160 -0
- package/dist/lib/Class/index.js.map +1 -0
- package/dist/lib/Consent/index.d.ts +4 -0
- package/dist/lib/Consent/index.js +80 -0
- package/dist/lib/Consent/index.js.map +1 -0
- package/dist/lib/Customer/index.d.ts +10 -0
- package/dist/lib/Customer/index.js +141 -0
- package/dist/lib/Customer/index.js.map +1 -0
- package/dist/lib/Declination/index.d.ts +10 -0
- package/dist/lib/Declination/index.js +86 -0
- package/dist/lib/Declination/index.js.map +1 -0
- package/dist/lib/Delivery/CalendarDay.d.ts +10 -0
- package/dist/lib/Delivery/CalendarDay.js +149 -0
- package/dist/lib/Delivery/CalendarDay.js.map +1 -0
- package/dist/lib/Delivery/Dispatch.d.ts +56 -0
- package/dist/lib/Delivery/Dispatch.js +1055 -0
- package/dist/lib/Delivery/Dispatch.js.map +1 -0
- package/dist/lib/Delivery/Driver.d.ts +12 -0
- package/dist/lib/Delivery/Driver.js +153 -0
- package/dist/lib/Delivery/Driver.js.map +1 -0
- package/dist/lib/Delivery/PlannedOrder.d.ts +15 -0
- package/dist/lib/Delivery/PlannedOrder.js +237 -0
- package/dist/lib/Delivery/PlannedOrder.js.map +1 -0
- package/dist/lib/Delivery/ScheduledRun.d.ts +12 -0
- package/dist/lib/Delivery/ScheduledRun.js +165 -0
- package/dist/lib/Delivery/ScheduledRun.js.map +1 -0
- package/dist/lib/Delivery/Truck.d.ts +12 -0
- package/dist/lib/Delivery/Truck.js +158 -0
- package/dist/lib/Delivery/Truck.js.map +1 -0
- package/dist/lib/Discount/index.d.ts +18 -0
- package/dist/lib/Discount/index.js +760 -0
- package/dist/lib/Discount/index.js.map +1 -0
- package/dist/lib/ElasticSearch/index.d.ts +8 -0
- package/dist/lib/ElasticSearch/index.js +102 -0
- package/dist/lib/ElasticSearch/index.js.map +1 -0
- package/dist/lib/Email/AbandonedCartEmail.d.ts +8 -0
- package/dist/lib/Email/AbandonedCartEmail.js +79 -0
- package/dist/lib/Email/AbandonedCartEmail.js.map +1 -0
- package/dist/lib/Email/AccountConfirmationEmail.d.ts +11 -0
- package/dist/lib/Email/AccountConfirmationEmail.js +96 -0
- package/dist/lib/Email/AccountConfirmationEmail.js.map +1 -0
- package/dist/lib/Email/AdminOrderConfirmationEmail.d.ts +8 -0
- package/dist/lib/Email/AdminOrderConfirmationEmail.js +79 -0
- package/dist/lib/Email/AdminOrderConfirmationEmail.js.map +1 -0
- package/dist/lib/Email/ApplicationEmail.d.ts +8 -0
- package/dist/lib/Email/ApplicationEmail.js +79 -0
- package/dist/lib/Email/ApplicationEmail.js.map +1 -0
- package/dist/lib/Email/BackInStockEmail.d.ts +8 -0
- package/dist/lib/Email/BackInStockEmail.js +79 -0
- package/dist/lib/Email/BackInStockEmail.js.map +1 -0
- package/dist/lib/Email/ContactEmail.d.ts +8 -0
- package/dist/lib/Email/ContactEmail.js +79 -0
- package/dist/lib/Email/ContactEmail.js.map +1 -0
- package/dist/lib/Email/CustomerBookingAdminEmail.d.ts +8 -0
- package/dist/lib/Email/CustomerBookingAdminEmail.js +79 -0
- package/dist/lib/Email/CustomerBookingAdminEmail.js.map +1 -0
- package/dist/lib/Email/CustomerBookingEmail.d.ts +8 -0
- package/dist/lib/Email/CustomerBookingEmail.js +79 -0
- package/dist/lib/Email/CustomerBookingEmail.js.map +1 -0
- package/dist/lib/Email/OrderConfirmationEmail.d.ts +8 -0
- package/dist/lib/Email/OrderConfirmationEmail.js +79 -0
- package/dist/lib/Email/OrderConfirmationEmail.js.map +1 -0
- package/dist/lib/Email/OrderDenounciationEmail.d.ts +8 -0
- package/dist/lib/Email/OrderDenounciationEmail.js +79 -0
- package/dist/lib/Email/OrderDenounciationEmail.js.map +1 -0
- package/dist/lib/Email/OrderSampleEmail.d.ts +8 -0
- package/dist/lib/Email/OrderSampleEmail.js +79 -0
- package/dist/lib/Email/OrderSampleEmail.js.map +1 -0
- package/dist/lib/Email/OtherTypeEmails.d.ts +8 -0
- package/dist/lib/Email/OtherTypeEmails.js +91 -0
- package/dist/lib/Email/OtherTypeEmails.js.map +1 -0
- package/dist/lib/Email/PasswordResetEmail.d.ts +8 -0
- package/dist/lib/Email/PasswordResetEmail.js +79 -0
- package/dist/lib/Email/PasswordResetEmail.js.map +1 -0
- package/dist/lib/Email/PhotoShootEmail.d.ts +8 -0
- package/dist/lib/Email/PhotoShootEmail.js +79 -0
- package/dist/lib/Email/PhotoShootEmail.js.map +1 -0
- package/dist/lib/Email/PickUpConfirmation.d.ts +8 -0
- package/dist/lib/Email/PickUpConfirmation.js +79 -0
- package/dist/lib/Email/PickUpConfirmation.js.map +1 -0
- package/dist/lib/Email/QuoteApprobationEmail.d.ts +8 -0
- package/dist/lib/Email/QuoteApprobationEmail.js +79 -0
- package/dist/lib/Email/QuoteApprobationEmail.js.map +1 -0
- package/dist/lib/Email/ShippingConfirmation.d.ts +8 -0
- package/dist/lib/Email/ShippingConfirmation.js +79 -0
- package/dist/lib/Email/ShippingConfirmation.js.map +1 -0
- package/dist/lib/Email/WelcomeEmail.d.ts +8 -0
- package/dist/lib/Email/WelcomeEmail.js +79 -0
- package/dist/lib/Email/WelcomeEmail.js.map +1 -0
- package/dist/lib/Email/index.d.ts +8 -0
- package/dist/lib/Email/index.js +83 -0
- package/dist/lib/Email/index.js.map +1 -0
- package/dist/lib/ExternalService/Ebay.d.ts +63 -0
- package/dist/lib/ExternalService/Ebay.js +186 -0
- package/dist/lib/ExternalService/Ebay.js.map +1 -0
- package/dist/lib/ExternalService/index.d.ts +5 -0
- package/dist/lib/ExternalService/index.js +29 -0
- package/dist/lib/ExternalService/index.js.map +1 -0
- package/dist/lib/Indexed/IndexedCart.d.ts +13 -0
- package/dist/lib/Indexed/IndexedCart.js +195 -0
- package/dist/lib/Indexed/IndexedCart.js.map +1 -0
- package/dist/lib/Indexed/Product.d.ts +17 -0
- package/dist/lib/Indexed/Product.js +117 -0
- package/dist/lib/Indexed/Product.js.map +1 -0
- package/dist/lib/Inventory/__tests__.d.ts +1 -0
- package/dist/lib/Inventory/__tests__.js +199 -0
- package/dist/lib/Inventory/__tests__.js.map +1 -0
- package/dist/lib/Inventory/index.d.ts +31 -0
- package/dist/lib/Inventory/index.js +561 -0
- package/dist/lib/Inventory/index.js.map +1 -0
- package/dist/lib/Invoice/index.d.ts +5 -0
- package/dist/lib/Invoice/index.js +29 -0
- package/dist/lib/Invoice/index.js.map +1 -0
- package/dist/lib/MarketplacePublication/index.d.ts +9 -0
- package/dist/lib/MarketplacePublication/index.js +222 -0
- package/dist/lib/MarketplacePublication/index.js.map +1 -0
- package/dist/lib/MongoDB/BaseAPI.d.ts +18 -0
- package/dist/lib/MongoDB/BaseAPI.js +309 -0
- package/dist/lib/MongoDB/BaseAPI.js.map +1 -0
- package/dist/lib/Order/index.d.ts +7 -0
- package/dist/lib/Order/index.js +63 -0
- package/dist/lib/Order/index.js.map +1 -0
- package/dist/lib/Org/index.d.ts +26 -0
- package/dist/lib/Org/index.js +287 -0
- package/dist/lib/Org/index.js.map +1 -0
- package/dist/lib/PandaPay/index.d.ts +16 -0
- package/dist/lib/PandaPay/index.js +220 -0
- package/dist/lib/PandaPay/index.js.map +1 -0
- package/dist/lib/Paysafe/index.d.ts +11 -0
- package/dist/lib/Paysafe/index.js +101 -0
- package/dist/lib/Paysafe/index.js.map +1 -0
- package/dist/lib/Product/index.d.ts +143 -0
- package/dist/lib/Product/index.js +1325 -0
- package/dist/lib/Product/index.js.map +1 -0
- package/dist/lib/ProductAttribute/index.d.ts +15 -0
- package/dist/lib/ProductAttribute/index.js +115 -0
- package/dist/lib/ProductAttribute/index.js.map +1 -0
- package/dist/lib/ProductGroup/index.d.ts +49 -0
- package/dist/lib/ProductGroup/index.js +141 -0
- package/dist/lib/ProductGroup/index.js.map +1 -0
- package/dist/lib/PromiseToPurchase/index.d.ts +35 -0
- package/dist/lib/PromiseToPurchase/index.js +475 -0
- package/dist/lib/PromiseToPurchase/index.js.map +1 -0
- package/dist/lib/PurchaseOrder/index.d.ts +9 -0
- package/dist/lib/PurchaseOrder/index.js +73 -0
- package/dist/lib/PurchaseOrder/index.js.map +1 -0
- package/dist/lib/Queue/index.d.ts +40 -0
- package/dist/lib/Queue/index.js +255 -0
- package/dist/lib/Queue/index.js.map +1 -0
- package/dist/lib/Quote/index.d.ts +204 -0
- package/dist/lib/Quote/index.js +721 -0
- package/dist/lib/Quote/index.js.map +1 -0
- package/dist/lib/Service/Enum/ServiceEnum.d.ts +3 -0
- package/dist/lib/Service/Enum/ServiceEnum.js +8 -0
- package/dist/lib/Service/Enum/ServiceEnum.js.map +1 -0
- package/dist/lib/Service/index.d.ts +5 -0
- package/dist/lib/Service/index.js +58 -0
- package/dist/lib/Service/index.js.map +1 -0
- package/dist/lib/Shipment/index.d.ts +28 -0
- package/dist/lib/Shipment/index.js +560 -0
- package/dist/lib/Shipment/index.js.map +1 -0
- package/dist/lib/Slider/index.d.ts +18 -0
- package/dist/lib/Slider/index.js +233 -0
- package/dist/lib/Slider/index.js.map +1 -0
- package/dist/lib/Space/index.d.ts +758 -0
- package/dist/lib/Space/index.js +6692 -0
- package/dist/lib/Space/index.js.map +1 -0
- package/dist/lib/SpecialOPS/Cases/BB.d.ts +8 -0
- package/dist/lib/SpecialOPS/Cases/BB.js +24 -0
- package/dist/lib/SpecialOPS/Cases/BB.js.map +1 -0
- package/dist/lib/SpecialOPS/index.d.ts +14 -0
- package/dist/lib/SpecialOPS/index.js +21 -0
- package/dist/lib/SpecialOPS/index.js.map +1 -0
- package/dist/lib/StockNotification/index.d.ts +4 -0
- package/dist/lib/StockNotification/index.js +27 -0
- package/dist/lib/StockNotification/index.js.map +1 -0
- package/dist/lib/Store/index.d.ts +5 -0
- package/dist/lib/Store/index.js +31 -0
- package/dist/lib/Store/index.js.map +1 -0
- package/dist/lib/Supplier/Command.d.ts +5 -0
- package/dist/lib/Supplier/Command.js +29 -0
- package/dist/lib/Supplier/Command.js.map +1 -0
- package/dist/lib/Supplier/index.d.ts +25 -0
- package/dist/lib/Supplier/index.js +93 -0
- package/dist/lib/Supplier/index.js.map +1 -0
- package/dist/lib/Tags/index.d.ts +6 -0
- package/dist/lib/Tags/index.js +85 -0
- package/dist/lib/Tags/index.js.map +1 -0
- package/dist/lib/Tax/index.d.ts +8 -0
- package/dist/lib/Tax/index.js +137 -0
- package/dist/lib/Tax/index.js.map +1 -0
- package/dist/lib/TransferRequest/index.d.ts +21 -0
- package/dist/lib/TransferRequest/index.js +303 -0
- package/dist/lib/TransferRequest/index.js.map +1 -0
- package/dist/lib/Update/index.d.ts +10 -0
- package/dist/lib/Update/index.js +72 -0
- package/dist/lib/Update/index.js.map +1 -0
- package/dist/lib/User/index.d.ts +33 -0
- package/dist/lib/User/index.js +361 -0
- package/dist/lib/User/index.js.map +1 -0
- package/dist/lib/Wishlist/index.d.ts +5 -0
- package/dist/lib/Wishlist/index.js +29 -0
- package/dist/lib/Wishlist/index.js.map +1 -0
- package/dist/lib/base copy.d.ts +14 -0
- package/dist/lib/base copy.js +136 -0
- package/dist/lib/base copy.js.map +1 -0
- package/dist/lib/base.d.ts +14 -0
- package/dist/lib/base.js +136 -0
- package/dist/lib/base.js.map +1 -0
- package/dist/lib/baseService.d.ts +17 -0
- package/dist/lib/baseService.js +114 -0
- package/dist/lib/baseService.js.map +1 -0
- package/dist/rules/GR/constants/data.d.ts +28 -0
- package/dist/rules/GR/constants/data.js +58 -0
- package/dist/rules/GR/constants/data.js.map +1 -0
- package/dist/rules/GR/constants/products.d.ts +8 -0
- package/dist/rules/GR/constants/products.js +235 -0
- package/dist/rules/GR/constants/products.js.map +1 -0
- package/dist/rules/GR/interfaces/cart.d.ts +68 -0
- package/dist/rules/GR/interfaces/cart.js +50 -0
- package/dist/rules/GR/interfaces/cart.js.map +1 -0
- package/dist/rules/GR/interfaces/data.d.ts +97 -0
- package/dist/rules/GR/interfaces/data.js +105 -0
- package/dist/rules/GR/interfaces/data.js.map +1 -0
- package/dist/rules/GR/interfaces/products.d.ts +61 -0
- package/dist/rules/GR/interfaces/products.js +11 -0
- package/dist/rules/GR/interfaces/products.js.map +1 -0
- package/dist/rules/GR/utils/anonymisation.d.ts +29 -0
- package/dist/rules/GR/utils/anonymisation.js +269 -0
- package/dist/rules/GR/utils/anonymisation.js.map +1 -0
- package/dist/rules/GR/utils/cart.d.ts +39 -0
- package/dist/rules/GR/utils/cart.js +645 -0
- package/dist/rules/GR/utils/cart.js.map +1 -0
- package/dist/rules/GR/utils/data.d.ts +3 -0
- package/dist/rules/GR/utils/data.js +26 -0
- package/dist/rules/GR/utils/data.js.map +1 -0
- package/dist/rules/GR/utils/expedition.d.ts +70 -0
- package/dist/rules/GR/utils/expedition.js +1584 -0
- package/dist/rules/GR/utils/expedition.js.map +1 -0
- package/dist/rules/GR/utils/g2.d.ts +153 -0
- package/dist/rules/GR/utils/g2.js +915 -0
- package/dist/rules/GR/utils/g2.js.map +1 -0
- package/dist/rules/GR/utils/invoices.d.ts +5 -0
- package/dist/rules/GR/utils/invoices.js +141 -0
- package/dist/rules/GR/utils/invoices.js.map +1 -0
- package/dist/rules/GR/utils/products.d.ts +105 -0
- package/dist/rules/GR/utils/products.js +1014 -0
- package/dist/rules/GR/utils/products.js.map +1 -0
- package/dist/rules/GR/utils/upsells.d.ts +75 -0
- package/dist/rules/GR/utils/upsells.js +279 -0
- package/dist/rules/GR/utils/upsells.js.map +1 -0
- package/dist/services/database/AuthProvider.d.ts +3 -0
- package/dist/services/database/AuthProvider.js +67 -0
- package/dist/services/database/AuthProvider.js.map +1 -0
- package/dist/services/database/BaseProvider.d.ts +28 -0
- package/dist/services/database/BaseProvider.js +78 -0
- package/dist/services/database/BaseProvider.js.map +1 -0
- package/dist/services/database/BatchUtils.d.ts +14 -0
- package/dist/services/database/BatchUtils.js +89 -0
- package/dist/services/database/BatchUtils.js.map +1 -0
- package/dist/services/database/Config.d.ts +2 -0
- package/dist/services/database/Config.js +6 -0
- package/dist/services/database/Config.js.map +1 -0
- package/dist/services/database/DatabaseService.d.ts +41 -0
- package/dist/services/database/DatabaseService.js +312 -0
- package/dist/services/database/DatabaseService.js.map +1 -0
- package/dist/services/database/FirebaseProvider.d.ts +17 -0
- package/dist/services/database/FirebaseProvider.js +301 -0
- package/dist/services/database/FirebaseProvider.js.map +1 -0
- package/dist/services/database/NotFirebaseProvider.d.ts +35 -0
- package/dist/services/database/NotFirebaseProvider.js +368 -0
- package/dist/services/database/NotFirebaseProvider.js.map +1 -0
- package/dist/utils/algolia.d.ts +6 -0
- package/dist/utils/algolia.js +23 -0
- package/dist/utils/algolia.js.map +1 -0
- package/dist/utils/anonymisation.d.ts +30 -0
- package/dist/utils/anonymisation.js +270 -0
- package/dist/utils/anonymisation.js.map +1 -0
- package/dist/utils/array.d.ts +5 -0
- package/dist/utils/array.js +37 -0
- package/dist/utils/array.js.map +1 -0
- package/dist/utils/aws.d.ts +18 -0
- package/dist/utils/aws.js +144 -0
- package/dist/utils/aws.js.map +1 -0
- package/dist/utils/booking.d.ts +22 -0
- package/dist/utils/booking.js +176 -0
- package/dist/utils/booking.js.map +1 -0
- package/dist/utils/cart.d.ts +505 -0
- package/dist/utils/cart.js +504 -0
- package/dist/utils/cart.js.map +1 -0
- package/dist/utils/cmv.d.ts +10 -0
- package/dist/utils/cmv.js +108 -0
- package/dist/utils/cmv.js.map +1 -0
- package/dist/utils/console.d.ts +6 -0
- package/dist/utils/console.js +122 -0
- package/dist/utils/console.js.map +1 -0
- package/dist/utils/context.d.ts +19 -0
- package/dist/utils/context.js +42 -0
- package/dist/utils/context.js.map +1 -0
- package/dist/utils/currency.d.ts +6 -0
- package/dist/utils/currency.js +63 -0
- package/dist/utils/currency.js.map +1 -0
- package/dist/utils/data.d.ts +40 -0
- package/dist/utils/data.js +227 -0
- package/dist/utils/data.js.map +1 -0
- package/dist/utils/date.d.ts +1 -0
- package/dist/utils/date.js +17 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/dimensions.d.ts +3 -0
- package/dist/utils/dimensions.js +19 -0
- package/dist/utils/dimensions.js.map +1 -0
- package/dist/utils/discount.d.ts +33 -0
- package/dist/utils/discount.js +907 -0
- package/dist/utils/discount.js.map +1 -0
- package/dist/utils/env.d.ts +1 -0
- package/dist/utils/env.js +14 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.ts +113 -0
- package/dist/utils/errors.js +114 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/file-admin.d.ts +8 -0
- package/dist/utils/file-admin.js +95 -0
- package/dist/utils/file-admin.js.map +1 -0
- package/dist/utils/file.d.ts +19 -0
- package/dist/utils/file.js +339 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/firebase-admin.d.ts +2 -0
- package/dist/utils/firebase-admin.js +119 -0
- package/dist/utils/firebase-admin.js.map +1 -0
- package/dist/utils/firebase.d.ts +23 -0
- package/dist/utils/firebase.js +59 -0
- package/dist/utils/firebase.js.map +1 -0
- package/dist/utils/import.d.ts +1 -0
- package/dist/utils/import.js +82 -0
- package/dist/utils/import.js.map +1 -0
- package/dist/utils/inventories.d.ts +26 -0
- package/dist/utils/inventories.js +356 -0
- package/dist/utils/inventories.js.map +1 -0
- package/dist/utils/locale.d.ts +13 -0
- package/dist/utils/locale.js +68 -0
- package/dist/utils/locale.js.map +1 -0
- package/dist/utils/mailchimp.d.ts +57 -0
- package/dist/utils/mailchimp.js +736 -0
- package/dist/utils/mailchimp.js.map +1 -0
- package/dist/utils/math.d.ts +1 -0
- package/dist/utils/math.js +16 -0
- package/dist/utils/math.js.map +1 -0
- package/dist/utils/mongodb.d.ts +1 -0
- package/dist/utils/mongodb.js +69 -0
- package/dist/utils/mongodb.js.map +1 -0
- package/dist/utils/object.d.ts +6 -0
- package/dist/utils/object.js +125 -0
- package/dist/utils/object.js.map +1 -0
- package/dist/utils/payment.d.ts +10 -0
- package/dist/utils/payment.js +26 -0
- package/dist/utils/payment.js.map +1 -0
- package/dist/utils/products.d.ts +26 -0
- package/dist/utils/products.js +302 -0
- package/dist/utils/products.js.map +1 -0
- package/dist/utils/promiseToPurchase.d.ts +56 -0
- package/dist/utils/promiseToPurchase.js +229 -0
- package/dist/utils/promiseToPurchase.js.map +1 -0
- package/dist/utils/prosprsearch.d.ts +21 -0
- package/dist/utils/prosprsearch.js +277 -0
- package/dist/utils/prosprsearch.js.map +1 -0
- package/dist/utils/sdc.d.ts +10 -0
- package/dist/utils/sdc.js +1309 -0
- package/dist/utils/sdc.js.map +1 -0
- package/dist/utils/searchIndexes.d.ts +20 -0
- package/dist/utils/searchIndexes.js +274 -0
- package/dist/utils/searchIndexes.js.map +1 -0
- package/dist/utils/services.d.ts +38 -0
- package/dist/utils/services.js +395 -0
- package/dist/utils/services.js.map +1 -0
- package/dist/utils/shipment.d.ts +110 -0
- package/dist/utils/shipment.js +411 -0
- package/dist/utils/shipment.js.map +1 -0
- package/dist/utils/simpletexting.d.ts +2 -0
- package/dist/utils/simpletexting.js +89 -0
- package/dist/utils/simpletexting.js.map +1 -0
- package/dist/utils/slack.d.ts +33 -0
- package/dist/utils/slack.js +178 -0
- package/dist/utils/slack.js.map +1 -0
- package/dist/utils/sliders.d.ts +4 -0
- package/dist/utils/sliders.js +71 -0
- package/dist/utils/sliders.js.map +1 -0
- package/dist/utils/string.d.ts +16 -0
- package/dist/utils/string.js +195 -0
- package/dist/utils/string.js.map +1 -0
- package/dist/utils/update.d.ts +7 -0
- package/dist/utils/update.js +245 -0
- package/dist/utils/update.js.map +1 -0
- package/dist/utils/weight.d.ts +3 -0
- package/dist/utils/weight.js +19 -0
- package/dist/utils/weight.js.map +1 -0
- package/dist/utils/zones.d.ts +10 -0
- package/dist/utils/zones.js +288 -0
- package/dist/utils/zones.js.map +1 -0
- package/package.json +106 -0
- package/publish.sh +144 -0
- package/readme.md +182 -0
|
@@ -0,0 +1,1055 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
50
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
51
|
+
if (ar || !(i in from)) {
|
|
52
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
53
|
+
ar[i] = from[i];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
57
|
+
};
|
|
58
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
|
+
};
|
|
61
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
+
var PlannedOrder_1 = require("../../Interfaces/Delivery/PlannedOrder");
|
|
63
|
+
var ScheduledRun_1 = require("../../Interfaces/Delivery/ScheduledRun");
|
|
64
|
+
var Truck_1 = require("../../Interfaces/Delivery/Truck");
|
|
65
|
+
var PlannedOrder_2 = __importDefault(require("./PlannedOrder"));
|
|
66
|
+
var ScheduledRun_2 = __importDefault(require("./ScheduledRun"));
|
|
67
|
+
var CalendarDay_1 = __importDefault(require("./CalendarDay"));
|
|
68
|
+
var moment_1 = __importDefault(require("moment"));
|
|
69
|
+
var Driver_1 = __importDefault(require("./Driver"));
|
|
70
|
+
var Truck_2 = __importDefault(require("./Truck"));
|
|
71
|
+
var isomorphic_unfetch_1 = __importDefault(require("isomorphic-unfetch"));
|
|
72
|
+
var DispatchErrorEnum;
|
|
73
|
+
(function (DispatchErrorEnum) {
|
|
74
|
+
DispatchErrorEnum[DispatchErrorEnum["NONE"] = 0] = "NONE";
|
|
75
|
+
DispatchErrorEnum[DispatchErrorEnum["OUT_OF_TRUCK"] = 1] = "OUT_OF_TRUCK";
|
|
76
|
+
})(DispatchErrorEnum || (DispatchErrorEnum = {}));
|
|
77
|
+
var Dispatch = (function () {
|
|
78
|
+
function Dispatch() {
|
|
79
|
+
var _this = this;
|
|
80
|
+
this.pushCityIntoRun = function (cityName, currentRun, orderList) {
|
|
81
|
+
orderList.map(function (o) {
|
|
82
|
+
if (o.city == cityName) {
|
|
83
|
+
currentRun.command_list.push(o);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
return currentRun;
|
|
87
|
+
};
|
|
88
|
+
this.getTruckForRun = function (avaibleTrucks, currentRun) {
|
|
89
|
+
var truckFit = [];
|
|
90
|
+
avaibleTrucks.map(function (t) {
|
|
91
|
+
if (t.skid_count >= currentRun.skids) {
|
|
92
|
+
truckFit.push(t);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return truckFit;
|
|
96
|
+
};
|
|
97
|
+
this.getBestTruck = function (avaibleTrucks, skid_count) {
|
|
98
|
+
var orderedTruck = avaibleTrucks.filter(function (f) { return f.skid_count >= skid_count; }).sort(function (a, b) { return a.priority - b.priority; });
|
|
99
|
+
for (var i = 0; i < orderedTruck.length; i++) {
|
|
100
|
+
if (orderedTruck[i].skid_count - skid_count <= 4 || i == orderedTruck.length - 1)
|
|
101
|
+
return orderedTruck[i];
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
this.getRuns = function (orderList, trucks) {
|
|
105
|
+
var citys = [];
|
|
106
|
+
orderList.map(function (c) {
|
|
107
|
+
if (!citys.includes(c.city))
|
|
108
|
+
citys.push(c.city);
|
|
109
|
+
});
|
|
110
|
+
var currentRun = (0, ScheduledRun_1.newScheduledRun)();
|
|
111
|
+
var result = [];
|
|
112
|
+
var avaibleTrucks = trucks;
|
|
113
|
+
console.log('City list: ', citys);
|
|
114
|
+
citys.map(function (c) {
|
|
115
|
+
var backupRun = __assign({}, currentRun);
|
|
116
|
+
currentRun = _this.pushCityIntoRun(c, currentRun, orderList);
|
|
117
|
+
if (!!!avaibleTrucks.length)
|
|
118
|
+
return { runs: result, error: DispatchErrorEnum.OUT_OF_TRUCK };
|
|
119
|
+
var truckFit = _this.getTruckForRun(avaibleTrucks, currentRun);
|
|
120
|
+
if (!!!truckFit.length) {
|
|
121
|
+
var doFit = true;
|
|
122
|
+
if (!!backupRun.command_list.length) {
|
|
123
|
+
backupRun.truck = _this.getBestTruck(avaibleTrucks, backupRun.skids);
|
|
124
|
+
console.log('adding a run: ', backupRun);
|
|
125
|
+
result.push(backupRun);
|
|
126
|
+
avaibleTrucks = avaibleTrucks.filter(function (t) { return !!!backupRun.truck || t.code_name !== backupRun.truck.code_name; });
|
|
127
|
+
currentRun = (0, ScheduledRun_1.newScheduledRun)();
|
|
128
|
+
currentRun = _this.pushCityIntoRun(c, currentRun, orderList);
|
|
129
|
+
if (!!!avaibleTrucks.length)
|
|
130
|
+
return { runs: result, error: DispatchErrorEnum.OUT_OF_TRUCK };
|
|
131
|
+
truckFit = _this.getTruckForRun(avaibleTrucks, currentRun);
|
|
132
|
+
if (!!!truckFit.length)
|
|
133
|
+
doFit = false;
|
|
134
|
+
}
|
|
135
|
+
else
|
|
136
|
+
doFit = false;
|
|
137
|
+
if (!doFit) {
|
|
138
|
+
console.log('Run didnt fit trying to split city');
|
|
139
|
+
orderList.map(function (o) {
|
|
140
|
+
if (o.city == c) {
|
|
141
|
+
currentRun = __assign({}, backupRun);
|
|
142
|
+
currentRun.command_list.push(o);
|
|
143
|
+
if (!!!avaibleTrucks.length)
|
|
144
|
+
return { runs: result, error: DispatchErrorEnum.OUT_OF_TRUCK };
|
|
145
|
+
truckFit = _this.getTruckForRun(avaibleTrucks, currentRun);
|
|
146
|
+
if (!!!truckFit.length) {
|
|
147
|
+
backupRun.truck = _this.getBestTruck(avaibleTrucks, backupRun.skids);
|
|
148
|
+
result.push(backupRun);
|
|
149
|
+
console.log('adding a run: ', backupRun);
|
|
150
|
+
avaibleTrucks = avaibleTrucks.filter(function (t) { return !!!backupRun.truck || t.code_name !== backupRun.truck.code_name; });
|
|
151
|
+
currentRun = (0, ScheduledRun_1.newScheduledRun)();
|
|
152
|
+
currentRun = _this.pushCityIntoRun(c, currentRun, orderList);
|
|
153
|
+
if (!!!avaibleTrucks.length)
|
|
154
|
+
return { runs: result, error: DispatchErrorEnum.OUT_OF_TRUCK };
|
|
155
|
+
truckFit = _this.getTruckForRun(avaibleTrucks, currentRun);
|
|
156
|
+
if (!!!truckFit.length) {
|
|
157
|
+
console.log('Run didnt fit in 1 truck');
|
|
158
|
+
if (!!!avaibleTrucks.length)
|
|
159
|
+
return { runs: result, error: DispatchErrorEnum.OUT_OF_TRUCK };
|
|
160
|
+
var orderedTruck = avaibleTrucks.sort(function (a, b) { return b.skid_count - a.skid_count; });
|
|
161
|
+
currentRun = __assign(__assign({}, currentRun), { truck: orderedTruck[0] });
|
|
162
|
+
result.push(currentRun);
|
|
163
|
+
console.log('adding a run: ', currentRun);
|
|
164
|
+
currentRun = (0, ScheduledRun_1.newScheduledRun)();
|
|
165
|
+
currentRun.command_list.push(o);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
if (!!currentRun.command_list.length) {
|
|
174
|
+
currentRun = __assign(__assign({}, currentRun), { truck: _this.getBestTruck(avaibleTrucks, currentRun.skids) });
|
|
175
|
+
result.push(currentRun);
|
|
176
|
+
}
|
|
177
|
+
return { runs: result, error: 0 };
|
|
178
|
+
};
|
|
179
|
+
this.defragRuns = function (runs, trucks) {
|
|
180
|
+
var orderedRuns = runs.sort(function (a, b) {
|
|
181
|
+
return (b.truck || { skid_count: 0 }).skid_count - b.skids - ((a.truck || { skid_count: 0 }).skid_count - a.skids);
|
|
182
|
+
});
|
|
183
|
+
var i = 0;
|
|
184
|
+
while (i < orderedRuns.length) {
|
|
185
|
+
var useTruck = orderedRuns[i].truck || (0, Truck_1.newTruck)();
|
|
186
|
+
var orderedTruck = trucks
|
|
187
|
+
.filter(function (f) { return !runs.some(function (r) { var _a; return ((_a = r.truck) === null || _a === void 0 ? void 0 : _a.code_name) === f.code_name; }); })
|
|
188
|
+
.sort(function (a, b) { return b.skid_count - a.skid_count; });
|
|
189
|
+
if (!!orderedTruck.length) {
|
|
190
|
+
if (useTruck.skid_count < orderedTruck[0].skid_count)
|
|
191
|
+
useTruck = orderedTruck[0];
|
|
192
|
+
}
|
|
193
|
+
for (var r = 0; r < orderedRuns.length; r++)
|
|
194
|
+
if (r !== i) {
|
|
195
|
+
if (orderedRuns[r].skids + orderedRuns[i].skids <= useTruck.skid_count) {
|
|
196
|
+
if (r < i) {
|
|
197
|
+
orderedRuns[r] = __assign(__assign({}, orderedRuns[r]), { truck: useTruck });
|
|
198
|
+
orderedRuns.splice(i, 1);
|
|
199
|
+
i--;
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
orderedRuns[i] = __assign(__assign({}, orderedRuns[i]), { truck: useTruck });
|
|
204
|
+
orderedRuns.splice(r, 1);
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
i++;
|
|
210
|
+
}
|
|
211
|
+
return runs;
|
|
212
|
+
};
|
|
213
|
+
this.googleDirection = function (from, to, waypoints, departure, API_KEY, doReorder) { return __awaiter(_this, void 0, void 0, function () {
|
|
214
|
+
var url, wp, i, res, data, error_1;
|
|
215
|
+
return __generator(this, function (_a) {
|
|
216
|
+
switch (_a.label) {
|
|
217
|
+
case 0:
|
|
218
|
+
url = "https://maps.googleapis.com/maps/api/directions/json?" +
|
|
219
|
+
"origin=".concat(encodeURI(from)) +
|
|
220
|
+
"&destination=".concat(encodeURI(to)) +
|
|
221
|
+
"&unit=metric" +
|
|
222
|
+
"&mode=driving" +
|
|
223
|
+
"&departureTime=".concat((0, moment_1.default)(departure).format()) +
|
|
224
|
+
"&key=".concat(API_KEY);
|
|
225
|
+
if (!!waypoints.length) {
|
|
226
|
+
url += "&waypoints=";
|
|
227
|
+
wp = 'optimize:' + (!!doReorder ? 'true' : 'false');
|
|
228
|
+
for (i = 0; i < waypoints.length; i++) {
|
|
229
|
+
wp += '|' + waypoints[i];
|
|
230
|
+
}
|
|
231
|
+
url += encodeURIComponent(wp);
|
|
232
|
+
}
|
|
233
|
+
_a.label = 1;
|
|
234
|
+
case 1:
|
|
235
|
+
_a.trys.push([1, 4, , 5]);
|
|
236
|
+
return [4, (0, isomorphic_unfetch_1.default)(url)];
|
|
237
|
+
case 2:
|
|
238
|
+
res = _a.sent();
|
|
239
|
+
return [4, res.json()];
|
|
240
|
+
case 3:
|
|
241
|
+
data = _a.sent();
|
|
242
|
+
return [2, data];
|
|
243
|
+
case 4:
|
|
244
|
+
error_1 = _a.sent();
|
|
245
|
+
console.log("error while fetching Google:", error_1);
|
|
246
|
+
throw error_1;
|
|
247
|
+
case 5: return [2];
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
}); };
|
|
251
|
+
this.getRouteFromGoogle = function (from, to, waypoints, departure, API_KEY, doReorder) { return __awaiter(_this, void 0, void 0, function () {
|
|
252
|
+
var data, citys, zips, cityData, realRoute, handledId, cityOffset, orderedCitys, failSafe, _loop_1, this_1;
|
|
253
|
+
return __generator(this, function (_a) {
|
|
254
|
+
switch (_a.label) {
|
|
255
|
+
case 0:
|
|
256
|
+
if (!(waypoints.length <= 25)) return [3, 2];
|
|
257
|
+
return [4, this.googleDirection(from, to, waypoints, departure, API_KEY, doReorder)];
|
|
258
|
+
case 1:
|
|
259
|
+
data = _a.sent();
|
|
260
|
+
return [2, data];
|
|
261
|
+
case 2:
|
|
262
|
+
citys = [];
|
|
263
|
+
zips = [];
|
|
264
|
+
waypoints.map(function (w) {
|
|
265
|
+
var city = w.split(',')[1].trim();
|
|
266
|
+
var zip = w.split(',')[2].trim();
|
|
267
|
+
if (!citys.includes(city)) {
|
|
268
|
+
citys.push(city);
|
|
269
|
+
zips.push(city + ', ' + zip);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
console.log('Splited city :', citys);
|
|
273
|
+
return [4, this.googleDirection(from, to, zips, departure, API_KEY, doReorder)];
|
|
274
|
+
case 3:
|
|
275
|
+
cityData = _a.sent();
|
|
276
|
+
realRoute = [];
|
|
277
|
+
handledId = [];
|
|
278
|
+
cityOffset = -1;
|
|
279
|
+
if (!this.validateGoogleRoute(cityData))
|
|
280
|
+
throw 'BAD GOOGLE RESULT';
|
|
281
|
+
orderedCitys = [];
|
|
282
|
+
cityData.routes[0].waypoint_order.map(function (o) {
|
|
283
|
+
orderedCitys.push(citys[o].toLowerCase());
|
|
284
|
+
});
|
|
285
|
+
console.log('orderedCitys :', orderedCitys);
|
|
286
|
+
failSafe = 0;
|
|
287
|
+
_loop_1 = function () {
|
|
288
|
+
var thisFrom, thisTo, tempWP, subRef, subRun, off, i, o, i, o;
|
|
289
|
+
return __generator(this, function (_b) {
|
|
290
|
+
switch (_b.label) {
|
|
291
|
+
case 0:
|
|
292
|
+
failSafe++;
|
|
293
|
+
if (failSafe > 20)
|
|
294
|
+
throw 'Too many loop';
|
|
295
|
+
thisFrom = from;
|
|
296
|
+
thisTo = to;
|
|
297
|
+
if (!!realRoute.length) {
|
|
298
|
+
console.log('set from :', realRoute[realRoute.length - 1].end_address);
|
|
299
|
+
thisFrom = realRoute[realRoute.length - 1].end_address;
|
|
300
|
+
}
|
|
301
|
+
tempWP = [];
|
|
302
|
+
subRef = [];
|
|
303
|
+
cityOffset = -1;
|
|
304
|
+
while (cityOffset < orderedCitys.length && tempWP.length < 25) {
|
|
305
|
+
cityOffset++;
|
|
306
|
+
waypoints.map(function (w, idx) {
|
|
307
|
+
var city = w.split(',')[1].trim().toLowerCase();
|
|
308
|
+
if (orderedCitys[cityOffset] === city && !handledId.includes(idx) && tempWP.length < 25) {
|
|
309
|
+
console.log('adding to run: ', w);
|
|
310
|
+
tempWP.push(w);
|
|
311
|
+
subRef.push(idx);
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
if (cityOffset < citys.length - 1)
|
|
316
|
+
thisTo = citys[cityOffset + 1];
|
|
317
|
+
console.log('getting direction from to: ', thisFrom, thisTo);
|
|
318
|
+
return [4, this_1.googleDirection(thisFrom, thisTo, tempWP, departure, API_KEY, doReorder)];
|
|
319
|
+
case 1:
|
|
320
|
+
subRun = _b.sent();
|
|
321
|
+
if (!this_1.validateGoogleRoute(subRun))
|
|
322
|
+
throw 'BAD GOOGLE RESULT';
|
|
323
|
+
if (tempWP.length + realRoute.length < waypoints.length) {
|
|
324
|
+
console.log('more to do...: ');
|
|
325
|
+
off = subRun.routes[0].legs.length - 2;
|
|
326
|
+
while (off > subRun.routes[0].legs.length - 6) {
|
|
327
|
+
if (subRun.routes[0].legs[off].end_address.split(',')[1].toLowerCase() !==
|
|
328
|
+
subRun.routes[0].legs[off - 1].end_address.split(',')[1].toLowerCase()) {
|
|
329
|
+
cityOffset--;
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
off--;
|
|
333
|
+
}
|
|
334
|
+
for (i = 0; i <= off; i++) {
|
|
335
|
+
console.log('adding to final run: ', subRun.routes[0].legs[i].end_address);
|
|
336
|
+
departure = (0, moment_1.default)(departure).add(subRun.routes[0].legs[i].duration.value, 'second').toDate();
|
|
337
|
+
realRoute.push(__assign({}, subRun.routes[0].legs[i]));
|
|
338
|
+
o = subRef[subRun.routes[0].waypoint_order[i]];
|
|
339
|
+
handledId.push(o);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
for (i = 0; i < subRun.routes[0].legs.length - 1; i++) {
|
|
344
|
+
console.log('adding to final run: ', subRun.routes[0].legs[i].end_address);
|
|
345
|
+
departure = (0, moment_1.default)(departure).add(subRun.routes[0].legs[i].duration.value, 'second').toDate();
|
|
346
|
+
realRoute.push(__assign({}, subRun.routes[0].legs[i]));
|
|
347
|
+
o = subRef[subRun.routes[0].waypoint_order[i]];
|
|
348
|
+
handledId.push(o);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
console.log('Handled id : ', handledId);
|
|
352
|
+
console.log('count : ', handledId.length);
|
|
353
|
+
console.log('ttl count : ', waypoints.length);
|
|
354
|
+
return [2];
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
};
|
|
358
|
+
this_1 = this;
|
|
359
|
+
_a.label = 4;
|
|
360
|
+
case 4:
|
|
361
|
+
if (!(handledId.length < waypoints.length)) return [3, 6];
|
|
362
|
+
return [5, _loop_1()];
|
|
363
|
+
case 5:
|
|
364
|
+
_a.sent();
|
|
365
|
+
return [3, 4];
|
|
366
|
+
case 6:
|
|
367
|
+
console.log('done');
|
|
368
|
+
return [2, __assign(__assign({}, cityData), { routes: [__assign(__assign({}, cityData.routes[0]), { legs: realRoute, waypoint_order: handledId })] })];
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
}); };
|
|
372
|
+
this.validateGoogleRoute = function (objJson) {
|
|
373
|
+
if (!!objJson && !!objJson.routes && !!objJson.routes.length) {
|
|
374
|
+
if (!!objJson.routes[0].legs && !!objJson.routes[0].legs.length) {
|
|
375
|
+
return true;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return false;
|
|
379
|
+
};
|
|
380
|
+
this.unpackGoogleRoute = function (objJson, orderList) {
|
|
381
|
+
if (!!objJson && !!objJson.routes && !!objJson.routes.length) {
|
|
382
|
+
var usedRoute = undefined;
|
|
383
|
+
for (var i = 0; i < objJson.routes.length; i++) {
|
|
384
|
+
if (!!objJson.routes[i].legs && !!objJson.routes[i].legs.length) {
|
|
385
|
+
usedRoute = objJson.routes[i];
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
if (!!usedRoute) {
|
|
390
|
+
var re_1 = [];
|
|
391
|
+
usedRoute.legs.map(function (r) {
|
|
392
|
+
re_1.push({
|
|
393
|
+
distance: r.distance.value,
|
|
394
|
+
duration: r.duration.value,
|
|
395
|
+
full_address: r.end_address,
|
|
396
|
+
position: r.end_location,
|
|
397
|
+
city: r.end_address.split(',')[1].trim(),
|
|
398
|
+
linked_order: undefined
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
if (!!usedRoute.waypoint_order && !!usedRoute.waypoint_order.length) {
|
|
402
|
+
for (var i = 0; i < usedRoute.waypoint_order.length; i++) {
|
|
403
|
+
re_1[i].linked_order = orderList[usedRoute.waypoint_order[i]] || null;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
if (re_1.length == 1) {
|
|
408
|
+
re_1[0].linked_order = orderList[0] || null;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return re_1;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
return [];
|
|
415
|
+
};
|
|
416
|
+
this.fillTruckInOrder = function (list, trucks, space) { return __awaiter(_this, void 0, void 0, function () {
|
|
417
|
+
var re, avaibleTrucks, currentRun, _i, list_1, routeEntry, quote, quotesReq, error_2, t, t;
|
|
418
|
+
return __generator(this, function (_a) {
|
|
419
|
+
switch (_a.label) {
|
|
420
|
+
case 0:
|
|
421
|
+
re = [];
|
|
422
|
+
avaibleTrucks = __spreadArray([], trucks, true).sort(function (a, b) { return b.skid_count - a.skid_count; });
|
|
423
|
+
currentRun = (0, ScheduledRun_1.newScheduledRun)();
|
|
424
|
+
_i = 0, list_1 = list;
|
|
425
|
+
_a.label = 1;
|
|
426
|
+
case 1:
|
|
427
|
+
if (!(_i < list_1.length)) return [3, 7];
|
|
428
|
+
routeEntry = list_1[_i];
|
|
429
|
+
if (!!!routeEntry.linked_order)
|
|
430
|
+
return [3, 6];
|
|
431
|
+
quote = void 0;
|
|
432
|
+
_a.label = 2;
|
|
433
|
+
case 2:
|
|
434
|
+
_a.trys.push([2, 4, , 5]);
|
|
435
|
+
return [4, space.quotes.get({
|
|
436
|
+
query: [{ field: 'id', operator: '==', value: routeEntry.linked_order.quote_id }]
|
|
437
|
+
})];
|
|
438
|
+
case 3:
|
|
439
|
+
quotesReq = _a.sent();
|
|
440
|
+
quote = quotesReq[0];
|
|
441
|
+
return [3, 5];
|
|
442
|
+
case 4:
|
|
443
|
+
error_2 = _a.sent();
|
|
444
|
+
throw new Error("Can't fetch quote with id ".concat(routeEntry.linked_order.id));
|
|
445
|
+
case 5:
|
|
446
|
+
if (!!routeEntry.linked_order) {
|
|
447
|
+
if (!!avaibleTrucks.length && quote.getSkidPlateCount() + currentRun.skids > avaibleTrucks[0].skid_count) {
|
|
448
|
+
t = 0;
|
|
449
|
+
while (t < avaibleTrucks.length && currentRun.skids <= avaibleTrucks[t].skid_count)
|
|
450
|
+
t++;
|
|
451
|
+
t--;
|
|
452
|
+
currentRun = __assign(__assign({}, currentRun), { truck: avaibleTrucks[t] });
|
|
453
|
+
avaibleTrucks.splice(t, 1);
|
|
454
|
+
re.push(currentRun);
|
|
455
|
+
currentRun = (0, ScheduledRun_1.newScheduledRun)();
|
|
456
|
+
}
|
|
457
|
+
currentRun.command_list.push(__assign(__assign({}, routeEntry.linked_order), { google_city: routeEntry.city.toLowerCase() }));
|
|
458
|
+
currentRun = __assign(__assign({}, currentRun), { skids: currentRun.skids + quote.getSkidPlateCount() });
|
|
459
|
+
}
|
|
460
|
+
_a.label = 6;
|
|
461
|
+
case 6:
|
|
462
|
+
_i++;
|
|
463
|
+
return [3, 1];
|
|
464
|
+
case 7:
|
|
465
|
+
if (currentRun.skids > 0) {
|
|
466
|
+
if (!!avaibleTrucks.length) {
|
|
467
|
+
t = 0;
|
|
468
|
+
while (t < avaibleTrucks.length && currentRun.skids <= avaibleTrucks[t].skid_count)
|
|
469
|
+
t++;
|
|
470
|
+
t--;
|
|
471
|
+
currentRun = __assign(__assign({}, currentRun), { truck: avaibleTrucks[t] });
|
|
472
|
+
avaibleTrucks.splice(t, 1);
|
|
473
|
+
}
|
|
474
|
+
re.push(currentRun);
|
|
475
|
+
}
|
|
476
|
+
return [2, re];
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
}); };
|
|
480
|
+
this.calcCrow = function (lat1, lon1, lat2, lon2) {
|
|
481
|
+
var R = 6371;
|
|
482
|
+
var dLat = _this.toRad(lat2 - lat1);
|
|
483
|
+
var dLon = _this.toRad(lon2 - lon1);
|
|
484
|
+
var lat1 = _this.toRad(lat1);
|
|
485
|
+
var lat2 = _this.toRad(lat2);
|
|
486
|
+
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
|
487
|
+
Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2);
|
|
488
|
+
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
489
|
+
var d = R * c;
|
|
490
|
+
return d;
|
|
491
|
+
};
|
|
492
|
+
this.toRad = function (Value) {
|
|
493
|
+
return (Value * Math.PI) / 180;
|
|
494
|
+
};
|
|
495
|
+
this.doAgregate = function (list, radius) {
|
|
496
|
+
var roadMatch = list.map(function (r) { return []; });
|
|
497
|
+
list.map(function (r, idx) {
|
|
498
|
+
if (!!r.linked_order) {
|
|
499
|
+
list.map(function (b, idx2) {
|
|
500
|
+
if (!!b.linked_order) {
|
|
501
|
+
if (r.city == b.city)
|
|
502
|
+
roadMatch[idx].push(idx2);
|
|
503
|
+
else {
|
|
504
|
+
if (_this.calcCrow(r.position.lat, r.position.lng, b.position.lat, b.position.lng) < radius)
|
|
505
|
+
roadMatch[idx].push(idx2);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
return roadMatch;
|
|
512
|
+
};
|
|
513
|
+
this.fillTruckByAgregation = function (list, trucks, startRadius, space) { return __awaiter(_this, void 0, void 0, function () {
|
|
514
|
+
var radius, decided, avaibleTrucks, re, _loop_2, this_2;
|
|
515
|
+
var _this = this;
|
|
516
|
+
return __generator(this, function (_a) {
|
|
517
|
+
switch (_a.label) {
|
|
518
|
+
case 0:
|
|
519
|
+
radius = startRadius + 5;
|
|
520
|
+
decided = false;
|
|
521
|
+
avaibleTrucks = __spreadArray([], trucks, true).sort(function (a, b) { return b.skid_count - a.skid_count; });
|
|
522
|
+
if (!!!avaibleTrucks.length)
|
|
523
|
+
return [2, []];
|
|
524
|
+
re = [];
|
|
525
|
+
_loop_2 = function () {
|
|
526
|
+
var agregations, currentRun, allMap, thisMap, nextLeft, nextRight, safe, orderR, orderL, quoteR, quoteL, quotesReqR, quotesReqL, error_3, t;
|
|
527
|
+
return __generator(this, function (_b) {
|
|
528
|
+
switch (_b.label) {
|
|
529
|
+
case 0:
|
|
530
|
+
radius -= 5;
|
|
531
|
+
agregations = this_2.doAgregate(list, radius);
|
|
532
|
+
agregations = agregations.filter(function (f) { return f.length > 0; });
|
|
533
|
+
agregations = agregations.filter(function (f) { return __awaiter(_this, void 0, void 0, function () {
|
|
534
|
+
var c, _i, f_1, e, plannedOrder, quotesReq, quote;
|
|
535
|
+
return __generator(this, function (_a) {
|
|
536
|
+
switch (_a.label) {
|
|
537
|
+
case 0:
|
|
538
|
+
c = 0;
|
|
539
|
+
_i = 0, f_1 = f;
|
|
540
|
+
_a.label = 1;
|
|
541
|
+
case 1:
|
|
542
|
+
if (!(_i < f_1.length)) return [3, 4];
|
|
543
|
+
e = f_1[_i];
|
|
544
|
+
plannedOrder = list[e].linked_order;
|
|
545
|
+
if (!!!plannedOrder)
|
|
546
|
+
return [3, 3];
|
|
547
|
+
return [4, space.quotes.get({
|
|
548
|
+
query: [{ field: 'id', operator: '==', value: plannedOrder.quote_id }]
|
|
549
|
+
})];
|
|
550
|
+
case 2:
|
|
551
|
+
quotesReq = _a.sent();
|
|
552
|
+
quote = quotesReq[0];
|
|
553
|
+
c += quote.getSkidPlateCount();
|
|
554
|
+
_a.label = 3;
|
|
555
|
+
case 3:
|
|
556
|
+
_i++;
|
|
557
|
+
return [3, 1];
|
|
558
|
+
case 4: return [2, avaibleTrucks.length == 0 || c <= avaibleTrucks[0].skid_count];
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
}); });
|
|
562
|
+
if (!!!agregations.length)
|
|
563
|
+
return [2, "continue"];
|
|
564
|
+
agregations = agregations.sort(function (a, b) { return b.length - a.length; });
|
|
565
|
+
currentRun = (0, ScheduledRun_1.newScheduledRun)();
|
|
566
|
+
allMap = [];
|
|
567
|
+
_b.label = 1;
|
|
568
|
+
case 1:
|
|
569
|
+
if (!!!agregations.length) return [3, 9];
|
|
570
|
+
currentRun = (0, ScheduledRun_1.newScheduledRun)();
|
|
571
|
+
thisMap = __spreadArray([], agregations[0], true);
|
|
572
|
+
thisMap.map(function (a) {
|
|
573
|
+
allMap.push(a);
|
|
574
|
+
var order = list[a].linked_order;
|
|
575
|
+
if (!!order) {
|
|
576
|
+
currentRun.command_list.push(__assign(__assign({}, order), { google_city: list[a].city.toLowerCase() }));
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
nextLeft = thisMap[0];
|
|
580
|
+
nextRight = nextLeft + 1;
|
|
581
|
+
if (nextRight >= list.length - 2)
|
|
582
|
+
nextRight = 0;
|
|
583
|
+
safe = 1000;
|
|
584
|
+
_b.label = 2;
|
|
585
|
+
case 2:
|
|
586
|
+
if (!true) return [3, 8];
|
|
587
|
+
safe--;
|
|
588
|
+
if (safe <= 0) {
|
|
589
|
+
agregations = [];
|
|
590
|
+
return [3, 8];
|
|
591
|
+
}
|
|
592
|
+
if (allMap.length >= list.length - 1) {
|
|
593
|
+
return [3, 8];
|
|
594
|
+
}
|
|
595
|
+
while (allMap.includes(nextLeft)) {
|
|
596
|
+
if (nextLeft === 0)
|
|
597
|
+
nextLeft = list.length - 1;
|
|
598
|
+
nextLeft--;
|
|
599
|
+
}
|
|
600
|
+
while (allMap.includes(nextRight)) {
|
|
601
|
+
if (nextRight >= list.length - 2)
|
|
602
|
+
nextRight = -1;
|
|
603
|
+
nextRight++;
|
|
604
|
+
}
|
|
605
|
+
orderR = list[nextRight].linked_order;
|
|
606
|
+
orderL = list[nextLeft].linked_order;
|
|
607
|
+
if (!!!orderL || !!!orderR) {
|
|
608
|
+
return [3, 8];
|
|
609
|
+
}
|
|
610
|
+
quoteR = void 0;
|
|
611
|
+
quoteL = void 0;
|
|
612
|
+
_b.label = 3;
|
|
613
|
+
case 3:
|
|
614
|
+
_b.trys.push([3, 6, , 7]);
|
|
615
|
+
return [4, space.quotes.get({
|
|
616
|
+
query: [{ field: 'id', operator: '==', value: orderR.quote_id }]
|
|
617
|
+
})];
|
|
618
|
+
case 4:
|
|
619
|
+
quotesReqR = _b.sent();
|
|
620
|
+
quoteR = quotesReqR[0];
|
|
621
|
+
return [4, space.quotes.get({
|
|
622
|
+
query: [{ field: 'id', operator: '==', value: orderL.quote_id }]
|
|
623
|
+
})];
|
|
624
|
+
case 5:
|
|
625
|
+
quotesReqL = _b.sent();
|
|
626
|
+
quoteL = quotesReqL[0];
|
|
627
|
+
return [3, 7];
|
|
628
|
+
case 6:
|
|
629
|
+
error_3 = _b.sent();
|
|
630
|
+
throw error_3;
|
|
631
|
+
case 7:
|
|
632
|
+
if (!!avaibleTrucks.length &&
|
|
633
|
+
currentRun.skids + quoteL.getSkidPlateCount() > avaibleTrucks[0].skid_count &&
|
|
634
|
+
currentRun.skids + quoteR.getSkidPlateCount() > avaibleTrucks[0].skid_count)
|
|
635
|
+
return [3, 8];
|
|
636
|
+
if (!!avaibleTrucks.length && currentRun.skids + quoteL.getSkidPlateCount() > avaibleTrucks[0].skid_count) {
|
|
637
|
+
allMap.push(nextRight);
|
|
638
|
+
currentRun = __assign(__assign({}, currentRun), { command_list: __spreadArray(__spreadArray([], currentRun.command_list, true), [
|
|
639
|
+
__assign(__assign({}, orderR), { google_city: list[nextRight].city.toLowerCase() })
|
|
640
|
+
], false), skids: currentRun.skids + quoteR.getSkidPlateCount() });
|
|
641
|
+
}
|
|
642
|
+
else if (!!avaibleTrucks.length &&
|
|
643
|
+
currentRun.skids + quoteR.getSkidPlateCount() > avaibleTrucks[0].skid_count) {
|
|
644
|
+
allMap.push(nextLeft);
|
|
645
|
+
currentRun = __assign(__assign({}, currentRun), { command_list: __spreadArray(__spreadArray([], currentRun.command_list, true), [__assign(__assign({}, orderL), { google_city: list[nextLeft].city.toLowerCase() })], false), skids: currentRun.skids + quoteL.getSkidPlateCount() });
|
|
646
|
+
}
|
|
647
|
+
else if (list[nextRight].distance > list[nextLeft].distance) {
|
|
648
|
+
allMap.push(nextLeft);
|
|
649
|
+
currentRun = __assign(__assign({}, currentRun), { command_list: __spreadArray(__spreadArray([], currentRun.command_list, true), [__assign(__assign({}, orderL), { google_city: list[nextLeft].city.toLowerCase() })], false), skids: currentRun.skids + quoteL.getSkidPlateCount() });
|
|
650
|
+
}
|
|
651
|
+
else {
|
|
652
|
+
allMap.push(nextRight);
|
|
653
|
+
currentRun = __assign(__assign({}, currentRun), { command_list: __spreadArray(__spreadArray([], currentRun.command_list, true), [
|
|
654
|
+
__assign(__assign({}, orderR), { google_city: list[nextRight].city.toLowerCase() })
|
|
655
|
+
], false), skids: currentRun.skids + quoteR.getSkidPlateCount() });
|
|
656
|
+
}
|
|
657
|
+
return [3, 2];
|
|
658
|
+
case 8:
|
|
659
|
+
allMap.map(function (m) {
|
|
660
|
+
agregations.map(function (a) {
|
|
661
|
+
if (a.includes(m)) {
|
|
662
|
+
var p = a.indexOf(m);
|
|
663
|
+
a.splice(p, 1);
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
});
|
|
667
|
+
agregations = agregations.filter(function (f) { return f.length > 0; });
|
|
668
|
+
agregations = agregations.sort(function (a, b) { return b.length - a.length; });
|
|
669
|
+
if (!!avaibleTrucks.length) {
|
|
670
|
+
t = 0;
|
|
671
|
+
while (t < avaibleTrucks.length && currentRun.skids <= avaibleTrucks[t].skid_count)
|
|
672
|
+
t++;
|
|
673
|
+
t--;
|
|
674
|
+
currentRun = __assign(__assign({}, currentRun), { truck: avaibleTrucks[t] });
|
|
675
|
+
avaibleTrucks.splice(t, 1);
|
|
676
|
+
}
|
|
677
|
+
re.push(currentRun);
|
|
678
|
+
return [3, 1];
|
|
679
|
+
case 9:
|
|
680
|
+
if (!!re.length)
|
|
681
|
+
decided = true;
|
|
682
|
+
return [2];
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
};
|
|
686
|
+
this_2 = this;
|
|
687
|
+
_a.label = 1;
|
|
688
|
+
case 1:
|
|
689
|
+
if (!(radius > 1 && !decided)) return [3, 3];
|
|
690
|
+
return [5, _loop_2()];
|
|
691
|
+
case 2:
|
|
692
|
+
_a.sent();
|
|
693
|
+
return [3, 1];
|
|
694
|
+
case 3: return [2, re];
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
}); };
|
|
698
|
+
this.evaluateRoutes = function (runs) {
|
|
699
|
+
var result = 0;
|
|
700
|
+
var _loop_3 = function (i) {
|
|
701
|
+
runs[i].command_list.map(function (c) {
|
|
702
|
+
for (var a = i + 1; a < runs.length; a++) {
|
|
703
|
+
if (runs[a].command_list.some(function (e) { return e.google_city === c.google_city; }))
|
|
704
|
+
result += 50;
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
};
|
|
708
|
+
for (var i = 0; i < runs.length - 1; i++) {
|
|
709
|
+
_loop_3(i);
|
|
710
|
+
}
|
|
711
|
+
result += runs.length * 100;
|
|
712
|
+
runs.map(function (r) {
|
|
713
|
+
if (!!r.truck)
|
|
714
|
+
result += (r.truck.skid_count - r.skids) * 10;
|
|
715
|
+
});
|
|
716
|
+
if (runs.some(function (r) { return !!!r.truck; }))
|
|
717
|
+
result += 500;
|
|
718
|
+
return result;
|
|
719
|
+
};
|
|
720
|
+
this.dispatchDay = function (dayInfo, orderList, trucks, _drivers, settings, space) { return __awaiter(_this, void 0, void 0, function () {
|
|
721
|
+
var currentDay, fullAddress, myJson, allPoints, runs, pts, _a, _b, _c, _d, _e, _f, _g, _h, i, bestRoutes, bestPts, i, run_1, amtot, otherDelivery, finalDelivery, finalGoogleRoute, googleRoute, from, addrs, routeAM, amPoints, i, deli, i, addrs, route, amPoints, i, deli, i, error_4, error_5;
|
|
722
|
+
return __generator(this, function (_j) {
|
|
723
|
+
switch (_j.label) {
|
|
724
|
+
case 0:
|
|
725
|
+
currentDay = (0, moment_1.default)(dayInfo.day)
|
|
726
|
+
.set('hour', settings.departure_hour)
|
|
727
|
+
.set('minute', settings.departure_minute)
|
|
728
|
+
.toDate();
|
|
729
|
+
fullAddress = orderList.map(function (plannedOrder) { return plannedOrder.fullAddress; });
|
|
730
|
+
_j.label = 1;
|
|
731
|
+
case 1:
|
|
732
|
+
_j.trys.push([1, 17, , 18]);
|
|
733
|
+
return [4, this.getRouteFromGoogle(settings.home_address, settings.home_address, fullAddress, currentDay, settings.api_key, !!settings.reorder_route)];
|
|
734
|
+
case 2:
|
|
735
|
+
myJson = _j.sent();
|
|
736
|
+
allPoints = this.unpackGoogleRoute(myJson, orderList.map(function (obj) { return obj.data(); }));
|
|
737
|
+
runs = [[], [], [], []];
|
|
738
|
+
pts = [0, 0, 0, 0];
|
|
739
|
+
if (!!!settings.dispatch_trucks) return [3, 6];
|
|
740
|
+
_a = runs;
|
|
741
|
+
_b = 1;
|
|
742
|
+
return [4, this.fillTruckByAgregation(allPoints, trucks, 5, space)];
|
|
743
|
+
case 3:
|
|
744
|
+
_a[_b] = _j.sent();
|
|
745
|
+
_c = runs;
|
|
746
|
+
_d = 2;
|
|
747
|
+
return [4, this.fillTruckByAgregation(allPoints, trucks, 10, space)];
|
|
748
|
+
case 4:
|
|
749
|
+
_c[_d] = _j.sent();
|
|
750
|
+
_e = runs;
|
|
751
|
+
_f = 3;
|
|
752
|
+
return [4, this.fillTruckByAgregation(allPoints, trucks, 15, space)];
|
|
753
|
+
case 5:
|
|
754
|
+
_e[_f] = _j.sent();
|
|
755
|
+
_j.label = 6;
|
|
756
|
+
case 6:
|
|
757
|
+
_g = runs;
|
|
758
|
+
_h = 0;
|
|
759
|
+
return [4, this.fillTruckInOrder(allPoints, trucks, space)];
|
|
760
|
+
case 7:
|
|
761
|
+
_g[_h] = _j.sent();
|
|
762
|
+
if (!!settings.dispatch_trucks) {
|
|
763
|
+
for (i = 0; i < 4; i++)
|
|
764
|
+
pts[i] = this.evaluateRoutes(runs[i]);
|
|
765
|
+
}
|
|
766
|
+
bestRoutes = runs[0];
|
|
767
|
+
bestPts = pts[0];
|
|
768
|
+
if (!!settings.dispatch_trucks) {
|
|
769
|
+
for (i = 0; i < 4; i++) {
|
|
770
|
+
if (pts[i] < bestPts) {
|
|
771
|
+
bestPts = pts[i];
|
|
772
|
+
bestRoutes = runs[i];
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
run_1 = 0;
|
|
777
|
+
_j.label = 8;
|
|
778
|
+
case 8:
|
|
779
|
+
if (!(run_1 < bestRoutes.length)) return [3, 16];
|
|
780
|
+
_j.label = 9;
|
|
781
|
+
case 9:
|
|
782
|
+
_j.trys.push([9, 14, , 15]);
|
|
783
|
+
amtot = [];
|
|
784
|
+
otherDelivery = __spreadArray([], bestRoutes[run_1].command_list, true);
|
|
785
|
+
if (!!settings.reorder_route) {
|
|
786
|
+
amtot = bestRoutes[run_1].command_list.filter(function (f) { return f.is_AM; });
|
|
787
|
+
otherDelivery = bestRoutes[run_1].command_list.filter(function (f) { return !f.is_AM; });
|
|
788
|
+
}
|
|
789
|
+
finalDelivery = [];
|
|
790
|
+
finalGoogleRoute = [];
|
|
791
|
+
googleRoute = undefined;
|
|
792
|
+
from = settings.home_address;
|
|
793
|
+
if (!!!amtot.length) return [3, 11];
|
|
794
|
+
addrs = amtot.map(function (a) { return a.address + ', ' + a.city + ', ' + a.province; });
|
|
795
|
+
return [4, this.getRouteFromGoogle(settings.home_address, !!otherDelivery.length ? addrs[addrs.length - 1] : settings.home_address, !!otherDelivery.length ? addrs.slice(0, addrs.length - 1) : addrs, currentDay, settings.api_key, !!settings.reorder_route)];
|
|
796
|
+
case 10:
|
|
797
|
+
routeAM = _j.sent();
|
|
798
|
+
from = addrs[addrs.length - 1];
|
|
799
|
+
amPoints = this.unpackGoogleRoute(routeAM, amtot);
|
|
800
|
+
for (i = 0; i < amPoints.length; i++) {
|
|
801
|
+
deli = amPoints[i].linked_order;
|
|
802
|
+
if (!!deli)
|
|
803
|
+
finalDelivery.push(__assign({}, deli));
|
|
804
|
+
}
|
|
805
|
+
for (i = 0; i < routeAM.routes[0].legs.length; i++) {
|
|
806
|
+
finalGoogleRoute.push(__assign({}, routeAM.routes[0].legs[i]));
|
|
807
|
+
}
|
|
808
|
+
googleRoute = routeAM;
|
|
809
|
+
_j.label = 11;
|
|
810
|
+
case 11:
|
|
811
|
+
if (!!!otherDelivery.length) return [3, 13];
|
|
812
|
+
addrs = otherDelivery.map(function (a) { return a.address + ', ' + a.city + ', ' + a.province; });
|
|
813
|
+
return [4, this.getRouteFromGoogle(from, settings.home_address, addrs, currentDay, settings.api_key, !!settings.reorder_route)];
|
|
814
|
+
case 12:
|
|
815
|
+
route = _j.sent();
|
|
816
|
+
amPoints = this.unpackGoogleRoute(route, otherDelivery);
|
|
817
|
+
for (i = 0; i < amPoints.length; i++) {
|
|
818
|
+
deli = amPoints[i].linked_order;
|
|
819
|
+
if (!!deli)
|
|
820
|
+
finalDelivery.push(__assign({}, deli));
|
|
821
|
+
}
|
|
822
|
+
for (i = 0; i < route.routes[0].legs.length; i++) {
|
|
823
|
+
finalGoogleRoute.push(__assign({}, route.routes[0].legs[i]));
|
|
824
|
+
}
|
|
825
|
+
googleRoute = route;
|
|
826
|
+
_j.label = 13;
|
|
827
|
+
case 13:
|
|
828
|
+
bestRoutes[run_1] = __assign(__assign({}, bestRoutes[run_1]), { command_list: __spreadArray([], finalDelivery, true), day: dayInfo.day, google_route: __assign(__assign({}, googleRoute), { routes: [
|
|
829
|
+
__assign(__assign({}, googleRoute.routes[0]), { legs: finalGoogleRoute, waypoint_order: finalDelivery.map(function (c, idx) { return idx; }) })
|
|
830
|
+
] }) });
|
|
831
|
+
return [3, 15];
|
|
832
|
+
case 14:
|
|
833
|
+
error_4 = _j.sent();
|
|
834
|
+
console.log("in loop", error_4);
|
|
835
|
+
return [3, 15];
|
|
836
|
+
case 15:
|
|
837
|
+
run_1++;
|
|
838
|
+
return [3, 8];
|
|
839
|
+
case 16: return [2, bestRoutes];
|
|
840
|
+
case 17:
|
|
841
|
+
error_5 = _j.sent();
|
|
842
|
+
console.log(error_5);
|
|
843
|
+
throw error_5;
|
|
844
|
+
case 18: return [2];
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
}); };
|
|
848
|
+
this.deleteFromDispatch = function (space, quoteId) { return __awaiter(_this, void 0, void 0, function () {
|
|
849
|
+
var old, schList, l, pos, mySche;
|
|
850
|
+
return __generator(this, function (_a) {
|
|
851
|
+
switch (_a.label) {
|
|
852
|
+
case 0: return [4, PlannedOrder_2.default.fetchByQuoteId(space, quoteId)];
|
|
853
|
+
case 1:
|
|
854
|
+
old = _a.sent();
|
|
855
|
+
if (!(!!old && !!old.length)) return [3, 7];
|
|
856
|
+
return [4, ScheduledRun_2.default.getList(space, old[0].day)];
|
|
857
|
+
case 2:
|
|
858
|
+
schList = _a.sent();
|
|
859
|
+
if (!!!schList) return [3, 7];
|
|
860
|
+
l = 0;
|
|
861
|
+
_a.label = 3;
|
|
862
|
+
case 3:
|
|
863
|
+
if (!(l < schList.length)) return [3, 7];
|
|
864
|
+
pos = schList[l].command_list.findIndex(function (f) { return f.quote_id == quoteId; });
|
|
865
|
+
if (!(pos > -1)) return [3, 6];
|
|
866
|
+
schList[l].command_list.splice(pos, 1);
|
|
867
|
+
return [4, ScheduledRun_2.default.create(space)];
|
|
868
|
+
case 4:
|
|
869
|
+
mySche = _a.sent();
|
|
870
|
+
if (!!!mySche) return [3, 6];
|
|
871
|
+
return [4, mySche.save(__assign(__assign({}, schList[l]), { google_is_good: false }))];
|
|
872
|
+
case 5:
|
|
873
|
+
_a.sent();
|
|
874
|
+
_a.label = 6;
|
|
875
|
+
case 6:
|
|
876
|
+
l++;
|
|
877
|
+
return [3, 3];
|
|
878
|
+
case 7: return [4, PlannedOrder_2.default.deleteId(quoteId, space)];
|
|
879
|
+
case 8:
|
|
880
|
+
_a.sent();
|
|
881
|
+
return [2];
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
}); };
|
|
885
|
+
this.addToDispatch = function (space, quote) { return __awaiter(_this, void 0, void 0, function () {
|
|
886
|
+
var quoteData, address, client, id, amTot, shipping_date, day, plannedOrdersReq, old, newOrder_1, schList, l, pos, mySche, error_6, list, customDay, sData, custom, drivers, daySettings_1, trucks, sche, existingSche, toBeReplaced, p, forSave, error_7;
|
|
887
|
+
return __generator(this, function (_a) {
|
|
888
|
+
switch (_a.label) {
|
|
889
|
+
case 0:
|
|
890
|
+
_a.trys.push([0, 27, , 28]);
|
|
891
|
+
quoteData = quote.data();
|
|
892
|
+
address = quoteData.address, client = quoteData.client, id = quoteData.id, amTot = quoteData.amTot, shipping_date = quoteData.shipping_date;
|
|
893
|
+
if (!!!address || !!!client || !!!id || !!!shipping_date)
|
|
894
|
+
throw new Error('Not enought information in quote, try filling address, client and id');
|
|
895
|
+
day = quote.shippingDate;
|
|
896
|
+
return [4, space.plannedOrders.get({
|
|
897
|
+
query: [{ field: 'quote_id', operator: '==', value: id }]
|
|
898
|
+
})];
|
|
899
|
+
case 1:
|
|
900
|
+
plannedOrdersReq = _a.sent();
|
|
901
|
+
old = undefined;
|
|
902
|
+
if (!!plannedOrdersReq.length && !!plannedOrdersReq[0])
|
|
903
|
+
old = __assign({}, plannedOrdersReq[0].data());
|
|
904
|
+
newOrder_1 = !!plannedOrdersReq.length && !!plannedOrdersReq[0]
|
|
905
|
+
? plannedOrdersReq[0]
|
|
906
|
+
: new PlannedOrder_2.default((0, PlannedOrder_1.newPlannedOrder)(), space, 'dispatch@addiocommerce.com');
|
|
907
|
+
if (!!!newOrder_1)
|
|
908
|
+
throw new Error("Unable to create new planned order");
|
|
909
|
+
return [4, newOrder_1.save({
|
|
910
|
+
day: (0, moment_1.default)(day).format('YYYY-MM-DD'),
|
|
911
|
+
address: address.address,
|
|
912
|
+
is_AM: !!amTot,
|
|
913
|
+
customer: {
|
|
914
|
+
email: client.email,
|
|
915
|
+
name: client.name,
|
|
916
|
+
phone: client.phone
|
|
917
|
+
},
|
|
918
|
+
quote_id: id,
|
|
919
|
+
status: 0
|
|
920
|
+
})];
|
|
921
|
+
case 2:
|
|
922
|
+
_a.sent();
|
|
923
|
+
if (!(!!!old ||
|
|
924
|
+
old.address !== newOrder_1.data().address ||
|
|
925
|
+
old.city !== newOrder_1.data().city ||
|
|
926
|
+
old.day !== newOrder_1.data().day)) return [3, 26];
|
|
927
|
+
_a.label = 3;
|
|
928
|
+
case 3:
|
|
929
|
+
_a.trys.push([3, 10, , 11]);
|
|
930
|
+
if (!(!!old && old.day !== newOrder_1.data().day)) return [3, 9];
|
|
931
|
+
return [4, ScheduledRun_2.default.getList(space, old.day)];
|
|
932
|
+
case 4:
|
|
933
|
+
schList = _a.sent();
|
|
934
|
+
if (!!!schList) return [3, 9];
|
|
935
|
+
l = 0;
|
|
936
|
+
_a.label = 5;
|
|
937
|
+
case 5:
|
|
938
|
+
if (!(l < schList.length)) return [3, 9];
|
|
939
|
+
pos = schList[l].command_list.findIndex(function (f) { return f.quote_id == newOrder_1.data().quote_id; });
|
|
940
|
+
if (!(pos > -1)) return [3, 8];
|
|
941
|
+
schList[l].command_list.splice(pos, 1);
|
|
942
|
+
return [4, ScheduledRun_2.default.create(space)];
|
|
943
|
+
case 6:
|
|
944
|
+
mySche = _a.sent();
|
|
945
|
+
if (!!!mySche) return [3, 8];
|
|
946
|
+
return [4, mySche.save(__assign(__assign({}, schList[l]), { google_is_good: false }))];
|
|
947
|
+
case 7:
|
|
948
|
+
_a.sent();
|
|
949
|
+
_a.label = 8;
|
|
950
|
+
case 8:
|
|
951
|
+
l++;
|
|
952
|
+
return [3, 5];
|
|
953
|
+
case 9: return [3, 11];
|
|
954
|
+
case 10:
|
|
955
|
+
error_6 = _a.sent();
|
|
956
|
+
console.log("error while changing day", error_6);
|
|
957
|
+
throw error_6;
|
|
958
|
+
case 11: return [4, PlannedOrder_2.default.getList(space, newOrder_1.data().day)];
|
|
959
|
+
case 12:
|
|
960
|
+
list = _a.sent();
|
|
961
|
+
if (!!!list) return [3, 26];
|
|
962
|
+
customDay = void 0;
|
|
963
|
+
sData = space.data();
|
|
964
|
+
return [4, CalendarDay_1.default.getList(space, [newOrder_1.data().day])];
|
|
965
|
+
case 13:
|
|
966
|
+
custom = _a.sent();
|
|
967
|
+
if (!!custom && custom.length) {
|
|
968
|
+
customDay = custom[0];
|
|
969
|
+
}
|
|
970
|
+
return [4, Driver_1.default.getList(space)];
|
|
971
|
+
case 14:
|
|
972
|
+
drivers = _a.sent();
|
|
973
|
+
daySettings_1 = {
|
|
974
|
+
avaible_drivers: !!customDay ? customDay.avaible_drivers : (drivers || []).map(function (d) { return d.slug; }),
|
|
975
|
+
max_run: !!customDay
|
|
976
|
+
? customDay.max_runs
|
|
977
|
+
: !!sData.dispatch_settings
|
|
978
|
+
? sData.dispatch_settings.normal_week_config[(0, moment_1.default)(newOrder_1.data().day).day()].max_run
|
|
979
|
+
: 1,
|
|
980
|
+
max_time: !!customDay
|
|
981
|
+
? customDay.time_limit
|
|
982
|
+
: !!sData.dispatch_settings
|
|
983
|
+
? sData.dispatch_settings.day_max_driving_time
|
|
984
|
+
: 12,
|
|
985
|
+
start_time: !!sData.dispatch_settings ? sData.dispatch_settings.day_start_time : 7 * 60,
|
|
986
|
+
time_per_delivery: 5,
|
|
987
|
+
time_per_skid: 5
|
|
988
|
+
};
|
|
989
|
+
return [4, Truck_2.default.getList(space)];
|
|
990
|
+
case 15:
|
|
991
|
+
trucks = _a.sent();
|
|
992
|
+
return [4, this.dispatchDay({
|
|
993
|
+
avaible_drivers: daySettings_1.avaible_drivers,
|
|
994
|
+
day: newOrder_1.data().day,
|
|
995
|
+
max_runs: daySettings_1.max_run,
|
|
996
|
+
time_limit: daySettings_1.max_time,
|
|
997
|
+
last_update_by: ''
|
|
998
|
+
}, list, trucks || [], (drivers || []).filter(function (f) { return daySettings_1.avaible_drivers.includes(f.slug); }), {
|
|
999
|
+
api_key: !!sData.dispatch_settings ? sData.dispatch_settings.api_key : '',
|
|
1000
|
+
departure_hour: Math.trunc(daySettings_1.start_time / 60),
|
|
1001
|
+
departure_minute: daySettings_1.start_time % 60,
|
|
1002
|
+
home_address: !!sData.dispatch_settings
|
|
1003
|
+
? sData.dispatch_settings.home_address
|
|
1004
|
+
: '3150 Bd Hochelaga, Québec, QC G1W 2R2',
|
|
1005
|
+
reorder_route: true
|
|
1006
|
+
}, space)];
|
|
1007
|
+
case 16:
|
|
1008
|
+
sche = _a.sent();
|
|
1009
|
+
if (!!!sche) return [3, 26];
|
|
1010
|
+
return [4, ScheduledRun_2.default.getList(space, newOrder_1.data().day)];
|
|
1011
|
+
case 17:
|
|
1012
|
+
existingSche = _a.sent();
|
|
1013
|
+
toBeReplaced = [];
|
|
1014
|
+
if (!!existingSche) {
|
|
1015
|
+
toBeReplaced = existingSche;
|
|
1016
|
+
}
|
|
1017
|
+
p = 0;
|
|
1018
|
+
return [4, ScheduledRun_2.default.create(space)];
|
|
1019
|
+
case 18:
|
|
1020
|
+
forSave = _a.sent();
|
|
1021
|
+
_a.label = 19;
|
|
1022
|
+
case 19:
|
|
1023
|
+
if (!(p < sche.length && !!forSave)) return [3, 24];
|
|
1024
|
+
if (!(p < toBeReplaced.length)) return [3, 21];
|
|
1025
|
+
return [4, forSave.save(__assign(__assign({}, toBeReplaced[p]), { command_list: sche[p].command_list, google_is_good: true, google_route: sche[p].google_route, skids: sche[p].skids }))];
|
|
1026
|
+
case 20:
|
|
1027
|
+
_a.sent();
|
|
1028
|
+
return [3, 23];
|
|
1029
|
+
case 21: return [4, forSave.save(__assign(__assign({}, sche[p]), { google_is_good: true, skids: sche[p].skids, day: newOrder_1.data().day }))];
|
|
1030
|
+
case 22:
|
|
1031
|
+
_a.sent();
|
|
1032
|
+
_a.label = 23;
|
|
1033
|
+
case 23:
|
|
1034
|
+
p++;
|
|
1035
|
+
return [3, 19];
|
|
1036
|
+
case 24:
|
|
1037
|
+
if (!(p < toBeReplaced.length)) return [3, 26];
|
|
1038
|
+
return [4, ScheduledRun_2.default.deleteId(toBeReplaced[p].id, space)];
|
|
1039
|
+
case 25:
|
|
1040
|
+
_a.sent();
|
|
1041
|
+
return [3, 24];
|
|
1042
|
+
case 26: return [3, 28];
|
|
1043
|
+
case 27:
|
|
1044
|
+
error_7 = _a.sent();
|
|
1045
|
+
console.log("error while adding to dispatch", error_7);
|
|
1046
|
+
throw error_7;
|
|
1047
|
+
case 28: return [2];
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
}); };
|
|
1051
|
+
}
|
|
1052
|
+
return Dispatch;
|
|
1053
|
+
}());
|
|
1054
|
+
exports.default = Dispatch;
|
|
1055
|
+
//# sourceMappingURL=Dispatch.js.map
|