@retaila/shared-types 2.0.10 → 2.0.14
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 +101 -3
- package/dist/index.d.ts +101 -3
- package/dist/index.js +100 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3403,11 +3403,19 @@ interface UpdateNotificationSettingsDTO {
|
|
|
3403
3403
|
delayHours?: number;
|
|
3404
3404
|
}
|
|
3405
3405
|
|
|
3406
|
+
/** Catalog price row and contract term: amount is the total for this period (e.g. full year for ANNUAL). */
|
|
3406
3407
|
declare enum BillingInterval {
|
|
3407
3408
|
MONTHLY = "MONTHLY",
|
|
3408
3409
|
SEMIANNUAL = "SEMIANNUAL",
|
|
3409
3410
|
ANNUAL = "ANNUAL"
|
|
3410
3411
|
}
|
|
3412
|
+
/** How often a subscription charge is generated (may split the contract total into installments). */
|
|
3413
|
+
declare enum PaymentFrequency {
|
|
3414
|
+
MONTHLY = "MONTHLY",
|
|
3415
|
+
QUARTERLY = "QUARTERLY",
|
|
3416
|
+
SEMIANNUAL = "SEMIANNUAL",
|
|
3417
|
+
ANNUAL = "ANNUAL"
|
|
3418
|
+
}
|
|
3411
3419
|
/** Single item in a spec category (display-like structure). */
|
|
3412
3420
|
interface ServiceBillingPlanSpecItem {
|
|
3413
3421
|
key: string;
|
|
@@ -3449,6 +3457,8 @@ interface ServiceBillingPlanLimits {
|
|
|
3449
3457
|
customApiIntegrations?: boolean;
|
|
3450
3458
|
storeCustomization?: boolean;
|
|
3451
3459
|
customEmail?: boolean;
|
|
3460
|
+
/** Maximum number of mailboxes (email accounts) the account can create. */
|
|
3461
|
+
maxMailboxes?: number | null;
|
|
3452
3462
|
reportsAndExport?: boolean;
|
|
3453
3463
|
multiCurrency?: boolean;
|
|
3454
3464
|
webhooks?: boolean;
|
|
@@ -3473,6 +3483,7 @@ interface ServiceBillingPlan {
|
|
|
3473
3483
|
interface ServiceBillingPlanPrice {
|
|
3474
3484
|
id: string;
|
|
3475
3485
|
serviceBillingPlanId: string;
|
|
3486
|
+
/** Contract / pricing period this row applies to (matches account assignment contract term). */
|
|
3476
3487
|
billingInterval: BillingInterval;
|
|
3477
3488
|
amount: number;
|
|
3478
3489
|
aiImageCreditsIncluded: number;
|
|
@@ -3491,8 +3502,12 @@ interface AccountServicePlan {
|
|
|
3491
3502
|
serviceBillingPlanId: string;
|
|
3492
3503
|
status: AccountServicePlanStatus;
|
|
3493
3504
|
customAmount?: number | null;
|
|
3505
|
+
/** Contract term; selects `service_billing_plan_price` row (catalog total for this term). */
|
|
3494
3506
|
billingInterval?: BillingInterval | null;
|
|
3495
|
-
|
|
3507
|
+
/** Charge cadence; installments divide the contract catalog/custom total. Null = same as billingInterval (legacy). */
|
|
3508
|
+
paymentFrequency?: PaymentFrequency | null;
|
|
3509
|
+
/** Trial length in days (0, 7, 15, 30, 60); no subscription charges until startedAt + freeDays. */
|
|
3510
|
+
freeDays: number;
|
|
3496
3511
|
installationFee?: number | null;
|
|
3497
3512
|
installationFeePaidAt?: Date | null;
|
|
3498
3513
|
startedAt: Date;
|
|
@@ -3521,7 +3536,8 @@ interface AccountServiceBillingCharge {
|
|
|
3521
3536
|
amount: number;
|
|
3522
3537
|
currency: string;
|
|
3523
3538
|
type: ChargeType;
|
|
3524
|
-
|
|
3539
|
+
/** For SUBSCRIPTION: length of the billed period (payment frequency), e.g. MONTHLY or QUARTERLY. */
|
|
3540
|
+
billingInterval?: BillingInterval | PaymentFrequency | null;
|
|
3525
3541
|
periodStart?: Date | null;
|
|
3526
3542
|
periodEnd?: Date | null;
|
|
3527
3543
|
dueDate?: Date | null;
|
|
@@ -3534,6 +3550,23 @@ interface AccountServiceBillingCharge {
|
|
|
3534
3550
|
deletedAt?: Date | null;
|
|
3535
3551
|
}
|
|
3536
3552
|
|
|
3553
|
+
/** Allowed “días gratis” before the first subscription charge is generated. */
|
|
3554
|
+
declare const SERVICE_BILLING_FREE_DAYS_VALUES: readonly [0, 7, 15, 30, 60];
|
|
3555
|
+
type ServiceBillingFreeDays = (typeof SERVICE_BILLING_FREE_DAYS_VALUES)[number];
|
|
3556
|
+
declare function normalizeServiceBillingFreeDays(value: unknown): ServiceBillingFreeDays;
|
|
3557
|
+
declare function contractTermMonths(contract: BillingInterval): number;
|
|
3558
|
+
declare function paymentFrequencyMonths(freq: PaymentFrequency): number;
|
|
3559
|
+
/**
|
|
3560
|
+
* Number of subscription charges in one full contract term, or null if incompatible
|
|
3561
|
+
* (e.g. quarterly billing on a 1-month contract).
|
|
3562
|
+
*/
|
|
3563
|
+
declare function subscriptionInstallmentCount(contract: BillingInterval, payment: PaymentFrequency): number | null;
|
|
3564
|
+
declare function resolveEffectivePaymentFrequency(contract: BillingInterval, paymentFrequency: PaymentFrequency | null | undefined): PaymentFrequency;
|
|
3565
|
+
/** Per-charge amount from the contract-period total (catalog or custom). */
|
|
3566
|
+
declare function subscriptionAmountPerInstallment(contractTotalAmount: number, contract: BillingInterval, payment: PaymentFrequency): number | null;
|
|
3567
|
+
/** IA credits to grant per subscription charge (proportional to installments). */
|
|
3568
|
+
declare function aiCreditsPerSubscriptionInstallment(creditsIncludedPerContract: number, contract: BillingInterval, payment: PaymentFrequency): number;
|
|
3569
|
+
|
|
3537
3570
|
declare enum HolidayType {
|
|
3538
3571
|
/** Business is expected to be closed. Default: excluded from delivery calculation. */
|
|
3539
3572
|
NON_WORKING = "NON_WORKING",
|
|
@@ -3564,4 +3597,69 @@ interface AccountHolidaySchedule {
|
|
|
3564
3597
|
updatedAt: Date;
|
|
3565
3598
|
}
|
|
3566
3599
|
|
|
3567
|
-
|
|
3600
|
+
interface Lead {
|
|
3601
|
+
id: string;
|
|
3602
|
+
name: string;
|
|
3603
|
+
company: string;
|
|
3604
|
+
email: string;
|
|
3605
|
+
phone: string;
|
|
3606
|
+
message: string;
|
|
3607
|
+
createdAt: Date;
|
|
3608
|
+
updatedAt: Date;
|
|
3609
|
+
deletedAt?: Date;
|
|
3610
|
+
}
|
|
3611
|
+
/** Payload to create a lead (e.g. from landing form). */
|
|
3612
|
+
interface CreateLeadDTO {
|
|
3613
|
+
name: string;
|
|
3614
|
+
company: string;
|
|
3615
|
+
email: string;
|
|
3616
|
+
phone: string;
|
|
3617
|
+
message: string;
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
declare enum GestionUserRole {
|
|
3621
|
+
OWNER = "OWNER",
|
|
3622
|
+
ADMIN = "ADMIN",
|
|
3623
|
+
ANALYST = "ANALYST"
|
|
3624
|
+
}
|
|
3625
|
+
declare enum GestionUserStatus {
|
|
3626
|
+
ACTIVE = "ACTIVE",
|
|
3627
|
+
INACTIVE = "INACTIVE",
|
|
3628
|
+
LOCKED = "LOCKED"
|
|
3629
|
+
}
|
|
3630
|
+
interface GestionUser {
|
|
3631
|
+
id: string;
|
|
3632
|
+
email: string;
|
|
3633
|
+
passwordHash?: string;
|
|
3634
|
+
name: string;
|
|
3635
|
+
role: GestionUserRole;
|
|
3636
|
+
status: GestionUserStatus;
|
|
3637
|
+
lastLoginAt?: Date | null;
|
|
3638
|
+
createdAt: Date;
|
|
3639
|
+
updatedAt: Date;
|
|
3640
|
+
deletedAt?: Date | null;
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3643
|
+
interface GestionSession {
|
|
3644
|
+
id: string;
|
|
3645
|
+
gestionUserId: string;
|
|
3646
|
+
tokenHash: string;
|
|
3647
|
+
expiresAt: Date;
|
|
3648
|
+
lastSeenAt?: Date | null;
|
|
3649
|
+
ip?: string | null;
|
|
3650
|
+
userAgent?: string | null;
|
|
3651
|
+
revokedAt?: Date | null;
|
|
3652
|
+
createdAt: Date;
|
|
3653
|
+
updatedAt: Date;
|
|
3654
|
+
deletedAt?: Date | null;
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3657
|
+
interface GestionLoginAttempt {
|
|
3658
|
+
id: string;
|
|
3659
|
+
email: string;
|
|
3660
|
+
ip?: string | null;
|
|
3661
|
+
userAgent?: string | null;
|
|
3662
|
+
createdAt: Date;
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
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 AccountEmailDomain, AccountEmailDomainStatus, type AccountExchangeRate, type AccountExchangeRateListResponse, type AccountExchangeRateMetadata, type AccountExchangeRateQueryDto, type AccountExchangeRateResponse, AccountExchangeRateType, type AccountExchangeRateWithEffectiveRate, type AccountHolidaySchedule, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, type AccountMailbox, 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 CreateLeadDTO, 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 GestionLoginAttempt, type GestionSession, type GestionUser, GestionUserRole, GestionUserStatus, type HistoricalDataPoint, type Holiday, HolidayType, type Integration, IntegrationCategory, type IntegrationDeliveryZone, IntegrationDeliveryZoneStatus, IntegrationStatus, type InternalNotificationConfig, InternalNotificationType, type Lead, 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, PaymentFrequency, 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, SERVICE_BILLING_FREE_DAYS_VALUES, SUPPORTED_COUNTRIES, type SameDayCutoffParams, type Seller, type SellerPeriodBalance, type ServiceBillingFreeDays, 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, aiCreditsPerSubscriptionInstallment, contractTermMonths, getAccountPaymentMethodStatusInfo, getCountryDefaults, getCurrencySymbol, getDisplayOrderStatus, getDisplayOrderStatusInfo, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderPaymentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, isLegacyLayout, isSupportedCountry, isZonedLayout, normalizeServiceBillingFreeDays, parsePriceFormatPattern, paymentFrequencyMonths, resolveEffectivePaymentFrequency, subscriptionAmountPerInstallment, subscriptionInstallmentCount };
|
package/dist/index.d.ts
CHANGED
|
@@ -3403,11 +3403,19 @@ interface UpdateNotificationSettingsDTO {
|
|
|
3403
3403
|
delayHours?: number;
|
|
3404
3404
|
}
|
|
3405
3405
|
|
|
3406
|
+
/** Catalog price row and contract term: amount is the total for this period (e.g. full year for ANNUAL). */
|
|
3406
3407
|
declare enum BillingInterval {
|
|
3407
3408
|
MONTHLY = "MONTHLY",
|
|
3408
3409
|
SEMIANNUAL = "SEMIANNUAL",
|
|
3409
3410
|
ANNUAL = "ANNUAL"
|
|
3410
3411
|
}
|
|
3412
|
+
/** How often a subscription charge is generated (may split the contract total into installments). */
|
|
3413
|
+
declare enum PaymentFrequency {
|
|
3414
|
+
MONTHLY = "MONTHLY",
|
|
3415
|
+
QUARTERLY = "QUARTERLY",
|
|
3416
|
+
SEMIANNUAL = "SEMIANNUAL",
|
|
3417
|
+
ANNUAL = "ANNUAL"
|
|
3418
|
+
}
|
|
3411
3419
|
/** Single item in a spec category (display-like structure). */
|
|
3412
3420
|
interface ServiceBillingPlanSpecItem {
|
|
3413
3421
|
key: string;
|
|
@@ -3449,6 +3457,8 @@ interface ServiceBillingPlanLimits {
|
|
|
3449
3457
|
customApiIntegrations?: boolean;
|
|
3450
3458
|
storeCustomization?: boolean;
|
|
3451
3459
|
customEmail?: boolean;
|
|
3460
|
+
/** Maximum number of mailboxes (email accounts) the account can create. */
|
|
3461
|
+
maxMailboxes?: number | null;
|
|
3452
3462
|
reportsAndExport?: boolean;
|
|
3453
3463
|
multiCurrency?: boolean;
|
|
3454
3464
|
webhooks?: boolean;
|
|
@@ -3473,6 +3483,7 @@ interface ServiceBillingPlan {
|
|
|
3473
3483
|
interface ServiceBillingPlanPrice {
|
|
3474
3484
|
id: string;
|
|
3475
3485
|
serviceBillingPlanId: string;
|
|
3486
|
+
/** Contract / pricing period this row applies to (matches account assignment contract term). */
|
|
3476
3487
|
billingInterval: BillingInterval;
|
|
3477
3488
|
amount: number;
|
|
3478
3489
|
aiImageCreditsIncluded: number;
|
|
@@ -3491,8 +3502,12 @@ interface AccountServicePlan {
|
|
|
3491
3502
|
serviceBillingPlanId: string;
|
|
3492
3503
|
status: AccountServicePlanStatus;
|
|
3493
3504
|
customAmount?: number | null;
|
|
3505
|
+
/** Contract term; selects `service_billing_plan_price` row (catalog total for this term). */
|
|
3494
3506
|
billingInterval?: BillingInterval | null;
|
|
3495
|
-
|
|
3507
|
+
/** Charge cadence; installments divide the contract catalog/custom total. Null = same as billingInterval (legacy). */
|
|
3508
|
+
paymentFrequency?: PaymentFrequency | null;
|
|
3509
|
+
/** Trial length in days (0, 7, 15, 30, 60); no subscription charges until startedAt + freeDays. */
|
|
3510
|
+
freeDays: number;
|
|
3496
3511
|
installationFee?: number | null;
|
|
3497
3512
|
installationFeePaidAt?: Date | null;
|
|
3498
3513
|
startedAt: Date;
|
|
@@ -3521,7 +3536,8 @@ interface AccountServiceBillingCharge {
|
|
|
3521
3536
|
amount: number;
|
|
3522
3537
|
currency: string;
|
|
3523
3538
|
type: ChargeType;
|
|
3524
|
-
|
|
3539
|
+
/** For SUBSCRIPTION: length of the billed period (payment frequency), e.g. MONTHLY or QUARTERLY. */
|
|
3540
|
+
billingInterval?: BillingInterval | PaymentFrequency | null;
|
|
3525
3541
|
periodStart?: Date | null;
|
|
3526
3542
|
periodEnd?: Date | null;
|
|
3527
3543
|
dueDate?: Date | null;
|
|
@@ -3534,6 +3550,23 @@ interface AccountServiceBillingCharge {
|
|
|
3534
3550
|
deletedAt?: Date | null;
|
|
3535
3551
|
}
|
|
3536
3552
|
|
|
3553
|
+
/** Allowed “días gratis” before the first subscription charge is generated. */
|
|
3554
|
+
declare const SERVICE_BILLING_FREE_DAYS_VALUES: readonly [0, 7, 15, 30, 60];
|
|
3555
|
+
type ServiceBillingFreeDays = (typeof SERVICE_BILLING_FREE_DAYS_VALUES)[number];
|
|
3556
|
+
declare function normalizeServiceBillingFreeDays(value: unknown): ServiceBillingFreeDays;
|
|
3557
|
+
declare function contractTermMonths(contract: BillingInterval): number;
|
|
3558
|
+
declare function paymentFrequencyMonths(freq: PaymentFrequency): number;
|
|
3559
|
+
/**
|
|
3560
|
+
* Number of subscription charges in one full contract term, or null if incompatible
|
|
3561
|
+
* (e.g. quarterly billing on a 1-month contract).
|
|
3562
|
+
*/
|
|
3563
|
+
declare function subscriptionInstallmentCount(contract: BillingInterval, payment: PaymentFrequency): number | null;
|
|
3564
|
+
declare function resolveEffectivePaymentFrequency(contract: BillingInterval, paymentFrequency: PaymentFrequency | null | undefined): PaymentFrequency;
|
|
3565
|
+
/** Per-charge amount from the contract-period total (catalog or custom). */
|
|
3566
|
+
declare function subscriptionAmountPerInstallment(contractTotalAmount: number, contract: BillingInterval, payment: PaymentFrequency): number | null;
|
|
3567
|
+
/** IA credits to grant per subscription charge (proportional to installments). */
|
|
3568
|
+
declare function aiCreditsPerSubscriptionInstallment(creditsIncludedPerContract: number, contract: BillingInterval, payment: PaymentFrequency): number;
|
|
3569
|
+
|
|
3537
3570
|
declare enum HolidayType {
|
|
3538
3571
|
/** Business is expected to be closed. Default: excluded from delivery calculation. */
|
|
3539
3572
|
NON_WORKING = "NON_WORKING",
|
|
@@ -3564,4 +3597,69 @@ interface AccountHolidaySchedule {
|
|
|
3564
3597
|
updatedAt: Date;
|
|
3565
3598
|
}
|
|
3566
3599
|
|
|
3567
|
-
|
|
3600
|
+
interface Lead {
|
|
3601
|
+
id: string;
|
|
3602
|
+
name: string;
|
|
3603
|
+
company: string;
|
|
3604
|
+
email: string;
|
|
3605
|
+
phone: string;
|
|
3606
|
+
message: string;
|
|
3607
|
+
createdAt: Date;
|
|
3608
|
+
updatedAt: Date;
|
|
3609
|
+
deletedAt?: Date;
|
|
3610
|
+
}
|
|
3611
|
+
/** Payload to create a lead (e.g. from landing form). */
|
|
3612
|
+
interface CreateLeadDTO {
|
|
3613
|
+
name: string;
|
|
3614
|
+
company: string;
|
|
3615
|
+
email: string;
|
|
3616
|
+
phone: string;
|
|
3617
|
+
message: string;
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
declare enum GestionUserRole {
|
|
3621
|
+
OWNER = "OWNER",
|
|
3622
|
+
ADMIN = "ADMIN",
|
|
3623
|
+
ANALYST = "ANALYST"
|
|
3624
|
+
}
|
|
3625
|
+
declare enum GestionUserStatus {
|
|
3626
|
+
ACTIVE = "ACTIVE",
|
|
3627
|
+
INACTIVE = "INACTIVE",
|
|
3628
|
+
LOCKED = "LOCKED"
|
|
3629
|
+
}
|
|
3630
|
+
interface GestionUser {
|
|
3631
|
+
id: string;
|
|
3632
|
+
email: string;
|
|
3633
|
+
passwordHash?: string;
|
|
3634
|
+
name: string;
|
|
3635
|
+
role: GestionUserRole;
|
|
3636
|
+
status: GestionUserStatus;
|
|
3637
|
+
lastLoginAt?: Date | null;
|
|
3638
|
+
createdAt: Date;
|
|
3639
|
+
updatedAt: Date;
|
|
3640
|
+
deletedAt?: Date | null;
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3643
|
+
interface GestionSession {
|
|
3644
|
+
id: string;
|
|
3645
|
+
gestionUserId: string;
|
|
3646
|
+
tokenHash: string;
|
|
3647
|
+
expiresAt: Date;
|
|
3648
|
+
lastSeenAt?: Date | null;
|
|
3649
|
+
ip?: string | null;
|
|
3650
|
+
userAgent?: string | null;
|
|
3651
|
+
revokedAt?: Date | null;
|
|
3652
|
+
createdAt: Date;
|
|
3653
|
+
updatedAt: Date;
|
|
3654
|
+
deletedAt?: Date | null;
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3657
|
+
interface GestionLoginAttempt {
|
|
3658
|
+
id: string;
|
|
3659
|
+
email: string;
|
|
3660
|
+
ip?: string | null;
|
|
3661
|
+
userAgent?: string | null;
|
|
3662
|
+
createdAt: Date;
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
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 AccountEmailDomain, AccountEmailDomainStatus, type AccountExchangeRate, type AccountExchangeRateListResponse, type AccountExchangeRateMetadata, type AccountExchangeRateQueryDto, type AccountExchangeRateResponse, AccountExchangeRateType, type AccountExchangeRateWithEffectiveRate, type AccountHolidaySchedule, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, type AccountMailbox, 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 CreateLeadDTO, 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 GestionLoginAttempt, type GestionSession, type GestionUser, GestionUserRole, GestionUserStatus, type HistoricalDataPoint, type Holiday, HolidayType, type Integration, IntegrationCategory, type IntegrationDeliveryZone, IntegrationDeliveryZoneStatus, IntegrationStatus, type InternalNotificationConfig, InternalNotificationType, type Lead, 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, PaymentFrequency, 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, SERVICE_BILLING_FREE_DAYS_VALUES, SUPPORTED_COUNTRIES, type SameDayCutoffParams, type Seller, type SellerPeriodBalance, type ServiceBillingFreeDays, 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, aiCreditsPerSubscriptionInstallment, contractTermMonths, getAccountPaymentMethodStatusInfo, getCountryDefaults, getCurrencySymbol, getDisplayOrderStatus, getDisplayOrderStatusInfo, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderPaymentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, isLegacyLayout, isSupportedCountry, isZonedLayout, normalizeServiceBillingFreeDays, parsePriceFormatPattern, paymentFrequencyMonths, resolveEffectivePaymentFrequency, subscriptionAmountPerInstallment, subscriptionInstallmentCount };
|
package/dist/index.js
CHANGED
|
@@ -69,6 +69,8 @@ __export(index_exports, {
|
|
|
69
69
|
FulfillmentStatus: () => FulfillmentStatus,
|
|
70
70
|
FunnelStep: () => FunnelStep,
|
|
71
71
|
GeoZoneStatus: () => GeoZoneStatus,
|
|
72
|
+
GestionUserRole: () => GestionUserRole,
|
|
73
|
+
GestionUserStatus: () => GestionUserStatus,
|
|
72
74
|
HolidayType: () => HolidayType,
|
|
73
75
|
IntegrationCategory: () => IntegrationCategory,
|
|
74
76
|
IntegrationDeliveryZoneStatus: () => IntegrationDeliveryZoneStatus,
|
|
@@ -82,6 +84,7 @@ __export(index_exports, {
|
|
|
82
84
|
OrderStatus: () => OrderStatus,
|
|
83
85
|
PageType: () => PageType,
|
|
84
86
|
PaymentCardBrandKey: () => PaymentCardBrandKey,
|
|
87
|
+
PaymentFrequency: () => PaymentFrequency,
|
|
85
88
|
PaymentMethodType: () => PaymentMethodType,
|
|
86
89
|
PaymentStatus: () => PaymentStatus,
|
|
87
90
|
ProductAttributeStatus: () => ProductAttributeStatus,
|
|
@@ -98,6 +101,7 @@ __export(index_exports, {
|
|
|
98
101
|
PubSubTopics: () => PubSubTopics,
|
|
99
102
|
RoundingMethod: () => RoundingMethod,
|
|
100
103
|
RoundingRule: () => RoundingRule,
|
|
104
|
+
SERVICE_BILLING_FREE_DAYS_VALUES: () => SERVICE_BILLING_FREE_DAYS_VALUES,
|
|
101
105
|
SUPPORTED_COUNTRIES: () => SUPPORTED_COUNTRIES,
|
|
102
106
|
StandardCategoryStatus: () => StandardCategoryStatus,
|
|
103
107
|
StoreBannerStatus: () => StoreBannerStatus,
|
|
@@ -112,6 +116,8 @@ __export(index_exports, {
|
|
|
112
116
|
SupportConversationStatus: () => SupportConversationStatus,
|
|
113
117
|
SupportConversationVisibility: () => SupportConversationVisibility,
|
|
114
118
|
TrafficSource: () => TrafficSource,
|
|
119
|
+
aiCreditsPerSubscriptionInstallment: () => aiCreditsPerSubscriptionInstallment,
|
|
120
|
+
contractTermMonths: () => contractTermMonths,
|
|
115
121
|
getAccountPaymentMethodStatusInfo: () => getAccountPaymentMethodStatusInfo,
|
|
116
122
|
getCountryDefaults: () => getCountryDefaults,
|
|
117
123
|
getCurrencySymbol: () => getCurrencySymbol,
|
|
@@ -127,7 +133,12 @@ __export(index_exports, {
|
|
|
127
133
|
isLegacyLayout: () => isLegacyLayout,
|
|
128
134
|
isSupportedCountry: () => isSupportedCountry,
|
|
129
135
|
isZonedLayout: () => isZonedLayout,
|
|
130
|
-
|
|
136
|
+
normalizeServiceBillingFreeDays: () => normalizeServiceBillingFreeDays,
|
|
137
|
+
parsePriceFormatPattern: () => parsePriceFormatPattern,
|
|
138
|
+
paymentFrequencyMonths: () => paymentFrequencyMonths,
|
|
139
|
+
resolveEffectivePaymentFrequency: () => resolveEffectivePaymentFrequency,
|
|
140
|
+
subscriptionAmountPerInstallment: () => subscriptionAmountPerInstallment,
|
|
141
|
+
subscriptionInstallmentCount: () => subscriptionInstallmentCount
|
|
131
142
|
});
|
|
132
143
|
module.exports = __toCommonJS(index_exports);
|
|
133
144
|
|
|
@@ -1196,6 +1207,13 @@ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
|
|
|
1196
1207
|
BillingInterval2["ANNUAL"] = "ANNUAL";
|
|
1197
1208
|
return BillingInterval2;
|
|
1198
1209
|
})(BillingInterval || {});
|
|
1210
|
+
var PaymentFrequency = /* @__PURE__ */ ((PaymentFrequency2) => {
|
|
1211
|
+
PaymentFrequency2["MONTHLY"] = "MONTHLY";
|
|
1212
|
+
PaymentFrequency2["QUARTERLY"] = "QUARTERLY";
|
|
1213
|
+
PaymentFrequency2["SEMIANNUAL"] = "SEMIANNUAL";
|
|
1214
|
+
PaymentFrequency2["ANNUAL"] = "ANNUAL";
|
|
1215
|
+
return PaymentFrequency2;
|
|
1216
|
+
})(PaymentFrequency || {});
|
|
1199
1217
|
var AccountServicePlanStatus = /* @__PURE__ */ ((AccountServicePlanStatus2) => {
|
|
1200
1218
|
AccountServicePlanStatus2["ACTIVE"] = "ACTIVE";
|
|
1201
1219
|
AccountServicePlanStatus2["ENDED"] = "ENDED";
|
|
@@ -1216,12 +1234,81 @@ var ChargeStatus = /* @__PURE__ */ ((ChargeStatus2) => {
|
|
|
1216
1234
|
return ChargeStatus2;
|
|
1217
1235
|
})(ChargeStatus || {});
|
|
1218
1236
|
|
|
1237
|
+
// src/serviceBilling/billingSchedule.ts
|
|
1238
|
+
var SERVICE_BILLING_FREE_DAYS_VALUES = [0, 7, 15, 30, 60];
|
|
1239
|
+
function normalizeServiceBillingFreeDays(value) {
|
|
1240
|
+
const n = value == null || value === "" ? 0 : Number(value);
|
|
1241
|
+
if (!Number.isFinite(n)) return 0;
|
|
1242
|
+
return SERVICE_BILLING_FREE_DAYS_VALUES.includes(n) ? n : 0;
|
|
1243
|
+
}
|
|
1244
|
+
function contractTermMonths(contract) {
|
|
1245
|
+
switch (contract) {
|
|
1246
|
+
case "MONTHLY" /* MONTHLY */:
|
|
1247
|
+
return 1;
|
|
1248
|
+
case "SEMIANNUAL" /* SEMIANNUAL */:
|
|
1249
|
+
return 6;
|
|
1250
|
+
case "ANNUAL" /* ANNUAL */:
|
|
1251
|
+
return 12;
|
|
1252
|
+
default:
|
|
1253
|
+
return 1;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
function paymentFrequencyMonths(freq) {
|
|
1257
|
+
switch (freq) {
|
|
1258
|
+
case "MONTHLY" /* MONTHLY */:
|
|
1259
|
+
return 1;
|
|
1260
|
+
case "QUARTERLY" /* QUARTERLY */:
|
|
1261
|
+
return 3;
|
|
1262
|
+
case "SEMIANNUAL" /* SEMIANNUAL */:
|
|
1263
|
+
return 6;
|
|
1264
|
+
case "ANNUAL" /* ANNUAL */:
|
|
1265
|
+
return 12;
|
|
1266
|
+
default:
|
|
1267
|
+
return 1;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
function subscriptionInstallmentCount(contract, payment) {
|
|
1271
|
+
const cm = contractTermMonths(contract);
|
|
1272
|
+
const pm = paymentFrequencyMonths(payment);
|
|
1273
|
+
if (pm > cm) return null;
|
|
1274
|
+
if (cm % pm !== 0) return null;
|
|
1275
|
+
return cm / pm;
|
|
1276
|
+
}
|
|
1277
|
+
function resolveEffectivePaymentFrequency(contract, paymentFrequency) {
|
|
1278
|
+
if (paymentFrequency != null) return paymentFrequency;
|
|
1279
|
+
return contract;
|
|
1280
|
+
}
|
|
1281
|
+
function subscriptionAmountPerInstallment(contractTotalAmount, contract, payment) {
|
|
1282
|
+
const n = subscriptionInstallmentCount(contract, payment);
|
|
1283
|
+
if (n == null || n <= 0) return null;
|
|
1284
|
+
return Math.round(contractTotalAmount / n * 100) / 100;
|
|
1285
|
+
}
|
|
1286
|
+
function aiCreditsPerSubscriptionInstallment(creditsIncludedPerContract, contract, payment) {
|
|
1287
|
+
const n = subscriptionInstallmentCount(contract, payment);
|
|
1288
|
+
if (n == null || n <= 0) return creditsIncludedPerContract;
|
|
1289
|
+
return Math.round(creditsIncludedPerContract / n);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1219
1292
|
// src/holiday/types.ts
|
|
1220
1293
|
var HolidayType = /* @__PURE__ */ ((HolidayType2) => {
|
|
1221
1294
|
HolidayType2["NON_WORKING"] = "NON_WORKING";
|
|
1222
1295
|
HolidayType2["WORKING"] = "WORKING";
|
|
1223
1296
|
return HolidayType2;
|
|
1224
1297
|
})(HolidayType || {});
|
|
1298
|
+
|
|
1299
|
+
// src/gestionUser/types.ts
|
|
1300
|
+
var GestionUserRole = /* @__PURE__ */ ((GestionUserRole2) => {
|
|
1301
|
+
GestionUserRole2["OWNER"] = "OWNER";
|
|
1302
|
+
GestionUserRole2["ADMIN"] = "ADMIN";
|
|
1303
|
+
GestionUserRole2["ANALYST"] = "ANALYST";
|
|
1304
|
+
return GestionUserRole2;
|
|
1305
|
+
})(GestionUserRole || {});
|
|
1306
|
+
var GestionUserStatus = /* @__PURE__ */ ((GestionUserStatus2) => {
|
|
1307
|
+
GestionUserStatus2["ACTIVE"] = "ACTIVE";
|
|
1308
|
+
GestionUserStatus2["INACTIVE"] = "INACTIVE";
|
|
1309
|
+
GestionUserStatus2["LOCKED"] = "LOCKED";
|
|
1310
|
+
return GestionUserStatus2;
|
|
1311
|
+
})(GestionUserStatus || {});
|
|
1225
1312
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1226
1313
|
0 && (module.exports = {
|
|
1227
1314
|
AccountBranchScheduleDay,
|
|
@@ -1272,6 +1359,8 @@ var HolidayType = /* @__PURE__ */ ((HolidayType2) => {
|
|
|
1272
1359
|
FulfillmentStatus,
|
|
1273
1360
|
FunnelStep,
|
|
1274
1361
|
GeoZoneStatus,
|
|
1362
|
+
GestionUserRole,
|
|
1363
|
+
GestionUserStatus,
|
|
1275
1364
|
HolidayType,
|
|
1276
1365
|
IntegrationCategory,
|
|
1277
1366
|
IntegrationDeliveryZoneStatus,
|
|
@@ -1285,6 +1374,7 @@ var HolidayType = /* @__PURE__ */ ((HolidayType2) => {
|
|
|
1285
1374
|
OrderStatus,
|
|
1286
1375
|
PageType,
|
|
1287
1376
|
PaymentCardBrandKey,
|
|
1377
|
+
PaymentFrequency,
|
|
1288
1378
|
PaymentMethodType,
|
|
1289
1379
|
PaymentStatus,
|
|
1290
1380
|
ProductAttributeStatus,
|
|
@@ -1301,6 +1391,7 @@ var HolidayType = /* @__PURE__ */ ((HolidayType2) => {
|
|
|
1301
1391
|
PubSubTopics,
|
|
1302
1392
|
RoundingMethod,
|
|
1303
1393
|
RoundingRule,
|
|
1394
|
+
SERVICE_BILLING_FREE_DAYS_VALUES,
|
|
1304
1395
|
SUPPORTED_COUNTRIES,
|
|
1305
1396
|
StandardCategoryStatus,
|
|
1306
1397
|
StoreBannerStatus,
|
|
@@ -1315,6 +1406,8 @@ var HolidayType = /* @__PURE__ */ ((HolidayType2) => {
|
|
|
1315
1406
|
SupportConversationStatus,
|
|
1316
1407
|
SupportConversationVisibility,
|
|
1317
1408
|
TrafficSource,
|
|
1409
|
+
aiCreditsPerSubscriptionInstallment,
|
|
1410
|
+
contractTermMonths,
|
|
1318
1411
|
getAccountPaymentMethodStatusInfo,
|
|
1319
1412
|
getCountryDefaults,
|
|
1320
1413
|
getCurrencySymbol,
|
|
@@ -1330,6 +1423,11 @@ var HolidayType = /* @__PURE__ */ ((HolidayType2) => {
|
|
|
1330
1423
|
isLegacyLayout,
|
|
1331
1424
|
isSupportedCountry,
|
|
1332
1425
|
isZonedLayout,
|
|
1333
|
-
|
|
1426
|
+
normalizeServiceBillingFreeDays,
|
|
1427
|
+
parsePriceFormatPattern,
|
|
1428
|
+
paymentFrequencyMonths,
|
|
1429
|
+
resolveEffectivePaymentFrequency,
|
|
1430
|
+
subscriptionAmountPerInstallment,
|
|
1431
|
+
subscriptionInstallmentCount
|
|
1334
1432
|
});
|
|
1335
1433
|
//# sourceMappingURL=index.js.map
|