hey-pharmacist-ecommerce 1.1.29 → 1.1.31

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.
Files changed (104) hide show
  1. package/dist/index.d.mts +10957 -1331
  2. package/dist/index.d.ts +10957 -1331
  3. package/dist/index.js +12364 -5144
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +9353 -2205
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +4 -3
  8. package/src/components/AccountReviewsTab.tsx +97 -0
  9. package/src/components/CouponCodeInput.tsx +190 -0
  10. package/src/components/Header.tsx +5 -1
  11. package/src/components/Notification.tsx +1 -1
  12. package/src/components/NotificationBell.tsx +33 -0
  13. package/src/components/NotificationCard.tsx +211 -0
  14. package/src/components/NotificationDrawer.tsx +195 -0
  15. package/src/components/OrderCard.tsx +164 -99
  16. package/src/components/ProductReviewsSection.tsx +30 -0
  17. package/src/components/RatingDistribution.tsx +86 -0
  18. package/src/components/ReviewCard.tsx +59 -0
  19. package/src/components/ReviewForm.tsx +207 -0
  20. package/src/components/ReviewPromptBanner.tsx +98 -0
  21. package/src/components/ReviewsList.tsx +151 -0
  22. package/src/components/StarRating.tsx +98 -0
  23. package/src/hooks/useDiscounts.ts +7 -0
  24. package/src/hooks/useOrders.ts +15 -0
  25. package/src/hooks/useReviews.ts +230 -0
  26. package/src/hooks/useStoreCapabilities.ts +87 -0
  27. package/src/index.ts +29 -0
  28. package/src/lib/Apis/apis/auth-api.ts +19 -7
  29. package/src/lib/Apis/apis/categories-api.ts +97 -0
  30. package/src/lib/Apis/apis/discounts-api.ts +23 -72
  31. package/src/lib/Apis/apis/notifications-api.ts +196 -231
  32. package/src/lib/Apis/apis/products-api.ts +181 -0
  33. package/src/lib/Apis/apis/review-api.ts +283 -4
  34. package/src/lib/Apis/apis/shipping-api.ts +105 -0
  35. package/src/lib/Apis/apis/stores-api.ts +536 -0
  36. package/src/lib/Apis/apis/sub-categories-api.ts +97 -0
  37. package/src/lib/Apis/apis/users-api.ts +8 -8
  38. package/src/lib/Apis/models/address-created-request.ts +0 -12
  39. package/src/lib/Apis/models/address.ts +0 -12
  40. package/src/lib/Apis/models/api-key-info-dto.ts +49 -0
  41. package/src/lib/Apis/models/bulk-channel-toggle-dto.ts +52 -0
  42. package/src/lib/Apis/models/cart-body-populated.ts +3 -3
  43. package/src/lib/Apis/models/channel-settings-dto.ts +39 -0
  44. package/src/lib/Apis/models/{discount-paginated-response.ts → completed-order-dto.ts} +21 -16
  45. package/src/lib/Apis/models/create-address-dto.ts +0 -12
  46. package/src/lib/Apis/models/create-discount-dto.ts +31 -100
  47. package/src/lib/Apis/models/create-review-dto.ts +4 -4
  48. package/src/lib/Apis/models/create-shippo-account-dto.ts +45 -0
  49. package/src/lib/Apis/models/create-store-address-dto.ts +0 -12
  50. package/src/lib/Apis/models/create-store-dto-settings.ts +51 -0
  51. package/src/lib/Apis/models/create-store-dto.ts +13 -0
  52. package/src/lib/Apis/models/create-variant-dto.ts +0 -6
  53. package/src/lib/Apis/models/discount.ts +37 -106
  54. package/src/lib/Apis/models/discounts-insights-dto.ts +12 -0
  55. package/src/lib/Apis/models/index.ts +24 -7
  56. package/src/lib/Apis/models/{manual-discount.ts → manual-discount-dto.ts} +10 -10
  57. package/src/lib/Apis/models/manual-order-dto.ts +3 -3
  58. package/src/lib/Apis/models/populated-discount.ts +41 -109
  59. package/src/lib/Apis/models/preference-update-item.ts +59 -0
  60. package/src/lib/Apis/models/product-light-dto.ts +40 -0
  61. package/src/lib/Apis/models/product-variant.ts +0 -6
  62. package/src/lib/Apis/models/reorder-categories-dto.ts +27 -0
  63. package/src/lib/Apis/models/reorder-products-dto.ts +49 -0
  64. package/src/lib/Apis/models/{check-notifications-response-dto.ts → reorder-products-success-response-dto.ts} +7 -7
  65. package/src/lib/Apis/models/reorder-subcategories-dto.ts +33 -0
  66. package/src/lib/Apis/models/reorder-success-response-dto.ts +33 -0
  67. package/src/lib/Apis/models/review-status-dto.ts +34 -0
  68. package/src/lib/Apis/models/review.ts +9 -3
  69. package/src/lib/Apis/models/reviewable-order-dto.ts +58 -0
  70. package/src/lib/Apis/models/reviewable-product-dto.ts +81 -0
  71. package/src/lib/Apis/models/shipment-with-order.ts +18 -0
  72. package/src/lib/Apis/models/shipment.ts +18 -0
  73. package/src/lib/Apis/models/shippo-account-response-dto.ts +51 -0
  74. package/src/lib/Apis/models/store-api-keys-response-dto.ts +34 -0
  75. package/src/lib/Apis/models/store-capabilities-dto.ts +63 -0
  76. package/src/lib/Apis/models/store-entity.ts +13 -0
  77. package/src/lib/Apis/models/store.ts +13 -0
  78. package/src/lib/Apis/models/update-address-dto.ts +0 -12
  79. package/src/lib/Apis/models/update-api-keys-dto.ts +39 -0
  80. package/src/lib/Apis/models/update-discount-dto.ts +31 -100
  81. package/src/lib/Apis/models/update-manual-shipment-status-dto.ts +47 -0
  82. package/src/lib/Apis/models/update-notification-settings-dto.ts +28 -0
  83. package/src/lib/Apis/models/update-review-dto.ts +4 -4
  84. package/src/lib/Apis/models/update-store-dto.ts +13 -0
  85. package/src/lib/Apis/models/update-variant-dto.ts +0 -6
  86. package/src/lib/Apis/models/{pick-type-class.ts → variant-light-dto.ts} +20 -14
  87. package/src/lib/utils/discount.ts +155 -0
  88. package/src/lib/validations/discount.ts +11 -0
  89. package/src/providers/CartProvider.tsx +2 -2
  90. package/src/providers/DiscountProvider.tsx +97 -0
  91. package/src/providers/EcommerceProvider.tsx +13 -5
  92. package/src/providers/NotificationCenterProvider.tsx +436 -0
  93. package/src/screens/CartScreen.tsx +1 -1
  94. package/src/screens/CheckoutScreen.tsx +402 -290
  95. package/src/screens/NotificationSettingsScreen.tsx +413 -0
  96. package/src/screens/OrderDetailScreen.tsx +283 -0
  97. package/src/screens/OrderReviewsScreen.tsx +308 -0
  98. package/src/screens/OrdersScreen.tsx +31 -7
  99. package/src/screens/ProductDetailScreen.tsx +24 -11
  100. package/src/screens/ProfileScreen.tsx +5 -0
  101. package/src/screens/ResetPasswordScreen.tsx +10 -4
  102. package/src/lib/Apis/models/create-notification-dto.ts +0 -75
  103. package/src/lib/Apis/models/notification.ts +0 -93
  104. package/src/lib/Apis/models/single-notification-dto.ts +0 -99
