@reactionary/core 0.0.71 → 0.0.73
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/cache/index.js +4 -0
- package/client/index.js +2 -0
- package/decorators/index.js +1 -0
- package/index.js +6 -314
- package/package.json +1 -1
- package/schemas/index.js +5 -0
- package/schemas/queries/price.query.js +7 -5
- package/src/cache/index.d.ts +4 -0
- package/src/client/index.d.ts +2 -0
- package/src/decorators/index.d.ts +1 -0
- package/src/index.d.ts +6 -17
- package/src/providers/price.provider.d.ts +10 -10
- package/src/schemas/index.d.ts +5 -0
- package/src/schemas/queries/price.query.d.ts +9 -4
package/cache/index.js
ADDED
package/client/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./reactionary.decorator.js";
|
package/index.js
CHANGED
|
@@ -1,314 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ReactionaryDecoratorOptions
|
|
8
|
-
} from "./decorators/reactionary.decorator.js";
|
|
9
|
-
import {
|
|
10
|
-
AnalyticsProvider,
|
|
11
|
-
BaseProvider,
|
|
12
|
-
CartProvider,
|
|
13
|
-
CategoryProvider,
|
|
14
|
-
CheckoutProvider,
|
|
15
|
-
IdentityProvider,
|
|
16
|
-
InventoryProvider,
|
|
17
|
-
OrderProvider,
|
|
18
|
-
PriceProvider,
|
|
19
|
-
ProductProvider,
|
|
20
|
-
ProductSearchProvider,
|
|
21
|
-
ProfileProvider,
|
|
22
|
-
StoreProvider
|
|
23
|
-
} from "./providers/index.js";
|
|
24
|
-
import {
|
|
25
|
-
CapabilitiesSchema
|
|
26
|
-
} from "./schemas/capabilities.schema.js";
|
|
27
|
-
import {
|
|
28
|
-
LanguageContextSchema,
|
|
29
|
-
RequestContextSchema,
|
|
30
|
-
SessionSchema,
|
|
31
|
-
TaxJurisdictionSchema
|
|
32
|
-
} from "./schemas/session.schema.js";
|
|
33
|
-
import {
|
|
34
|
-
AddressIdentifierSchema,
|
|
35
|
-
AddressSchema,
|
|
36
|
-
AnalyticsEventSchema,
|
|
37
|
-
AnonymousIdentitySchema,
|
|
38
|
-
BaseModelSchema,
|
|
39
|
-
CacheInformationSchema,
|
|
40
|
-
CartIdentifierSchema,
|
|
41
|
-
CartItemIdentifierSchema,
|
|
42
|
-
CartItemSchema,
|
|
43
|
-
CartSchema,
|
|
44
|
-
CategoryIdentifierSchema,
|
|
45
|
-
CategoryPaginatedResultSchema,
|
|
46
|
-
CategorySchema,
|
|
47
|
-
CheckoutIdentifierSchema,
|
|
48
|
-
CheckoutItemIdentifierSchema,
|
|
49
|
-
CheckoutItemSchema,
|
|
50
|
-
CheckoutSchema,
|
|
51
|
-
CostBreakDownSchema,
|
|
52
|
-
CurrencySchema,
|
|
53
|
-
FacetIdentifierSchema,
|
|
54
|
-
FacetValueIdentifierSchema,
|
|
55
|
-
FulfillmentCenterIdentifierSchema,
|
|
56
|
-
GuestIdentitySchema,
|
|
57
|
-
IdentityIdentifierSchema,
|
|
58
|
-
IdentitySchema,
|
|
59
|
-
ImageSchema,
|
|
60
|
-
InventoryIdentifierSchema,
|
|
61
|
-
InventorySchema,
|
|
62
|
-
ItemCostBreakdownSchema,
|
|
63
|
-
MetaSchema,
|
|
64
|
-
MonetaryAmountSchema,
|
|
65
|
-
OrderIdentifierSchema,
|
|
66
|
-
OrderInventoryStatusSchema,
|
|
67
|
-
OrderItemIdentifierSchema,
|
|
68
|
-
OrderItemSchema,
|
|
69
|
-
OrderSchema,
|
|
70
|
-
OrderStatusSchema,
|
|
71
|
-
PaginationOptionsSchema,
|
|
72
|
-
PaymentInstructionIdentifierSchema,
|
|
73
|
-
PaymentInstructionSchema,
|
|
74
|
-
PaymentMethodIdentifierSchema,
|
|
75
|
-
PaymentMethodSchema,
|
|
76
|
-
PaymentProtocolDataSchema,
|
|
77
|
-
PaymentStatusSchema,
|
|
78
|
-
PickupPointIdentifierSchema,
|
|
79
|
-
PickupPointSchema,
|
|
80
|
-
PriceIdentifierSchema,
|
|
81
|
-
PriceSchema,
|
|
82
|
-
ProductAttributeIdentifierSchema,
|
|
83
|
-
ProductAttributeSchema,
|
|
84
|
-
ProductAttributeValueIdentifierSchema,
|
|
85
|
-
ProductAttributeValueSchema,
|
|
86
|
-
ProductIdentifierSchema,
|
|
87
|
-
ProductOptionIdentifierSchema,
|
|
88
|
-
ProductOptionSchema,
|
|
89
|
-
ProductOptionValueIdentifierSchema,
|
|
90
|
-
ProductOptionValueSchema,
|
|
91
|
-
ProductSchema,
|
|
92
|
-
ProductSearchIdentifierSchema,
|
|
93
|
-
ProductSearchResultFacetSchema,
|
|
94
|
-
ProductSearchResultFacetValueSchema,
|
|
95
|
-
ProductSearchResultItemSchema,
|
|
96
|
-
ProductSearchResultItemVariantSchema,
|
|
97
|
-
ProductSearchResultSchema,
|
|
98
|
-
ProductVariantIdentifierSchema,
|
|
99
|
-
ProductVariantOptionSchema,
|
|
100
|
-
ProductVariantSchema,
|
|
101
|
-
ProfileSchema,
|
|
102
|
-
RegisteredIdentitySchema,
|
|
103
|
-
ShippingInstructionSchema,
|
|
104
|
-
ShippingMethodIdentifierSchema,
|
|
105
|
-
ShippingMethodSchema,
|
|
106
|
-
StoreIdentifierSchema,
|
|
107
|
-
StoreSchema,
|
|
108
|
-
TieredPriceSchema,
|
|
109
|
-
WebStoreIdentifierSchema,
|
|
110
|
-
createPaginatedResponseSchema
|
|
111
|
-
} from "./schemas/models/index.js";
|
|
112
|
-
import {
|
|
113
|
-
AnalyticsMutationSchema,
|
|
114
|
-
AnalyticsMutationSearchEventSchema,
|
|
115
|
-
AnalyticsMutationSearchProductClickEventSchema,
|
|
116
|
-
BaseMutationSchema,
|
|
117
|
-
CartMutationAddPaymentMethodSchema,
|
|
118
|
-
CartMutationApplyCouponSchema,
|
|
119
|
-
CartMutationChangeCurrencySchema,
|
|
120
|
-
CartMutationCheckoutSchema,
|
|
121
|
-
CartMutationDeleteCartSchema,
|
|
122
|
-
CartMutationItemAddSchema,
|
|
123
|
-
CartMutationItemQuantityChangeSchema,
|
|
124
|
-
CartMutationItemRemoveSchema,
|
|
125
|
-
CartMutationRemoveCouponSchema,
|
|
126
|
-
CartMutationRemovePaymentMethodSchema,
|
|
127
|
-
CartMutationSetBillingAddressSchema,
|
|
128
|
-
CartMutationSetShippingInfoSchema,
|
|
129
|
-
CheckoutMutationAddPaymentInstructionSchema,
|
|
130
|
-
CheckoutMutationFinalizeCheckoutSchema,
|
|
131
|
-
CheckoutMutationInitiateCheckoutSchema,
|
|
132
|
-
CheckoutMutationRemovePaymentInstructionSchema,
|
|
133
|
-
CheckoutMutationSetShippingAddressSchema,
|
|
134
|
-
CheckoutMutationSetShippingInstructionSchema,
|
|
135
|
-
IdentityMutationLoginSchema,
|
|
136
|
-
IdentityMutationLogoutSchema,
|
|
137
|
-
IdentityMutationRegisterSchema,
|
|
138
|
-
ProfileMutationUpdateSchema
|
|
139
|
-
} from "./schemas/mutations/index.js";
|
|
140
|
-
import {
|
|
141
|
-
BaseQuerySchema,
|
|
142
|
-
CartQueryByIdSchema,
|
|
143
|
-
CategoryQueryByIdSchema,
|
|
144
|
-
CategoryQueryBySlugSchema,
|
|
145
|
-
CategoryQueryForBreadcrumbSchema,
|
|
146
|
-
CategoryQueryForChildCategoriesSchema,
|
|
147
|
-
CategoryQueryForTopCategoriesSchema,
|
|
148
|
-
CheckoutQueryByIdSchema,
|
|
149
|
-
CheckoutQueryForAvailablePaymentMethodsSchema,
|
|
150
|
-
CheckoutQueryForAvailableShippingMethodsSchema,
|
|
151
|
-
IdentityQuerySelfSchema,
|
|
152
|
-
InventoryQueryBySKUSchema,
|
|
153
|
-
OrderQueryByIdSchema,
|
|
154
|
-
PriceQueryBySkuSchema,
|
|
155
|
-
ProductQueryByIdSchema,
|
|
156
|
-
ProductQueryBySKUSchema,
|
|
157
|
-
ProductQueryBySlugSchema,
|
|
158
|
-
ProductQueryVariantsSchema,
|
|
159
|
-
ProductSearchQueryByTermSchema,
|
|
160
|
-
ProfileQuerySelfSchema,
|
|
161
|
-
StoreQueryByProximitySchema
|
|
162
|
-
} from "./schemas/queries/index.js";
|
|
163
|
-
import { createInitialRequestContext } from "./initialization.js";
|
|
164
|
-
export {
|
|
165
|
-
AddressIdentifierSchema,
|
|
166
|
-
AddressSchema,
|
|
167
|
-
AnalyticsEventSchema,
|
|
168
|
-
AnalyticsMutationSchema,
|
|
169
|
-
AnalyticsMutationSearchEventSchema,
|
|
170
|
-
AnalyticsMutationSearchProductClickEventSchema,
|
|
171
|
-
AnalyticsProvider,
|
|
172
|
-
AnonymousIdentitySchema,
|
|
173
|
-
BaseModelSchema,
|
|
174
|
-
BaseMutationSchema,
|
|
175
|
-
BaseProvider,
|
|
176
|
-
BaseQuerySchema,
|
|
177
|
-
CacheInformationSchema,
|
|
178
|
-
CapabilitiesSchema,
|
|
179
|
-
CartIdentifierSchema,
|
|
180
|
-
CartItemIdentifierSchema,
|
|
181
|
-
CartItemSchema,
|
|
182
|
-
CartMutationAddPaymentMethodSchema,
|
|
183
|
-
CartMutationApplyCouponSchema,
|
|
184
|
-
CartMutationChangeCurrencySchema,
|
|
185
|
-
CartMutationCheckoutSchema,
|
|
186
|
-
CartMutationDeleteCartSchema,
|
|
187
|
-
CartMutationItemAddSchema,
|
|
188
|
-
CartMutationItemQuantityChangeSchema,
|
|
189
|
-
CartMutationItemRemoveSchema,
|
|
190
|
-
CartMutationRemoveCouponSchema,
|
|
191
|
-
CartMutationRemovePaymentMethodSchema,
|
|
192
|
-
CartMutationSetBillingAddressSchema,
|
|
193
|
-
CartMutationSetShippingInfoSchema,
|
|
194
|
-
CartProvider,
|
|
195
|
-
CartQueryByIdSchema,
|
|
196
|
-
CartSchema,
|
|
197
|
-
CategoryIdentifierSchema,
|
|
198
|
-
CategoryPaginatedResultSchema,
|
|
199
|
-
CategoryProvider,
|
|
200
|
-
CategoryQueryByIdSchema,
|
|
201
|
-
CategoryQueryBySlugSchema,
|
|
202
|
-
CategoryQueryForBreadcrumbSchema,
|
|
203
|
-
CategoryQueryForChildCategoriesSchema,
|
|
204
|
-
CategoryQueryForTopCategoriesSchema,
|
|
205
|
-
CategorySchema,
|
|
206
|
-
CheckoutIdentifierSchema,
|
|
207
|
-
CheckoutItemIdentifierSchema,
|
|
208
|
-
CheckoutItemSchema,
|
|
209
|
-
CheckoutMutationAddPaymentInstructionSchema,
|
|
210
|
-
CheckoutMutationFinalizeCheckoutSchema,
|
|
211
|
-
CheckoutMutationInitiateCheckoutSchema,
|
|
212
|
-
CheckoutMutationRemovePaymentInstructionSchema,
|
|
213
|
-
CheckoutMutationSetShippingAddressSchema,
|
|
214
|
-
CheckoutMutationSetShippingInstructionSchema,
|
|
215
|
-
CheckoutProvider,
|
|
216
|
-
CheckoutQueryByIdSchema,
|
|
217
|
-
CheckoutQueryForAvailablePaymentMethodsSchema,
|
|
218
|
-
CheckoutQueryForAvailableShippingMethodsSchema,
|
|
219
|
-
CheckoutSchema,
|
|
220
|
-
ClientBuilder,
|
|
221
|
-
CostBreakDownSchema,
|
|
222
|
-
CurrencySchema,
|
|
223
|
-
FacetIdentifierSchema,
|
|
224
|
-
FacetValueIdentifierSchema,
|
|
225
|
-
FulfillmentCenterIdentifierSchema,
|
|
226
|
-
GuestIdentitySchema,
|
|
227
|
-
IdentityIdentifierSchema,
|
|
228
|
-
IdentityMutationLoginSchema,
|
|
229
|
-
IdentityMutationLogoutSchema,
|
|
230
|
-
IdentityMutationRegisterSchema,
|
|
231
|
-
IdentityProvider,
|
|
232
|
-
IdentityQuerySelfSchema,
|
|
233
|
-
IdentitySchema,
|
|
234
|
-
ImageSchema,
|
|
235
|
-
InventoryIdentifierSchema,
|
|
236
|
-
InventoryProvider,
|
|
237
|
-
InventoryQueryBySKUSchema,
|
|
238
|
-
InventorySchema,
|
|
239
|
-
ItemCostBreakdownSchema,
|
|
240
|
-
LanguageContextSchema,
|
|
241
|
-
MemoryCache,
|
|
242
|
-
MetaSchema,
|
|
243
|
-
MonetaryAmountSchema,
|
|
244
|
-
NoOpCache,
|
|
245
|
-
OrderIdentifierSchema,
|
|
246
|
-
OrderInventoryStatusSchema,
|
|
247
|
-
OrderItemIdentifierSchema,
|
|
248
|
-
OrderItemSchema,
|
|
249
|
-
OrderProvider,
|
|
250
|
-
OrderQueryByIdSchema,
|
|
251
|
-
OrderSchema,
|
|
252
|
-
OrderStatusSchema,
|
|
253
|
-
PaginationOptionsSchema,
|
|
254
|
-
PaymentInstructionIdentifierSchema,
|
|
255
|
-
PaymentInstructionSchema,
|
|
256
|
-
PaymentMethodIdentifierSchema,
|
|
257
|
-
PaymentMethodSchema,
|
|
258
|
-
PaymentProtocolDataSchema,
|
|
259
|
-
PaymentStatusSchema,
|
|
260
|
-
PickupPointIdentifierSchema,
|
|
261
|
-
PickupPointSchema,
|
|
262
|
-
PriceIdentifierSchema,
|
|
263
|
-
PriceProvider,
|
|
264
|
-
PriceQueryBySkuSchema,
|
|
265
|
-
PriceSchema,
|
|
266
|
-
ProductAttributeIdentifierSchema,
|
|
267
|
-
ProductAttributeSchema,
|
|
268
|
-
ProductAttributeValueIdentifierSchema,
|
|
269
|
-
ProductAttributeValueSchema,
|
|
270
|
-
ProductIdentifierSchema,
|
|
271
|
-
ProductOptionIdentifierSchema,
|
|
272
|
-
ProductOptionSchema,
|
|
273
|
-
ProductOptionValueIdentifierSchema,
|
|
274
|
-
ProductOptionValueSchema,
|
|
275
|
-
ProductProvider,
|
|
276
|
-
ProductQueryByIdSchema,
|
|
277
|
-
ProductQueryBySKUSchema,
|
|
278
|
-
ProductQueryBySlugSchema,
|
|
279
|
-
ProductQueryVariantsSchema,
|
|
280
|
-
ProductSchema,
|
|
281
|
-
ProductSearchIdentifierSchema,
|
|
282
|
-
ProductSearchProvider,
|
|
283
|
-
ProductSearchQueryByTermSchema,
|
|
284
|
-
ProductSearchResultFacetSchema,
|
|
285
|
-
ProductSearchResultFacetValueSchema,
|
|
286
|
-
ProductSearchResultItemSchema,
|
|
287
|
-
ProductSearchResultItemVariantSchema,
|
|
288
|
-
ProductSearchResultSchema,
|
|
289
|
-
ProductVariantIdentifierSchema,
|
|
290
|
-
ProductVariantOptionSchema,
|
|
291
|
-
ProductVariantSchema,
|
|
292
|
-
ProfileMutationUpdateSchema,
|
|
293
|
-
ProfileProvider,
|
|
294
|
-
ProfileQuerySelfSchema,
|
|
295
|
-
ProfileSchema,
|
|
296
|
-
Reactionary,
|
|
297
|
-
ReactionaryDecoratorOptions,
|
|
298
|
-
RedisCache,
|
|
299
|
-
RegisteredIdentitySchema,
|
|
300
|
-
RequestContextSchema,
|
|
301
|
-
SessionSchema,
|
|
302
|
-
ShippingInstructionSchema,
|
|
303
|
-
ShippingMethodIdentifierSchema,
|
|
304
|
-
ShippingMethodSchema,
|
|
305
|
-
StoreIdentifierSchema,
|
|
306
|
-
StoreProvider,
|
|
307
|
-
StoreQueryByProximitySchema,
|
|
308
|
-
StoreSchema,
|
|
309
|
-
TaxJurisdictionSchema,
|
|
310
|
-
TieredPriceSchema,
|
|
311
|
-
WebStoreIdentifierSchema,
|
|
312
|
-
createInitialRequestContext,
|
|
313
|
-
createPaginatedResponseSchema
|
|
314
|
-
};
|
|
1
|
+
export * from "./cache/index.js";
|
|
2
|
+
export * from "./client/index.js";
|
|
3
|
+
export * from "./decorators/index.js";
|
|
4
|
+
export * from "./providers/index.js";
|
|
5
|
+
export * from "./schemas/index.js";
|
|
6
|
+
export * from "./initialization.js";
|
package/package.json
CHANGED
package/schemas/index.js
ADDED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
import { BaseQuerySchema } from "./base.query.js";
|
|
3
2
|
import { ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
|
|
4
|
-
const
|
|
5
|
-
variant: ProductVariantIdentifierSchema.required()
|
|
6
|
-
|
|
3
|
+
const ListPriceQuerySchema = BaseQuerySchema.extend({
|
|
4
|
+
variant: ProductVariantIdentifierSchema.required()
|
|
5
|
+
});
|
|
6
|
+
const CustomerPriceQuerySchema = BaseQuerySchema.extend({
|
|
7
|
+
variant: ProductVariantIdentifierSchema.required()
|
|
7
8
|
});
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
CustomerPriceQuerySchema,
|
|
11
|
+
ListPriceQuerySchema
|
|
10
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './reactionary.decorator.js';
|
package/src/index.d.ts
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export { Reactionary, ReactionaryDecoratorOptions, } from './decorators/reactionary.decorator.js';
|
|
8
|
-
export { AnalyticsProvider, BaseProvider, CartProvider, CategoryProvider, CheckoutProvider, IdentityProvider, InventoryProvider, OrderProvider, PriceProvider, ProductProvider, ProductSearchProvider, ProfileProvider, StoreProvider, } from './providers/index.js';
|
|
9
|
-
export { type Capabilities, CapabilitiesSchema, } from './schemas/capabilities.schema.js';
|
|
10
|
-
export { type LanguageContext, LanguageContextSchema, type RequestContext, RequestContextSchema, type Session, SessionSchema, type TaxJurisdiction, TaxJurisdictionSchema, } from './schemas/session.schema.js';
|
|
11
|
-
export { AddressIdentifierSchema, AddressSchema, AnalyticsEventSchema, AnonymousIdentitySchema, BaseModelSchema, CacheInformationSchema, CartIdentifierSchema, CartItemIdentifierSchema, CartItemSchema, CartSchema, CategoryIdentifierSchema, CategoryPaginatedResultSchema, CategorySchema, CheckoutIdentifierSchema, CheckoutItemIdentifierSchema, CheckoutItemSchema, CheckoutSchema, CostBreakDownSchema, CurrencySchema, FacetIdentifierSchema, FacetValueIdentifierSchema, FulfillmentCenterIdentifierSchema, GuestIdentitySchema, IdentityIdentifierSchema, IdentitySchema, ImageSchema, InventoryIdentifierSchema, InventorySchema, ItemCostBreakdownSchema, MetaSchema, MonetaryAmountSchema, OrderIdentifierSchema, OrderInventoryStatusSchema, OrderItemIdentifierSchema, OrderItemSchema, OrderSchema, OrderStatusSchema, PaginationOptionsSchema, PaymentInstructionIdentifierSchema, PaymentInstructionSchema, PaymentMethodIdentifierSchema, PaymentMethodSchema, PaymentProtocolDataSchema, PaymentStatusSchema, PickupPointIdentifierSchema, PickupPointSchema, PriceIdentifierSchema, PriceSchema, ProductAttributeIdentifierSchema, ProductAttributeSchema, ProductAttributeValueIdentifierSchema, ProductAttributeValueSchema, ProductIdentifierSchema, ProductOptionIdentifierSchema, ProductOptionSchema, ProductOptionValueIdentifierSchema, ProductOptionValueSchema, ProductSchema, ProductSearchIdentifierSchema, ProductSearchResultFacetSchema, ProductSearchResultFacetValueSchema, ProductSearchResultItemSchema, ProductSearchResultItemVariantSchema, ProductSearchResultSchema, ProductVariantIdentifierSchema, ProductVariantOptionSchema, ProductVariantSchema, ProfileSchema, RegisteredIdentitySchema, ShippingInstructionSchema, ShippingMethodIdentifierSchema, ShippingMethodSchema, StoreIdentifierSchema, StoreSchema, TieredPriceSchema, WebStoreIdentifierSchema, createPaginatedResponseSchema, } from './schemas/models/index.js';
|
|
12
|
-
export type { Address, AddressIdentifier, AnalyticsEvent, AnonymousIdentity, BaseModel, CacheInformation, Cart, CartIdentifier, CartItem, CartItemIdentifier, Category, CategoryIdentifier, CategoryPaginatedResult, Checkout, CheckoutIdentifier, CheckoutItem, CheckoutItemIdentifier, CostBreakDown, Currency, FacetIdentifier, FacetValueIdentifier, FulfillmentCenterIdentifier, GuestIdentity, IdentifierType, Identity, IdentityIdentifier, Image, Inventory, InventoryIdentifier, ItemCostBreakdown, Meta, MonetaryAmount, Order, OrderIdentifier, OrderItem, OrderItemIdentifier, PaginationOptions, PaymentInstruction, PaymentInstructionIdentifier, PaymentMethod, PaymentMethodIdentifier, PaymentStatus, PickupPoint, PickupPointIdentifier, Price, PriceIdentifier, Product, ProductAttribute, ProductAttributeIdentifier, ProductAttributeValue, ProductAttributeValueIdentifier, ProductIdentifier, ProductOption, ProductOptionIdentifier, ProductOptionValue, ProductOptionValueIdentifier, ProductSearchResult, ProductSearchResultFacet, ProductSearchResultFacetValue, ProductSearchResultItem, ProductSearchResultItemVariant, ProductVariant, ProductVariantIdentifier, ProductVariantOption, Profile, RegisteredIdentity, SearchIdentifier, ShippingInstruction, ShippingMethod, ShippingMethodIdentifier, Store, StoreIdentifier, TieredPrice, WebStoreIdentifier, } from './schemas/models/index.js';
|
|
13
|
-
export { AnalyticsMutationSchema, AnalyticsMutationSearchEventSchema, AnalyticsMutationSearchProductClickEventSchema, BaseMutationSchema, CartMutationAddPaymentMethodSchema, CartMutationApplyCouponSchema, CartMutationChangeCurrencySchema, CartMutationCheckoutSchema, CartMutationDeleteCartSchema, CartMutationItemAddSchema, CartMutationItemQuantityChangeSchema, CartMutationItemRemoveSchema, CartMutationRemoveCouponSchema, CartMutationRemovePaymentMethodSchema, CartMutationSetBillingAddressSchema, CartMutationSetShippingInfoSchema, CheckoutMutationAddPaymentInstructionSchema, CheckoutMutationFinalizeCheckoutSchema, CheckoutMutationInitiateCheckoutSchema, CheckoutMutationRemovePaymentInstructionSchema, CheckoutMutationSetShippingAddressSchema, CheckoutMutationSetShippingInstructionSchema, IdentityMutationLoginSchema, IdentityMutationLogoutSchema, IdentityMutationRegisterSchema, ProfileMutationUpdateSchema, } from './schemas/mutations/index.js';
|
|
14
|
-
export type { AnalyticsMutation, AnalyticsMutationSearchEvent, AnalyticsMutationSearchProductClickEvent, BaseMutation, CartMutationAddPaymentMethod, CartMutationApplyCoupon, CartMutationChangeCurrency, CartMutationCheckout, CartMutationDeleteCart, CartMutationItemAdd, CartMutationItemQuantityChange, CartMutationItemRemove, CartMutationRemoveCoupon, CartMutationRemovePaymentMethod, CartMutationSetBillingAddress, CartMutationSetShippingInfo, CheckoutMutationAddPaymentInstruction, CheckoutMutationFinalizeCheckout, CheckoutMutationInitiateCheckout, CheckoutMutationRemovePaymentInstruction, CheckoutMutationSetShippingAddress, CheckoutMutationSetShippingInstruction, IdentityMutationLogin, IdentityMutationLogout, IdentityMutationRegister, ProfileMutationUpdate, } from './schemas/mutations/index.js';
|
|
15
|
-
export { BaseQuerySchema, CartQueryByIdSchema, CategoryQueryByIdSchema, CategoryQueryBySlugSchema, CategoryQueryForBreadcrumbSchema, CategoryQueryForChildCategoriesSchema, CategoryQueryForTopCategoriesSchema, CheckoutQueryByIdSchema, CheckoutQueryForAvailablePaymentMethodsSchema, CheckoutQueryForAvailableShippingMethodsSchema, IdentityQuerySelfSchema, InventoryQueryBySKUSchema, OrderQueryByIdSchema, PriceQueryBySkuSchema, ProductQueryByIdSchema, ProductQueryBySKUSchema, ProductQueryBySlugSchema, ProductQueryVariantsSchema, ProductSearchQueryByTermSchema, ProfileQuerySelfSchema, StoreQueryByProximitySchema, } from './schemas/queries/index.js';
|
|
16
|
-
export type { BaseQuery, CartQueryById, CheckoutQueryById, CategoryQueryById, CategoryQueryBySlug, CategoryQueryForBreadcrumb, CategoryQueryForChildCategories, CategoryQueryForTopCategories, CheckoutQueryForAvailablePaymentMethods, CheckoutQueryForAvailableShippingMethods, IdentityQuerySelf, InventoryQueryBySKU, OrderQueryById, PriceQueryBySku, ProductQueryById, ProductQueryBySKU, ProductQueryBySlug, ProductQueryVariants, ProductSearchQueryByTerm, ProfileQuerySelf, StoreQueryByProximity, } from './schemas/queries/index.js';
|
|
17
|
-
export { createInitialRequestContext } from './initialization.js';
|
|
1
|
+
export * from './cache/index.js';
|
|
2
|
+
export * from './client/index.js';
|
|
3
|
+
export * from './decorators/index.js';
|
|
4
|
+
export * from './providers/index.js';
|
|
5
|
+
export * from './schemas/index.js';
|
|
6
|
+
export * from './initialization.js';
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import type { Price } from '../schemas/models/price.model.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CustomerPriceQuery, ListPriceQuery } from '../schemas/queries/price.query.js';
|
|
3
3
|
import { BaseProvider } from './base.provider.js';
|
|
4
4
|
export declare abstract class PriceProvider<T extends Price = Price> extends BaseProvider<T> {
|
|
5
5
|
/**
|
|
6
|
-
* Get a price by SKU.
|
|
7
|
-
*
|
|
8
|
-
* Note: This does not include any discounts or promotions that may apply.
|
|
9
|
-
* For B2B scenarios, this will be the base price, and any customer specific pricing
|
|
6
|
+
* Get a list price price by SKU. This is the most general, undiscounted price and is typically
|
|
7
|
+
* used as the "before" price in most ecommerce setups.
|
|
10
8
|
*
|
|
11
9
|
* Usecase: You are rendering a product page, and you need to show the price for a SKU.
|
|
12
10
|
* @param payload The SKU to query
|
|
13
11
|
* @param session The session information
|
|
14
12
|
*/
|
|
15
|
-
abstract
|
|
13
|
+
abstract getListPrice(payload: ListPriceQuery): Promise<T>;
|
|
16
14
|
/**
|
|
17
|
-
*
|
|
15
|
+
* Get a customer-specific price by SKU.
|
|
16
|
+
*
|
|
17
|
+
* No
|
|
18
18
|
*
|
|
19
|
-
* Usecase: You are rendering a product
|
|
20
|
-
* @param payload The
|
|
19
|
+
* Usecase: You are rendering a product page, and you need to show the price for a SKU.
|
|
20
|
+
* @param payload The SKU to query
|
|
21
21
|
* @param session The session information
|
|
22
22
|
*/
|
|
23
|
-
abstract
|
|
23
|
+
abstract getCustomerPrice(payload: CustomerPriceQuery): Promise<T>;
|
|
24
24
|
/**
|
|
25
25
|
* Utility function to create an empty price result, with a value of -1.
|
|
26
26
|
* This is used when no price is found for a given SKU + currency combination.
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
export declare const ListPriceQuerySchema: z.ZodObject<{
|
|
3
3
|
variant: z.ZodObject<{
|
|
4
4
|
sku: z.ZodNonOptional<z.ZodNonOptional<z.ZodDefault<z.ZodString>>>;
|
|
5
5
|
}, z.core.$loose>;
|
|
6
|
-
type: z.ZodDefault<z.ZodLiteral<"List" | "Offer">>;
|
|
7
6
|
}, z.core.$loose>;
|
|
8
|
-
export
|
|
7
|
+
export declare const CustomerPriceQuerySchema: z.ZodObject<{
|
|
8
|
+
variant: z.ZodObject<{
|
|
9
|
+
sku: z.ZodNonOptional<z.ZodNonOptional<z.ZodDefault<z.ZodString>>>;
|
|
10
|
+
}, z.core.$loose>;
|
|
11
|
+
}, z.core.$loose>;
|
|
12
|
+
export type ListPriceQuery = z.infer<typeof ListPriceQuerySchema>;
|
|
13
|
+
export type CustomerPriceQuery = z.infer<typeof CustomerPriceQuerySchema>;
|