|
| 1 | +/** |
| 2 | + * @enum {string} |
| 3 | + * Represents the availability status of an article. |
| 4 | + */ |
| 5 | +export const ArticleAvailability = Object.freeze({ |
| 6 | + IN_STOCK: 'instock', |
| 7 | + OUT_OF_STOCK: 'outofstock', |
| 8 | + LIMITED: 'limited', |
| 9 | + DISCONTINUED: 'discontinued', |
| 10 | + PREORDER: 'preorder', |
| 11 | +}); |
| 12 | + |
| 13 | +/** |
| 14 | + * @enum {string} |
| 15 | + * Represents the type of cart. |
| 16 | + */ |
1 | 17 | export const CartType = Object.freeze({
|
2 | 18 | WISHLIST: 'wishlist',
|
3 | 19 | BASKET: 'basket',
|
4 | 20 | });
|
5 | 21 |
|
6 |
| - |
| 22 | +/** |
| 23 | + * @enum {string} |
| 24 | + * Represents the type of customer. |
| 25 | + */ |
7 | 26 | export const CustomerType = Object.freeze({
|
8 | 27 | PRIVATE: 'private',
|
9 | 28 | BUSINESS: 'business',
|
10 | 29 | });
|
| 30 | + |
| 31 | +/** |
| 32 | + * @enum {string} |
| 33 | + * Represents different salutations for customers. |
| 34 | + */ |
| 35 | +export const Salutation = Object.freeze({ |
| 36 | + FEMALE: 'female', |
| 37 | + MALE: 'male', |
| 38 | + OTHER: 'other', |
| 39 | +}); |
| 40 | + |
| 41 | +/** |
| 42 | + * @enum {string} |
| 43 | + * Represents the type of address. |
| 44 | + */ |
| 45 | +export const AddressType = Object.freeze({ |
| 46 | + BILLING: 'billing', |
| 47 | + SHIPPING: 'shipping', |
| 48 | +}); |
| 49 | + |
| 50 | +/** |
| 51 | + * @enum {string} |
| 52 | + * Represents different types of codes. |
| 53 | + */ |
| 54 | +export const CodeType = Object.freeze({ |
| 55 | + NONE: 'none', |
| 56 | + INDIVIDUAL: 'individual', |
| 57 | + UNIVERSAL: 'universal', |
| 58 | +}); |
| 59 | + |
| 60 | +/** |
| 61 | + * @enum {string} |
| 62 | + * Represents the domain of an application. |
| 63 | + */ |
| 64 | +export const ApplicationDomain = Object.freeze({ |
| 65 | + BASKET: 'basket', |
| 66 | + ARTICLE: 'article', |
| 67 | + ALL: 'all', // Not care / both(all) / None |
| 68 | +}); |
| 69 | + |
| 70 | +/** |
| 71 | + * @enum {string} |
| 72 | + * Represents customer groups. |
| 73 | + */ |
| 74 | +export const CustomerGroup = Object.freeze({ |
| 75 | + ALL: 'all', // All customers |
| 76 | + FIRST_ORDER: 'first_order', // First-time order |
| 77 | + FOLLOW_UP_ORDER: 'follow_up_order', // Follow-up order (repeat customers) |
| 78 | +}); |
| 79 | + |
| 80 | +/** |
| 81 | + * @enum {string} |
| 82 | + * Represents types of discounts. |
| 83 | + */ |
| 84 | +export const DiscountType = Object.freeze({ |
| 85 | + PERCENTAGE: 'percentage', // Percentage discount |
| 86 | + ABSOLUTE: 'absolute', // Absolute discount |
| 87 | + FREE_ARTICLE: 'free_article', // Free article (and cart easter egg) |
| 88 | + FREE_SHIPPING: 'free_shipping', // Free shipping |
| 89 | +}); |
| 90 | + |
| 91 | +/** |
| 92 | + * @enum {string} |
| 93 | + * Represents logical operators for conditions. |
| 94 | + */ |
| 95 | +export const ConditionOperator = Object.freeze({ |
| 96 | + ONE_OF: 'one_of', // One condition must be satisfied |
| 97 | + ALL: 'all', // All conditions must be satisfied |
| 98 | +}); |
| 99 | + |
| 100 | +/** |
| 101 | + * @enum {string} |
| 102 | + * Represents the state of an order. |
| 103 | + */ |
| 104 | +export const OrderState = Object.freeze({ |
| 105 | + ORDERED: 'ordered', // Customer completed the order and clicked buy |
| 106 | + PAID: 'paid', // Payment completed |
| 107 | + RTS: 'rts', // Ready To Send (may not be paid yet) |
| 108 | +}); |
| 109 | + |
| 110 | +/** |
| 111 | + * @enum {string} |
| 112 | + * Represents the mode for handling quantity. |
| 113 | + */ |
| 114 | +export const QuantityMode = Object.freeze({ |
| 115 | + REPLACE: 'replace', // Use the provided quantity as new value |
| 116 | + INCREASE: 'increase', // Add the provided quantity to the current value |
| 117 | + DECREASE: 'decrease', // Subtract the provided quantity from the current value |
| 118 | +}); |
| 119 | + |
| 120 | +/** |
| 121 | + * @enum {string} |
| 122 | + * Represents the status of shipping. |
| 123 | + */ |
| 124 | +export const ShippingStatus = Object.freeze({ |
| 125 | + USER: 'user', // Shipping selected by a user |
| 126 | + CHEAPEST: 'cheapest', // Cheapest shipping selected |
| 127 | +}); |
0 commit comments