@@ -19,163 +19,112 @@
19
19
  export interface CreateDiscountDto {
20
20
  _id?: string;
21
21
  /**
22
- *
22
+ * Display name for the discount
23
23
  * @type {string}
24
24
  * @memberof CreateDiscountDto
25
25
  */
26
- discountName?: string;
26
+ name?: string;
27
27
  /**
28
- *
28
+ * Optional description for internal use
29
29
  * @type {string}
30
30
  * @memberof CreateDiscountDto
31
31
  */
32
32
  description?: string;
33
33
  /**
34
- *
34
+ * ITEM_DISCOUNT: Shows on products automatically. COUPON_CODE: Requires code at checkout
35
35
  * @type {string}
36
36
  * @memberof CreateDiscountDto
37
37
  */
38
- discountType?: CreateDiscountDtoDiscountTypeEnum;
38
+ type?: CreateDiscountDtoTypeEnum;
39
39
  /**
40
- *
40
+ * PERCENTAGE or FIXED_AMOUNT
41
41
  * @type {string}
42
42
  * @memberof CreateDiscountDto
43
43
  */
44
- decreasePriceBy?: CreateDiscountDtoDecreasePriceByEnum;
44
+ valueType?: CreateDiscountDtoValueTypeEnum;
45
45
  /**
46
- *
47
- * @type {string}
48
- * @memberof CreateDiscountDto
49
- */
50
- code?: string;
51
- /**
52
- *
53
- * @type {boolean}
46
+ * The discount value (percentage 1-100 or fixed dollar amount)
47
+ * @type {number}
54
48
  * @memberof CreateDiscountDto
55
49
  */
56
- automatic?: boolean;
50
+ value?: number;
57
51
  /**
58
- *
52
+ * Maximum discount amount for percentage discounts (optional, mainly for COUPON_CODE)
59
53
  * @type {number}
60
54
  * @memberof CreateDiscountDto
61
55
  */
62
56
  cappedAt?: number;
63
57
  /**
64
- *
65
- * @type {number}
58
+ * Coupon code (required for COUPON_CODE type)
59
+ * @type {string}
66
60
  * @memberof CreateDiscountDto
67
61
  */
68
- amount?: number;
62
+ code?: string;
69
63
  /**
70
- *
64
+ * When the discount becomes active
71
65
  * @type {Date}
72
66
  * @memberof CreateDiscountDto
73
67
  */
74
68
  startsAt?: Date;
75
69
  /**
76
- *
70
+ * When the discount expires
77
71
  * @type {Date}
78
72
  * @memberof CreateDiscountDto
79
73
  */
80
74
  expiresAt?: Date;
81
75
  /**
82
- *
83
- * @type {number}
84
- * @memberof CreateDiscountDto
85
- */
86
- maxUses?: number;
87
- /**
88
- *
76
+ * Current lifecycle state
89
77
  * @type {string}
90
78
  * @memberof CreateDiscountDto
91
79
  */
92
80
  state?: CreateDiscountDtoStateEnum;
93
81
  /**
94
- *
95
- * @type {Array<string>}
82
+ * Quick toggle to enable/disable the discount
83
+ * @type {boolean}
96
84
  * @memberof CreateDiscountDto
97
85
  */
98
- categoriesEligible?: Array<string>;
86
+ isActive?: boolean;
99
87
  /**
100
- *
88
+ * Products to apply discount to (all their variants will be discounted)
101
89
  * @type {Array<string>}
102
90
  * @memberof CreateDiscountDto
103
91
  */
104
92
  productsEligible?: Array<string>;
105
93
  /**
106
- *
94
+ * Specific variants to apply discount to
107
95
  * @type {Array<string>}
108
96
  * @memberof CreateDiscountDto
109
97
  */
110
98
  variantsEligible?: Array<string>;
111
99
  /**
112
- *
100
+ * Maximum total times this discount can be used (optional)
113
101
  * @type {number}
114
102
  * @memberof CreateDiscountDto
115
103
  */
116
- maxUsesPerUser?: number;
117
- /**
118
- *
119
- * @type {string}
120
- * @memberof CreateDiscountDto
121
- */
122
- minPurchaseRequired?: CreateDiscountDtoMinPurchaseRequiredEnum;
123
- /**
124
- *
125
- * @type {number}
126
- * @memberof CreateDiscountDto
127
- */
128
- minPurchaseAmount?: number;
104
+ maxUses?: number;
129
105
  /**
130
- *
106
+ * Maximum times a single user can use this discount (optional)
131
107
  * @type {number}
132
108
  * @memberof CreateDiscountDto
133
109
  */
134
- minPurchaseQuantity?: number;
135
- /**
136
- *
137
- * @type {string}
138
- * @memberof CreateDiscountDto
139
- */
140
- customerEligibility?: CreateDiscountDtoCustomerEligibilityEnum;
141
- /**
142
- *
143
- * @type {Array<string>}
144
- * @memberof CreateDiscountDto
145
- */
146
- usersEligible?: Array<string>;
147
- /**
148
- *
149
- * @type {Array<string>}
150
- * @memberof CreateDiscountDto
151
- */
152
- groupsEligible?: Array<string>;
153
- /**
154
- *
155
- * @type {Array<string>}
156
- * @memberof CreateDiscountDto
157
- */
158
- eligibleZipCodes?: Array<string>;
110
+ maxUsesPerUser?: number;
159
111
  }
