@nextorders/food-schema 0.2.3 → 0.2.5
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 +580 -2
- package/dist/index.d.ts +580 -2
- package/dist/index.mjs +15 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,8 @@ const CurrencyCodeSchema = z.enum([
|
|
|
10
10
|
"UAH",
|
|
11
11
|
"KZT",
|
|
12
12
|
"PLN",
|
|
13
|
-
"TRY"
|
|
13
|
+
"TRY",
|
|
14
|
+
"INR"
|
|
14
15
|
]);
|
|
15
16
|
const CountryCodeSchema = z.enum([
|
|
16
17
|
"RU",
|
|
@@ -259,7 +260,7 @@ const CountryCodeSchema = z.enum([
|
|
|
259
260
|
"ZM",
|
|
260
261
|
"ZW"
|
|
261
262
|
]);
|
|
262
|
-
const LocaleSchema = z.enum(["de", "en", "es", "fr", "ka", "ru", "zh_cn"]);
|
|
263
|
+
const LocaleSchema = z.enum(["de", "el", "en", "es", "fr", "hi", "it", "ka", "ru", "zh_cn", "pt"]);
|
|
263
264
|
const LocaleValueSchema = z.object({
|
|
264
265
|
locale: LocaleSchema,
|
|
265
266
|
value: z.string()
|
|
@@ -420,6 +421,7 @@ const ProductVariantSchema = z.object({
|
|
|
420
421
|
weightUnit: WeightUnitSchema,
|
|
421
422
|
weightValue: z.number(),
|
|
422
423
|
price: z.number(),
|
|
424
|
+
originalPrice: z.number().optional(),
|
|
423
425
|
sku: z.string().nullable(),
|
|
424
426
|
nutritionFacts: NutritionFactsSchema.nullable()
|
|
425
427
|
});
|
|
@@ -562,6 +564,7 @@ const GatewayActionTypeSchema = z.enum([
|
|
|
562
564
|
"getOrder",
|
|
563
565
|
"createOrder",
|
|
564
566
|
"updateOrder",
|
|
567
|
+
"completeOrder",
|
|
565
568
|
"addOrderItem",
|
|
566
569
|
"incrementOrderItemQuantity",
|
|
567
570
|
"decrementOrderItemQuantity",
|
|
@@ -618,6 +621,14 @@ const GatewayUpdateOrderResponseSchema = BaseResponseSchema.extend({
|
|
|
618
621
|
type: z.literal("updateOrder"),
|
|
619
622
|
result: OrderSchema
|
|
620
623
|
});
|
|
624
|
+
const GatewayCompleteOrderRequestSchema = GatewayRequestSchema.extend({
|
|
625
|
+
type: z.literal("completeOrder"),
|
|
626
|
+
body: OrderSchema.partial()
|
|
627
|
+
});
|
|
628
|
+
const GatewayCompleteOrderResponseSchema = BaseResponseSchema.extend({
|
|
629
|
+
type: z.literal("completeOrder"),
|
|
630
|
+
result: OrderSchema
|
|
631
|
+
});
|
|
621
632
|
const GatewayAddOrderItemRequestSchema = GatewayRequestSchema.extend({
|
|
622
633
|
type: z.literal("addOrderItem"),
|
|
623
634
|
body: z.object({
|
|
@@ -689,6 +700,7 @@ const GatewayResponseSchema = z.discriminatedUnion("type", [
|
|
|
689
700
|
GatewayGetOrderResponseSchema,
|
|
690
701
|
GatewayCreateOrderResponseSchema,
|
|
691
702
|
GatewayUpdateOrderResponseSchema,
|
|
703
|
+
GatewayCompleteOrderResponseSchema,
|
|
692
704
|
GatewayAddOrderItemResponseSchema,
|
|
693
705
|
GatewayIncrementOrderItemQuantityResponseSchema,
|
|
694
706
|
GatewayDecrementOrderItemQuantityResponseSchema,
|
|
@@ -698,4 +710,4 @@ const GatewayResponseSchema = z.discriminatedUnion("type", [
|
|
|
698
710
|
GatewayGetTimeSlotsResponseSchema
|
|
699
711
|
]);
|
|
700
712
|
|
|
701
|
-
export { BaseResponseSchema, ChannelSchema, CompositionIngredientSchema, CompositionProductSchema, CountryCodeSchema, CurrencyCodeSchema, DeliveryMethodSchema, GatewayActionTypeSchema, GatewayAddOrderItemRequestSchema, GatewayAddOrderItemResponseSchema, GatewayCreateOrderRequestSchema, GatewayCreateOrderResponseSchema, GatewayDecrementOrderItemQuantityRequestSchema, GatewayDecrementOrderItemQuantityResponseSchema, GatewayGetChannelsRequestSchema, GatewayGetChannelsResponseSchema, GatewayGetDeliveryByCourierStatusRequestSchema, GatewayGetDeliveryByCourierStatusResponseSchema, GatewayGetMenuRequestSchema, GatewayGetMenuResponseSchema, GatewayGetOptionsRequestSchema, GatewayGetOptionsResponseSchema, GatewayGetOrderRequestSchema, GatewayGetOrderResponseSchema, GatewayGetSelfPickupStatusRequestSchema, GatewayGetSelfPickupStatusResponseSchema, GatewayGetTimeSlotsRequestSchema, GatewayGetTimeSlotsResponseSchema, GatewayIncrementOrderItemQuantityRequestSchema, GatewayIncrementOrderItemQuantityResponseSchema, GatewayRequestSchema, GatewayResponseSchema, GatewayUpdateOrderRequestSchema, GatewayUpdateOrderResponseSchema, ImageFormatSchema, ImageSchema, ImageSizeSchema, LocaleSchema, LocaleValueSchema, MenuCategorySchema, MenuSchema, NutritionFactsSchema, OpeningStatusSchema, OptionsSchema, OrderDeliveryAddressSchema, OrderItemChangeSchema, OrderItemSchema, OrderSchema, OrderStatusSchema, OrderWarehouseAddressSchema, PaymentMethodSchema, PaymentMethodTypeSchema, ProductBadgeSchema, ProductCompositionSchema, ProductSchema, ProductVariantSchema, RecommendedProductSchema, ScheduleSchema, TimePeriodSchema, TimeSchema, TimeTypeSchema, TimeZoneSchema, VideoSchema, VideoTypeSchema, WarehouseAddressSchema, WarehouseSchema, WeekDaySchema, WeightUnitSchema };
|
|
713
|
+
export { BaseResponseSchema, ChannelSchema, CompositionIngredientSchema, CompositionProductSchema, CountryCodeSchema, CurrencyCodeSchema, DeliveryMethodSchema, GatewayActionTypeSchema, GatewayAddOrderItemRequestSchema, GatewayAddOrderItemResponseSchema, GatewayCompleteOrderRequestSchema, GatewayCompleteOrderResponseSchema, GatewayCreateOrderRequestSchema, GatewayCreateOrderResponseSchema, GatewayDecrementOrderItemQuantityRequestSchema, GatewayDecrementOrderItemQuantityResponseSchema, GatewayGetChannelsRequestSchema, GatewayGetChannelsResponseSchema, GatewayGetDeliveryByCourierStatusRequestSchema, GatewayGetDeliveryByCourierStatusResponseSchema, GatewayGetMenuRequestSchema, GatewayGetMenuResponseSchema, GatewayGetOptionsRequestSchema, GatewayGetOptionsResponseSchema, GatewayGetOrderRequestSchema, GatewayGetOrderResponseSchema, GatewayGetSelfPickupStatusRequestSchema, GatewayGetSelfPickupStatusResponseSchema, GatewayGetTimeSlotsRequestSchema, GatewayGetTimeSlotsResponseSchema, GatewayIncrementOrderItemQuantityRequestSchema, GatewayIncrementOrderItemQuantityResponseSchema, GatewayRequestSchema, GatewayResponseSchema, GatewayUpdateOrderRequestSchema, GatewayUpdateOrderResponseSchema, ImageFormatSchema, ImageSchema, ImageSizeSchema, LocaleSchema, LocaleValueSchema, MenuCategorySchema, MenuSchema, NutritionFactsSchema, OpeningStatusSchema, OptionsSchema, OrderDeliveryAddressSchema, OrderItemChangeSchema, OrderItemSchema, OrderSchema, OrderStatusSchema, OrderWarehouseAddressSchema, PaymentMethodSchema, PaymentMethodTypeSchema, ProductBadgeSchema, ProductCompositionSchema, ProductSchema, ProductVariantSchema, RecommendedProductSchema, ScheduleSchema, TimePeriodSchema, TimeSchema, TimeTypeSchema, TimeZoneSchema, VideoSchema, VideoTypeSchema, WarehouseAddressSchema, WarehouseSchema, WeekDaySchema, WeightUnitSchema };
|