@restaround/react 1.2.20 → 1.3.3
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/constants/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/index.esm.js +1 -1
- package/dist/models/index.esm.js.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/menu.d.ts +3 -0
- package/dist/models/models/menu.d.ts +3 -0
- package/dist/models/modules/business/models.d.ts +29 -2
- package/dist/models/modules/feature/models.d.ts +5 -0
- package/dist/models/modules/order/models.d.ts +11 -2
- package/dist/modules/business/models.d.ts +29 -2
- package/dist/modules/customer/hooks.d.ts +1 -0
- package/dist/modules/customer/utils.d.ts +2 -1
- package/dist/modules/feature/constants.d.ts +4 -0
- package/dist/modules/feature/hooks.d.ts +1 -1
- package/dist/modules/feature/models.d.ts +5 -0
- package/dist/modules/order/constants.d.ts +2 -1
- package/dist/modules/order/hooks.d.ts +3 -2
- package/dist/modules/order/models.d.ts +11 -2
- package/dist/modules/order/services.d.ts +4 -2
- package/dist/services/translation/locales/az/customer.d.ts +1 -0
- package/dist/services/translation/locales/az/error.d.ts +2 -0
- package/dist/services/translation/locales/az/index.d.ts +3 -0
- package/dist/services/translation/locales/en/error.d.ts +2 -0
- package/dist/services/translation/locales/en/index.d.ts +2 -0
- package/dist/services/translation/locales/et/error.d.ts +2 -0
- package/dist/services/translation/locales/et/index.d.ts +2 -0
- package/dist/services/translation/locales/index.d.ts +15 -0
- package/dist/services/translation/locales/nl/error.d.ts +2 -0
- package/dist/services/translation/locales/nl/index.d.ts +2 -0
- package/dist/services/translation/locales/ru/customer.d.ts +1 -0
- package/dist/services/translation/locales/ru/error.d.ts +2 -0
- package/dist/services/translation/locales/ru/index.d.ts +3 -0
- package/dist/services/translation/locales/tr/customer.d.ts +1 -0
- package/dist/services/translation/locales/tr/error.d.ts +2 -0
- package/dist/services/translation/locales/tr/index.d.ts +3 -0
- package/dist/store/order.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/models/menu.d.ts +3 -0
- package/dist/utils/modules/business/models.d.ts +29 -2
- package/dist/utils/modules/customer/utils.d.ts +7 -0
- package/dist/utils/modules/feature/models.d.ts +5 -0
- package/dist/utils/modules/order/models.d.ts +11 -2
- package/dist/utils/modules/view/utils.d.ts +6 -0
- package/dist/utils/utils/index.d.ts +1 -0
- package/package.json +6 -6
package/dist/models/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var E,I,R,
|
|
1
|
+
var E,L,A,I,R,D,P,N,C,T,n,O,i;!function(E){E.SINGLE="SINGLE",E.MULTIPLE="MULTIPLE"}(E||(E={})),function(E){E.ACTIVE="ACTIVE",E.EXPIRED="EXPIRED",E.CANCELLED="CANCELLED"}(L||(L={})),function(E){E.PHONE="PHONE",E.OTP="OTP",E.EMAIL="EMAIL"}(A||(A={})),function(E){E.HOME="HOME",E.WORK="WORK",E.TRAVEL="TRAVEL"}(I||(I={})),function(E){E.ORDER="feature_order"}(R||(R={})),function(E){E.ALPHA="ALPHA",E.BETA="BETA",E.ALL="ALL"}(D||(D={})),function(E){E.DINE_IN="DINE_IN",E.PICK_UP="PICK_UP",E.DELIVERY="DELIVERY"}(P||(P={})),function(E){E.DRAFT="DRAFT",E.PENDING="PENDING",E.CONFIRMED="CONFIRMED",E.PREPARING="PREPARING",E.READY="READY",E.OUT_FOR_DELIVERY="OUT_FOR_DELIVERY",E.DELIVERED="DELIVERED",E.COMPLETED="COMPLETED",E.CANCELLED="CANCELLED",E.FAILED="FAILED"}(N||(N={})),function(E){E.PENDING="PENDING",E.PREPARING="PREPARING",E.READY="READY",E.SERVED="SERVED"}(C||(C={})),function(E){E.CASH="CASH",E.CARD="CARD",E.WALLET="WALLET",E.TERMINAL="TERMINAL"}(T||(T={})),function(E){E.CART="CART",E.DETAILS="DETAILS",E.COMPLETED="COMPLETED"}(n||(n={})),function(E){E.LIST="list",E.GRID="grid"}(O||(O={})),function(E){E.APPETIZER="appetizer",E.MAIN_COURSE="mainCourse",E.CHEFS_SPECIAL="chefsSpecial"}(i||(i={}));export{I as CustomerAddressType,A as CustomerAuthStep,R as Feature,D as FeatureSegment,E as MenuAddonSelectType,C as OrderItemStatus,N as OrderStatus,n as OrderStep,P as OrderType,T as PaymentMethod,i as PlanType,O as ProductView,L as SubscriptionStatus};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../src/modules/addon/models.ts","../../../src/modules/customer/models.ts","../../../src/modules/feature/models.ts","../../../src/modules/order/models.ts","../../../src/modules/product/models.ts","../../../src/models/pricing.ts"],"sourcesContent":["export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOptionTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\tprice: number;\n\ttranslations: MenuAddonOptionTranslation[];\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\ttranslations: MenuAddonTranslation[];\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n}\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\tphoneNumber: string;\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","export enum Feature {\n\tORDER = \"feature_order\",\n}\n","
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../src/modules/addon/models.ts","../../../src/modules/business/models.ts","../../../src/modules/customer/models.ts","../../../src/modules/feature/models.ts","../../../src/modules/order/models.ts","../../../src/modules/product/models.ts","../../../src/models/pricing.ts"],"sourcesContent":["export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOptionTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\tprice: number;\n\ttranslations: MenuAddonOptionTranslation[];\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\ttranslations: MenuAddonTranslation[];\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n}\n","import { PricingInterval } from \"src/models/pricing\";\n\nimport * as featureModels from \"../feature/models\";\n\nexport enum SubscriptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tEXPIRED = \"EXPIRED\",\n\tCANCELLED = \"CANCELLED\",\n}\n\nexport type BillingInterval = \"MONTH\" | \"YEAR\";\n\nexport interface Subscription {\n\tid: number;\n\tbillingInterval: BillingInterval;\n\tbillingIntervalCount: number;\n\tstartDate: string;\n\tendDate: string;\n\tinterval: PricingInterval;\n\tstatus: SubscriptionStatus;\n\tbusiness_id?: number;\n\tplanName: string;\n}\n\nexport interface BusinessLanguage {\n\tid: number;\n\tcode: string;\n\tbusinessId: number;\n}\n\nexport interface BusinessSettings {\n\tdeliveryOrderEnabled: boolean;\n\tpickupOrderEnabled: boolean;\n\tdineInOrderEnabled: boolean;\n}\n\nexport interface Business {\n\tid: number;\n\tname: string;\n\tusername: string;\n\tavatar64?: string;\n\tavatar128?: string;\n\tavatar256?: string;\n\tcoverPhoto?: string;\n\tinstagram?: string;\n\tfacebook?: string;\n\ttiktok?: string;\n\tcreatedAt?: number;\n\tcurrency: string;\n\tlanguages: BusinessLanguage[];\n\tsubscriptions?: Subscription[];\n\tsegment?: featureModels.FeatureSegment;\n\tsettings?: BusinessSettings;\n}\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\tphoneNumber: string;\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","export enum Feature {\n\tORDER = \"feature_order\",\n}\nexport enum FeatureSegment {\n\tALPHA = \"ALPHA\",\n\tBETA = \"BETA\",\n\tALL = \"ALL\",\n}\n","import * as customerModels from \"../customer/models\";\n\nexport enum OrderType {\n\tDINE_IN = \"DINE_IN\",\n\tPICK_UP = \"PICK_UP\",\n\tDELIVERY = \"DELIVERY\",\n}\n\nexport enum OrderStatus {\n\tDRAFT = \"DRAFT\",\n\tPENDING = \"PENDING\",\n\tCONFIRMED = \"CONFIRMED\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tOUT_FOR_DELIVERY = \"OUT_FOR_DELIVERY\",\n\tDELIVERED = \"DELIVERED\",\n\tCOMPLETED = \"COMPLETED\",\n\tCANCELLED = \"CANCELLED\",\n\tFAILED = \"FAILED\",\n}\n\nexport enum OrderItemStatus {\n\tPENDING = \"PENDING\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tSERVED = \"SERVED\",\n}\n\nexport enum PaymentMethod {\n\tCASH = \"CASH\",\n\tCARD = \"CARD\",\n\tWALLET = \"WALLET\",\n\tTERMINAL = \"TERMINAL\",\n}\n\nexport interface OrderAddon {\n\tid?: number;\n\taddonId: number;\n\toptionId: number;\n\tprice: number;\n}\n\nexport interface SelectedAddons {\n\t[key: number]: number | number[];\n}\n\nexport interface OrderItemVariant {\n\tid?: number;\n\tvariantId: number;\n\tprice: number;\n}\n\nexport interface OrderItem {\n\tid?: number;\n\tproductId: number;\n\torderId?: number;\n\tquantity: number;\n\tprice: number;\n\tvariant?: OrderItemVariant;\n\taddons: OrderAddon[];\n\tnote?: string;\n\tstatus?: OrderItemStatus;\n\tvat?: number;\n\tisPaid?: boolean;\n}\n\nexport interface Order {\n\tid?: number;\n\tbusinessId?: number;\n\tbranchId?: number;\n\tworkingDayId?: number;\n\ttableId?: number;\n\temployeeId?: number;\n\torderType: OrderType;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithoutTax: number;\n\ttotalTax: number;\n\titems: OrderItem[];\n\tstatus?: OrderStatus;\n\tvat?: number;\n\tpaymentMethod?: PaymentMethod;\n\tnote?: string;\n\tcreatedAt?: number;\n\tupdatedAt?: number;\n\tcustomer?: customerModels.Customer;\n}\n\nexport interface OrderItems {\n\t[key: string]: OrderItem;\n}\n\nexport enum OrderStep {\n\tCART = \"CART\",\n\tDETAILS = \"DETAILS\",\n\tCOMPLETED = \"COMPLETED\",\n}\n\nexport interface OrderPayload extends Order {\n\tcustomerAddressId: number;\n\tcustomerId: number;\n}\n","import { MenuAddon } from \"../addon/models\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId?: number;\n}\n\nexport interface ProductVariantTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslation[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n\nexport interface DashboardProduct extends Omit<Product, \"addons\"> {\n\taddons: number[];\n}\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n"],"names":["MenuAddonSelectType","SubscriptionStatus","CustomerAuthStep","CustomerAddressType","Feature","FeatureSegment","OrderType","OrderStatus","OrderItemStatus","PaymentMethod","OrderStep","ProductView","PlanType"],"mappings":"IAAYA,ECIAC,ECJAC,EAMAC,ECNAC,EAGAC,ECDAC,EAMAC,EAaAC,EAOAC,EA+DAC,EClDAC,ECzCAC,GNAZ,SAAYZ,GACXA,EAAA,OAAA,SACAA,EAAA,SAAA,UACA,CAHD,CAAYA,IAAAA,EAGX,CAAA,ICCD,SAAYC,GACXA,EAAA,OAAA,SACAA,EAAA,QAAA,UACAA,EAAA,UAAA,WACA,CAJD,CAAYA,IAAAA,EAIX,CAAA,ICRD,SAAYC,GACXA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,MAAA,OACA,CAJD,CAAYA,IAAAA,EAIX,CAAA,IAED,SAAYC,GACXA,EAAA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,OAAA,QACA,CAJD,CAAYA,IAAAA,EAIX,CAAA,ICVD,SAAYC,GACXA,EAAA,MAAA,eACA,CAFD,CAAYA,IAAAA,EAEX,CAAA,IACD,SAAYC,GACXA,EAAA,MAAA,QACAA,EAAA,KAAA,OACAA,EAAA,IAAA,KACA,CAJD,CAAYA,IAAAA,EAIX,CAAA,ICLD,SAAYC,GACXA,EAAA,QAAA,UACAA,EAAA,QAAA,UACAA,EAAA,SAAA,UACA,CAJD,CAAYA,IAAAA,EAIX,CAAA,IAED,SAAYC,GACXA,EAAA,MAAA,QACAA,EAAA,QAAA,UACAA,EAAA,UAAA,YACAA,EAAA,UAAA,YACAA,EAAA,MAAA,QACAA,EAAA,iBAAA,mBACAA,EAAA,UAAA,YACAA,EAAA,UAAA,YACAA,EAAA,UAAA,YACAA,EAAA,OAAA,QACA,CAXD,CAAYA,IAAAA,EAWX,CAAA,IAED,SAAYC,GACXA,EAAA,QAAA,UACAA,EAAA,UAAA,YACAA,EAAA,MAAA,QACAA,EAAA,OAAA,QACA,CALD,CAAYA,IAAAA,EAKX,CAAA,IAED,SAAYC,GACXA,EAAA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,SAAA,UACA,CALD,CAAYA,IAAAA,EAKX,CAAA,IA0DD,SAAYC,GACXA,EAAA,KAAA,OACAA,EAAA,QAAA,UACAA,EAAA,UAAA,WACA,CAJD,CAAYA,IAAAA,EAIX,CAAA,ICtDD,SAAYC,GACXA,EAAA,KAAA,OACAA,EAAA,KAAA,MACA,CAHD,CAAYA,IAAAA,EAGX,CAAA,IC5CD,SAAYC,GACXA,EAAA,UAAA,YACAA,EAAA,YAAA,aACAA,EAAA,cAAA,cACA,CAJD,CAAYA,IAAAA,EAIX,CAAA"}
|
package/dist/models/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e,t,r,o,
|
|
1
|
+
"use strict";var e,t,r,E,o,s,p,A,I,L,d,R;exports.MenuAddonSelectType=void 0,(e=exports.MenuAddonSelectType||(exports.MenuAddonSelectType={})).SINGLE="SINGLE",e.MULTIPLE="MULTIPLE",exports.SubscriptionStatus=void 0,(t=exports.SubscriptionStatus||(exports.SubscriptionStatus={})).ACTIVE="ACTIVE",t.EXPIRED="EXPIRED",t.CANCELLED="CANCELLED",exports.CustomerAuthStep=void 0,(r=exports.CustomerAuthStep||(exports.CustomerAuthStep={})).PHONE="PHONE",r.OTP="OTP",r.EMAIL="EMAIL",exports.CustomerAddressType=void 0,(E=exports.CustomerAddressType||(exports.CustomerAddressType={})).HOME="HOME",E.WORK="WORK",E.TRAVEL="TRAVEL",exports.Feature=void 0,(exports.Feature||(exports.Feature={})).ORDER="feature_order",exports.FeatureSegment=void 0,(o=exports.FeatureSegment||(exports.FeatureSegment={})).ALPHA="ALPHA",o.BETA="BETA",o.ALL="ALL",exports.OrderType=void 0,(s=exports.OrderType||(exports.OrderType={})).DINE_IN="DINE_IN",s.PICK_UP="PICK_UP",s.DELIVERY="DELIVERY",exports.OrderStatus=void 0,(p=exports.OrderStatus||(exports.OrderStatus={})).DRAFT="DRAFT",p.PENDING="PENDING",p.CONFIRMED="CONFIRMED",p.PREPARING="PREPARING",p.READY="READY",p.OUT_FOR_DELIVERY="OUT_FOR_DELIVERY",p.DELIVERED="DELIVERED",p.COMPLETED="COMPLETED",p.CANCELLED="CANCELLED",p.FAILED="FAILED",exports.OrderItemStatus=void 0,(A=exports.OrderItemStatus||(exports.OrderItemStatus={})).PENDING="PENDING",A.PREPARING="PREPARING",A.READY="READY",A.SERVED="SERVED",exports.PaymentMethod=void 0,(I=exports.PaymentMethod||(exports.PaymentMethod={})).CASH="CASH",I.CARD="CARD",I.WALLET="WALLET",I.TERMINAL="TERMINAL",exports.OrderStep=void 0,(L=exports.OrderStep||(exports.OrderStep={})).CART="CART",L.DETAILS="DETAILS",L.COMPLETED="COMPLETED",exports.ProductView=void 0,(d=exports.ProductView||(exports.ProductView={})).LIST="list",d.GRID="grid",exports.PlanType=void 0,(R=exports.PlanType||(exports.PlanType={})).APPETIZER="appetizer",R.MAIN_COURSE="mainCourse",R.CHEFS_SPECIAL="chefsSpecial";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/modules/addon/models.ts","../../../src/modules/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/modules/addon/models.ts","../../../src/modules/business/models.ts","../../../src/modules/customer/models.ts","../../../src/modules/feature/models.ts","../../../src/modules/order/models.ts","../../../src/modules/product/models.ts","../../../src/models/pricing.ts"],"sourcesContent":["export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOptionTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\tprice: number;\n\ttranslations: MenuAddonOptionTranslation[];\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\ttranslations: MenuAddonTranslation[];\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n}\n","import { PricingInterval } from \"src/models/pricing\";\n\nimport * as featureModels from \"../feature/models\";\n\nexport enum SubscriptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tEXPIRED = \"EXPIRED\",\n\tCANCELLED = \"CANCELLED\",\n}\n\nexport type BillingInterval = \"MONTH\" | \"YEAR\";\n\nexport interface Subscription {\n\tid: number;\n\tbillingInterval: BillingInterval;\n\tbillingIntervalCount: number;\n\tstartDate: string;\n\tendDate: string;\n\tinterval: PricingInterval;\n\tstatus: SubscriptionStatus;\n\tbusiness_id?: number;\n\tplanName: string;\n}\n\nexport interface BusinessLanguage {\n\tid: number;\n\tcode: string;\n\tbusinessId: number;\n}\n\nexport interface BusinessSettings {\n\tdeliveryOrderEnabled: boolean;\n\tpickupOrderEnabled: boolean;\n\tdineInOrderEnabled: boolean;\n}\n\nexport interface Business {\n\tid: number;\n\tname: string;\n\tusername: string;\n\tavatar64?: string;\n\tavatar128?: string;\n\tavatar256?: string;\n\tcoverPhoto?: string;\n\tinstagram?: string;\n\tfacebook?: string;\n\ttiktok?: string;\n\tcreatedAt?: number;\n\tcurrency: string;\n\tlanguages: BusinessLanguage[];\n\tsubscriptions?: Subscription[];\n\tsegment?: featureModels.FeatureSegment;\n\tsettings?: BusinessSettings;\n}\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\tphoneNumber: string;\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","export enum Feature {\n\tORDER = \"feature_order\",\n}\nexport enum FeatureSegment {\n\tALPHA = \"ALPHA\",\n\tBETA = \"BETA\",\n\tALL = \"ALL\",\n}\n","import * as customerModels from \"../customer/models\";\n\nexport enum OrderType {\n\tDINE_IN = \"DINE_IN\",\n\tPICK_UP = \"PICK_UP\",\n\tDELIVERY = \"DELIVERY\",\n}\n\nexport enum OrderStatus {\n\tDRAFT = \"DRAFT\",\n\tPENDING = \"PENDING\",\n\tCONFIRMED = \"CONFIRMED\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tOUT_FOR_DELIVERY = \"OUT_FOR_DELIVERY\",\n\tDELIVERED = \"DELIVERED\",\n\tCOMPLETED = \"COMPLETED\",\n\tCANCELLED = \"CANCELLED\",\n\tFAILED = \"FAILED\",\n}\n\nexport enum OrderItemStatus {\n\tPENDING = \"PENDING\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tSERVED = \"SERVED\",\n}\n\nexport enum PaymentMethod {\n\tCASH = \"CASH\",\n\tCARD = \"CARD\",\n\tWALLET = \"WALLET\",\n\tTERMINAL = \"TERMINAL\",\n}\n\nexport interface OrderAddon {\n\tid?: number;\n\taddonId: number;\n\toptionId: number;\n\tprice: number;\n}\n\nexport interface SelectedAddons {\n\t[key: number]: number | number[];\n}\n\nexport interface OrderItemVariant {\n\tid?: number;\n\tvariantId: number;\n\tprice: number;\n}\n\nexport interface OrderItem {\n\tid?: number;\n\tproductId: number;\n\torderId?: number;\n\tquantity: number;\n\tprice: number;\n\tvariant?: OrderItemVariant;\n\taddons: OrderAddon[];\n\tnote?: string;\n\tstatus?: OrderItemStatus;\n\tvat?: number;\n\tisPaid?: boolean;\n}\n\nexport interface Order {\n\tid?: number;\n\tbusinessId?: number;\n\tbranchId?: number;\n\tworkingDayId?: number;\n\ttableId?: number;\n\temployeeId?: number;\n\torderType: OrderType;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithoutTax: number;\n\ttotalTax: number;\n\titems: OrderItem[];\n\tstatus?: OrderStatus;\n\tvat?: number;\n\tpaymentMethod?: PaymentMethod;\n\tnote?: string;\n\tcreatedAt?: number;\n\tupdatedAt?: number;\n\tcustomer?: customerModels.Customer;\n}\n\nexport interface OrderItems {\n\t[key: string]: OrderItem;\n}\n\nexport enum OrderStep {\n\tCART = \"CART\",\n\tDETAILS = \"DETAILS\",\n\tCOMPLETED = \"COMPLETED\",\n}\n\nexport interface OrderPayload extends Order {\n\tcustomerAddressId: number;\n\tcustomerId: number;\n}\n","import { MenuAddon } from \"../addon/models\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId?: number;\n}\n\nexport interface ProductVariantTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslation[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n\nexport interface DashboardProduct extends Omit<Product, \"addons\"> {\n\taddons: number[];\n}\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n"],"names":["MenuAddonSelectType","SubscriptionStatus","CustomerAuthStep","CustomerAddressType","FeatureSegment","OrderType","OrderStatus","OrderItemStatus","PaymentMethod","OrderStep","ProductView","PlanType","Feature"],"mappings":"aAAA,IAAYA,ECIAC,ECJAC,EAMAC,ECHAC,ECDAC,EAMAC,EAaAC,EAOAC,EA+DAC,EClDAC,ECzCAC,ENAAX,QAAAA,yBAAAA,GAAAA,EAAAA,QAAmBA,sBAAnBA,4BAGX,CAAA,IAFA,OAAA,SACAA,EAAA,SAAA,WCEWC,QAAAA,wBAAAA,GAAAA,EAAAA,QAAkBA,qBAAlBA,2BAIX,CAAA,IAHA,OAAA,SACAA,EAAA,QAAA,UACAA,EAAA,UAAA,YCPWC,QAAAA,sBAAAA,GAAAA,EAAAA,QAAgBA,mBAAhBA,yBAIX,CAAA,IAHA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,MAAA,QAGWC,QAAAA,yBAAAA,GAAAA,EAAAA,QAAmBA,sBAAnBA,4BAIX,CAAA,IAHA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,OAAA,SCTWS,QAAAA,aAAAA,GAAAA,QAAOA,UAAPA,gBAEX,CAAA,IADA,MAAA,gBAEWR,QAAAA,oBAAAA,GAAAA,EAAAA,QAAcA,iBAAdA,uBAIX,CAAA,IAHA,MAAA,QACAA,EAAA,KAAA,OACAA,EAAA,IAAA,MCJWC,QAAAA,eAAAA,GAAAA,EAAAA,QAASA,YAATA,kBAIX,CAAA,IAHA,QAAA,UACAA,EAAA,QAAA,UACAA,EAAA,SAAA,WAGWC,QAAAA,iBAAAA,GAAAA,EAAAA,QAAWA,cAAXA,oBAWX,CAAA,IAVA,MAAA,QACAA,EAAA,QAAA,UACAA,EAAA,UAAA,YACAA,EAAA,UAAA,YACAA,EAAA,MAAA,QACAA,EAAA,iBAAA,mBACAA,EAAA,UAAA,YACAA,EAAA,UAAA,YACAA,EAAA,UAAA,YACAA,EAAA,OAAA,SAGWC,QAAAA,qBAAAA,GAAAA,EAAAA,QAAeA,kBAAfA,wBAKX,CAAA,IAJA,QAAA,UACAA,EAAA,UAAA,YACAA,EAAA,MAAA,QACAA,EAAA,OAAA,SAGWC,QAAAA,mBAAAA,GAAAA,EAAAA,QAAaA,gBAAbA,sBAKX,CAAA,IAJA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,SAAA,WA2DWC,QAAAA,eAAAA,GAAAA,EAAAA,QAASA,YAATA,kBAIX,CAAA,IAHA,KAAA,OACAA,EAAA,QAAA,UACAA,EAAA,UAAA,YCrDWC,QAAAA,iBAAAA,GAAAA,EAAAA,QAAWA,cAAXA,oBAGX,CAAA,IAFA,KAAA,OACAA,EAAA,KAAA,OC3CWC,QAAAA,cAAAA,GAAAA,EAAAA,QAAQA,WAARA,iBAIX,CAAA,IAHA,UAAA,YACAA,EAAA,YAAA,aACAA,EAAA,cAAA"}
|
package/dist/models/menu.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as productModels from "src/modules/product/models";
|
|
|
2
2
|
import * as branchModels from "src/modules/branch/models";
|
|
3
3
|
import * as categoryModels from "./category";
|
|
4
4
|
import * as businessModels from "src/modules/business/models";
|
|
5
|
+
import * as featureModels from "src/modules/feature/models";
|
|
5
6
|
export interface PublicMenuData {
|
|
6
7
|
businessId: number;
|
|
7
8
|
branches: branchModels.Branch[];
|
|
@@ -23,6 +24,8 @@ export interface PublicMenuData {
|
|
|
23
24
|
rootPath?: string;
|
|
24
25
|
hostname?: string | null;
|
|
25
26
|
imageTag?: any;
|
|
27
|
+
businessSegment?: featureModels.FeatureSegment;
|
|
28
|
+
businessSettings?: businessModels.BusinessSettings;
|
|
26
29
|
onBranchSelect?: (branchId: number) => void;
|
|
27
30
|
onLanguageSelect?: (code: string) => void;
|
|
28
31
|
}
|
|
@@ -2,6 +2,7 @@ import * as productModels from "src/modules/product/models";
|
|
|
2
2
|
import * as branchModels from "src/modules/branch/models";
|
|
3
3
|
import * as categoryModels from "./category";
|
|
4
4
|
import * as businessModels from "src/modules/business/models";
|
|
5
|
+
import * as featureModels from "src/modules/feature/models";
|
|
5
6
|
export interface PublicMenuData {
|
|
6
7
|
businessId: number;
|
|
7
8
|
branches: branchModels.Branch[];
|
|
@@ -23,6 +24,8 @@ export interface PublicMenuData {
|
|
|
23
24
|
rootPath?: string;
|
|
24
25
|
hostname?: string | null;
|
|
25
26
|
imageTag?: any;
|
|
27
|
+
businessSegment?: featureModels.FeatureSegment;
|
|
28
|
+
businessSettings?: businessModels.BusinessSettings;
|
|
26
29
|
onBranchSelect?: (branchId: number) => void;
|
|
27
30
|
onLanguageSelect?: (code: string) => void;
|
|
28
31
|
}
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
+
import { PricingInterval } from "src/models/pricing";
|
|
2
|
+
import * as featureModels from "../feature/models";
|
|
3
|
+
export declare enum SubscriptionStatus {
|
|
4
|
+
ACTIVE = "ACTIVE",
|
|
5
|
+
EXPIRED = "EXPIRED",
|
|
6
|
+
CANCELLED = "CANCELLED"
|
|
7
|
+
}
|
|
8
|
+
export type BillingInterval = "MONTH" | "YEAR";
|
|
9
|
+
export interface Subscription {
|
|
10
|
+
id: number;
|
|
11
|
+
billingInterval: BillingInterval;
|
|
12
|
+
billingIntervalCount: number;
|
|
13
|
+
startDate: string;
|
|
14
|
+
endDate: string;
|
|
15
|
+
interval: PricingInterval;
|
|
16
|
+
status: SubscriptionStatus;
|
|
17
|
+
business_id?: number;
|
|
18
|
+
planName: string;
|
|
19
|
+
}
|
|
1
20
|
export interface BusinessLanguage {
|
|
2
21
|
id: number;
|
|
3
22
|
code: string;
|
|
4
23
|
businessId: number;
|
|
5
24
|
}
|
|
25
|
+
export interface BusinessSettings {
|
|
26
|
+
deliveryOrderEnabled: boolean;
|
|
27
|
+
pickupOrderEnabled: boolean;
|
|
28
|
+
dineInOrderEnabled: boolean;
|
|
29
|
+
}
|
|
6
30
|
export interface Business {
|
|
7
31
|
id: number;
|
|
8
32
|
name: string;
|
|
33
|
+
username: string;
|
|
9
34
|
avatar64?: string;
|
|
10
35
|
avatar128?: string;
|
|
11
36
|
avatar256?: string;
|
|
@@ -13,8 +38,10 @@ export interface Business {
|
|
|
13
38
|
instagram?: string;
|
|
14
39
|
facebook?: string;
|
|
15
40
|
tiktok?: string;
|
|
16
|
-
createdAt
|
|
41
|
+
createdAt?: number;
|
|
17
42
|
currency: string;
|
|
18
43
|
languages: BusinessLanguage[];
|
|
19
|
-
|
|
44
|
+
subscriptions?: Subscription[];
|
|
45
|
+
segment?: featureModels.FeatureSegment;
|
|
46
|
+
settings?: BusinessSettings;
|
|
20
47
|
}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import * as customerModels from "../customer/models";
|
|
1
2
|
export declare enum OrderType {
|
|
2
3
|
DINE_IN = "DINE_IN",
|
|
3
4
|
PICK_UP = "PICK_UP",
|
|
4
5
|
DELIVERY = "DELIVERY"
|
|
5
6
|
}
|
|
6
7
|
export declare enum OrderStatus {
|
|
8
|
+
DRAFT = "DRAFT",
|
|
7
9
|
PENDING = "PENDING",
|
|
8
10
|
CONFIRMED = "CONFIRMED",
|
|
9
11
|
PREPARING = "PREPARING",
|
|
10
12
|
READY = "READY",
|
|
13
|
+
OUT_FOR_DELIVERY = "OUT_FOR_DELIVERY",
|
|
14
|
+
DELIVERED = "DELIVERED",
|
|
11
15
|
COMPLETED = "COMPLETED",
|
|
12
|
-
CANCELLED = "CANCELLED"
|
|
16
|
+
CANCELLED = "CANCELLED",
|
|
17
|
+
FAILED = "FAILED"
|
|
13
18
|
}
|
|
14
19
|
export declare enum OrderItemStatus {
|
|
15
20
|
PENDING = "PENDING",
|
|
@@ -56,7 +61,6 @@ export interface Order {
|
|
|
56
61
|
branchId?: number;
|
|
57
62
|
workingDayId?: number;
|
|
58
63
|
tableId?: number;
|
|
59
|
-
customerId?: number;
|
|
60
64
|
employeeId?: number;
|
|
61
65
|
orderType: OrderType;
|
|
62
66
|
totalPriceWithTax: number;
|
|
@@ -69,6 +73,7 @@ export interface Order {
|
|
|
69
73
|
note?: string;
|
|
70
74
|
createdAt?: number;
|
|
71
75
|
updatedAt?: number;
|
|
76
|
+
customer?: customerModels.Customer;
|
|
72
77
|
}
|
|
73
78
|
export interface OrderItems {
|
|
74
79
|
[key: string]: OrderItem;
|
|
@@ -78,3 +83,7 @@ export declare enum OrderStep {
|
|
|
78
83
|
DETAILS = "DETAILS",
|
|
79
84
|
COMPLETED = "COMPLETED"
|
|
80
85
|
}
|
|
86
|
+
export interface OrderPayload extends Order {
|
|
87
|
+
customerAddressId: number;
|
|
88
|
+
customerId: number;
|
|
89
|
+
}
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
+
import { PricingInterval } from "src/models/pricing";
|
|
2
|
+
import * as featureModels from "../feature/models";
|
|
3
|
+
export declare enum SubscriptionStatus {
|
|
4
|
+
ACTIVE = "ACTIVE",
|
|
5
|
+
EXPIRED = "EXPIRED",
|
|
6
|
+
CANCELLED = "CANCELLED"
|
|
7
|
+
}
|
|
8
|
+
export type BillingInterval = "MONTH" | "YEAR";
|
|
9
|
+
export interface Subscription {
|
|
10
|
+
id: number;
|
|
11
|
+
billingInterval: BillingInterval;
|
|
12
|
+
billingIntervalCount: number;
|
|
13
|
+
startDate: string;
|
|
14
|
+
endDate: string;
|
|
15
|
+
interval: PricingInterval;
|
|
16
|
+
status: SubscriptionStatus;
|
|
17
|
+
business_id?: number;
|
|
18
|
+
planName: string;
|
|
19
|
+
}
|
|
1
20
|
export interface BusinessLanguage {
|
|
2
21
|
id: number;
|
|
3
22
|
code: string;
|
|
4
23
|
businessId: number;
|
|
5
24
|
}
|
|
25
|
+
export interface BusinessSettings {
|
|
26
|
+
deliveryOrderEnabled: boolean;
|
|
27
|
+
pickupOrderEnabled: boolean;
|
|
28
|
+
dineInOrderEnabled: boolean;
|
|
29
|
+
}
|
|
6
30
|
export interface Business {
|
|
7
31
|
id: number;
|
|
8
32
|
name: string;
|
|
33
|
+
username: string;
|
|
9
34
|
avatar64?: string;
|
|
10
35
|
avatar128?: string;
|
|
11
36
|
avatar256?: string;
|
|
@@ -13,8 +38,10 @@ export interface Business {
|
|
|
13
38
|
instagram?: string;
|
|
14
39
|
facebook?: string;
|
|
15
40
|
tiktok?: string;
|
|
16
|
-
createdAt
|
|
41
|
+
createdAt?: number;
|
|
17
42
|
currency: string;
|
|
18
43
|
languages: BusinessLanguage[];
|
|
19
|
-
|
|
44
|
+
subscriptions?: Subscription[];
|
|
45
|
+
segment?: featureModels.FeatureSegment;
|
|
46
|
+
settings?: BusinessSettings;
|
|
20
47
|
}
|
|
@@ -3,4 +3,5 @@ import { CustomerAddress, CustomerAuthForm, CustomerAuthPhoneForm, CustomerAuthS
|
|
|
3
3
|
export declare const preparePhoneNumber: (form: CustomerAuthPhoneForm) => string;
|
|
4
4
|
export declare const validateForm: (form: CustomerAuthForm, step: CustomerAuthStep) => FormErrors;
|
|
5
5
|
export declare const validateAddressForm: (form: CustomerAddress) => FormErrors;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const formatCityLine: (fields: (string | undefined)[]) => string;
|
|
7
|
+
export declare const formatAddressLine: (street: string, houseNumber: string, additionalNumber: string) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Feature } from "./models";
|
|
2
2
|
export declare const useFeatureActive: (feature: Feature) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OrderType, PaymentMethod } from "./models";
|
|
1
|
+
import { OrderStep, OrderType, PaymentMethod } from "./models";
|
|
2
2
|
export declare const initialOrder: {
|
|
3
3
|
orderType: OrderType;
|
|
4
4
|
totalPriceWithTax: number;
|
|
@@ -7,3 +7,4 @@ export declare const initialOrder: {
|
|
|
7
7
|
vat: number;
|
|
8
8
|
paymentMethod: PaymentMethod;
|
|
9
9
|
};
|
|
10
|
+
export declare const ORDER_STEPS: OrderStep[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Order, OrderItem, SelectedAddons } from "./models";
|
|
1
|
+
import { Order, OrderItem, OrderPayload, SelectedAddons } from "./models";
|
|
2
2
|
export declare const useOrderPriceDetails: () => {
|
|
3
3
|
totalPriceWithTax: number;
|
|
4
4
|
totalPriceWithoutTax: number;
|
|
5
5
|
totalTax: number;
|
|
6
6
|
};
|
|
7
|
-
export declare const usePrepareOrder: (existingOrderData?: Partial<Order>) =>
|
|
7
|
+
export declare const usePrepareOrder: (existingOrderData?: Partial<Order>) => OrderPayload;
|
|
8
8
|
export declare const useTotalOrderItemsCount: () => number;
|
|
9
9
|
export declare const useOrderItemsTotalPrice: () => {
|
|
10
10
|
totalPrice: number;
|
|
@@ -20,3 +20,4 @@ export declare const useOrderItemPrice: (item: OrderItem) => {
|
|
|
20
20
|
totalPrice: number;
|
|
21
21
|
formattedTotalPrice: string;
|
|
22
22
|
};
|
|
23
|
+
export declare const useOrderActiveForBusiness: () => boolean;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import * as customerModels from "../customer/models";
|
|
1
2
|
export declare enum OrderType {
|
|
2
3
|
DINE_IN = "DINE_IN",
|
|
3
4
|
PICK_UP = "PICK_UP",
|
|
4
5
|
DELIVERY = "DELIVERY"
|
|
5
6
|
}
|
|
6
7
|
export declare enum OrderStatus {
|
|
8
|
+
DRAFT = "DRAFT",
|
|
7
9
|
PENDING = "PENDING",
|
|
8
10
|
CONFIRMED = "CONFIRMED",
|
|
9
11
|
PREPARING = "PREPARING",
|
|
10
12
|
READY = "READY",
|
|
13
|
+
OUT_FOR_DELIVERY = "OUT_FOR_DELIVERY",
|
|
14
|
+
DELIVERED = "DELIVERED",
|
|
11
15
|
COMPLETED = "COMPLETED",
|
|
12
|
-
CANCELLED = "CANCELLED"
|
|
16
|
+
CANCELLED = "CANCELLED",
|
|
17
|
+
FAILED = "FAILED"
|
|
13
18
|
}
|
|
14
19
|
export declare enum OrderItemStatus {
|
|
15
20
|
PENDING = "PENDING",
|
|
@@ -56,7 +61,6 @@ export interface Order {
|
|
|
56
61
|
branchId?: number;
|
|
57
62
|
workingDayId?: number;
|
|
58
63
|
tableId?: number;
|
|
59
|
-
customerId?: number;
|
|
60
64
|
employeeId?: number;
|
|
61
65
|
orderType: OrderType;
|
|
62
66
|
totalPriceWithTax: number;
|
|
@@ -69,6 +73,7 @@ export interface Order {
|
|
|
69
73
|
note?: string;
|
|
70
74
|
createdAt?: number;
|
|
71
75
|
updatedAt?: number;
|
|
76
|
+
customer?: customerModels.Customer;
|
|
72
77
|
}
|
|
73
78
|
export interface OrderItems {
|
|
74
79
|
[key: string]: OrderItem;
|
|
@@ -78,3 +83,7 @@ export declare enum OrderStep {
|
|
|
78
83
|
DETAILS = "DETAILS",
|
|
79
84
|
COMPLETED = "COMPLETED"
|
|
80
85
|
}
|
|
86
|
+
export interface OrderPayload extends Order {
|
|
87
|
+
customerAddressId: number;
|
|
88
|
+
customerId: number;
|
|
89
|
+
}
|
|
@@ -8,6 +8,8 @@ declare const _default: {
|
|
|
8
8
|
INVALID_OTP: string;
|
|
9
9
|
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
10
10
|
"Invalid Email Address": string;
|
|
11
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
12
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
11
13
|
};
|
|
12
14
|
common: {
|
|
13
15
|
Save: string;
|
|
@@ -118,6 +120,7 @@ declare const _default: {
|
|
|
118
120
|
Lachin: string;
|
|
119
121
|
Kalbajar: string;
|
|
120
122
|
Khankendi: string;
|
|
123
|
+
Nakhchivan: string;
|
|
121
124
|
};
|
|
122
125
|
auth: {
|
|
123
126
|
"Create an account or log in": string;
|
|
@@ -9,6 +9,8 @@ declare const _default: {
|
|
|
9
9
|
INVALID_OTP: string;
|
|
10
10
|
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
11
11
|
"Invalid Email Address": string;
|
|
12
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
13
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
12
14
|
};
|
|
13
15
|
common: {
|
|
14
16
|
Save: string;
|
|
@@ -119,6 +121,7 @@ declare const _default: {
|
|
|
119
121
|
Lachin: string;
|
|
120
122
|
Kalbajar: string;
|
|
121
123
|
Khankendi: string;
|
|
124
|
+
Nakhchivan: string;
|
|
122
125
|
};
|
|
123
126
|
auth: {
|
|
124
127
|
"Create an account or log in": string;
|
|
@@ -168,6 +171,8 @@ declare const _default: {
|
|
|
168
171
|
FIELD_REQUIRED: string;
|
|
169
172
|
INVALID_OTP: string;
|
|
170
173
|
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
174
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
175
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
171
176
|
};
|
|
172
177
|
common: {};
|
|
173
178
|
order: {};
|
|
@@ -186,6 +191,8 @@ declare const _default: {
|
|
|
186
191
|
INVALID_OTP: string;
|
|
187
192
|
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
188
193
|
"Invalid Email Address": string;
|
|
194
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
195
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
189
196
|
};
|
|
190
197
|
common: {
|
|
191
198
|
Save: string;
|
|
@@ -297,6 +304,7 @@ declare const _default: {
|
|
|
297
304
|
Lachin: string;
|
|
298
305
|
Kalbajar: string;
|
|
299
306
|
Khankendi: string;
|
|
307
|
+
Nakhchivan: string;
|
|
300
308
|
};
|
|
301
309
|
auth: {
|
|
302
310
|
"Create an account or log in": string;
|
|
@@ -350,6 +358,8 @@ declare const _default: {
|
|
|
350
358
|
INVALID_OTP: string;
|
|
351
359
|
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
352
360
|
"Invalid Email Address": string;
|
|
361
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
362
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
353
363
|
};
|
|
354
364
|
common: {
|
|
355
365
|
Save: string;
|
|
@@ -461,6 +471,7 @@ declare const _default: {
|
|
|
461
471
|
Lachin: string;
|
|
462
472
|
Kalbajar: string;
|
|
463
473
|
Khankendi: string;
|
|
474
|
+
Nakhchivan: string;
|
|
464
475
|
};
|
|
465
476
|
auth: {
|
|
466
477
|
"Create an account or log in": string;
|
|
@@ -514,6 +525,8 @@ declare const _default: {
|
|
|
514
525
|
INVALID_OTP: string;
|
|
515
526
|
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
516
527
|
"Invalid Email Address": string;
|
|
528
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
529
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
517
530
|
};
|
|
518
531
|
common: {
|
|
519
532
|
Save: string;
|
|
@@ -678,6 +691,8 @@ declare const _default: {
|
|
|
678
691
|
INVALID_OTP: string;
|
|
679
692
|
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
680
693
|
"Invalid Email Address": string;
|
|
694
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
695
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
681
696
|
};
|
|
682
697
|
common: {
|
|
683
698
|
Save: string;
|
|
@@ -8,6 +8,8 @@ declare const _default: {
|
|
|
8
8
|
INVALID_OTP: string;
|
|
9
9
|
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
10
10
|
"Invalid Email Address": string;
|
|
11
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
12
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
11
13
|
};
|
|
12
14
|
common: {
|
|
13
15
|
Save: string;
|
|
@@ -119,6 +121,7 @@ declare const _default: {
|
|
|
119
121
|
Lachin: string;
|
|
120
122
|
Kalbajar: string;
|
|
121
123
|
Khankendi: string;
|
|
124
|
+
Nakhchivan: string;
|
|
122
125
|
};
|
|
123
126
|
auth: {
|
|
124
127
|
"Create an account or log in": string;
|