160
112
 
161
113
  /**
162
114
  * @export
163
115
  * @enum {string}
164
116
  */
165
- export enum CreateDiscountDtoDiscountTypeEnum {
166
- CARTBALANCE = 'CART_BALANCE',
167
- SHIPPING = 'SHIPPING',
168
- PRODUCT = 'PRODUCT',
169
- CATEGORY = 'CATEGORY',
170
- VARIANT = 'VARIANT'
117
+ export enum CreateDiscountDtoTypeEnum {
118
+ ITEMDISCOUNT = 'ITEM_DISCOUNT',
119
+ COUPONCODE = 'COUPON_CODE'
171
120
  }
172
121
  /**
173
122
  * @export
174
123
  * @enum {string}
175
124
  */
176
- export enum CreateDiscountDtoDecreasePriceByEnum {
125
+ export enum CreateDiscountDtoValueTypeEnum {
177
126
  PERCENTAGE = 'PERCENTAGE',
178
- AMOUNT = 'AMOUNT'
127
+ FIXEDAMOUNT = 'FIXED_AMOUNT'
179
128
  }
180
129
  /**
181
130
  * @export
@@ -187,22 +136,4 @@ export enum CreateDiscountDtoStateEnum {
187
136
  EXPIRED = 'EXPIRED',
188
137
  SCHEDULED = 'SCHEDULED'
189
138
  }
190
- /**
191
- * @export
192
- * @enum {string}
193
- */
194
- export enum CreateDiscountDtoMinPurchaseRequiredEnum {
195
- NOREQUIREMENT = 'NO_REQUIREMENT',
196
- MINIMUMAMOUNT = 'MINIMUM_AMOUNT',
197
- MINIMUMQUANTITY = 'MINIMUM_QUANTITY'
198
- }
199
- /**
200
- * @export
201
- * @enum {string}
202
- */
203
- export enum CreateDiscountDtoCustomerEligibilityEnum {
204
- ALL = 'ALL',
205
- SPECIFICUSERS = 'SPECIFIC_USERS',
206
- SPECIFICGROUPS = 'SPECIFIC_GROUPS'
207
- }
208
139
 
@@ -23,13 +23,13 @@ export interface CreateReviewDto {
23
23
  * @type {string}
24
24
  * @memberof CreateReviewDto
25
25
  */
26
- userId?: string;
26
+ productId?: string;
27
27
  /**
28
28
  *
29
29
  * @type {string}
30
30
  * @memberof CreateReviewDto
31
31
  */
32
- productId?: string;
32
+ productVariantId?: string;
33
33
  /**
34
34
  *
35
35
  * @type {string}
@@ -56,8 +56,8 @@ export interface CreateReviewDto {
56
56
  reply?: string;
57
57
  /**
58
58
  *
59
- * @type {string}
59
+ * @type {Date}
60
60
  * @memberof CreateReviewDto
61
61
  */
62
- replyDate?: string;
62
+ replyDate?: Date;
63
63
  }
@@ -0,0 +1,45 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Hey Pharamcist API
5
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
6
+ *
7
+ * OpenAPI spec version: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface CreateShippoAccountDto
18
+ */
19
+ export interface CreateShippoAccountDto {
20
+ _id?: string;
21
+ /**
22
+ * Email for shipping notifications
23
+ * @type {string}
24
+ * @memberof CreateShippoAccountDto
25
+ */
26
+ email: string;
27
+ /**
28
+ * First name of store owner
29
+ * @type {string}
30
+ * @memberof CreateShippoAccountDto
31
+ */
32
+ firstName: string;
33
+ /**
34
+ * Last name of store owner
35
+ * @type {string}
36
+ * @memberof CreateShippoAccountDto
37
+ */
38
+ lastName: string;
39
+ /**
40
+ * Company/store name
41
+ * @type {string}
42
+ * @memberof CreateShippoAccountDto
43
+ */
44
+ companyName: string;
45
+ }
@@ -102,18 +102,6 @@ export interface CreateStoreAddressDto {
102
102
  * @memberof CreateStoreAddressDto
103
103
  */
104
104
  isResidential?: boolean;
105
- /**
106
- *
107
- * @type {number}
108
- * @memberof CreateStoreAddressDto
109
- */
110
- latitude?: number;
111
- /**
112
- *
113
- * @type {number}
114
- * @memberof CreateStoreAddressDto
115
- */
116
- longitude?: number;
117
105
  /**
118
106
  *
119
107
  * @type {string}
@@ -0,0 +1,51 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Hey Pharamcist API
5
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
6
+ *
7
+ * OpenAPI spec version: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Store settings for payment and delivery options
16
+ * @export
17
+ * @interface CreateStoreDtoSettings
18
+ */
19
+ export interface CreateStoreDtoSettings {
20
+ _id?: string;
21
+ /**
22
+ *
23
+ * @type {boolean}
24
+ * @memberof CreateStoreDtoSettings
25
+ */
26
+ enableCardPayment?: boolean;
27
+ /**
28
+ *
29
+ * @type {boolean}
30
+ * @memberof CreateStoreDtoSettings
31
+ */
32
+ enableShippoDelivery?: boolean;
33
+ /**
34
+ *
35
+ * @type {boolean}
36
+ * @memberof CreateStoreDtoSettings
37
+ */
38
+ enableCustomDelivery?: boolean;
39
+ /**
40
+ *
41
+ * @type {number}
42
+ * @memberof CreateStoreDtoSettings
43
+ */
44
+ customDeliveryFlatRate?: number;
45
+ /**
46
+ *
47
+ * @type {string}
48
+ * @memberof CreateStoreDtoSettings
49
+ */
50
+ customDeliveryTitle?: string;
51
+ }
@@ -11,6 +11,7 @@
11
11
  * https://github.com/swagger-api/swagger-codegen.git
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { CreateStoreDtoSettings } from './create-store-dto-settings';
14
15
  /**
15
16
  *
16
17
  * @export
@@ -48,6 +49,12 @@ export interface CreateStoreDto {
48
49
  * @memberof CreateStoreDto
49
50
  */
50
51
  adminUrl?: string;
52
+ /**
53
+ * Shippo Platform managed account ID
54
+ * @type {string}
55
+ * @memberof CreateStoreDto
56
+ */
57
+ shippoAccountId?: string;
51
58
  /**
52
59
  *
53
60
  * @type {string}
@@ -102,4 +109,10 @@ export interface CreateStoreDto {
102
109
  * @memberof CreateStoreDto
103
110
  */
104
111
  storeBillingAddress?: string;
112
+ /**
113
+ *
114
+ * @type {CreateStoreDtoSettings}
115
+ * @memberof CreateStoreDto
116
+ */
117
+ settings?: CreateStoreDtoSettings;
105
118
  }
@@ -55,12 +55,6 @@ export interface CreateVariantDto {
55
55
  * @memberof CreateVariantDto
56
56
  */
57
57
  retailPrice: number;
58
- /**
59
- *
60
- * @type {number}
61
- * @memberof CreateVariantDto
62
- */
63
- costPrice: number;
64
58
  /**
65
59
  * Initial inventory count
66
60
  * @type {number}
@@ -38,181 +38,130 @@ export interface Discount {
38
38
  */
39
39
  id: string;
40
40
  /**
41
- *
41
+ * Display name for the discount
42
42
  * @type {string}
43
43
  * @memberof Discount
44
44
  */
45
- discountName: string;
45
+ name: string;
46
46
  /**
47
- *
47
+ * Optional description for internal use
48
48
  * @type {string}
49
49
  * @memberof Discount
50
50
  */
51
51
  description: string;
52
52
  /**
53
- *
53
+ * ITEM_DISCOUNT: Shows on products automatically. COUPON_CODE: Requires code at checkout
54
54
  * @type {string}
55
55
  * @memberof Discount
56
56
  */
57
- discountType: DiscountDiscountTypeEnum;
57
+ type: DiscountTypeEnum;
58
58
  /**
59
- *
59
+ * PERCENTAGE or FIXED_AMOUNT
60
60
  * @type {string}
61
61
  * @memberof Discount
62
62
  */
63
- decreasePriceBy: DiscountDecreasePriceByEnum;
63
+ valueType: DiscountValueTypeEnum;
64
64
  /**
65
- *
66
- * @type {string}
67
- * @memberof Discount
68
- */
69
- code: string;
70
- /**
71
- *
72
- * @type {boolean}
65
+ * The discount value (percentage 1-100 or fixed dollar amount)
66
+ * @type {number}
73
67
  * @memberof Discount
74
68
  */
75
- automatic: boolean;
69
+ value: number;
76
70
  /**
77
- *
71
+ * Maximum discount amount for percentage discounts (optional, mainly for COUPON_CODE)
78
72
  * @type {number}
79
73
  * @memberof Discount
80
74
  */
81
75
  cappedAt: number;
82
76
  /**
83
- *
84
- * @type {number}
77
+ * Coupon code (required for COUPON_CODE type)
78
+ * @type {string}
85
79
  * @memberof Discount
86
80
  */
87
- amount: number;
81
+ code: string;
88
82
  /**
89
- *
83
+ * When the discount becomes active
90
84
  * @type {Date}
91
85
  * @memberof Discount
92
86
  */
93
87
  startsAt: Date;
94
88
  /**
95
- *
89
+ * When the discount expires
96
90
  * @type {Date}
97
91
  * @memberof Discount
98
92
  */
99
93
  expiresAt: Date;
100
94
  /**
101
- *
102
- * @type {number}
103
- * @memberof Discount
104
- */
105
- maxUses: number;
106
- /**
107
- *
108
- * @type {number}
109
- * @memberof Discount
110
- */
111
- numberOfUses: number;
112
- /**
113
- *
95
+ * Current lifecycle state
114
96
  * @type {string}
115
97
  * @memberof Discount
116
98
  */
117
99
  state: DiscountStateEnum;
118
100
  /**
119
- *
120
- * @type {Array<string>}
101
+ * Quick toggle to enable/disable the discount
102
+ * @type {boolean}
121
103
  * @memberof Discount
122
104
  */
123
- categoriesEligible: Array<string>;
105
+ isActive: boolean;
124
106
  /**
125
- *
107
+ * Products to apply discount to (all their variants will be discounted)
126
108
  * @type {Array<string>}
127
109
  * @memberof Discount
128
110
  */
129
111
  productsEligible: Array<string>;
130
112
  /**
131
- *
113
+ * Specific variants to apply discount to
132
114
  * @type {Array<string>}
133
115
  * @memberof Discount
134
116
  */
135
117
  variantsEligible: Array<string>;
136
118
  /**
137
- *
138
- * @type {string}
139
- * @memberof Discount
140
- */
141
- storeId: string;
142
- /**
143
- *
144
- * @type {Array<UsedBy>}
119
+ * Maximum total times this discount can be used (optional)
120
+ * @type {number}
145
121
  * @memberof Discount
146
122
  */
147
- usedBy: Array<UsedBy>;
123
+ maxUses: number;
148
124
  /**
149
- *
125
+ * Maximum times a single user can use this discount (optional)
150
126
  * @type {number}
151
127
  * @memberof Discount
152
128
  */
153
129
  maxUsesPerUser: number;
154
130
  /**
155
- *
156
- * @type {string}
157
- * @memberof Discount
158
- */
159
- minPurchaseRequired: DiscountMinPurchaseRequiredEnum;
160
- /**
161
- *
131
+ * Current total usage count
162
132
  * @type {number}
163
133
  * @memberof Discount
164
134
  */
165
- minPurchaseAmount: number;
135
+ numberOfUses: number;
166
136
  /**
167
- *
168
- * @type {number}
137
+ * Usage history
138
+ * @type {Array<UsedBy>}
169
139
  * @memberof Discount
170
140
  */
171
- minPurchaseQuantity: number;
141
+ usedBy: Array<UsedBy>;
172
142
  /**
173
143
  *
174
144
  * @type {string}
175
145
  * @memberof Discount
176
146
  */
177
- customerEligibility: DiscountCustomerEligibilityEnum;
178
- /**
179
- *
180
- * @type {Array<string>}
181
- * @memberof Discount
182
- */
183
- usersEligible: Array<string>;
184
- /**
185
- *
186
- * @type {Array<string>}
187
- * @memberof Discount
188
- */
189
- groupsEligible: Array<string>;
190
- /**
191
- *
192
- * @type {Array<string>}
193
- * @memberof Discount
194
- */
195
- eligibleZipCodes: Array<string>;
147
+ storeId: string;
196
148
  }
197
149
 
198
150
  /**
199
151
  * @export
200
152
  * @enum {string}
201
153
  */
202
- export enum DiscountDiscountTypeEnum {
203
- CARTBALANCE = 'CART_BALANCE',
204
- SHIPPING = 'SHIPPING',
205
- PRODUCT = 'PRODUCT',
206
- CATEGORY = 'CATEGORY',
207
- VARIANT = 'VARIANT'
154
+ export enum DiscountTypeEnum {
155
+ ITEMDISCOUNT = 'ITEM_DISCOUNT',
156
+ COUPONCODE = 'COUPON_CODE'
208
157
  }
209
158
  /**
210
159
  * @export
211
160
  * @enum {string}
212
161
  */
213
- export enum DiscountDecreasePriceByEnum {
162
+ export enum DiscountValueTypeEnum {
214
163
  PERCENTAGE = 'PERCENTAGE',
215
- AMOUNT = 'AMOUNT'
164
+ FIXEDAMOUNT = 'FIXED_AMOUNT'
216
165
  }
217
166
  /**
218
167
  * @export
@@ -224,22 +173,4 @@ export enum DiscountStateEnum {
224
173
  EXPIRED = 'EXPIRED',
225
174
  SCHEDULED = 'SCHEDULED'
226
175
  }
227
- /**
228
- * @export
229
- * @enum {string}
230
- */
231
- export enum DiscountMinPurchaseRequiredEnum {
232
- NOREQUIREMENT = 'NO_REQUIREMENT',
233
- MINIMUMAMOUNT = 'MINIMUM_AMOUNT',
234
- MINIMUMQUANTITY = 'MINIMUM_QUANTITY'
235
- }
236
- /**
237
- * @export
238
- * @enum {string}
239
- */
240
- export enum DiscountCustomerEligibilityEnum {
241
- ALL = 'ALL',
242
- SPECIFICUSERS = 'SPECIFIC_USERS',
243
- SPECIFICGROUPS = 'SPECIFIC_GROUPS'
244
- }
245
176
 
@@ -48,4 +48,16 @@ export interface DiscountsInsightsDto {
48
48
  * @memberof DiscountsInsightsDto
49
49
  */
50
50
  totalScheduled: number;
51
+ /**
52
+ *
53
+ * @type {number}
54
+ * @memberof DiscountsInsightsDto
55
+ */
56
+ totalItemDiscounts: number;
57
+ /**
58
+ *
59
+ * @type {number}
60
+ * @memberof DiscountsInsightsDto
61
+ */
62
+ totalCouponCodes: number;
51
63
  }