@nextorders/food-schema 0.0.1 → 0.2.0
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 +223 -14
- package/dist/index.d.ts +223 -14
- package/dist/index.mjs +16 -5
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -259,7 +259,7 @@ const CountryCodeSchema = z.enum([
|
|
|
259
259
|
"ZM",
|
|
260
260
|
"ZW"
|
|
261
261
|
]);
|
|
262
|
-
const LocaleSchema = z.enum(["de", "en", "es", "ka", "ru", "zh_cn"]);
|
|
262
|
+
const LocaleSchema = z.enum(["de", "en", "es", "fr", "ka", "ru", "zh_cn"]);
|
|
263
263
|
const LocaleValueSchema = z.object({
|
|
264
264
|
locale: LocaleSchema,
|
|
265
265
|
value: z.string()
|
|
@@ -401,24 +401,35 @@ const NutritionFactsSchema = z.object({
|
|
|
401
401
|
protein: z.number(),
|
|
402
402
|
fat: z.number()
|
|
403
403
|
});
|
|
404
|
+
const ProductBadgeSchema = z.object({
|
|
405
|
+
id: z.string(),
|
|
406
|
+
title: LocaleValueSchema.array()
|
|
407
|
+
});
|
|
404
408
|
const ProductVariantSchema = z.object({
|
|
405
409
|
id: z.string(),
|
|
406
410
|
title: LocaleValueSchema.array(),
|
|
407
411
|
images: ImageSchema.array(),
|
|
408
412
|
weightUnit: WeightUnitSchema,
|
|
409
413
|
weightValue: z.number(),
|
|
410
|
-
|
|
411
|
-
net: z.number().nullable(),
|
|
414
|
+
price: z.number(),
|
|
412
415
|
sku: z.string().nullable(),
|
|
413
416
|
nutritionFacts: NutritionFactsSchema.nullable()
|
|
414
417
|
});
|
|
418
|
+
const RecommendedProductSchema = z.object({
|
|
419
|
+
id: z.string(),
|
|
420
|
+
productId: z.string(),
|
|
421
|
+
productVariantId: z.string()
|
|
422
|
+
});
|
|
415
423
|
const ProductSchema = z.object({
|
|
416
424
|
id: z.string(),
|
|
417
425
|
slug: z.string(),
|
|
418
426
|
title: LocaleValueSchema.array(),
|
|
419
427
|
description: LocaleValueSchema.array().optional(),
|
|
420
428
|
isAvailableForPurchase: z.boolean(),
|
|
421
|
-
|
|
429
|
+
isShownInCatalog: z.boolean(),
|
|
430
|
+
variants: ProductVariantSchema.array(),
|
|
431
|
+
badges: ProductBadgeSchema.array().optional(),
|
|
432
|
+
recommendedProducts: RecommendedProductSchema.array().optional()
|
|
422
433
|
});
|
|
423
434
|
|
|
424
435
|
const MenuCategorySchema = z.object({
|
|
@@ -666,4 +677,4 @@ const GatewayResponseSchema = z.discriminatedUnion("type", [
|
|
|
666
677
|
GatewayGetTimeSlotsResponseSchema
|
|
667
678
|
]);
|
|
668
679
|
|
|
669
|
-
export { BaseResponseSchema, ChannelSchema, 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, ProductSchema, ProductVariantSchema, ScheduleSchema, TimePeriodSchema, TimeSchema, TimeTypeSchema, TimeZoneSchema, WarehouseAddressSchema, WarehouseSchema, WeekDaySchema, WeightUnitSchema };
|
|
680
|
+
export { BaseResponseSchema, ChannelSchema, 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, ProductSchema, ProductVariantSchema, RecommendedProductSchema, ScheduleSchema, TimePeriodSchema, TimeSchema, TimeTypeSchema, TimeZoneSchema, WarehouseAddressSchema, WarehouseSchema, WeekDaySchema, WeightUnitSchema };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextorders/food-schema",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"zod": "^4.3.5"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/node": "^25.0.
|
|
31
|
+
"@types/node": "^25.0.6",
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
33
|
"unbuild": "^3.6.1"
|
|
34
34
|
},
|