@artisan-commerce/types 0.14.0-canary.55 → 0.14.0-canary.56
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/bundle.d.ts +124 -1
- package/package.json +2 -2
package/dist/bundle.d.ts
CHANGED
|
@@ -1086,6 +1086,7 @@ interface CartTotals {
|
|
|
1086
1086
|
shippingCost: number;
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
+
type MasivoRegistrationStatus = "REGISTERED" | "UNREGISTERED";
|
|
1089
1090
|
/**
|
|
1090
1091
|
* Represents a customer in the Masivo system.
|
|
1091
1092
|
*/
|
|
@@ -1458,6 +1459,124 @@ interface LoyaltyAccumulation extends WalletLine {
|
|
|
1458
1459
|
/** The reward associated with the accumulation */
|
|
1459
1460
|
reward: WalletReward;
|
|
1460
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Represents the summary of coupon codes.
|
|
1464
|
+
*/
|
|
1465
|
+
interface CodesSummary {
|
|
1466
|
+
/** Array of coupon codes */
|
|
1467
|
+
codes: string[];
|
|
1468
|
+
/** Number of times coupon code has been redeemed */
|
|
1469
|
+
used: number;
|
|
1470
|
+
/** Number of times coupon code can be redeemed */
|
|
1471
|
+
left: number;
|
|
1472
|
+
/** Total number of uses for the coupon code */
|
|
1473
|
+
total: number;
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Represents the format configuration for a code generation system.
|
|
1477
|
+
*/
|
|
1478
|
+
interface CodeFormat {
|
|
1479
|
+
/** Determines if the code should be case sensitive */
|
|
1480
|
+
case_sensitive: boolean;
|
|
1481
|
+
/** The template pattern for code generation */
|
|
1482
|
+
template: string;
|
|
1483
|
+
/** Characters that should not be included in the generated code */
|
|
1484
|
+
exclude_characters: string;
|
|
1485
|
+
/** Characters that must be included in the generated code */
|
|
1486
|
+
include_characters: string;
|
|
1487
|
+
}
|
|
1488
|
+
type MasivoCampaignAttributes = BehaviorCampaignAttributes | CouponCampaignAttributes;
|
|
1489
|
+
/**
|
|
1490
|
+
* Interface representing attributes for a behavior-based campaign
|
|
1491
|
+
*/
|
|
1492
|
+
interface BehaviorCampaignAttributes {
|
|
1493
|
+
/** The trigger identifier for the campaign behavior */
|
|
1494
|
+
trigger: string;
|
|
1495
|
+
}
|
|
1496
|
+
/**
|
|
1497
|
+
* Interface representing the attributes of a coupon campaign
|
|
1498
|
+
*/
|
|
1499
|
+
interface CouponCampaignAttributes {
|
|
1500
|
+
/** The format specification for coupon codes */
|
|
1501
|
+
code_format: CodeFormat;
|
|
1502
|
+
/** Array of valid coupon codes for the campaign */
|
|
1503
|
+
codes_summary: CodesSummary;
|
|
1504
|
+
/** Maximum number of times each code can be redeemed in total */
|
|
1505
|
+
max_redemptions_per_code: number;
|
|
1506
|
+
/** Maximum number of times each code can be redeemed by a single customer */
|
|
1507
|
+
max_redemptions_per_code_per_customer: number;
|
|
1508
|
+
}
|
|
1509
|
+
type BudgetDivision = "daily" | "weekly" | "monthly" | "total";
|
|
1510
|
+
type MasivoCampaignStatus = "RUNNING" | "PAUSED" | "SCHEDULED" | "FINISHED";
|
|
1511
|
+
type MasivoCampaignType = "COUPONS" | "BEHAVIOR";
|
|
1512
|
+
/**
|
|
1513
|
+
* Represents a Masivo Campaign configuration.
|
|
1514
|
+
*/
|
|
1515
|
+
interface MasivoCampaign {
|
|
1516
|
+
/** The attributes of the campaign */
|
|
1517
|
+
attributes: MasivoCampaignAttributes;
|
|
1518
|
+
/** Identifier of the associated brand */
|
|
1519
|
+
brand_id: string;
|
|
1520
|
+
/** The budget allocated for the campaign */
|
|
1521
|
+
budget: number;
|
|
1522
|
+
/** The content of the campaign */
|
|
1523
|
+
content: Objectify<MasivoTemplateContent>;
|
|
1524
|
+
/** A detailed description of the campaign */
|
|
1525
|
+
description: string;
|
|
1526
|
+
/** The division of the budget */
|
|
1527
|
+
divide_budget_in: BudgetDivision;
|
|
1528
|
+
/** The end date of the campaign, if applicable */
|
|
1529
|
+
end_date: string | null;
|
|
1530
|
+
/** The source of funding for the campaign, if specified */
|
|
1531
|
+
funded_by: string | null;
|
|
1532
|
+
/** Unique identifier for the campaign */
|
|
1533
|
+
id: string;
|
|
1534
|
+
/** Array of labels associated to filter the campaigns by */
|
|
1535
|
+
labels: string[];
|
|
1536
|
+
/** Additional metadata for the campaign */
|
|
1537
|
+
metadata: unknown;
|
|
1538
|
+
/** The name of the campaign */
|
|
1539
|
+
name: string;
|
|
1540
|
+
/** The rules governing the campaign */
|
|
1541
|
+
rules: MasivoCampaignRule[];
|
|
1542
|
+
/** The start date of the campaign */
|
|
1543
|
+
start_date: string;
|
|
1544
|
+
/** The current status of the campaign */
|
|
1545
|
+
status: MasivoCampaignStatus;
|
|
1546
|
+
/** Identifier of the template used for the campaign */
|
|
1547
|
+
template_id: string;
|
|
1548
|
+
/** The type of the campaign */
|
|
1549
|
+
type: MasivoCampaignType;
|
|
1550
|
+
}
|
|
1551
|
+
/**
|
|
1552
|
+
* Defines the structure for rules in a masivo campaign.
|
|
1553
|
+
*/
|
|
1554
|
+
interface MasivoCampaignRule {
|
|
1555
|
+
/** A matrix of conditions that must be met for the campaign rules to apply */
|
|
1556
|
+
conditions: MasivoCondition[][];
|
|
1557
|
+
/** Array of effects to be applied when conditions are met */
|
|
1558
|
+
effects: MasivoEffect[];
|
|
1559
|
+
}
|
|
1560
|
+
/**
|
|
1561
|
+
* Represents the effect of a Masivo reward.
|
|
1562
|
+
*/
|
|
1563
|
+
interface MasivoEffect {
|
|
1564
|
+
/** The unique identifier of the reward */
|
|
1565
|
+
reward_id: string;
|
|
1566
|
+
/** The type of the reward */
|
|
1567
|
+
type: MasivoRewardType;
|
|
1568
|
+
/** The identifier of the tier this effect belongs to */
|
|
1569
|
+
tier_id: string;
|
|
1570
|
+
/** The reward object containing detailed information */
|
|
1571
|
+
reward: WalletReward;
|
|
1572
|
+
/** The date when the effect expires */
|
|
1573
|
+
expiration_date: string;
|
|
1574
|
+
/** The amount value of the effect */
|
|
1575
|
+
amount: number;
|
|
1576
|
+
/** The multiplier condition type */
|
|
1577
|
+
multiplier: MasivoEffectMultiplierType;
|
|
1578
|
+
}
|
|
1579
|
+
type MasivoEffectMultiplierType = Extract<MasivoConditionType, "Order value">;
|
|
1461
1580
|
|
|
1462
1581
|
/**
|
|
1463
1582
|
* Wallet user information.
|
|
@@ -2487,6 +2606,10 @@ interface BaseUser<T extends AdditionalInfo = AdditionalInfo> {
|
|
|
2487
2606
|
interface User<T extends AdditionalInfo = AdditionalInfo> extends BaseUser<T> {
|
|
2488
2607
|
/** User's auto generated id */
|
|
2489
2608
|
idInt: number;
|
|
2609
|
+
/** User registration status in Masivo */
|
|
2610
|
+
rewardsProgramStatus?: MasivoRegistrationStatus | null;
|
|
2611
|
+
/** Last date when the user accepted the new conditions */
|
|
2612
|
+
latestConditionsAcceptanceDate?: string | null;
|
|
2490
2613
|
}
|
|
2491
2614
|
/**
|
|
2492
2615
|
* The possible values for the user's type.
|
|
@@ -3671,4 +3794,4 @@ interface CardInscription {
|
|
|
3671
3794
|
createdAt?: string;
|
|
3672
3795
|
}
|
|
3673
3796
|
|
|
3674
|
-
export type { ARDocumentType, Account, AdditionalInfo, Alert, Allocation, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, Award, BODocumentType, BRDocumentType, Banner, BannerBenefits, BannerCoupon, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitData, BenefitTypes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, Discount, DocumentType, ECDocumentType, ExtendedLoyaltyInfo, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, LoyaltyAccumulation, MaritalStatus, MasivoBenefitPayload, MasivoCondition, MasivoConditionBase, MasivoConditionType, MasivoCustomer, MasivoCustomerMetrics, MasivoInfo, MasivoOperator, MasivoRepeatInterval, MasivoReportingPeriod, MasivoRewardAction, MasivoRewardType, MasivoTemplateContent, MasivoTemplateType, MasivoTier, MasivoTransactionType, MasivoWallet, Message, Metadata, MetadataShipping, MetricPeriod, NewShippingAddress, Notification, NotificationAdditionalInfo, NotificationExtraData, NotificationListItem, NotificationPriority, NotificationStep, NotificationStore, NotificationUser, NotificationVendor, Objectify, OperatorInformation, Order, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductBillTotal, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderStoreAdditionalInfo, OrderStoreDelivery, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, PaymentStatus, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductCoupon, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, ReadValue, RedeemableBenefit, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreCoupon, StoreCouponDetail, StoreLocation, StorePolygons, Suborder, Tax, TaxCalculation, TaxCalculations, TaxType, Token, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, ValidateConditionConfig, Vendor, Wallet, WalletAttribute, WalletLine, WalletMedia, WalletReward, WalletTotal, WebhookWorkflow, Workflow, ZipCodeField };
|
|
3797
|
+
export type { ARDocumentType, Account, AdditionalInfo, Alert, Allocation, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, Award, BODocumentType, BRDocumentType, Banner, BannerBenefits, BannerCoupon, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, BehaviorCampaignAttributes, Benefit, BenefitData, BenefitTypes, BillTotal, BillTotalCategory, BillingData, BudgetDivision, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CodeFormat, CodesSummary, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCampaignAttributes, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, Discount, DocumentType, ECDocumentType, ExtendedLoyaltyInfo, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, LoyaltyAccumulation, MaritalStatus, MasivoBenefitPayload, MasivoCampaign, MasivoCampaignAttributes, MasivoCampaignRule, MasivoCampaignStatus, MasivoCampaignType, MasivoCondition, MasivoConditionBase, MasivoConditionType, MasivoCustomer, MasivoCustomerMetrics, MasivoEffect, MasivoEffectMultiplierType, MasivoInfo, MasivoOperator, MasivoRegistrationStatus, MasivoRepeatInterval, MasivoReportingPeriod, MasivoRewardAction, MasivoRewardType, MasivoTemplateContent, MasivoTemplateType, MasivoTier, MasivoTransactionType, MasivoWallet, Message, Metadata, MetadataShipping, MetricPeriod, NewShippingAddress, Notification, NotificationAdditionalInfo, NotificationExtraData, NotificationListItem, NotificationPriority, NotificationStep, NotificationStore, NotificationUser, NotificationVendor, Objectify, OperatorInformation, Order, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductBillTotal, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderStoreAdditionalInfo, OrderStoreDelivery, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, PaymentStatus, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductCoupon, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, ReadValue, RedeemableBenefit, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreCoupon, StoreCouponDetail, StoreLocation, StorePolygons, Suborder, Tax, TaxCalculation, TaxCalculations, TaxType, Token, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, ValidateConditionConfig, Vendor, Wallet, WalletAttribute, WalletLine, WalletMedia, WalletReward, WalletTotal, WebhookWorkflow, Workflow, ZipCodeField };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@artisan-commerce/types",
|
|
3
3
|
"description": "Artisn's types and interfaces library",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.14.0-canary.
|
|
5
|
+
"version": "0.14.0-canary.56",
|
|
6
6
|
"types": "./dist/bundle.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"author": "Luis Eduardo Andrade",
|
|
26
26
|
"license": "MIT",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "41f1511aa3a414cab385c560855ecd01bb4325d1",
|
|
28
28
|
"nx": {
|
|
29
29
|
"targets": {
|
|
30
30
|
"build": {
|