@retaila/shared-types 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +125 -1
- package/dist/index.d.ts +125 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -401,6 +401,8 @@ interface AccountDeliveryOption {
|
|
|
401
401
|
deliveryType: DeliveryType;
|
|
402
402
|
demo: boolean;
|
|
403
403
|
hideAccountBranchAddress: boolean;
|
|
404
|
+
/** When true, estimated delivery times are calculated by AI and shown to customers at checkout */
|
|
405
|
+
showEstimatedDeliveryTime: boolean;
|
|
404
406
|
createdAt: Date;
|
|
405
407
|
updatedAt: Date;
|
|
406
408
|
deletedAt?: Date | null;
|
|
@@ -409,6 +411,11 @@ interface AccountDeliveryOption {
|
|
|
409
411
|
integration?: AccountIntegration | null;
|
|
410
412
|
price?: number | null;
|
|
411
413
|
accountBranch?: AccountBranch | null;
|
|
414
|
+
/** Computed by api-public when listing delivery options; ISO date strings */
|
|
415
|
+
estimatedDelivery?: {
|
|
416
|
+
start: string;
|
|
417
|
+
end: string;
|
|
418
|
+
};
|
|
412
419
|
}
|
|
413
420
|
declare enum AccountDeliveryOptionPriceLogic {
|
|
414
421
|
FIXED = "FIXED",
|
|
@@ -467,6 +474,7 @@ interface CreateAccountDeliveryOptionDTO {
|
|
|
467
474
|
deliveryType: DeliveryType;
|
|
468
475
|
deliveryZones?: DeliveryZoneInput[];
|
|
469
476
|
data?: Record<string, unknown>;
|
|
477
|
+
showEstimatedDeliveryTime?: boolean;
|
|
470
478
|
}
|
|
471
479
|
interface UpdateAccountDeliveryOptionDTO {
|
|
472
480
|
accountBranchId: string;
|
|
@@ -478,6 +486,88 @@ interface UpdateAccountDeliveryOptionDTO {
|
|
|
478
486
|
deliveryType?: DeliveryType;
|
|
479
487
|
deliveryZones?: DeliveryZoneInput[];
|
|
480
488
|
data?: Record<string, unknown>;
|
|
489
|
+
showEstimatedDeliveryTime?: boolean;
|
|
490
|
+
}
|
|
491
|
+
/** Rule types for estimated delivery calculation */
|
|
492
|
+
declare enum DeliveryOptionRuleType {
|
|
493
|
+
PROCESSING_DAYS = "PROCESSING_DAYS",
|
|
494
|
+
SAME_DAY_CUTOFF = "SAME_DAY_CUTOFF",
|
|
495
|
+
DELIVERY_DAYS = "DELIVERY_DAYS",
|
|
496
|
+
PICKUP_READY_HOURS = "PICKUP_READY_HOURS",
|
|
497
|
+
FIXED_OFFSET_DAYS = "FIXED_OFFSET_DAYS",
|
|
498
|
+
/** ISO weekday numbers (1=Mon..7=Sun) that count as operating days */
|
|
499
|
+
BUSINESS_DAYS = "BUSINESS_DAYS",
|
|
500
|
+
/** Delivery time-of-day window inferred by AI from historical orders */
|
|
501
|
+
DELIVERY_HOURS = "DELIVERY_HOURS",
|
|
502
|
+
/** Extra days added to the pessimistic end when volume is high */
|
|
503
|
+
BUFFER_SAFETY_MARGIN = "BUFFER_SAFETY_MARGIN"
|
|
504
|
+
}
|
|
505
|
+
interface AccountDeliveryOptionRule {
|
|
506
|
+
id: string;
|
|
507
|
+
accountId: string;
|
|
508
|
+
accountDeliveryOptionId: string;
|
|
509
|
+
ruleType: DeliveryOptionRuleType;
|
|
510
|
+
params?: Record<string, unknown>;
|
|
511
|
+
priority: number;
|
|
512
|
+
createdAt: Date;
|
|
513
|
+
updatedAt: Date;
|
|
514
|
+
deletedAt?: Date | null;
|
|
515
|
+
}
|
|
516
|
+
interface CreateDeliveryOptionRuleDTO {
|
|
517
|
+
ruleType: DeliveryOptionRuleType;
|
|
518
|
+
params?: Record<string, unknown>;
|
|
519
|
+
priority?: number;
|
|
520
|
+
}
|
|
521
|
+
interface UpdateDeliveryOptionRuleDTO {
|
|
522
|
+
ruleType?: DeliveryOptionRuleType;
|
|
523
|
+
params?: Record<string, unknown>;
|
|
524
|
+
priority?: number;
|
|
525
|
+
}
|
|
526
|
+
/** Params per rule type for estimation */
|
|
527
|
+
interface ProcessingDaysParams {
|
|
528
|
+
minDays: number;
|
|
529
|
+
maxDays?: number;
|
|
530
|
+
}
|
|
531
|
+
interface SameDayCutoffParams {
|
|
532
|
+
cutoffTime: string;
|
|
533
|
+
}
|
|
534
|
+
interface DeliveryDaysParams {
|
|
535
|
+
minDays: number;
|
|
536
|
+
maxDays: number;
|
|
537
|
+
}
|
|
538
|
+
interface PickupReadyHoursParams {
|
|
539
|
+
hours?: number;
|
|
540
|
+
minHours?: number;
|
|
541
|
+
maxHours?: number;
|
|
542
|
+
}
|
|
543
|
+
interface FixedOffsetDaysParams {
|
|
544
|
+
minDays: number;
|
|
545
|
+
maxDays?: number;
|
|
546
|
+
}
|
|
547
|
+
interface BusinessDaysParams {
|
|
548
|
+
/** ISO weekday numbers: 1=Monday … 7=Sunday */
|
|
549
|
+
days: number[];
|
|
550
|
+
}
|
|
551
|
+
interface DeliveryHoursParams {
|
|
552
|
+
/** Start of delivery window "HH:mm" */
|
|
553
|
+
start: string;
|
|
554
|
+
/** End of delivery window "HH:mm" */
|
|
555
|
+
end: string;
|
|
556
|
+
}
|
|
557
|
+
interface BufferSafetyMarginParams {
|
|
558
|
+
/** Extra days added to the pessimistic (end) delivery date */
|
|
559
|
+
extraDays: number;
|
|
560
|
+
}
|
|
561
|
+
/** Unified delivery config shape used by the backoffice form */
|
|
562
|
+
interface UnifiedDeliveryConfig {
|
|
563
|
+
businessDays: number[];
|
|
564
|
+
cutoffEnabled: boolean;
|
|
565
|
+
cutoffTime: string;
|
|
566
|
+
processingMinDays: number;
|
|
567
|
+
processingMaxDays: number;
|
|
568
|
+
deliveryMinDays: number;
|
|
569
|
+
deliveryMaxDays: number;
|
|
570
|
+
pickupHours: number;
|
|
481
571
|
}
|
|
482
572
|
|
|
483
573
|
/**
|
|
@@ -1118,6 +1208,10 @@ interface Order {
|
|
|
1118
1208
|
cancelledAt?: Date;
|
|
1119
1209
|
cancelReason?: string;
|
|
1120
1210
|
deletedAt?: Date;
|
|
1211
|
+
/** Estimated delivery window start (from delivery option rules) */
|
|
1212
|
+
estimatedDeliveryStart?: Date;
|
|
1213
|
+
/** Estimated delivery window end (from delivery option rules) */
|
|
1214
|
+
estimatedDeliveryEnd?: Date;
|
|
1121
1215
|
items?: OrderItem[];
|
|
1122
1216
|
customer?: Customer | null;
|
|
1123
1217
|
paymentMethodIntegration?: AccountIntegration | null;
|
|
@@ -3406,4 +3500,34 @@ interface AccountServiceBillingCharge {
|
|
|
3406
3500
|
deletedAt?: Date | null;
|
|
3407
3501
|
}
|
|
3408
3502
|
|
|
3409
|
-
|
|
3503
|
+
declare enum HolidayType {
|
|
3504
|
+
/** Business is expected to be closed. Default: excluded from delivery calculation. */
|
|
3505
|
+
NON_WORKING = "NON_WORKING",
|
|
3506
|
+
/** Business may choose to work. Default: included in delivery calculation. */
|
|
3507
|
+
WORKING = "WORKING"
|
|
3508
|
+
}
|
|
3509
|
+
interface Holiday {
|
|
3510
|
+
id: string;
|
|
3511
|
+
/** ISO date string "YYYY-MM-DD" */
|
|
3512
|
+
date: string;
|
|
3513
|
+
/** ISO 3166-1 alpha-2 country code (e.g. "UY", "AR") */
|
|
3514
|
+
country: string;
|
|
3515
|
+
name: string;
|
|
3516
|
+
type: HolidayType;
|
|
3517
|
+
createdAt: Date;
|
|
3518
|
+
updatedAt: Date;
|
|
3519
|
+
}
|
|
3520
|
+
interface AccountHolidaySchedule {
|
|
3521
|
+
id: string;
|
|
3522
|
+
accountId: string;
|
|
3523
|
+
holidayId: string;
|
|
3524
|
+
/** Whether the account will operate on this holiday */
|
|
3525
|
+
isOpen: boolean;
|
|
3526
|
+
respondedAt: Date;
|
|
3527
|
+
/** Tracks whether a reminder has already been sent */
|
|
3528
|
+
reminderSentAt?: Date | null;
|
|
3529
|
+
createdAt: Date;
|
|
3530
|
+
updatedAt: Date;
|
|
3531
|
+
}
|
|
3532
|
+
|
|
3533
|
+
export { type Account, type AccountAiCreditTransaction, type AccountAiCredits, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountCurrencyConfig, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, type AccountDeliveryOptionRule, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, type AccountExchangeRate, type AccountExchangeRateListResponse, type AccountExchangeRateMetadata, type AccountExchangeRateQueryDto, type AccountExchangeRateResponse, AccountExchangeRateType, type AccountExchangeRateWithEffectiveRate, type AccountHolidaySchedule, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, type AccountPaymentMethod, AccountPaymentMethodStatus, type AccountServiceBillingCharge, type AccountServicePlan, AccountServicePlanStatus, AccountStatus, type AccountUserRoleLink, type ActiveSession, type Address, type AdminOrderStatusChangeDto, AiCreditSource, AiCreditTransactionReason, AiCreditType, type AiCreditsBalance, type AnalyticsEvent, AnalyticsEventType, type AnalyticsFunnelStep, type AnalyticsOverview, type AnalyticsPageview, type AnalyticsPagination, type AnalyticsQueryParams, type AnalyticsSession, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, BillingInterval, type BufferSafetyMarginParams, type BusinessDaysParams, type ButtonStyle, COUNTRY_DEFAULTS, type Campaign, type CampaignBudget, CampaignBudgetType, type CampaignBudgetUsage, type CampaignData, type CampaignPerformance, CampaignStatus, type Cart, type CartConfirmDto, type CartDeliveryMethod, type CartDeliveryMethodAdjustment, type CartDeliveryMethodCreateData, type CartDeliveryMethodCreateDto, type CartDeliveryMethodFindParams, type CartDeliveryMethodResponse, type CartDeliveryMethodUpdateData, type CartDeliveryMethodUpdateDto, CartDeliveryType, type CartItem, type CartItemAddDto, type CartItemAttributeDetail, CartItemErrorCode, type CartItemRemoveDto, type CartItemUpdateDto, type CartItemValidation, type CartLineItemAdjustment, type CartPromotion, CartSource, CartStatus, type CartUpdateDto, type ChargeSellerAllocation, ChargeStatus, ChargeType, type Collection, type CollectionMedia, type CollectionProductLink, type CollectionRule, CollectionRuleField, CollectionRuleFieldLabels, CollectionRuleOperator, CollectionRuleOperatorLabels, CollectionRulesLogic, CollectionStatus, CollectionStatusLabels, CollectionType, CollectionTypeLabels, type ColorVariant, type CountryDefaultBranchAddress, type CountryDefaultConfig, type CountryDefaultTax, type CreateAccountDeliveryOptionDTO, type CreateAccountExchangeRateDto, type CreateAnalyticsSessionDto, type CreateCollectionDTO, type CreateDeliveryOptionDto, type CreateDeliveryOptionRuleDTO, type CreateExchangeRateDto, type CreateFulfillmentDto, type CreateFulfillmentItemDto, type CreatePromotionDTO, type CreateRoleDTO, type CreateStoreComponentTemplateDTO, type CreateStoreTemplateDTO, Currency, type CurrencyConversion, type Customer, type CustomerNotificationConfig, CustomerStatus, type CustomerUpsertDto, DayOfWeek, type DeliveryDaysParams, type DeliveryHoursParams, DeliveryOptionRuleType, DeliveryType, type DeliveryZoneInput, type DesignTokens, DeviceType, DisplayOrderStatus, type EffectiveExchangeRate, type ExchangeRate, type ExchangeRateListResponse, type ExchangeRateMetadata, type ExchangeRateQueryDto, type ExchangeRateResponse, type FixedOffsetDaysParams, type Fulfillment, type FulfillmentDeliveryOption, type FulfillmentItem, type FulfillmentLabel, type FulfillmentLabelCreateData, type FulfillmentLabelUpdateData, type FulfillmentProviderAdapter, type FulfillmentProviderContext, type FulfillmentProviderCreateInput, type FulfillmentProviderCreateOutput, type FulfillmentProviderKey, type FulfillmentProviderProcessWebhookInput, type FulfillmentProviderProcessWebhookOutput, type FulfillmentRecollectionCapabilities, type FulfillmentRecollectionConfig, type FulfillmentRecollectionMode, type FulfillmentRecollectionSchedule, FulfillmentStatus, type FulfillmentTrackingEvent, type FunnelData, FunnelStep, type FunnelStepData, type GeoZone, type GeoZoneInput, GeoZoneStatus, type HistoricalDataPoint, type Holiday, HolidayType, type Integration, IntegrationCategory, type IntegrationDeliveryZone, IntegrationDeliveryZoneStatus, IntegrationStatus, type InternalNotificationConfig, InternalNotificationType, type LinkButtonStyle, type MapPosition, type Media, MediaType, NavigationItemType, type NavigationMenuConfig, type NavigationMenuItem, type NeutralColorScale, type NextStatusAction, type Order, type OrderCreateFromCartDto, type OrderDeliveryMethod, type OrderDeliveryMethodAdjustment, type OrderDeliveryMethodCreateData, type OrderDeliveryMethodUpdateData, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, type OrderLineItemAdjustment, OrderPaymentStatus, type OrderPromotion, OrderSource, OrderStatus, type PageData, PageType, type Payment, type PaymentCardBrand, PaymentCardBrandKey, type PaymentConversion, PaymentMethodType, type PaymentProviderAdapter, type PaymentProviderCaptureInput, type PaymentProviderCaptureOutput, type PaymentProviderContext, type PaymentProviderInitInput, type PaymentProviderInitOutput, type PaymentProviderKey, type PaymentProviderRefundInput, type PaymentProviderRefundOutput, type PaymentProviderWebhookResult, PaymentStatus, type Permission, type Phone, type PickupLocation, type PickupReadyHoursParams, type ProcessingDaysParams, type Product, type ProductAnalyticsData, type ProductAnalyticsItem, type ProductAttribute, type ProductAttributeOption, ProductAttributeStatus, ProductAttributeType, type ProductCategory, ProductCategoryStatus, ProductStatus, ProductType, type ProductVariant, ProductVariantStatus, type Promotion, type PromotionApplicationMethod, type PromotionApplicationMethodInput, type PromotionApplicationMethodPromotionRule, PromotionApplicationType, type PromotionListFilters, type PromotionPromotionRule, type PromotionRule, type PromotionRuleInput, PromotionRuleOperator, type PromotionRuleValue, PromotionStatus, PromotionTargetType, PromotionType, PubSubTopics, type RealtimeAnalytics, type RecentEvent, type Role, type RolePermissionLink, type RoundingConfig, RoundingMethod, RoundingRule, SUPPORTED_COUNTRIES, type SameDayCutoffParams, type Seller, type SellerPeriodBalance, type ServiceBillingPlan, type ServiceBillingPlanLimits, type ServiceBillingPlanPrice, type ServiceBillingPlanSpec, type ServiceBillingPlanSpecCategory, type ServiceBillingPlanSpecItem, type SessionHeartbeatDto, type StandardCategory, StandardCategoryStatus, type StatusChangeHistory, type StatusFlow, type StoreBanner, StoreBannerStatus, type StoreComponentTemplate, type StoreCustomization, type StoreCustomizationComponentSettings, type StoreCustomizationFooterZone, type StoreCustomizationHeaderZone, type StoreCustomizationLayout, type StoreCustomizationLayoutComponent, type StoreCustomizationLayoutLegacy, type StoreCustomizationPage, type StoreCustomizationPageComponent, type StoreCustomizationSeo, type StoreCustomizationThemeButtons, type StoreCustomizationThemeColors, type StoreCustomizationThemeTypography, type StorePage, StorePageStatus, StorePageType, type StoreSettings, type StoreTemplate, type StoreTemplateMocks, type SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type SupportedCountryCode, type SurfaceColors, type ThemeBorderRadius, type ThemeBorderWidth, type ThemeBorders, type ThemeButtonSize, type ThemeButtonSizes, type ThemeButtonVariant, type ThemeButtonVariants, type ThemeButtons, type ThemeColorPalette, type ThemeConfig, type ThemeFonts, type ThemeProductCard, type ThemeShadows, type ThemeSpacing, type ThemeTypography, type ThemeTypographySizes, type ThemeTypographyStyles, type TopPagesData, type TrackEventDto, type TrackPageviewDto, TrafficSource, type TrafficSourceItem, type TrafficSourcesData, type TypographyStyle, type UnifiedDeliveryConfig, type UpdateAccountDeliveryOptionDTO, type UpdateAccountExchangeRateAllDto, type UpdateAccountExchangeRateDto, type UpdateCollectionDTO, type UpdateDeliveryOptionRuleDTO, type UpdateExchangeRateDto, type UpdateFulfillmentDto, type UpdateNotificationSettingsDTO, type UpdatePromotionDTO, type UpdateRoleDTO, type UpdateStoreComponentTemplateDTO, type UpdateStoreTemplateDTO, type Webhook, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCountryDefaults, getCurrencySymbol, getDisplayOrderStatus, getDisplayOrderStatusInfo, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderPaymentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, isLegacyLayout, isSupportedCountry, isZonedLayout, parsePriceFormatPattern };
|
package/dist/index.d.ts
CHANGED
|
@@ -401,6 +401,8 @@ interface AccountDeliveryOption {
|
|
|
401
401
|
deliveryType: DeliveryType;
|
|
402
402
|
demo: boolean;
|
|
403
403
|
hideAccountBranchAddress: boolean;
|
|
404
|
+
/** When true, estimated delivery times are calculated by AI and shown to customers at checkout */
|
|
405
|
+
showEstimatedDeliveryTime: boolean;
|
|
404
406
|
createdAt: Date;
|
|
405
407
|
updatedAt: Date;
|
|
406
408
|
deletedAt?: Date | null;
|
|
@@ -409,6 +411,11 @@ interface AccountDeliveryOption {
|
|
|
409
411
|
integration?: AccountIntegration | null;
|
|
410
412
|
price?: number | null;
|
|
411
413
|
accountBranch?: AccountBranch | null;
|
|
414
|
+
/** Computed by api-public when listing delivery options; ISO date strings */
|
|
415
|
+
estimatedDelivery?: {
|
|
416
|
+
start: string;
|
|
417
|
+
end: string;
|
|
418
|
+
};
|
|
412
419
|
}
|
|
413
420
|
declare enum AccountDeliveryOptionPriceLogic {
|
|
414
421
|
FIXED = "FIXED",
|
|
@@ -467,6 +474,7 @@ interface CreateAccountDeliveryOptionDTO {
|
|
|
467
474
|
deliveryType: DeliveryType;
|
|
468
475
|
deliveryZones?: DeliveryZoneInput[];
|
|
469
476
|
data?: Record<string, unknown>;
|
|
477
|
+
showEstimatedDeliveryTime?: boolean;
|
|
470
478
|
}
|
|
471
479
|
interface UpdateAccountDeliveryOptionDTO {
|
|
472
480
|
accountBranchId: string;
|
|
@@ -478,6 +486,88 @@ interface UpdateAccountDeliveryOptionDTO {
|
|
|
478
486
|
deliveryType?: DeliveryType;
|
|
479
487
|
deliveryZones?: DeliveryZoneInput[];
|
|
480
488
|
data?: Record<string, unknown>;
|
|
489
|
+
showEstimatedDeliveryTime?: boolean;
|
|
490
|
+
}
|
|
491
|
+
/** Rule types for estimated delivery calculation */
|
|
492
|
+
declare enum DeliveryOptionRuleType {
|
|
493
|
+
PROCESSING_DAYS = "PROCESSING_DAYS",
|
|
494
|
+
SAME_DAY_CUTOFF = "SAME_DAY_CUTOFF",
|
|
495
|
+
DELIVERY_DAYS = "DELIVERY_DAYS",
|
|
496
|
+
PICKUP_READY_HOURS = "PICKUP_READY_HOURS",
|
|
497
|
+
FIXED_OFFSET_DAYS = "FIXED_OFFSET_DAYS",
|
|
498
|
+
/** ISO weekday numbers (1=Mon..7=Sun) that count as operating days */
|
|
499
|
+
BUSINESS_DAYS = "BUSINESS_DAYS",
|
|
500
|
+
/** Delivery time-of-day window inferred by AI from historical orders */
|
|
501
|
+
DELIVERY_HOURS = "DELIVERY_HOURS",
|
|
502
|
+
/** Extra days added to the pessimistic end when volume is high */
|
|
503
|
+
BUFFER_SAFETY_MARGIN = "BUFFER_SAFETY_MARGIN"
|
|
504
|
+
}
|
|
505
|
+
interface AccountDeliveryOptionRule {
|
|
506
|
+
id: string;
|
|
507
|
+
accountId: string;
|
|
508
|
+
accountDeliveryOptionId: string;
|
|
509
|
+
ruleType: DeliveryOptionRuleType;
|
|
510
|
+
params?: Record<string, unknown>;
|
|
511
|
+
priority: number;
|
|
512
|
+
createdAt: Date;
|
|
513
|
+
updatedAt: Date;
|
|
514
|
+
deletedAt?: Date | null;
|
|
515
|
+
}
|
|
516
|
+
interface CreateDeliveryOptionRuleDTO {
|
|
517
|
+
ruleType: DeliveryOptionRuleType;
|
|
518
|
+
params?: Record<string, unknown>;
|
|
519
|
+
priority?: number;
|
|
520
|
+
}
|
|
521
|
+
interface UpdateDeliveryOptionRuleDTO {
|
|
522
|
+
ruleType?: DeliveryOptionRuleType;
|
|
523
|
+
params?: Record<string, unknown>;
|
|
524
|
+
priority?: number;
|
|
525
|
+
}
|
|
526
|
+
/** Params per rule type for estimation */
|
|
527
|
+
interface ProcessingDaysParams {
|
|
528
|
+
minDays: number;
|
|
529
|
+
maxDays?: number;
|
|
530
|
+
}
|
|
531
|
+
interface SameDayCutoffParams {
|
|
532
|
+
cutoffTime: string;
|
|
533
|
+
}
|
|
534
|
+
interface DeliveryDaysParams {
|
|
535
|
+
minDays: number;
|
|
536
|
+
maxDays: number;
|
|
537
|
+
}
|
|
538
|
+
interface PickupReadyHoursParams {
|
|
539
|
+
hours?: number;
|
|
540
|
+
minHours?: number;
|
|
541
|
+
maxHours?: number;
|
|
542
|
+
}
|
|
543
|
+
interface FixedOffsetDaysParams {
|
|
544
|
+
minDays: number;
|
|
545
|
+
maxDays?: number;
|
|
546
|
+
}
|
|
547
|
+
interface BusinessDaysParams {
|
|
548
|
+
/** ISO weekday numbers: 1=Monday … 7=Sunday */
|
|
549
|
+
days: number[];
|
|
550
|
+
}
|
|
551
|
+
interface DeliveryHoursParams {
|
|
552
|
+
/** Start of delivery window "HH:mm" */
|
|
553
|
+
start: string;
|
|
554
|
+
/** End of delivery window "HH:mm" */
|
|
555
|
+
end: string;
|
|
556
|
+
}
|
|
557
|
+
interface BufferSafetyMarginParams {
|
|
558
|
+
/** Extra days added to the pessimistic (end) delivery date */
|
|
559
|
+
extraDays: number;
|
|
560
|
+
}
|
|
561
|
+
/** Unified delivery config shape used by the backoffice form */
|
|
562
|
+
interface UnifiedDeliveryConfig {
|
|
563
|
+
businessDays: number[];
|
|
564
|
+
cutoffEnabled: boolean;
|
|
565
|
+
cutoffTime: string;
|
|
566
|
+
processingMinDays: number;
|
|
567
|
+
processingMaxDays: number;
|
|
568
|
+
deliveryMinDays: number;
|
|
569
|
+
deliveryMaxDays: number;
|
|
570
|
+
pickupHours: number;
|
|
481
571
|
}
|
|
482
572
|
|
|
483
573
|
/**
|
|
@@ -1118,6 +1208,10 @@ interface Order {
|
|
|
1118
1208
|
cancelledAt?: Date;
|
|
1119
1209
|
cancelReason?: string;
|
|
1120
1210
|
deletedAt?: Date;
|
|
1211
|
+
/** Estimated delivery window start (from delivery option rules) */
|
|
1212
|
+
estimatedDeliveryStart?: Date;
|
|
1213
|
+
/** Estimated delivery window end (from delivery option rules) */
|
|
1214
|
+
estimatedDeliveryEnd?: Date;
|
|
1121
1215
|
items?: OrderItem[];
|
|
1122
1216
|
customer?: Customer | null;
|
|
1123
1217
|
paymentMethodIntegration?: AccountIntegration | null;
|
|
@@ -3406,4 +3500,34 @@ interface AccountServiceBillingCharge {
|
|
|
3406
3500
|
deletedAt?: Date | null;
|
|
3407
3501
|
}
|
|
3408
3502
|
|
|
3409
|
-
|
|
3503
|
+
declare enum HolidayType {
|
|
3504
|
+
/** Business is expected to be closed. Default: excluded from delivery calculation. */
|
|
3505
|
+
NON_WORKING = "NON_WORKING",
|
|
3506
|
+
/** Business may choose to work. Default: included in delivery calculation. */
|
|
3507
|
+
WORKING = "WORKING"
|
|
3508
|
+
}
|
|
3509
|
+
interface Holiday {
|
|
3510
|
+
id: string;
|
|
3511
|
+
/** ISO date string "YYYY-MM-DD" */
|
|
3512
|
+
date: string;
|
|
3513
|
+
/** ISO 3166-1 alpha-2 country code (e.g. "UY", "AR") */
|
|
3514
|
+
country: string;
|
|
3515
|
+
name: string;
|
|
3516
|
+
type: HolidayType;
|
|
3517
|
+
createdAt: Date;
|
|
3518
|
+
updatedAt: Date;
|
|
3519
|
+
}
|
|
3520
|
+
interface AccountHolidaySchedule {
|
|
3521
|
+
id: string;
|
|
3522
|
+
accountId: string;
|
|
3523
|
+
holidayId: string;
|
|
3524
|
+
/** Whether the account will operate on this holiday */
|
|
3525
|
+
isOpen: boolean;
|
|
3526
|
+
respondedAt: Date;
|
|
3527
|
+
/** Tracks whether a reminder has already been sent */
|
|
3528
|
+
reminderSentAt?: Date | null;
|
|
3529
|
+
createdAt: Date;
|
|
3530
|
+
updatedAt: Date;
|
|
3531
|
+
}
|
|
3532
|
+
|
|
3533
|
+
export { type Account, type AccountAiCreditTransaction, type AccountAiCredits, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountCurrencyConfig, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, type AccountDeliveryOptionRule, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, type AccountExchangeRate, type AccountExchangeRateListResponse, type AccountExchangeRateMetadata, type AccountExchangeRateQueryDto, type AccountExchangeRateResponse, AccountExchangeRateType, type AccountExchangeRateWithEffectiveRate, type AccountHolidaySchedule, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, type AccountPaymentMethod, AccountPaymentMethodStatus, type AccountServiceBillingCharge, type AccountServicePlan, AccountServicePlanStatus, AccountStatus, type AccountUserRoleLink, type ActiveSession, type Address, type AdminOrderStatusChangeDto, AiCreditSource, AiCreditTransactionReason, AiCreditType, type AiCreditsBalance, type AnalyticsEvent, AnalyticsEventType, type AnalyticsFunnelStep, type AnalyticsOverview, type AnalyticsPageview, type AnalyticsPagination, type AnalyticsQueryParams, type AnalyticsSession, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, BillingInterval, type BufferSafetyMarginParams, type BusinessDaysParams, type ButtonStyle, COUNTRY_DEFAULTS, type Campaign, type CampaignBudget, CampaignBudgetType, type CampaignBudgetUsage, type CampaignData, type CampaignPerformance, CampaignStatus, type Cart, type CartConfirmDto, type CartDeliveryMethod, type CartDeliveryMethodAdjustment, type CartDeliveryMethodCreateData, type CartDeliveryMethodCreateDto, type CartDeliveryMethodFindParams, type CartDeliveryMethodResponse, type CartDeliveryMethodUpdateData, type CartDeliveryMethodUpdateDto, CartDeliveryType, type CartItem, type CartItemAddDto, type CartItemAttributeDetail, CartItemErrorCode, type CartItemRemoveDto, type CartItemUpdateDto, type CartItemValidation, type CartLineItemAdjustment, type CartPromotion, CartSource, CartStatus, type CartUpdateDto, type ChargeSellerAllocation, ChargeStatus, ChargeType, type Collection, type CollectionMedia, type CollectionProductLink, type CollectionRule, CollectionRuleField, CollectionRuleFieldLabels, CollectionRuleOperator, CollectionRuleOperatorLabels, CollectionRulesLogic, CollectionStatus, CollectionStatusLabels, CollectionType, CollectionTypeLabels, type ColorVariant, type CountryDefaultBranchAddress, type CountryDefaultConfig, type CountryDefaultTax, type CreateAccountDeliveryOptionDTO, type CreateAccountExchangeRateDto, type CreateAnalyticsSessionDto, type CreateCollectionDTO, type CreateDeliveryOptionDto, type CreateDeliveryOptionRuleDTO, type CreateExchangeRateDto, type CreateFulfillmentDto, type CreateFulfillmentItemDto, type CreatePromotionDTO, type CreateRoleDTO, type CreateStoreComponentTemplateDTO, type CreateStoreTemplateDTO, Currency, type CurrencyConversion, type Customer, type CustomerNotificationConfig, CustomerStatus, type CustomerUpsertDto, DayOfWeek, type DeliveryDaysParams, type DeliveryHoursParams, DeliveryOptionRuleType, DeliveryType, type DeliveryZoneInput, type DesignTokens, DeviceType, DisplayOrderStatus, type EffectiveExchangeRate, type ExchangeRate, type ExchangeRateListResponse, type ExchangeRateMetadata, type ExchangeRateQueryDto, type ExchangeRateResponse, type FixedOffsetDaysParams, type Fulfillment, type FulfillmentDeliveryOption, type FulfillmentItem, type FulfillmentLabel, type FulfillmentLabelCreateData, type FulfillmentLabelUpdateData, type FulfillmentProviderAdapter, type FulfillmentProviderContext, type FulfillmentProviderCreateInput, type FulfillmentProviderCreateOutput, type FulfillmentProviderKey, type FulfillmentProviderProcessWebhookInput, type FulfillmentProviderProcessWebhookOutput, type FulfillmentRecollectionCapabilities, type FulfillmentRecollectionConfig, type FulfillmentRecollectionMode, type FulfillmentRecollectionSchedule, FulfillmentStatus, type FulfillmentTrackingEvent, type FunnelData, FunnelStep, type FunnelStepData, type GeoZone, type GeoZoneInput, GeoZoneStatus, type HistoricalDataPoint, type Holiday, HolidayType, type Integration, IntegrationCategory, type IntegrationDeliveryZone, IntegrationDeliveryZoneStatus, IntegrationStatus, type InternalNotificationConfig, InternalNotificationType, type LinkButtonStyle, type MapPosition, type Media, MediaType, NavigationItemType, type NavigationMenuConfig, type NavigationMenuItem, type NeutralColorScale, type NextStatusAction, type Order, type OrderCreateFromCartDto, type OrderDeliveryMethod, type OrderDeliveryMethodAdjustment, type OrderDeliveryMethodCreateData, type OrderDeliveryMethodUpdateData, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, type OrderLineItemAdjustment, OrderPaymentStatus, type OrderPromotion, OrderSource, OrderStatus, type PageData, PageType, type Payment, type PaymentCardBrand, PaymentCardBrandKey, type PaymentConversion, PaymentMethodType, type PaymentProviderAdapter, type PaymentProviderCaptureInput, type PaymentProviderCaptureOutput, type PaymentProviderContext, type PaymentProviderInitInput, type PaymentProviderInitOutput, type PaymentProviderKey, type PaymentProviderRefundInput, type PaymentProviderRefundOutput, type PaymentProviderWebhookResult, PaymentStatus, type Permission, type Phone, type PickupLocation, type PickupReadyHoursParams, type ProcessingDaysParams, type Product, type ProductAnalyticsData, type ProductAnalyticsItem, type ProductAttribute, type ProductAttributeOption, ProductAttributeStatus, ProductAttributeType, type ProductCategory, ProductCategoryStatus, ProductStatus, ProductType, type ProductVariant, ProductVariantStatus, type Promotion, type PromotionApplicationMethod, type PromotionApplicationMethodInput, type PromotionApplicationMethodPromotionRule, PromotionApplicationType, type PromotionListFilters, type PromotionPromotionRule, type PromotionRule, type PromotionRuleInput, PromotionRuleOperator, type PromotionRuleValue, PromotionStatus, PromotionTargetType, PromotionType, PubSubTopics, type RealtimeAnalytics, type RecentEvent, type Role, type RolePermissionLink, type RoundingConfig, RoundingMethod, RoundingRule, SUPPORTED_COUNTRIES, type SameDayCutoffParams, type Seller, type SellerPeriodBalance, type ServiceBillingPlan, type ServiceBillingPlanLimits, type ServiceBillingPlanPrice, type ServiceBillingPlanSpec, type ServiceBillingPlanSpecCategory, type ServiceBillingPlanSpecItem, type SessionHeartbeatDto, type StandardCategory, StandardCategoryStatus, type StatusChangeHistory, type StatusFlow, type StoreBanner, StoreBannerStatus, type StoreComponentTemplate, type StoreCustomization, type StoreCustomizationComponentSettings, type StoreCustomizationFooterZone, type StoreCustomizationHeaderZone, type StoreCustomizationLayout, type StoreCustomizationLayoutComponent, type StoreCustomizationLayoutLegacy, type StoreCustomizationPage, type StoreCustomizationPageComponent, type StoreCustomizationSeo, type StoreCustomizationThemeButtons, type StoreCustomizationThemeColors, type StoreCustomizationThemeTypography, type StorePage, StorePageStatus, StorePageType, type StoreSettings, type StoreTemplate, type StoreTemplateMocks, type SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type SupportedCountryCode, type SurfaceColors, type ThemeBorderRadius, type ThemeBorderWidth, type ThemeBorders, type ThemeButtonSize, type ThemeButtonSizes, type ThemeButtonVariant, type ThemeButtonVariants, type ThemeButtons, type ThemeColorPalette, type ThemeConfig, type ThemeFonts, type ThemeProductCard, type ThemeShadows, type ThemeSpacing, type ThemeTypography, type ThemeTypographySizes, type ThemeTypographyStyles, type TopPagesData, type TrackEventDto, type TrackPageviewDto, TrafficSource, type TrafficSourceItem, type TrafficSourcesData, type TypographyStyle, type UnifiedDeliveryConfig, type UpdateAccountDeliveryOptionDTO, type UpdateAccountExchangeRateAllDto, type UpdateAccountExchangeRateDto, type UpdateCollectionDTO, type UpdateDeliveryOptionRuleDTO, type UpdateExchangeRateDto, type UpdateFulfillmentDto, type UpdateNotificationSettingsDTO, type UpdatePromotionDTO, type UpdateRoleDTO, type UpdateStoreComponentTemplateDTO, type UpdateStoreTemplateDTO, type Webhook, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCountryDefaults, getCurrencySymbol, getDisplayOrderStatus, getDisplayOrderStatusInfo, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderPaymentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, isLegacyLayout, isSupportedCountry, isZonedLayout, parsePriceFormatPattern };
|
package/dist/index.js
CHANGED
|
@@ -61,12 +61,14 @@ __export(index_exports, {
|
|
|
61
61
|
Currency: () => Currency,
|
|
62
62
|
CustomerStatus: () => CustomerStatus,
|
|
63
63
|
DayOfWeek: () => DayOfWeek,
|
|
64
|
+
DeliveryOptionRuleType: () => DeliveryOptionRuleType,
|
|
64
65
|
DeliveryType: () => DeliveryType,
|
|
65
66
|
DeviceType: () => DeviceType,
|
|
66
67
|
DisplayOrderStatus: () => DisplayOrderStatus,
|
|
67
68
|
FulfillmentStatus: () => FulfillmentStatus,
|
|
68
69
|
FunnelStep: () => FunnelStep,
|
|
69
70
|
GeoZoneStatus: () => GeoZoneStatus,
|
|
71
|
+
HolidayType: () => HolidayType,
|
|
70
72
|
IntegrationCategory: () => IntegrationCategory,
|
|
71
73
|
IntegrationDeliveryZoneStatus: () => IntegrationDeliveryZoneStatus,
|
|
72
74
|
IntegrationStatus: () => IntegrationStatus,
|
|
@@ -371,6 +373,17 @@ var AccountDeliveryOptionZoneStatus = /* @__PURE__ */ ((AccountDeliveryOptionZon
|
|
|
371
373
|
AccountDeliveryOptionZoneStatus2["INACTIVE"] = "INACTIVE";
|
|
372
374
|
return AccountDeliveryOptionZoneStatus2;
|
|
373
375
|
})(AccountDeliveryOptionZoneStatus || {});
|
|
376
|
+
var DeliveryOptionRuleType = /* @__PURE__ */ ((DeliveryOptionRuleType2) => {
|
|
377
|
+
DeliveryOptionRuleType2["PROCESSING_DAYS"] = "PROCESSING_DAYS";
|
|
378
|
+
DeliveryOptionRuleType2["SAME_DAY_CUTOFF"] = "SAME_DAY_CUTOFF";
|
|
379
|
+
DeliveryOptionRuleType2["DELIVERY_DAYS"] = "DELIVERY_DAYS";
|
|
380
|
+
DeliveryOptionRuleType2["PICKUP_READY_HOURS"] = "PICKUP_READY_HOURS";
|
|
381
|
+
DeliveryOptionRuleType2["FIXED_OFFSET_DAYS"] = "FIXED_OFFSET_DAYS";
|
|
382
|
+
DeliveryOptionRuleType2["BUSINESS_DAYS"] = "BUSINESS_DAYS";
|
|
383
|
+
DeliveryOptionRuleType2["DELIVERY_HOURS"] = "DELIVERY_HOURS";
|
|
384
|
+
DeliveryOptionRuleType2["BUFFER_SAFETY_MARGIN"] = "BUFFER_SAFETY_MARGIN";
|
|
385
|
+
return DeliveryOptionRuleType2;
|
|
386
|
+
})(DeliveryOptionRuleType || {});
|
|
374
387
|
|
|
375
388
|
// src/accountDomain/types.ts
|
|
376
389
|
var AccountDomainStatus = /* @__PURE__ */ ((AccountDomainStatus2) => {
|
|
@@ -1192,6 +1205,13 @@ var ChargeStatus = /* @__PURE__ */ ((ChargeStatus2) => {
|
|
|
1192
1205
|
ChargeStatus2["CANCELLED"] = "CANCELLED";
|
|
1193
1206
|
return ChargeStatus2;
|
|
1194
1207
|
})(ChargeStatus || {});
|
|
1208
|
+
|
|
1209
|
+
// src/holiday/types.ts
|
|
1210
|
+
var HolidayType = /* @__PURE__ */ ((HolidayType2) => {
|
|
1211
|
+
HolidayType2["NON_WORKING"] = "NON_WORKING";
|
|
1212
|
+
HolidayType2["WORKING"] = "WORKING";
|
|
1213
|
+
return HolidayType2;
|
|
1214
|
+
})(HolidayType || {});
|
|
1195
1215
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1196
1216
|
0 && (module.exports = {
|
|
1197
1217
|
AccountBranchScheduleDay,
|
|
@@ -1234,12 +1254,14 @@ var ChargeStatus = /* @__PURE__ */ ((ChargeStatus2) => {
|
|
|
1234
1254
|
Currency,
|
|
1235
1255
|
CustomerStatus,
|
|
1236
1256
|
DayOfWeek,
|
|
1257
|
+
DeliveryOptionRuleType,
|
|
1237
1258
|
DeliveryType,
|
|
1238
1259
|
DeviceType,
|
|
1239
1260
|
DisplayOrderStatus,
|
|
1240
1261
|
FulfillmentStatus,
|
|
1241
1262
|
FunnelStep,
|
|
1242
1263
|
GeoZoneStatus,
|
|
1264
|
+
HolidayType,
|
|
1243
1265
|
IntegrationCategory,
|
|
1244
1266
|
IntegrationDeliveryZoneStatus,
|
|
1245
1267
|
IntegrationStatus,
|