@retaila/shared-types 1.1.87 → 1.1.91
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 +39 -3
- package/dist/index.d.ts +39 -3
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -146,8 +146,8 @@ interface Account {
|
|
|
146
146
|
priceFormatPattern: string;
|
|
147
147
|
instagram?: string;
|
|
148
148
|
facebook?: string;
|
|
149
|
-
whatsapp?: string;
|
|
150
|
-
phone?: string;
|
|
149
|
+
whatsapp?: Phone | string;
|
|
150
|
+
phone?: Phone | string;
|
|
151
151
|
email: string;
|
|
152
152
|
timezone: string;
|
|
153
153
|
hasDelivery: boolean;
|
|
@@ -619,6 +619,7 @@ interface ProductVariant {
|
|
|
619
619
|
compareAtPrice?: number;
|
|
620
620
|
allowBackorder?: boolean;
|
|
621
621
|
stock: number;
|
|
622
|
+
status: ProductVariantStatus;
|
|
622
623
|
weight?: number | null;
|
|
623
624
|
weightUnit?: string | null;
|
|
624
625
|
height?: number | null;
|
|
@@ -631,6 +632,11 @@ interface ProductVariant {
|
|
|
631
632
|
updatedAt: Date;
|
|
632
633
|
deletedAt?: Date;
|
|
633
634
|
}
|
|
635
|
+
declare enum ProductVariantStatus {
|
|
636
|
+
ACTIVE = "ACTIVE",
|
|
637
|
+
OUT_OF_STOCK = "OUT_OF_STOCK",
|
|
638
|
+
COMING_SOON = "COMING_SOON"
|
|
639
|
+
}
|
|
634
640
|
|
|
635
641
|
declare function getProductStatusInfo(status: ProductStatus): StatusInfo;
|
|
636
642
|
|
|
@@ -731,6 +737,12 @@ interface Payment {
|
|
|
731
737
|
deletedAt?: string | Date;
|
|
732
738
|
accountPaymentMethod?: Partial<AccountPaymentMethod> | null;
|
|
733
739
|
order?: Order;
|
|
740
|
+
allowedActions?: {
|
|
741
|
+
canCopyLink: boolean;
|
|
742
|
+
canMarkAsPaid: boolean;
|
|
743
|
+
canRecapture: boolean;
|
|
744
|
+
canRefund: boolean;
|
|
745
|
+
};
|
|
734
746
|
}
|
|
735
747
|
type PaymentProviderKey = 'MERCADOPAGO' | 'PLEXO' | 'MANUAL_PAYMENT';
|
|
736
748
|
interface PaymentProviderContext {
|
|
@@ -2152,4 +2164,28 @@ interface EffectiveExchangeRate {
|
|
|
2152
2164
|
source: string;
|
|
2153
2165
|
}
|
|
2154
2166
|
|
|
2155
|
-
|
|
2167
|
+
interface StoreSettings {
|
|
2168
|
+
id: string;
|
|
2169
|
+
accountId: string;
|
|
2170
|
+
showOutOfStockItems: boolean;
|
|
2171
|
+
allowBackorder: boolean;
|
|
2172
|
+
hasDelivery: boolean;
|
|
2173
|
+
priceFormatPattern?: string;
|
|
2174
|
+
publicEmail?: string;
|
|
2175
|
+
publicPhone?: Phone | string;
|
|
2176
|
+
whatsapp?: Phone | string;
|
|
2177
|
+
instagram?: string;
|
|
2178
|
+
facebook?: string;
|
|
2179
|
+
address?: string;
|
|
2180
|
+
location?: {
|
|
2181
|
+
lat: number;
|
|
2182
|
+
lng: number;
|
|
2183
|
+
};
|
|
2184
|
+
logoId?: string;
|
|
2185
|
+
faviconId?: string;
|
|
2186
|
+
createdAt: Date;
|
|
2187
|
+
updatedAt: Date;
|
|
2188
|
+
deletedAt?: Date;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountCurrencyConfig, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, type AccountExchangeRate, type AccountExchangeRateListResponse, type AccountExchangeRateMetadata, type AccountExchangeRateQueryDto, type AccountExchangeRateResponse, AccountExchangeRateType, type AccountExchangeRateWithEffectiveRate, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, type AccountPaymentMethod, AccountPaymentMethodStatus, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type ButtonStyle, type Campaign, type CampaignBudget, CampaignBudgetType, type CampaignBudgetUsage, 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 CreateAccountDeliveryOptionDTO, type CreateAccountExchangeRateDto, type CreateDeliveryOptionDto, type CreateExchangeRateDto, type CreateFulfillmentDto, type CreateFulfillmentItemDto, type CreatePromotionDTO, Currency, type CurrencyConversion, type Customer, CustomerStatus, type CustomerUpsertDto, DayOfWeek, DeliveryType, type DeliveryZoneInput, type EffectiveExchangeRate, type ExchangeRate, type ExchangeRateListResponse, type ExchangeRateMetadata, type ExchangeRateQueryDto, type ExchangeRateResponse, 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 GeoZone, type GeoZoneInput, GeoZoneStatus, type Integration, IntegrationCategory, type IntegrationDeliveryZone, IntegrationDeliveryZoneStatus, IntegrationStatus, type MapPosition, type Media, MediaType, 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 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 Phone, type PickupLocation, type Product, 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 RoundingConfig, RoundingMethod, RoundingRule, type StandardCategory, StandardCategoryStatus, type StatusChangeHistory, type StatusFlow, type StoreBanner, StoreBannerStatus, type StoreCustomization, type StoreCustomizationComponentSettings, type StoreCustomizationLayoutComponent, type StoreCustomizationPage, type StoreCustomizationPageComponent, type StoreCustomizationSeo, type StoreCustomizationThemeButtons, type StoreCustomizationThemeColors, type StoreCustomizationThemeTypography, type StorePage, StorePageStatus, StorePageType, type StoreSettings, type SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type ThemeConfig, type UpdateAccountDeliveryOptionDTO, type UpdateAccountExchangeRateAllDto, type UpdateAccountExchangeRateDto, type UpdateExchangeRateDto, type UpdateFulfillmentDto, type UpdatePromotionDTO, type Webhook, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCurrencySymbol, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderPaymentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, parsePriceFormatPattern };
|
package/dist/index.d.ts
CHANGED
|
@@ -146,8 +146,8 @@ interface Account {
|
|
|
146
146
|
priceFormatPattern: string;
|
|
147
147
|
instagram?: string;
|
|
148
148
|
facebook?: string;
|
|
149
|
-
whatsapp?: string;
|
|
150
|
-
phone?: string;
|
|
149
|
+
whatsapp?: Phone | string;
|
|
150
|
+
phone?: Phone | string;
|
|
151
151
|
email: string;
|
|
152
152
|
timezone: string;
|
|
153
153
|
hasDelivery: boolean;
|
|
@@ -619,6 +619,7 @@ interface ProductVariant {
|
|
|
619
619
|
compareAtPrice?: number;
|
|
620
620
|
allowBackorder?: boolean;
|
|
621
621
|
stock: number;
|
|
622
|
+
status: ProductVariantStatus;
|
|
622
623
|
weight?: number | null;
|
|
623
624
|
weightUnit?: string | null;
|
|
624
625
|
height?: number | null;
|
|
@@ -631,6 +632,11 @@ interface ProductVariant {
|
|
|
631
632
|
updatedAt: Date;
|
|
632
633
|
deletedAt?: Date;
|
|
633
634
|
}
|
|
635
|
+
declare enum ProductVariantStatus {
|
|
636
|
+
ACTIVE = "ACTIVE",
|
|
637
|
+
OUT_OF_STOCK = "OUT_OF_STOCK",
|
|
638
|
+
COMING_SOON = "COMING_SOON"
|
|
639
|
+
}
|
|
634
640
|
|
|
635
641
|
declare function getProductStatusInfo(status: ProductStatus): StatusInfo;
|
|
636
642
|
|
|
@@ -731,6 +737,12 @@ interface Payment {
|
|
|
731
737
|
deletedAt?: string | Date;
|
|
732
738
|
accountPaymentMethod?: Partial<AccountPaymentMethod> | null;
|
|
733
739
|
order?: Order;
|
|
740
|
+
allowedActions?: {
|
|
741
|
+
canCopyLink: boolean;
|
|
742
|
+
canMarkAsPaid: boolean;
|
|
743
|
+
canRecapture: boolean;
|
|
744
|
+
canRefund: boolean;
|
|
745
|
+
};
|
|
734
746
|
}
|
|
735
747
|
type PaymentProviderKey = 'MERCADOPAGO' | 'PLEXO' | 'MANUAL_PAYMENT';
|
|
736
748
|
interface PaymentProviderContext {
|
|
@@ -2152,4 +2164,28 @@ interface EffectiveExchangeRate {
|
|
|
2152
2164
|
source: string;
|
|
2153
2165
|
}
|
|
2154
2166
|
|
|
2155
|
-
|
|
2167
|
+
interface StoreSettings {
|
|
2168
|
+
id: string;
|
|
2169
|
+
accountId: string;
|
|
2170
|
+
showOutOfStockItems: boolean;
|
|
2171
|
+
allowBackorder: boolean;
|
|
2172
|
+
hasDelivery: boolean;
|
|
2173
|
+
priceFormatPattern?: string;
|
|
2174
|
+
publicEmail?: string;
|
|
2175
|
+
publicPhone?: Phone | string;
|
|
2176
|
+
whatsapp?: Phone | string;
|
|
2177
|
+
instagram?: string;
|
|
2178
|
+
facebook?: string;
|
|
2179
|
+
address?: string;
|
|
2180
|
+
location?: {
|
|
2181
|
+
lat: number;
|
|
2182
|
+
lng: number;
|
|
2183
|
+
};
|
|
2184
|
+
logoId?: string;
|
|
2185
|
+
faviconId?: string;
|
|
2186
|
+
createdAt: Date;
|
|
2187
|
+
updatedAt: Date;
|
|
2188
|
+
deletedAt?: Date;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountCurrencyConfig, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, type AccountExchangeRate, type AccountExchangeRateListResponse, type AccountExchangeRateMetadata, type AccountExchangeRateQueryDto, type AccountExchangeRateResponse, AccountExchangeRateType, type AccountExchangeRateWithEffectiveRate, type AccountIntegration, type AccountIntegrationConfigDTO, AccountIntegrationConnectionStatus, AccountIntegrationEnvironment, AccountIntegrationStatus, type AccountPaymentMethod, AccountPaymentMethodStatus, AccountStatus, type Address, type AdminOrderStatusChangeDto, type BaseEntity, type BaseEntityWithAccount, type BaseEntityWithAccountAndUser, type BaseEntityWithUser, type ButtonStyle, type Campaign, type CampaignBudget, CampaignBudgetType, type CampaignBudgetUsage, 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 CreateAccountDeliveryOptionDTO, type CreateAccountExchangeRateDto, type CreateDeliveryOptionDto, type CreateExchangeRateDto, type CreateFulfillmentDto, type CreateFulfillmentItemDto, type CreatePromotionDTO, Currency, type CurrencyConversion, type Customer, CustomerStatus, type CustomerUpsertDto, DayOfWeek, DeliveryType, type DeliveryZoneInput, type EffectiveExchangeRate, type ExchangeRate, type ExchangeRateListResponse, type ExchangeRateMetadata, type ExchangeRateQueryDto, type ExchangeRateResponse, 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 GeoZone, type GeoZoneInput, GeoZoneStatus, type Integration, IntegrationCategory, type IntegrationDeliveryZone, IntegrationDeliveryZoneStatus, IntegrationStatus, type MapPosition, type Media, MediaType, 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 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 Phone, type PickupLocation, type Product, 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 RoundingConfig, RoundingMethod, RoundingRule, type StandardCategory, StandardCategoryStatus, type StatusChangeHistory, type StatusFlow, type StoreBanner, StoreBannerStatus, type StoreCustomization, type StoreCustomizationComponentSettings, type StoreCustomizationLayoutComponent, type StoreCustomizationPage, type StoreCustomizationPageComponent, type StoreCustomizationSeo, type StoreCustomizationThemeButtons, type StoreCustomizationThemeColors, type StoreCustomizationThemeTypography, type StorePage, StorePageStatus, StorePageType, type StoreSettings, type SupportConversation, SupportConversationChannel, type SupportConversationMessage, SupportConversationMessageAiAnalysisStatus, SupportConversationMessageDeliveryStatus, SupportConversationMessageDirection, SupportConversationMessageSenderType, SupportConversationPriority, SupportConversationStatus, SupportConversationVisibility, type ThemeConfig, type UpdateAccountDeliveryOptionDTO, type UpdateAccountExchangeRateAllDto, type UpdateAccountExchangeRateDto, type UpdateExchangeRateDto, type UpdateFulfillmentDto, type UpdatePromotionDTO, type Webhook, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCurrencySymbol, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderPaymentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, parsePriceFormatPattern };
|
package/dist/index.js
CHANGED
|
@@ -62,6 +62,7 @@ __export(index_exports, {
|
|
|
62
62
|
ProductCategoryStatus: () => ProductCategoryStatus,
|
|
63
63
|
ProductStatus: () => ProductStatus,
|
|
64
64
|
ProductType: () => ProductType,
|
|
65
|
+
ProductVariantStatus: () => ProductVariantStatus,
|
|
65
66
|
PromotionApplicationType: () => PromotionApplicationType,
|
|
66
67
|
PromotionRuleOperator: () => PromotionRuleOperator,
|
|
67
68
|
PromotionStatus: () => PromotionStatus,
|
|
@@ -600,6 +601,12 @@ var ProductType = /* @__PURE__ */ ((ProductType2) => {
|
|
|
600
601
|
ProductType2["GIFT_CARD"] = "GIFT_CARD";
|
|
601
602
|
return ProductType2;
|
|
602
603
|
})(ProductType || {});
|
|
604
|
+
var ProductVariantStatus = /* @__PURE__ */ ((ProductVariantStatus2) => {
|
|
605
|
+
ProductVariantStatus2["ACTIVE"] = "ACTIVE";
|
|
606
|
+
ProductVariantStatus2["OUT_OF_STOCK"] = "OUT_OF_STOCK";
|
|
607
|
+
ProductVariantStatus2["COMING_SOON"] = "COMING_SOON";
|
|
608
|
+
return ProductVariantStatus2;
|
|
609
|
+
})(ProductVariantStatus || {});
|
|
603
610
|
|
|
604
611
|
// src/product/helpers.ts
|
|
605
612
|
function getProductStatusInfo(status) {
|
|
@@ -879,6 +886,7 @@ var RoundingRule = /* @__PURE__ */ ((RoundingRule2) => {
|
|
|
879
886
|
ProductCategoryStatus,
|
|
880
887
|
ProductStatus,
|
|
881
888
|
ProductType,
|
|
889
|
+
ProductVariantStatus,
|
|
882
890
|
PromotionApplicationType,
|
|
883
891
|
PromotionRuleOperator,
|
|
884
892
|
PromotionStatus,
|