@retaila/shared-types 1.1.74 → 1.1.76
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 +189 -1
- package/dist/index.d.ts +189 -1
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +51 -51
package/dist/index.d.mts
CHANGED
|
@@ -1003,6 +1003,7 @@ interface Order {
|
|
|
1003
1003
|
payments?: Payment[];
|
|
1004
1004
|
statusFlow?: StatusFlow[];
|
|
1005
1005
|
statusChangeAllowed?: OrderStatus[];
|
|
1006
|
+
hasShipment?: boolean;
|
|
1006
1007
|
}
|
|
1007
1008
|
interface OrderItem {
|
|
1008
1009
|
id: string;
|
|
@@ -1085,6 +1086,7 @@ type NextStatusAction<T extends keyof StatusByType = keyof StatusByType> = {
|
|
|
1085
1086
|
type: T;
|
|
1086
1087
|
status: StatusByType[T];
|
|
1087
1088
|
text: string;
|
|
1089
|
+
fulfillmentId?: string;
|
|
1088
1090
|
};
|
|
1089
1091
|
|
|
1090
1092
|
interface OrderCreateFromCartDto {
|
|
@@ -1097,6 +1099,7 @@ interface AdminOrderStatusChangeDto {
|
|
|
1097
1099
|
}
|
|
1098
1100
|
|
|
1099
1101
|
declare function getOrderStatusInfo(status: OrderStatus): StatusInfo;
|
|
1102
|
+
declare function getOrderPaymentStatusInfo(status: OrderPaymentStatus): StatusInfo;
|
|
1100
1103
|
|
|
1101
1104
|
/**
|
|
1102
1105
|
* Add an item to the cart
|
|
@@ -1197,10 +1200,189 @@ declare enum CartItemErrorCode {
|
|
|
1197
1200
|
VALIDATION_ERROR = "VALIDATION_ERROR"
|
|
1198
1201
|
}
|
|
1199
1202
|
|
|
1203
|
+
/**
|
|
1204
|
+
* Promotion Module Types
|
|
1205
|
+
* Types for the promotion system including promotions, rules, application methods, and adjustments
|
|
1206
|
+
*/
|
|
1207
|
+
/**
|
|
1208
|
+
* Main promotion entity that defines discount rules and metadata
|
|
1209
|
+
*/
|
|
1210
|
+
interface Promotion {
|
|
1211
|
+
id: string;
|
|
1212
|
+
accountId: string;
|
|
1213
|
+
code: string;
|
|
1214
|
+
type: PromotionType;
|
|
1215
|
+
isAutomatic: boolean;
|
|
1216
|
+
isStackable: boolean;
|
|
1217
|
+
campaignId?: string | null;
|
|
1218
|
+
name: string;
|
|
1219
|
+
description?: string | null;
|
|
1220
|
+
status: PromotionStatus;
|
|
1221
|
+
createdAt: Date;
|
|
1222
|
+
updatedAt: Date;
|
|
1223
|
+
deletedAt?: Date | null;
|
|
1224
|
+
}
|
|
1225
|
+
declare enum PromotionType {
|
|
1226
|
+
STANDARD = "standard"
|
|
1227
|
+
}
|
|
1228
|
+
declare enum PromotionStatus {
|
|
1229
|
+
ACTIVE = "active",
|
|
1230
|
+
INACTIVE = "inactive"
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* Reusable rule entity that can be attached to either Promotions (cart/order level)
|
|
1234
|
+
* or ApplicationMethods (target level)
|
|
1235
|
+
*/
|
|
1236
|
+
interface PromotionRule {
|
|
1237
|
+
id: string;
|
|
1238
|
+
accountId: string;
|
|
1239
|
+
ruleAttribute: string;
|
|
1240
|
+
ruleOperator: PromotionRuleOperator;
|
|
1241
|
+
createdAt: Date;
|
|
1242
|
+
updatedAt: Date;
|
|
1243
|
+
}
|
|
1244
|
+
declare enum PromotionRuleOperator {
|
|
1245
|
+
GT = "gt",// greater than
|
|
1246
|
+
GTE = "gte",// greater than or equal
|
|
1247
|
+
LT = "lt",// less than
|
|
1248
|
+
LTE = "lte",// less than or equal
|
|
1249
|
+
EQ = "eq",// equals
|
|
1250
|
+
IN = "in",// in array
|
|
1251
|
+
NIN = "nin"
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Stores the values that a PromotionRule is evaluated against
|
|
1255
|
+
*/
|
|
1256
|
+
interface PromotionRuleValue {
|
|
1257
|
+
id: string;
|
|
1258
|
+
promotionRuleId: string;
|
|
1259
|
+
value: string;
|
|
1260
|
+
createdAt: Date;
|
|
1261
|
+
updatedAt: Date;
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
* Many-to-many relationship between Promotion and PromotionRule for cart/order-level rules
|
|
1265
|
+
*/
|
|
1266
|
+
interface PromotionPromotionRule {
|
|
1267
|
+
promotionId: string;
|
|
1268
|
+
promotionRuleId: string;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Many-to-many relationship between PromotionApplicationMethod and PromotionRule for target-level rules
|
|
1272
|
+
*/
|
|
1273
|
+
interface PromotionApplicationMethodPromotionRule {
|
|
1274
|
+
applicationMethodId: string;
|
|
1275
|
+
promotionRuleId: string;
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Defines how the promotion discount is applied
|
|
1279
|
+
*/
|
|
1280
|
+
interface PromotionApplicationMethod {
|
|
1281
|
+
id: string;
|
|
1282
|
+
accountId: string;
|
|
1283
|
+
promotionId: string;
|
|
1284
|
+
targetType: PromotionTargetType;
|
|
1285
|
+
applicationType: PromotionApplicationType;
|
|
1286
|
+
value: number;
|
|
1287
|
+
createdAt: Date;
|
|
1288
|
+
updatedAt: Date;
|
|
1289
|
+
deletedAt?: Date | null;
|
|
1290
|
+
}
|
|
1291
|
+
declare enum PromotionTargetType {
|
|
1292
|
+
ITEMS = "items",// apply to cart/order line items
|
|
1293
|
+
SHIPPING = "shipping",// apply to cart/order delivery methods
|
|
1294
|
+
ORDER = "order"
|
|
1295
|
+
}
|
|
1296
|
+
declare enum PromotionApplicationType {
|
|
1297
|
+
PERCENTAGE = "percentage",// e.g., 10% off
|
|
1298
|
+
FIXED = "fixed"
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Tracks promotion adjustments applied to individual cart items
|
|
1302
|
+
*/
|
|
1303
|
+
interface CartLineItemAdjustment {
|
|
1304
|
+
id: string;
|
|
1305
|
+
accountId: string;
|
|
1306
|
+
cartItemId: string;
|
|
1307
|
+
promotionId?: string | null;
|
|
1308
|
+
description: string;
|
|
1309
|
+
code?: string | null;
|
|
1310
|
+
amount: number;
|
|
1311
|
+
createdAt: Date;
|
|
1312
|
+
updatedAt: Date;
|
|
1313
|
+
deletedAt?: Date | null;
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Tracks promotion adjustments applied to cart delivery methods
|
|
1317
|
+
*/
|
|
1318
|
+
interface CartDeliveryMethodAdjustment {
|
|
1319
|
+
id: string;
|
|
1320
|
+
accountId: string;
|
|
1321
|
+
cartDeliveryMethodId: string;
|
|
1322
|
+
promotionId?: string | null;
|
|
1323
|
+
description: string;
|
|
1324
|
+
code?: string | null;
|
|
1325
|
+
amount: number;
|
|
1326
|
+
createdAt: Date;
|
|
1327
|
+
updatedAt: Date;
|
|
1328
|
+
deletedAt?: Date | null;
|
|
1329
|
+
}
|
|
1330
|
+
/**
|
|
1331
|
+
* Links carts to applied promotions for easy querying (pivot table)
|
|
1332
|
+
*/
|
|
1333
|
+
interface CartPromotion {
|
|
1334
|
+
cartId: string;
|
|
1335
|
+
promotionId: string;
|
|
1336
|
+
createdAt: Date;
|
|
1337
|
+
updatedAt: Date;
|
|
1338
|
+
deletedAt?: Date | null;
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* Tracks promotion adjustments on order items (snapshot from cart)
|
|
1342
|
+
*/
|
|
1343
|
+
interface OrderLineItemAdjustment {
|
|
1344
|
+
id: string;
|
|
1345
|
+
accountId: string;
|
|
1346
|
+
orderItemId: string;
|
|
1347
|
+
promotionId?: string | null;
|
|
1348
|
+
description: string;
|
|
1349
|
+
code?: string | null;
|
|
1350
|
+
amount: number;
|
|
1351
|
+
createdAt: Date;
|
|
1352
|
+
updatedAt: Date;
|
|
1353
|
+
deletedAt?: Date | null;
|
|
1354
|
+
}
|
|
1355
|
+
/**
|
|
1356
|
+
* Tracks promotion adjustments on order delivery methods
|
|
1357
|
+
*/
|
|
1358
|
+
interface OrderDeliveryMethodAdjustment {
|
|
1359
|
+
id: string;
|
|
1360
|
+
accountId: string;
|
|
1361
|
+
orderDeliveryMethodId: string;
|
|
1362
|
+
promotionId?: string | null;
|
|
1363
|
+
description: string;
|
|
1364
|
+
code?: string | null;
|
|
1365
|
+
amount: number;
|
|
1366
|
+
createdAt: Date;
|
|
1367
|
+
updatedAt: Date;
|
|
1368
|
+
deletedAt?: Date | null;
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Links orders to applied promotions for easy querying (pivot table, snapshot from cart)
|
|
1372
|
+
*/
|
|
1373
|
+
interface OrderPromotion {
|
|
1374
|
+
orderId: string;
|
|
1375
|
+
promotionId: string;
|
|
1376
|
+
createdAt: Date;
|
|
1377
|
+
updatedAt: Date;
|
|
1378
|
+
deletedAt?: Date | null;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1200
1381
|
/**
|
|
1201
1382
|
* CartDeliveryMethod Entity
|
|
1202
1383
|
* Represents a snapshot of the selected delivery option for a cart
|
|
1203
1384
|
*/
|
|
1385
|
+
|
|
1204
1386
|
interface CartDeliveryMethod {
|
|
1205
1387
|
id: string;
|
|
1206
1388
|
cartId: string;
|
|
@@ -1210,6 +1392,7 @@ interface CartDeliveryMethod {
|
|
|
1210
1392
|
amount: number;
|
|
1211
1393
|
data?: Record<string, any>;
|
|
1212
1394
|
accountId: string;
|
|
1395
|
+
adjustments?: CartDeliveryMethodAdjustment[];
|
|
1213
1396
|
createdAt: Date;
|
|
1214
1397
|
updatedAt: Date;
|
|
1215
1398
|
deletedAt?: Date;
|
|
@@ -1293,6 +1476,10 @@ interface Cart {
|
|
|
1293
1476
|
customer?: Partial<Customer> | null;
|
|
1294
1477
|
accountDomain?: Partial<AccountDomain> | null;
|
|
1295
1478
|
deliveryMethod?: CartDeliveryMethod | null;
|
|
1479
|
+
promotions: {
|
|
1480
|
+
code: string;
|
|
1481
|
+
amount: number;
|
|
1482
|
+
}[];
|
|
1296
1483
|
}
|
|
1297
1484
|
interface CartItem {
|
|
1298
1485
|
id: string;
|
|
@@ -1306,6 +1493,7 @@ interface CartItem {
|
|
|
1306
1493
|
sku?: string;
|
|
1307
1494
|
attributeDetails: CartItemAttributeDetail[];
|
|
1308
1495
|
validation?: CartItemValidation;
|
|
1496
|
+
adjustments?: CartLineItemAdjustment[];
|
|
1309
1497
|
}
|
|
1310
1498
|
interface CartItemAttributeDetail {
|
|
1311
1499
|
name: string;
|
|
@@ -1707,4 +1895,4 @@ declare enum IntegrationDeliveryZoneStatus {
|
|
|
1707
1895
|
INACTIVE = "INACTIVE"
|
|
1708
1896
|
}
|
|
1709
1897
|
|
|
1710
|
-
export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, 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 Cart, type CartConfirmDto, type CartDeliveryMethod, 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, CartSource, CartStatus, type CartUpdateDto, type CreateAccountDeliveryOptionDTO, type CreateDeliveryOptionDto, type CreateFulfillmentDto, type CreateFulfillmentItemDto, Currency, type Customer, CustomerStatus, type CustomerUpsertDto, DayOfWeek, DeliveryType, type DeliveryZoneInput, 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 OrderDeliveryMethodCreateData, type OrderDeliveryMethodUpdateData, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, type PaymentCardBrand, PaymentCardBrandKey, 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, PubSubTopics, 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 UpdateFulfillmentDto, type Webhook, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCurrencySymbol, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, parsePriceFormatPattern };
|
|
1898
|
+
export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, 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 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 CreateDeliveryOptionDto, type CreateFulfillmentDto, type CreateFulfillmentItemDto, Currency, type Customer, CustomerStatus, type CustomerUpsertDto, DayOfWeek, DeliveryType, type DeliveryZoneInput, 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, 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 PromotionApplicationMethodPromotionRule, PromotionApplicationType, type PromotionPromotionRule, type PromotionRule, PromotionRuleOperator, type PromotionRuleValue, PromotionStatus, PromotionTargetType, PromotionType, PubSubTopics, 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 UpdateFulfillmentDto, type Webhook, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCurrencySymbol, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderPaymentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, parsePriceFormatPattern };
|
package/dist/index.d.ts
CHANGED
|
@@ -1003,6 +1003,7 @@ interface Order {
|
|
|
1003
1003
|
payments?: Payment[];
|
|
1004
1004
|
statusFlow?: StatusFlow[];
|
|
1005
1005
|
statusChangeAllowed?: OrderStatus[];
|
|
1006
|
+
hasShipment?: boolean;
|
|
1006
1007
|
}
|
|
1007
1008
|
interface OrderItem {
|
|
1008
1009
|
id: string;
|
|
@@ -1085,6 +1086,7 @@ type NextStatusAction<T extends keyof StatusByType = keyof StatusByType> = {
|
|
|
1085
1086
|
type: T;
|
|
1086
1087
|
status: StatusByType[T];
|
|
1087
1088
|
text: string;
|
|
1089
|
+
fulfillmentId?: string;
|
|
1088
1090
|
};
|
|
1089
1091
|
|
|
1090
1092
|
interface OrderCreateFromCartDto {
|
|
@@ -1097,6 +1099,7 @@ interface AdminOrderStatusChangeDto {
|
|
|
1097
1099
|
}
|
|
1098
1100
|
|
|
1099
1101
|
declare function getOrderStatusInfo(status: OrderStatus): StatusInfo;
|
|
1102
|
+
declare function getOrderPaymentStatusInfo(status: OrderPaymentStatus): StatusInfo;
|
|
1100
1103
|
|
|
1101
1104
|
/**
|
|
1102
1105
|
* Add an item to the cart
|
|
@@ -1197,10 +1200,189 @@ declare enum CartItemErrorCode {
|
|
|
1197
1200
|
VALIDATION_ERROR = "VALIDATION_ERROR"
|
|
1198
1201
|
}
|
|
1199
1202
|
|
|
1203
|
+
/**
|
|
1204
|
+
* Promotion Module Types
|
|
1205
|
+
* Types for the promotion system including promotions, rules, application methods, and adjustments
|
|
1206
|
+
*/
|
|
1207
|
+
/**
|
|
1208
|
+
* Main promotion entity that defines discount rules and metadata
|
|
1209
|
+
*/
|
|
1210
|
+
interface Promotion {
|
|
1211
|
+
id: string;
|
|
1212
|
+
accountId: string;
|
|
1213
|
+
code: string;
|
|
1214
|
+
type: PromotionType;
|
|
1215
|
+
isAutomatic: boolean;
|
|
1216
|
+
isStackable: boolean;
|
|
1217
|
+
campaignId?: string | null;
|
|
1218
|
+
name: string;
|
|
1219
|
+
description?: string | null;
|
|
1220
|
+
status: PromotionStatus;
|
|
1221
|
+
createdAt: Date;
|
|
1222
|
+
updatedAt: Date;
|
|
1223
|
+
deletedAt?: Date | null;
|
|
1224
|
+
}
|
|
1225
|
+
declare enum PromotionType {
|
|
1226
|
+
STANDARD = "standard"
|
|
1227
|
+
}
|
|
1228
|
+
declare enum PromotionStatus {
|
|
1229
|
+
ACTIVE = "active",
|
|
1230
|
+
INACTIVE = "inactive"
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* Reusable rule entity that can be attached to either Promotions (cart/order level)
|
|
1234
|
+
* or ApplicationMethods (target level)
|
|
1235
|
+
*/
|
|
1236
|
+
interface PromotionRule {
|
|
1237
|
+
id: string;
|
|
1238
|
+
accountId: string;
|
|
1239
|
+
ruleAttribute: string;
|
|
1240
|
+
ruleOperator: PromotionRuleOperator;
|
|
1241
|
+
createdAt: Date;
|
|
1242
|
+
updatedAt: Date;
|
|
1243
|
+
}
|
|
1244
|
+
declare enum PromotionRuleOperator {
|
|
1245
|
+
GT = "gt",// greater than
|
|
1246
|
+
GTE = "gte",// greater than or equal
|
|
1247
|
+
LT = "lt",// less than
|
|
1248
|
+
LTE = "lte",// less than or equal
|
|
1249
|
+
EQ = "eq",// equals
|
|
1250
|
+
IN = "in",// in array
|
|
1251
|
+
NIN = "nin"
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Stores the values that a PromotionRule is evaluated against
|
|
1255
|
+
*/
|
|
1256
|
+
interface PromotionRuleValue {
|
|
1257
|
+
id: string;
|
|
1258
|
+
promotionRuleId: string;
|
|
1259
|
+
value: string;
|
|
1260
|
+
createdAt: Date;
|
|
1261
|
+
updatedAt: Date;
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
* Many-to-many relationship between Promotion and PromotionRule for cart/order-level rules
|
|
1265
|
+
*/
|
|
1266
|
+
interface PromotionPromotionRule {
|
|
1267
|
+
promotionId: string;
|
|
1268
|
+
promotionRuleId: string;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Many-to-many relationship between PromotionApplicationMethod and PromotionRule for target-level rules
|
|
1272
|
+
*/
|
|
1273
|
+
interface PromotionApplicationMethodPromotionRule {
|
|
1274
|
+
applicationMethodId: string;
|
|
1275
|
+
promotionRuleId: string;
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Defines how the promotion discount is applied
|
|
1279
|
+
*/
|
|
1280
|
+
interface PromotionApplicationMethod {
|
|
1281
|
+
id: string;
|
|
1282
|
+
accountId: string;
|
|
1283
|
+
promotionId: string;
|
|
1284
|
+
targetType: PromotionTargetType;
|
|
1285
|
+
applicationType: PromotionApplicationType;
|
|
1286
|
+
value: number;
|
|
1287
|
+
createdAt: Date;
|
|
1288
|
+
updatedAt: Date;
|
|
1289
|
+
deletedAt?: Date | null;
|
|
1290
|
+
}
|
|
1291
|
+
declare enum PromotionTargetType {
|
|
1292
|
+
ITEMS = "items",// apply to cart/order line items
|
|
1293
|
+
SHIPPING = "shipping",// apply to cart/order delivery methods
|
|
1294
|
+
ORDER = "order"
|
|
1295
|
+
}
|
|
1296
|
+
declare enum PromotionApplicationType {
|
|
1297
|
+
PERCENTAGE = "percentage",// e.g., 10% off
|
|
1298
|
+
FIXED = "fixed"
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Tracks promotion adjustments applied to individual cart items
|
|
1302
|
+
*/
|
|
1303
|
+
interface CartLineItemAdjustment {
|
|
1304
|
+
id: string;
|
|
1305
|
+
accountId: string;
|
|
1306
|
+
cartItemId: string;
|
|
1307
|
+
promotionId?: string | null;
|
|
1308
|
+
description: string;
|
|
1309
|
+
code?: string | null;
|
|
1310
|
+
amount: number;
|
|
1311
|
+
createdAt: Date;
|
|
1312
|
+
updatedAt: Date;
|
|
1313
|
+
deletedAt?: Date | null;
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Tracks promotion adjustments applied to cart delivery methods
|
|
1317
|
+
*/
|
|
1318
|
+
interface CartDeliveryMethodAdjustment {
|
|
1319
|
+
id: string;
|
|
1320
|
+
accountId: string;
|
|
1321
|
+
cartDeliveryMethodId: string;
|
|
1322
|
+
promotionId?: string | null;
|
|
1323
|
+
description: string;
|
|
1324
|
+
code?: string | null;
|
|
1325
|
+
amount: number;
|
|
1326
|
+
createdAt: Date;
|
|
1327
|
+
updatedAt: Date;
|
|
1328
|
+
deletedAt?: Date | null;
|
|
1329
|
+
}
|
|
1330
|
+
/**
|
|
1331
|
+
* Links carts to applied promotions for easy querying (pivot table)
|
|
1332
|
+
*/
|
|
1333
|
+
interface CartPromotion {
|
|
1334
|
+
cartId: string;
|
|
1335
|
+
promotionId: string;
|
|
1336
|
+
createdAt: Date;
|
|
1337
|
+
updatedAt: Date;
|
|
1338
|
+
deletedAt?: Date | null;
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* Tracks promotion adjustments on order items (snapshot from cart)
|
|
1342
|
+
*/
|
|
1343
|
+
interface OrderLineItemAdjustment {
|
|
1344
|
+
id: string;
|
|
1345
|
+
accountId: string;
|
|
1346
|
+
orderItemId: string;
|
|
1347
|
+
promotionId?: string | null;
|
|
1348
|
+
description: string;
|
|
1349
|
+
code?: string | null;
|
|
1350
|
+
amount: number;
|
|
1351
|
+
createdAt: Date;
|
|
1352
|
+
updatedAt: Date;
|
|
1353
|
+
deletedAt?: Date | null;
|
|
1354
|
+
}
|
|
1355
|
+
/**
|
|
1356
|
+
* Tracks promotion adjustments on order delivery methods
|
|
1357
|
+
*/
|
|
1358
|
+
interface OrderDeliveryMethodAdjustment {
|
|
1359
|
+
id: string;
|
|
1360
|
+
accountId: string;
|
|
1361
|
+
orderDeliveryMethodId: string;
|
|
1362
|
+
promotionId?: string | null;
|
|
1363
|
+
description: string;
|
|
1364
|
+
code?: string | null;
|
|
1365
|
+
amount: number;
|
|
1366
|
+
createdAt: Date;
|
|
1367
|
+
updatedAt: Date;
|
|
1368
|
+
deletedAt?: Date | null;
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Links orders to applied promotions for easy querying (pivot table, snapshot from cart)
|
|
1372
|
+
*/
|
|
1373
|
+
interface OrderPromotion {
|
|
1374
|
+
orderId: string;
|
|
1375
|
+
promotionId: string;
|
|
1376
|
+
createdAt: Date;
|
|
1377
|
+
updatedAt: Date;
|
|
1378
|
+
deletedAt?: Date | null;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1200
1381
|
/**
|
|
1201
1382
|
* CartDeliveryMethod Entity
|
|
1202
1383
|
* Represents a snapshot of the selected delivery option for a cart
|
|
1203
1384
|
*/
|
|
1385
|
+
|
|
1204
1386
|
interface CartDeliveryMethod {
|
|
1205
1387
|
id: string;
|
|
1206
1388
|
cartId: string;
|
|
@@ -1210,6 +1392,7 @@ interface CartDeliveryMethod {
|
|
|
1210
1392
|
amount: number;
|
|
1211
1393
|
data?: Record<string, any>;
|
|
1212
1394
|
accountId: string;
|
|
1395
|
+
adjustments?: CartDeliveryMethodAdjustment[];
|
|
1213
1396
|
createdAt: Date;
|
|
1214
1397
|
updatedAt: Date;
|
|
1215
1398
|
deletedAt?: Date;
|
|
@@ -1293,6 +1476,10 @@ interface Cart {
|
|
|
1293
1476
|
customer?: Partial<Customer> | null;
|
|
1294
1477
|
accountDomain?: Partial<AccountDomain> | null;
|
|
1295
1478
|
deliveryMethod?: CartDeliveryMethod | null;
|
|
1479
|
+
promotions: {
|
|
1480
|
+
code: string;
|
|
1481
|
+
amount: number;
|
|
1482
|
+
}[];
|
|
1296
1483
|
}
|
|
1297
1484
|
interface CartItem {
|
|
1298
1485
|
id: string;
|
|
@@ -1306,6 +1493,7 @@ interface CartItem {
|
|
|
1306
1493
|
sku?: string;
|
|
1307
1494
|
attributeDetails: CartItemAttributeDetail[];
|
|
1308
1495
|
validation?: CartItemValidation;
|
|
1496
|
+
adjustments?: CartLineItemAdjustment[];
|
|
1309
1497
|
}
|
|
1310
1498
|
interface CartItemAttributeDetail {
|
|
1311
1499
|
name: string;
|
|
@@ -1707,4 +1895,4 @@ declare enum IntegrationDeliveryZoneStatus {
|
|
|
1707
1895
|
INACTIVE = "INACTIVE"
|
|
1708
1896
|
}
|
|
1709
1897
|
|
|
1710
|
-
export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, 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 Cart, type CartConfirmDto, type CartDeliveryMethod, 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, CartSource, CartStatus, type CartUpdateDto, type CreateAccountDeliveryOptionDTO, type CreateDeliveryOptionDto, type CreateFulfillmentDto, type CreateFulfillmentItemDto, Currency, type Customer, CustomerStatus, type CustomerUpsertDto, DayOfWeek, DeliveryType, type DeliveryZoneInput, 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 OrderDeliveryMethodCreateData, type OrderDeliveryMethodUpdateData, OrderDeliveryType, type OrderItem, type OrderItemSnapshot, OrderPaymentStatus, OrderSource, OrderStatus, type Payment, type PaymentCardBrand, PaymentCardBrandKey, 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, PubSubTopics, 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 UpdateFulfillmentDto, type Webhook, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCurrencySymbol, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, parsePriceFormatPattern };
|
|
1898
|
+
export { type Account, type AccountBranch, type AccountBranchSchedule, AccountBranchScheduleDay, AccountBranchScheduleStatus, AccountBranchStatus, type AccountDeliveryOption, type AccountDeliveryOptionCalculatedCost, AccountDeliveryOptionPriceLogic, AccountDeliveryOptionStatus, type AccountDeliveryOptionZone, AccountDeliveryOptionZoneStatus, type AccountDomain, AccountDomainStatus, 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 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 CreateDeliveryOptionDto, type CreateFulfillmentDto, type CreateFulfillmentItemDto, Currency, type Customer, CustomerStatus, type CustomerUpsertDto, DayOfWeek, DeliveryType, type DeliveryZoneInput, 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, 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 PromotionApplicationMethodPromotionRule, PromotionApplicationType, type PromotionPromotionRule, type PromotionRule, PromotionRuleOperator, type PromotionRuleValue, PromotionStatus, PromotionTargetType, PromotionType, PubSubTopics, 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 UpdateFulfillmentDto, type Webhook, type WebhookPayload, getAccountPaymentMethodStatusInfo, getCurrencySymbol, getFulfillmentStatusInfo, getIntegrationCategoryName, getOrderPaymentStatusInfo, getOrderStatusInfo, getPaymentCardBrand, getPaymentStatusInfo, getProductStatusInfo, parsePriceFormatPattern };
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,11 @@ __export(index_exports, {
|
|
|
59
59
|
ProductCategoryStatus: () => ProductCategoryStatus,
|
|
60
60
|
ProductStatus: () => ProductStatus,
|
|
61
61
|
ProductType: () => ProductType,
|
|
62
|
+
PromotionApplicationType: () => PromotionApplicationType,
|
|
63
|
+
PromotionRuleOperator: () => PromotionRuleOperator,
|
|
64
|
+
PromotionStatus: () => PromotionStatus,
|
|
65
|
+
PromotionTargetType: () => PromotionTargetType,
|
|
66
|
+
PromotionType: () => PromotionType,
|
|
62
67
|
PubSubTopics: () => PubSubTopics,
|
|
63
68
|
StandardCategoryStatus: () => StandardCategoryStatus,
|
|
64
69
|
StoreBannerStatus: () => StoreBannerStatus,
|
|
@@ -76,6 +81,7 @@ __export(index_exports, {
|
|
|
76
81
|
getCurrencySymbol: () => getCurrencySymbol,
|
|
77
82
|
getFulfillmentStatusInfo: () => getFulfillmentStatusInfo,
|
|
78
83
|
getIntegrationCategoryName: () => getIntegrationCategoryName,
|
|
84
|
+
getOrderPaymentStatusInfo: () => getOrderPaymentStatusInfo,
|
|
79
85
|
getOrderStatusInfo: () => getOrderStatusInfo,
|
|
80
86
|
getPaymentCardBrand: () => getPaymentCardBrand,
|
|
81
87
|
getPaymentStatusInfo: () => getPaymentStatusInfo,
|
|
@@ -431,6 +437,17 @@ function getOrderStatusInfo(status) {
|
|
|
431
437
|
};
|
|
432
438
|
return map[status] ?? { text: String(status), class: "secondary" };
|
|
433
439
|
}
|
|
440
|
+
function getOrderPaymentStatusInfo(status) {
|
|
441
|
+
const map = {
|
|
442
|
+
PENDING: { text: "Pago pendiente", class: "warning", actionText: "" },
|
|
443
|
+
PARTIAL: { text: "Pago parcial", class: "info", actionText: "" },
|
|
444
|
+
PAID: { text: "Pago completo", class: "success", actionText: "" },
|
|
445
|
+
OVERPAID: { text: "Pago excedido", class: "info", actionText: "" },
|
|
446
|
+
REFUNDED: { text: "Reembolsado", class: "success", actionText: "" },
|
|
447
|
+
PARTIALLY_REFUNDED: { text: "Parcialmente reembolsado", class: "warning", actionText: "" }
|
|
448
|
+
};
|
|
449
|
+
return map[status] ?? { text: String(status), class: "secondary" };
|
|
450
|
+
}
|
|
434
451
|
|
|
435
452
|
// src/payment/types.ts
|
|
436
453
|
var PaymentStatus = /* @__PURE__ */ ((PaymentStatus2) => {
|
|
@@ -590,6 +607,38 @@ function getProductStatusInfo(status) {
|
|
|
590
607
|
return map[status] ?? { text: String(status), class: "secondary" };
|
|
591
608
|
}
|
|
592
609
|
|
|
610
|
+
// src/promotion/types.ts
|
|
611
|
+
var PromotionType = /* @__PURE__ */ ((PromotionType2) => {
|
|
612
|
+
PromotionType2["STANDARD"] = "standard";
|
|
613
|
+
return PromotionType2;
|
|
614
|
+
})(PromotionType || {});
|
|
615
|
+
var PromotionStatus = /* @__PURE__ */ ((PromotionStatus2) => {
|
|
616
|
+
PromotionStatus2["ACTIVE"] = "active";
|
|
617
|
+
PromotionStatus2["INACTIVE"] = "inactive";
|
|
618
|
+
return PromotionStatus2;
|
|
619
|
+
})(PromotionStatus || {});
|
|
620
|
+
var PromotionRuleOperator = /* @__PURE__ */ ((PromotionRuleOperator2) => {
|
|
621
|
+
PromotionRuleOperator2["GT"] = "gt";
|
|
622
|
+
PromotionRuleOperator2["GTE"] = "gte";
|
|
623
|
+
PromotionRuleOperator2["LT"] = "lt";
|
|
624
|
+
PromotionRuleOperator2["LTE"] = "lte";
|
|
625
|
+
PromotionRuleOperator2["EQ"] = "eq";
|
|
626
|
+
PromotionRuleOperator2["IN"] = "in";
|
|
627
|
+
PromotionRuleOperator2["NIN"] = "nin";
|
|
628
|
+
return PromotionRuleOperator2;
|
|
629
|
+
})(PromotionRuleOperator || {});
|
|
630
|
+
var PromotionTargetType = /* @__PURE__ */ ((PromotionTargetType2) => {
|
|
631
|
+
PromotionTargetType2["ITEMS"] = "items";
|
|
632
|
+
PromotionTargetType2["SHIPPING"] = "shipping";
|
|
633
|
+
PromotionTargetType2["ORDER"] = "order";
|
|
634
|
+
return PromotionTargetType2;
|
|
635
|
+
})(PromotionTargetType || {});
|
|
636
|
+
var PromotionApplicationType = /* @__PURE__ */ ((PromotionApplicationType2) => {
|
|
637
|
+
PromotionApplicationType2["PERCENTAGE"] = "percentage";
|
|
638
|
+
PromotionApplicationType2["FIXED"] = "fixed";
|
|
639
|
+
return PromotionApplicationType2;
|
|
640
|
+
})(PromotionApplicationType || {});
|
|
641
|
+
|
|
593
642
|
// src/productAttribute/types.ts
|
|
594
643
|
var ProductAttributeStatus = /* @__PURE__ */ ((ProductAttributeStatus2) => {
|
|
595
644
|
ProductAttributeStatus2["ACTIVE"] = "ACTIVE";
|
|
@@ -787,6 +836,11 @@ var IntegrationDeliveryZoneStatus = /* @__PURE__ */ ((IntegrationDeliveryZoneSta
|
|
|
787
836
|
ProductCategoryStatus,
|
|
788
837
|
ProductStatus,
|
|
789
838
|
ProductType,
|
|
839
|
+
PromotionApplicationType,
|
|
840
|
+
PromotionRuleOperator,
|
|
841
|
+
PromotionStatus,
|
|
842
|
+
PromotionTargetType,
|
|
843
|
+
PromotionType,
|
|
790
844
|
PubSubTopics,
|
|
791
845
|
StandardCategoryStatus,
|
|
792
846
|
StoreBannerStatus,
|
|
@@ -804,6 +858,7 @@ var IntegrationDeliveryZoneStatus = /* @__PURE__ */ ((IntegrationDeliveryZoneSta
|
|
|
804
858
|
getCurrencySymbol,
|
|
805
859
|
getFulfillmentStatusInfo,
|
|
806
860
|
getIntegrationCategoryName,
|
|
861
|
+
getOrderPaymentStatusInfo,
|
|
807
862
|
getOrderStatusInfo,
|
|
808
863
|
getPaymentCardBrand,
|
|
809
864
|
getPaymentStatusInfo,
|