@retaila/shared-types 1.1.84 → 1.1.87
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 +179 -1
- package/dist/index.d.ts +179 -1
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -694,6 +694,13 @@ declare enum PaymentMethodType {
|
|
|
694
694
|
CASH = "CASH",
|
|
695
695
|
OTHER = "OTHER"
|
|
696
696
|
}
|
|
697
|
+
interface PaymentConversion {
|
|
698
|
+
fromCurrency: Currency;
|
|
699
|
+
toCurrency: Currency;
|
|
700
|
+
rate: number;
|
|
701
|
+
originalAmount: number;
|
|
702
|
+
finalAmount: number;
|
|
703
|
+
}
|
|
697
704
|
interface Payment {
|
|
698
705
|
id: string;
|
|
699
706
|
accountId: string;
|
|
@@ -715,6 +722,7 @@ interface Payment {
|
|
|
715
722
|
cardBrandInfo?: PaymentCardBrand;
|
|
716
723
|
cardLast4?: string;
|
|
717
724
|
data?: Record<string, any>;
|
|
725
|
+
conversion?: PaymentConversion;
|
|
718
726
|
metadata?: Record<string, any>;
|
|
719
727
|
internalComment?: string;
|
|
720
728
|
demo: boolean;
|
|
@@ -910,6 +918,7 @@ interface FulfillmentProviderAdapter {
|
|
|
910
918
|
readonly key: FulfillmentProviderKey;
|
|
911
919
|
listDeliveryOptions(): Promise<FulfillmentDeliveryOption[]>;
|
|
912
920
|
canCalculate(data: Record<string, unknown>): Promise<boolean>;
|
|
921
|
+
calculatePrice(data: Record<string, unknown>): Promise<number>;
|
|
913
922
|
getRecollectionCapabilities(): Promise<FulfillmentRecollectionCapabilities>;
|
|
914
923
|
createFulfillment(input: FulfillmentProviderCreateInput): Promise<FulfillmentProviderCreateOutput>;
|
|
915
924
|
processWebhook(input: FulfillmentProviderProcessWebhookInput): Promise<FulfillmentProviderProcessWebhookOutput | null>;
|
|
@@ -1974,4 +1983,173 @@ declare enum IntegrationDeliveryZoneStatus {
|
|
|
1974
1983
|
INACTIVE = "INACTIVE"
|
|
1975
1984
|
}
|
|
1976
1985
|
|
|
1977
|
-
|
|
1986
|
+
interface ExchangeRate extends BaseEntity {
|
|
1987
|
+
id: string;
|
|
1988
|
+
baseCurrency: Currency;
|
|
1989
|
+
targetCurrency: Currency;
|
|
1990
|
+
rate: number;
|
|
1991
|
+
effectiveDate: Date;
|
|
1992
|
+
source: string;
|
|
1993
|
+
isLatest: boolean;
|
|
1994
|
+
metadata?: ExchangeRateMetadata;
|
|
1995
|
+
createdAt: Date;
|
|
1996
|
+
updatedAt: Date;
|
|
1997
|
+
deletedAt?: Date;
|
|
1998
|
+
}
|
|
1999
|
+
interface ExchangeRateMetadata {
|
|
2000
|
+
provider?: string;
|
|
2001
|
+
sourceTimestamp?: Date;
|
|
2002
|
+
confidence?: number;
|
|
2003
|
+
[key: string]: any;
|
|
2004
|
+
}
|
|
2005
|
+
interface CreateExchangeRateDto {
|
|
2006
|
+
baseCurrency: Currency;
|
|
2007
|
+
targetCurrency: Currency;
|
|
2008
|
+
rate: number;
|
|
2009
|
+
effectiveDate?: Date;
|
|
2010
|
+
source: string;
|
|
2011
|
+
metadata?: ExchangeRateMetadata;
|
|
2012
|
+
}
|
|
2013
|
+
interface UpdateExchangeRateDto {
|
|
2014
|
+
rate?: number;
|
|
2015
|
+
effectiveDate?: Date;
|
|
2016
|
+
source?: string;
|
|
2017
|
+
isLatest?: boolean;
|
|
2018
|
+
metadata?: ExchangeRateMetadata;
|
|
2019
|
+
}
|
|
2020
|
+
interface ExchangeRateQueryDto {
|
|
2021
|
+
baseCurrency?: Currency;
|
|
2022
|
+
targetCurrency?: Currency;
|
|
2023
|
+
source?: string;
|
|
2024
|
+
isLatest?: boolean;
|
|
2025
|
+
effectiveDateFrom?: Date;
|
|
2026
|
+
effectiveDateTo?: Date;
|
|
2027
|
+
limit?: number;
|
|
2028
|
+
offset?: number;
|
|
2029
|
+
}
|
|
2030
|
+
interface ExchangeRateResponse {
|
|
2031
|
+
item: ExchangeRate;
|
|
2032
|
+
}
|
|
2033
|
+
interface ExchangeRateListResponse {
|
|
2034
|
+
items: ExchangeRate[];
|
|
2035
|
+
total: number;
|
|
2036
|
+
}
|
|
2037
|
+
interface CurrencyConversion {
|
|
2038
|
+
fromCurrency: Currency;
|
|
2039
|
+
toCurrency: Currency;
|
|
2040
|
+
amount: number;
|
|
2041
|
+
convertedAmount: number;
|
|
2042
|
+
rate: number;
|
|
2043
|
+
effectiveDate: Date;
|
|
2044
|
+
source: string;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
interface AccountExchangeRate extends BaseEntityWithAccount {
|
|
2048
|
+
id: string;
|
|
2049
|
+
accountId: string;
|
|
2050
|
+
baseCurrency: Currency;
|
|
2051
|
+
targetCurrency: Currency;
|
|
2052
|
+
configurationType: AccountExchangeRateType;
|
|
2053
|
+
manualRate?: number;
|
|
2054
|
+
adjustmentPercentage?: number;
|
|
2055
|
+
roundingConfig?: RoundingConfig;
|
|
2056
|
+
isActive: boolean;
|
|
2057
|
+
lastManualUpdate?: Date;
|
|
2058
|
+
metadata?: AccountExchangeRateMetadata;
|
|
2059
|
+
createdAt: Date;
|
|
2060
|
+
updatedAt: Date;
|
|
2061
|
+
deletedAt?: Date;
|
|
2062
|
+
}
|
|
2063
|
+
declare enum AccountExchangeRateType {
|
|
2064
|
+
AUTOMATIC = "AUTOMATIC",
|
|
2065
|
+
AUTOMATIC_WITH_ADJUSTMENT = "AUTOMATIC_WITH_ADJUSTMENT",
|
|
2066
|
+
MANUAL = "MANUAL"
|
|
2067
|
+
}
|
|
2068
|
+
interface RoundingConfig {
|
|
2069
|
+
method: RoundingMethod;
|
|
2070
|
+
decimalPlaces: number;
|
|
2071
|
+
roundingRule?: RoundingRule;
|
|
2072
|
+
}
|
|
2073
|
+
declare enum RoundingMethod {
|
|
2074
|
+
ROUND = "ROUND",
|
|
2075
|
+
CEIL = "CEIL",
|
|
2076
|
+
FLOOR = "FLOOR",
|
|
2077
|
+
BANKERS = "BANKERS"
|
|
2078
|
+
}
|
|
2079
|
+
declare enum RoundingRule {
|
|
2080
|
+
ROUND_TO_5_CENTS = "ROUND_TO_5_CENTS",
|
|
2081
|
+
ROUND_TO_10_CENTS = "ROUND_TO_10_CENTS",
|
|
2082
|
+
NONE = "NONE"
|
|
2083
|
+
}
|
|
2084
|
+
interface AccountExchangeRateMetadata {
|
|
2085
|
+
description?: string;
|
|
2086
|
+
notes?: string;
|
|
2087
|
+
[key: string]: any;
|
|
2088
|
+
}
|
|
2089
|
+
interface CreateAccountExchangeRateDto {
|
|
2090
|
+
baseCurrency: Currency;
|
|
2091
|
+
targetCurrency: Currency;
|
|
2092
|
+
configurationType: AccountExchangeRateType;
|
|
2093
|
+
manualRate?: number;
|
|
2094
|
+
adjustmentPercentage?: number;
|
|
2095
|
+
roundingConfig?: RoundingConfig;
|
|
2096
|
+
metadata?: AccountExchangeRateMetadata;
|
|
2097
|
+
}
|
|
2098
|
+
interface UpdateAccountExchangeRateDto {
|
|
2099
|
+
configurationType?: AccountExchangeRateType;
|
|
2100
|
+
manualRate?: number;
|
|
2101
|
+
adjustmentPercentage?: number;
|
|
2102
|
+
roundingConfig?: RoundingConfig;
|
|
2103
|
+
isActive?: boolean;
|
|
2104
|
+
metadata?: AccountExchangeRateMetadata;
|
|
2105
|
+
}
|
|
2106
|
+
interface AccountExchangeRateQueryDto {
|
|
2107
|
+
baseCurrency?: Currency;
|
|
2108
|
+
targetCurrency?: Currency;
|
|
2109
|
+
configurationType?: AccountExchangeRateType;
|
|
2110
|
+
isActive?: boolean;
|
|
2111
|
+
limit?: number;
|
|
2112
|
+
offset?: number;
|
|
2113
|
+
}
|
|
2114
|
+
interface AccountExchangeRateResponse {
|
|
2115
|
+
item: AccountExchangeRate;
|
|
2116
|
+
}
|
|
2117
|
+
interface UpdateAccountExchangeRateAllDto {
|
|
2118
|
+
globalConfig?: any;
|
|
2119
|
+
rates: Array<{
|
|
2120
|
+
id?: string;
|
|
2121
|
+
targetCurrency: Currency;
|
|
2122
|
+
configurationType: AccountExchangeRateType;
|
|
2123
|
+
manualRate?: number;
|
|
2124
|
+
adjustmentPercentage?: number;
|
|
2125
|
+
roundingConfig?: RoundingConfig;
|
|
2126
|
+
}>;
|
|
2127
|
+
}
|
|
2128
|
+
interface AccountExchangeRateListResponse {
|
|
2129
|
+
storeCurrency: Currency;
|
|
2130
|
+
paymentCurrencies: Currency[];
|
|
2131
|
+
rates: AccountExchangeRateWithEffectiveRate[];
|
|
2132
|
+
}
|
|
2133
|
+
interface AccountExchangeRateWithEffectiveRate extends AccountExchangeRate {
|
|
2134
|
+
effectiveRate: number;
|
|
2135
|
+
baseGlobalRate: number;
|
|
2136
|
+
source: string;
|
|
2137
|
+
effectiveDate: Date;
|
|
2138
|
+
}
|
|
2139
|
+
interface AccountCurrencyConfig {
|
|
2140
|
+
accountId: string;
|
|
2141
|
+
primaryCurrency: Currency;
|
|
2142
|
+
exchangeRates: AccountExchangeRate[];
|
|
2143
|
+
effectiveRates: EffectiveExchangeRate[];
|
|
2144
|
+
}
|
|
2145
|
+
interface EffectiveExchangeRate {
|
|
2146
|
+
baseCurrency: Currency;
|
|
2147
|
+
targetCurrency: Currency;
|
|
2148
|
+
effectiveRate: number;
|
|
2149
|
+
baseGlobalRate: number;
|
|
2150
|
+
configurationType: AccountExchangeRateType;
|
|
2151
|
+
effectiveDate: Date;
|
|
2152
|
+
source: string;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
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, 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 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
|
@@ -694,6 +694,13 @@ declare enum PaymentMethodType {
|
|
|
694
694
|
CASH = "CASH",
|
|
695
695
|
OTHER = "OTHER"
|
|
696
696
|
}
|
|
697
|
+
interface PaymentConversion {
|
|
698
|
+
fromCurrency: Currency;
|
|
699
|
+
toCurrency: Currency;
|
|
700
|
+
rate: number;
|
|
701
|
+
originalAmount: number;
|
|
702
|
+
finalAmount: number;
|
|
703
|
+
}
|
|
697
704
|
interface Payment {
|
|
698
705
|
id: string;
|
|
699
706
|
accountId: string;
|
|
@@ -715,6 +722,7 @@ interface Payment {
|
|
|
715
722
|
cardBrandInfo?: PaymentCardBrand;
|
|
716
723
|
cardLast4?: string;
|
|
717
724
|
data?: Record<string, any>;
|
|
725
|
+
conversion?: PaymentConversion;
|
|
718
726
|
metadata?: Record<string, any>;
|
|
719
727
|
internalComment?: string;
|
|
720
728
|
demo: boolean;
|
|
@@ -910,6 +918,7 @@ interface FulfillmentProviderAdapter {
|
|
|
910
918
|
readonly key: FulfillmentProviderKey;
|
|
911
919
|
listDeliveryOptions(): Promise<FulfillmentDeliveryOption[]>;
|
|
912
920
|
canCalculate(data: Record<string, unknown>): Promise<boolean>;
|
|
921
|
+
calculatePrice(data: Record<string, unknown>): Promise<number>;
|
|
913
922
|
getRecollectionCapabilities(): Promise<FulfillmentRecollectionCapabilities>;
|
|
914
923
|
createFulfillment(input: FulfillmentProviderCreateInput): Promise<FulfillmentProviderCreateOutput>;
|
|
915
924
|
processWebhook(input: FulfillmentProviderProcessWebhookInput): Promise<FulfillmentProviderProcessWebhookOutput | null>;
|
|
@@ -1974,4 +1983,173 @@ declare enum IntegrationDeliveryZoneStatus {
|
|
|
1974
1983
|
INACTIVE = "INACTIVE"
|
|
1975
1984
|
}
|
|
1976
1985
|
|
|
1977
|
-
|
|
1986
|
+
interface ExchangeRate extends BaseEntity {
|
|
1987
|
+
id: string;
|
|
1988
|
+
baseCurrency: Currency;
|
|
1989
|
+
targetCurrency: Currency;
|
|
1990
|
+
rate: number;
|
|
1991
|
+
effectiveDate: Date;
|
|
1992
|
+
source: string;
|
|
1993
|
+
isLatest: boolean;
|
|
1994
|
+
metadata?: ExchangeRateMetadata;
|
|
1995
|
+
createdAt: Date;
|
|
1996
|
+
updatedAt: Date;
|
|
1997
|
+
deletedAt?: Date;
|
|
1998
|
+
}
|
|
1999
|
+
interface ExchangeRateMetadata {
|
|
2000
|
+
provider?: string;
|
|
2001
|
+
sourceTimestamp?: Date;
|
|
2002
|
+
confidence?: number;
|
|
2003
|
+
[key: string]: any;
|
|
2004
|
+
}
|
|
2005
|
+
interface CreateExchangeRateDto {
|
|
2006
|
+
baseCurrency: Currency;
|
|
2007
|
+
targetCurrency: Currency;
|
|
2008
|
+
rate: number;
|
|
2009
|
+
effectiveDate?: Date;
|
|
2010
|
+
source: string;
|
|
2011
|
+
metadata?: ExchangeRateMetadata;
|
|
2012
|
+
}
|
|
2013
|
+
interface UpdateExchangeRateDto {
|
|
2014
|
+
rate?: number;
|
|
2015
|
+
effectiveDate?: Date;
|
|
2016
|
+
source?: string;
|
|
2017
|
+
isLatest?: boolean;
|
|
2018
|
+
metadata?: ExchangeRateMetadata;
|
|
2019
|
+
}
|
|
2020
|
+
interface ExchangeRateQueryDto {
|
|
2021
|
+
baseCurrency?: Currency;
|
|
2022
|
+
targetCurrency?: Currency;
|
|
2023
|
+
source?: string;
|
|
2024
|
+
isLatest?: boolean;
|
|
2025
|
+
effectiveDateFrom?: Date;
|
|
2026
|
+
effectiveDateTo?: Date;
|
|
2027
|
+
limit?: number;
|
|
2028
|
+
offset?: number;
|
|
2029
|
+
}
|
|
2030
|
+
interface ExchangeRateResponse {
|
|
2031
|
+
item: ExchangeRate;
|
|
2032
|
+
}
|
|
2033
|
+
interface ExchangeRateListResponse {
|
|
2034
|
+
items: ExchangeRate[];
|
|
2035
|
+
total: number;
|
|
2036
|
+
}
|
|
2037
|
+
interface CurrencyConversion {
|
|
2038
|
+
fromCurrency: Currency;
|
|
2039
|
+
toCurrency: Currency;
|
|
2040
|
+
amount: number;
|
|
2041
|
+
convertedAmount: number;
|
|
2042
|
+
rate: number;
|
|
2043
|
+
effectiveDate: Date;
|
|
2044
|
+
source: string;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
interface AccountExchangeRate extends BaseEntityWithAccount {
|
|
2048
|
+
id: string;
|
|
2049
|
+
accountId: string;
|
|
2050
|
+
baseCurrency: Currency;
|
|
2051
|
+
targetCurrency: Currency;
|
|
2052
|
+
configurationType: AccountExchangeRateType;
|
|
2053
|
+
manualRate?: number;
|
|
2054
|
+
adjustmentPercentage?: number;
|
|
2055
|
+
roundingConfig?: RoundingConfig;
|
|
2056
|
+
isActive: boolean;
|
|
2057
|
+
lastManualUpdate?: Date;
|
|
2058
|
+
metadata?: AccountExchangeRateMetadata;
|
|
2059
|
+
createdAt: Date;
|
|
2060
|
+
updatedAt: Date;
|
|
2061
|
+
deletedAt?: Date;
|
|
2062
|
+
}
|
|
2063
|
+
declare enum AccountExchangeRateType {
|
|
2064
|
+
AUTOMATIC = "AUTOMATIC",
|
|
2065
|
+
AUTOMATIC_WITH_ADJUSTMENT = "AUTOMATIC_WITH_ADJUSTMENT",
|
|
2066
|
+
MANUAL = "MANUAL"
|
|
2067
|
+
}
|
|
2068
|
+
interface RoundingConfig {
|
|
2069
|
+
method: RoundingMethod;
|
|
2070
|
+
decimalPlaces: number;
|
|
2071
|
+
roundingRule?: RoundingRule;
|
|
2072
|
+
}
|
|
2073
|
+
declare enum RoundingMethod {
|
|
2074
|
+
ROUND = "ROUND",
|
|
2075
|
+
CEIL = "CEIL",
|
|
2076
|
+
FLOOR = "FLOOR",
|
|
2077
|
+
BANKERS = "BANKERS"
|
|
2078
|
+
}
|
|
2079
|
+
declare enum RoundingRule {
|
|
2080
|
+
ROUND_TO_5_CENTS = "ROUND_TO_5_CENTS",
|
|
2081
|
+
ROUND_TO_10_CENTS = "ROUND_TO_10_CENTS",
|
|
2082
|
+
NONE = "NONE"
|
|
2083
|
+
}
|
|
2084
|
+
interface AccountExchangeRateMetadata {
|
|
2085
|
+
description?: string;
|
|
2086
|
+
notes?: string;
|
|
2087
|
+
[key: string]: any;
|
|
2088
|
+
}
|
|
2089
|
+
interface CreateAccountExchangeRateDto {
|
|
2090
|
+
baseCurrency: Currency;
|
|
2091
|
+
targetCurrency: Currency;
|
|
2092
|
+
configurationType: AccountExchangeRateType;
|
|
2093
|
+
manualRate?: number;
|
|
2094
|
+
adjustmentPercentage?: number;
|
|
2095
|
+
roundingConfig?: RoundingConfig;
|
|
2096
|
+
metadata?: AccountExchangeRateMetadata;
|
|
2097
|
+
}
|
|
2098
|
+
interface UpdateAccountExchangeRateDto {
|
|
2099
|
+
configurationType?: AccountExchangeRateType;
|
|
2100
|
+
manualRate?: number;
|
|
2101
|
+
adjustmentPercentage?: number;
|
|
2102
|
+
roundingConfig?: RoundingConfig;
|
|
2103
|
+
isActive?: boolean;
|
|
2104
|
+
metadata?: AccountExchangeRateMetadata;
|
|
2105
|
+
}
|
|
2106
|
+
interface AccountExchangeRateQueryDto {
|
|
2107
|
+
baseCurrency?: Currency;
|
|
2108
|
+
targetCurrency?: Currency;
|
|
2109
|
+
configurationType?: AccountExchangeRateType;
|
|
2110
|
+
isActive?: boolean;
|
|
2111
|
+
limit?: number;
|
|
2112
|
+
offset?: number;
|
|
2113
|
+
}
|
|
2114
|
+
interface AccountExchangeRateResponse {
|
|
2115
|
+
item: AccountExchangeRate;
|
|
2116
|
+
}
|
|
2117
|
+
interface UpdateAccountExchangeRateAllDto {
|
|
2118
|
+
globalConfig?: any;
|
|
2119
|
+
rates: Array<{
|
|
2120
|
+
id?: string;
|
|
2121
|
+
targetCurrency: Currency;
|
|
2122
|
+
configurationType: AccountExchangeRateType;
|
|
2123
|
+
manualRate?: number;
|
|
2124
|
+
adjustmentPercentage?: number;
|
|
2125
|
+
roundingConfig?: RoundingConfig;
|
|
2126
|
+
}>;
|
|
2127
|
+
}
|
|
2128
|
+
interface AccountExchangeRateListResponse {
|
|
2129
|
+
storeCurrency: Currency;
|
|
2130
|
+
paymentCurrencies: Currency[];
|
|
2131
|
+
rates: AccountExchangeRateWithEffectiveRate[];
|
|
2132
|
+
}
|
|
2133
|
+
interface AccountExchangeRateWithEffectiveRate extends AccountExchangeRate {
|
|
2134
|
+
effectiveRate: number;
|
|
2135
|
+
baseGlobalRate: number;
|
|
2136
|
+
source: string;
|
|
2137
|
+
effectiveDate: Date;
|
|
2138
|
+
}
|
|
2139
|
+
interface AccountCurrencyConfig {
|
|
2140
|
+
accountId: string;
|
|
2141
|
+
primaryCurrency: Currency;
|
|
2142
|
+
exchangeRates: AccountExchangeRate[];
|
|
2143
|
+
effectiveRates: EffectiveExchangeRate[];
|
|
2144
|
+
}
|
|
2145
|
+
interface EffectiveExchangeRate {
|
|
2146
|
+
baseCurrency: Currency;
|
|
2147
|
+
targetCurrency: Currency;
|
|
2148
|
+
effectiveRate: number;
|
|
2149
|
+
baseGlobalRate: number;
|
|
2150
|
+
configurationType: AccountExchangeRateType;
|
|
2151
|
+
effectiveDate: Date;
|
|
2152
|
+
source: string;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
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, 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 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
|
@@ -28,6 +28,7 @@ __export(index_exports, {
|
|
|
28
28
|
AccountDeliveryOptionStatus: () => AccountDeliveryOptionStatus,
|
|
29
29
|
AccountDeliveryOptionZoneStatus: () => AccountDeliveryOptionZoneStatus,
|
|
30
30
|
AccountDomainStatus: () => AccountDomainStatus,
|
|
31
|
+
AccountExchangeRateType: () => AccountExchangeRateType,
|
|
31
32
|
AccountIntegrationConnectionStatus: () => AccountIntegrationConnectionStatus,
|
|
32
33
|
AccountIntegrationEnvironment: () => AccountIntegrationEnvironment,
|
|
33
34
|
AccountIntegrationStatus: () => AccountIntegrationStatus,
|
|
@@ -67,6 +68,8 @@ __export(index_exports, {
|
|
|
67
68
|
PromotionTargetType: () => PromotionTargetType,
|
|
68
69
|
PromotionType: () => PromotionType,
|
|
69
70
|
PubSubTopics: () => PubSubTopics,
|
|
71
|
+
RoundingMethod: () => RoundingMethod,
|
|
72
|
+
RoundingRule: () => RoundingRule,
|
|
70
73
|
StandardCategoryStatus: () => StandardCategoryStatus,
|
|
71
74
|
StoreBannerStatus: () => StoreBannerStatus,
|
|
72
75
|
StorePageStatus: () => StorePageStatus,
|
|
@@ -812,6 +815,27 @@ var IntegrationDeliveryZoneStatus = /* @__PURE__ */ ((IntegrationDeliveryZoneSta
|
|
|
812
815
|
IntegrationDeliveryZoneStatus2["INACTIVE"] = "INACTIVE";
|
|
813
816
|
return IntegrationDeliveryZoneStatus2;
|
|
814
817
|
})(IntegrationDeliveryZoneStatus || {});
|
|
818
|
+
|
|
819
|
+
// src/accountExchangeRate/types.ts
|
|
820
|
+
var AccountExchangeRateType = /* @__PURE__ */ ((AccountExchangeRateType2) => {
|
|
821
|
+
AccountExchangeRateType2["AUTOMATIC"] = "AUTOMATIC";
|
|
822
|
+
AccountExchangeRateType2["AUTOMATIC_WITH_ADJUSTMENT"] = "AUTOMATIC_WITH_ADJUSTMENT";
|
|
823
|
+
AccountExchangeRateType2["MANUAL"] = "MANUAL";
|
|
824
|
+
return AccountExchangeRateType2;
|
|
825
|
+
})(AccountExchangeRateType || {});
|
|
826
|
+
var RoundingMethod = /* @__PURE__ */ ((RoundingMethod2) => {
|
|
827
|
+
RoundingMethod2["ROUND"] = "ROUND";
|
|
828
|
+
RoundingMethod2["CEIL"] = "CEIL";
|
|
829
|
+
RoundingMethod2["FLOOR"] = "FLOOR";
|
|
830
|
+
RoundingMethod2["BANKERS"] = "BANKERS";
|
|
831
|
+
return RoundingMethod2;
|
|
832
|
+
})(RoundingMethod || {});
|
|
833
|
+
var RoundingRule = /* @__PURE__ */ ((RoundingRule2) => {
|
|
834
|
+
RoundingRule2["ROUND_TO_5_CENTS"] = "ROUND_TO_5_CENTS";
|
|
835
|
+
RoundingRule2["ROUND_TO_10_CENTS"] = "ROUND_TO_10_CENTS";
|
|
836
|
+
RoundingRule2["NONE"] = "NONE";
|
|
837
|
+
return RoundingRule2;
|
|
838
|
+
})(RoundingRule || {});
|
|
815
839
|
// Annotate the CommonJS export names for ESM import in node:
|
|
816
840
|
0 && (module.exports = {
|
|
817
841
|
AccountBranchScheduleDay,
|
|
@@ -821,6 +845,7 @@ var IntegrationDeliveryZoneStatus = /* @__PURE__ */ ((IntegrationDeliveryZoneSta
|
|
|
821
845
|
AccountDeliveryOptionStatus,
|
|
822
846
|
AccountDeliveryOptionZoneStatus,
|
|
823
847
|
AccountDomainStatus,
|
|
848
|
+
AccountExchangeRateType,
|
|
824
849
|
AccountIntegrationConnectionStatus,
|
|
825
850
|
AccountIntegrationEnvironment,
|
|
826
851
|
AccountIntegrationStatus,
|
|
@@ -860,6 +885,8 @@ var IntegrationDeliveryZoneStatus = /* @__PURE__ */ ((IntegrationDeliveryZoneSta
|
|
|
860
885
|
PromotionTargetType,
|
|
861
886
|
PromotionType,
|
|
862
887
|
PubSubTopics,
|
|
888
|
+
RoundingMethod,
|
|
889
|
+
RoundingRule,
|
|
863
890
|
StandardCategoryStatus,
|
|
864
891
|
StoreBannerStatus,
|
|
865
892
|
StorePageStatus,
|