@react-pakistan/util-functions 2.0.0 → 2.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "A library of all util functions",
5
5
  "exports": {
6
6
  "./*": {
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "homepage": "https://github.com/react-pakistan/util-functions#readme",
55
55
  "devDependencies": {
56
- "@appcorp/shadcn": "^1.1.83",
56
+ "@appcorp/shadcn": "^1.2.0",
57
57
  "@eslint/js": "^9.17.0",
58
58
  "@testing-library/react": "^14.0.0",
59
59
  "@testing-library/react-hooks": "^8.0.1",
@@ -0,0 +1,26 @@
1
+ declare enum LS_KEYS {
2
+ BANKS = "stellar_banks_cache",
3
+ BRANCHES = "stellar_branches_cache",
4
+ COMPANIES = "stellar_companies_cache",
5
+ CONTACTS = "stellar_contacts_cache",
6
+ CURRENCIES = "stellar_currencies_cache",
7
+ CUSTOMERS = "stellar_customers_cache",
8
+ EXPENSE_CATEGORIES = "stellar_expense_categories_cache",
9
+ EXPENSES = "stellar_expenses_cache",
10
+ PAYMENT_MODES = "stellar_payment_modes_cache",
11
+ PREFERENCES = "stellar_preferences_cache",
12
+ PRODUCT_CATEGORIES = "stellar_product_categories_cache",
13
+ PRODUCTS = "stellar_products_cache",
14
+ TAXES = "stellar_taxes_cache"
15
+ }
16
+ /**
17
+ * Base entity interface with common audit fields and meta support
18
+ */
19
+ interface BaseEntity {
20
+ id: string;
21
+ createdAt: Date;
22
+ updatedAt: Date;
23
+ meta?: any;
24
+ }
25
+
26
+ export { type BaseEntity, LS_KEYS };
@@ -0,0 +1 @@
1
+ var r=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var o=(c,a)=>{for(var s in a)r(c,s,{get:a[s],enumerable:!0})},p=(c,a,s,l)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of n(a))!C.call(c,t)&&t!==s&&r(c,t,{get:()=>a[t],enumerable:!(l=h(a,t))||l.enumerable});return c};var A=c=>p(r({},"__esModule",{value:!0}),c);var E={};o(E,{LS_KEYS:()=>_});module.exports=A(E);var _=(e=>(e.BANKS="stellar_banks_cache",e.BRANCHES="stellar_branches_cache",e.COMPANIES="stellar_companies_cache",e.CONTACTS="stellar_contacts_cache",e.CURRENCIES="stellar_currencies_cache",e.CUSTOMERS="stellar_customers_cache",e.EXPENSE_CATEGORIES="stellar_expense_categories_cache",e.EXPENSES="stellar_expenses_cache",e.PAYMENT_MODES="stellar_payment_modes_cache",e.PREFERENCES="stellar_preferences_cache",e.PRODUCT_CATEGORIES="stellar_product_categories_cache",e.PRODUCTS="stellar_products_cache",e.TAXES="stellar_taxes_cache",e))(_||{});0&&(module.exports={LS_KEYS});
@@ -0,0 +1,305 @@
1
+ import { BaseEntity } from './common.js';
2
+
3
+ declare enum GENDER {
4
+ MALE = "MALE",
5
+ FEMALE = "FEMALE"
6
+ }
7
+ declare enum QUOTE_INVOICE_CATEGORY {
8
+ QUOTE = "QUOTE",
9
+ INVOICE = "INVOICE"
10
+ }
11
+ declare enum QUOTE_INVOICE_MODE {
12
+ COMPANY = "COMPANY",
13
+ CUSTOMER = "CUSTOMER"
14
+ }
15
+ declare enum DISCOUNT_UNIT {
16
+ FIXED_VALUE = "FIXED_VALUE",
17
+ PERCENTAGE_VALUE = "PERCENTAGE_VALUE"
18
+ }
19
+ declare enum INVOICE_STATUS {
20
+ UNPAID = "UNPAID",
21
+ PAID = "PAID"
22
+ }
23
+ declare enum QUOTE_STATUS {
24
+ DRAFT = "DRAFT",
25
+ PENDING = "PENDING",
26
+ SENT = "SENT",
27
+ ACCEPTED = "ACCEPTED",
28
+ DECLINED = "DECLINED"
29
+ }
30
+ declare enum PAYMENT_TYPE {
31
+ FULL_AMOUNT = "FULL_AMOUNT",
32
+ PARTIAL_AMOUNT = "PARTIAL_AMOUNT"
33
+ }
34
+ declare enum LEAD_SOURCE {
35
+ WEBSITE = "WEBSITE",
36
+ SOCIAL_MEDIA = "SOCIAL_MEDIA",
37
+ LINKEDIN = "LINKEDIN",
38
+ PROFESSIONAL_NETWORK = "PROFESSIONAL_NETWORK",
39
+ CUSTOMER_REFERRAL = "CUSTOMER_REFERRAL",
40
+ SALES = "SALES",
41
+ ADVERTISING = "ADVERTISING",
42
+ FRIEND = "FRIEND",
43
+ OTHER = "OTHER"
44
+ }
45
+ declare enum LEAD_TYPE {
46
+ COMPANY = "COMPANY",
47
+ CONTACT = "CONTACT"
48
+ }
49
+ declare enum LEAD_STATUS {
50
+ NEW = "NEW",
51
+ ASSIGNED = "ASSIGNED",
52
+ IN_NEGOTIATION = "IN_NEGOTIATION",
53
+ ON_HOLD = "ON_HOLD",
54
+ WON = "WON",
55
+ LOOSE = "LOOSE",
56
+ CANCELLED = "CANCELLED",
57
+ DRAFT = "DRAFT",
58
+ WAITING = "WAITING"
59
+ }
60
+ /**
61
+ * Profile model type
62
+ */
63
+ interface ProfileBE extends BaseEntity {
64
+ avatar?: string;
65
+ dob?: Date;
66
+ email: string;
67
+ firstName: string;
68
+ gender: GENDER;
69
+ language?: string;
70
+ lastName: string;
71
+ location?: string;
72
+ phone: string;
73
+ skill?: string;
74
+ userId: string;
75
+ }
76
+ /**
77
+ * Product model type
78
+ */
79
+ interface ProductBE extends BaseEntity {
80
+ currency: string;
81
+ description?: string;
82
+ images: string[];
83
+ name: string;
84
+ productCategoryId: string;
85
+ quantity: number;
86
+ ref?: string;
87
+ price: number;
88
+ }
89
+ /**
90
+ * ProductCategory model type
91
+ */
92
+ interface ProductCategoryBE extends BaseEntity {
93
+ description?: string;
94
+ name: string;
95
+ }
96
+ /**
97
+ * Company model type
98
+ */
99
+ interface CompanyBE extends BaseEntity {
100
+ country: string;
101
+ email: string;
102
+ name: string;
103
+ phone: string;
104
+ website?: string;
105
+ }
106
+ /**
107
+ * Contact model type
108
+ */
109
+ interface ContactBE extends BaseEntity {
110
+ companyId: string;
111
+ country: string;
112
+ email: string;
113
+ firstName: string;
114
+ lastName: string;
115
+ phone: string;
116
+ }
117
+ /**
118
+ * ExpenseCategory model type
119
+ */
120
+ interface ExpenseCategoryBE extends BaseEntity {
121
+ description?: string;
122
+ name: string;
123
+ }
124
+ /**
125
+ * Expense model type
126
+ */
127
+ interface ExpenseBE extends BaseEntity {
128
+ currency: string;
129
+ description: string;
130
+ expenseCategoryId: string;
131
+ name: string;
132
+ ref?: string;
133
+ total: number;
134
+ }
135
+ /**
136
+ * QuoteInvoice model type
137
+ */
138
+ interface QuoteInvoiceBE extends BaseEntity {
139
+ category: QUOTE_INVOICE_CATEGORY;
140
+ companyId?: string;
141
+ currency: string;
142
+ customerId?: string;
143
+ date: Date;
144
+ discount: number;
145
+ discountUnit: DISCOUNT_UNIT;
146
+ expiryDate: Date;
147
+ invoiceStatus: INVOICE_STATUS;
148
+ note?: string;
149
+ quoteStatus: QUOTE_STATUS;
150
+ ref?: string;
151
+ subTotal: number;
152
+ taxRate: number;
153
+ total: number;
154
+ }
155
+ /**
156
+ * Service model type
157
+ */
158
+ interface ServiceBE extends BaseEntity {
159
+ description?: string;
160
+ name: string;
161
+ price: number;
162
+ quantity: number;
163
+ quoteInvoiceId?: string;
164
+ }
165
+ /**
166
+ * Payment model type
167
+ */
168
+ interface PaymentBE extends BaseEntity {
169
+ amount: number;
170
+ attachment?: string;
171
+ balance: number;
172
+ currency: string;
173
+ date: Date;
174
+ description?: string;
175
+ paymentModeId: string;
176
+ paymentType: PAYMENT_TYPE;
177
+ quoteInvoiceId: string;
178
+ ref?: string;
179
+ }
180
+ /**
181
+ * Preference model type
182
+ */
183
+ interface PreferenceBE extends BaseEntity {
184
+ onboarding: boolean;
185
+ }
186
+ /**
187
+ * AppUser model type
188
+ */
189
+ interface AppUserBE extends BaseEntity {
190
+ email: string;
191
+ firstName: string;
192
+ lastName: string;
193
+ }
194
+ /**
195
+ * MenuOrder model type
196
+ */
197
+ interface MenuOrderBE extends BaseEntity {
198
+ label: string;
199
+ order: number;
200
+ preferenceId: string;
201
+ }
202
+ /**
203
+ * PaymentMode model type
204
+ */
205
+ interface PaymentModeBE extends BaseEntity {
206
+ enabled: boolean;
207
+ isDefault: boolean;
208
+ label: string;
209
+ preferenceId: string;
210
+ }
211
+ /**
212
+ * Bank model type
213
+ */
214
+ interface BankBE extends BaseEntity {
215
+ accountNumber: string;
216
+ accountTitle: string;
217
+ bankAddress?: string;
218
+ bankName: string;
219
+ enabled: boolean;
220
+ iban?: string;
221
+ isDefault: boolean;
222
+ preferenceId: string;
223
+ swiftCode?: string;
224
+ }
225
+ /**
226
+ * Tax model type
227
+ */
228
+ interface TaxBE extends BaseEntity {
229
+ description?: string;
230
+ enabled: boolean;
231
+ isDefault: boolean;
232
+ preferenceId: string;
233
+ taxName: string;
234
+ taxRate: number;
235
+ }
236
+ /**
237
+ * Branch model type
238
+ */
239
+ interface BranchBE extends BaseEntity {
240
+ branchAddress: string;
241
+ branchName: string;
242
+ enabled: boolean;
243
+ isDefault: boolean;
244
+ personEmail: string;
245
+ personName: string;
246
+ personPhone: string;
247
+ preferenceId: string;
248
+ }
249
+ /**
250
+ * Currency model type
251
+ */
252
+ interface CurrencyBE extends BaseEntity {
253
+ code: string;
254
+ enabled: boolean;
255
+ isDefault: boolean;
256
+ label: string;
257
+ preferenceId: string;
258
+ }
259
+ /**
260
+ * Customer model type
261
+ */
262
+ interface CustomerBE extends BaseEntity {
263
+ address?: string;
264
+ city: string;
265
+ country: string;
266
+ email?: string;
267
+ firstName: string;
268
+ lastName: string;
269
+ phone: string;
270
+ }
271
+ /**
272
+ * RequestForm model type
273
+ */
274
+ interface RequestFormBE extends BaseEntity {
275
+ businessType: string;
276
+ companyName: string;
277
+ companySize?: string;
278
+ designation: string;
279
+ firstName: string;
280
+ headOffice?: string;
281
+ lastName: string;
282
+ phoneNumber: string;
283
+ website?: string;
284
+ workEmail: string;
285
+ }
286
+ /**
287
+ * Lead model type
288
+ */
289
+ interface LeadBE extends BaseEntity {
290
+ notes?: string;
291
+ source: LEAD_SOURCE;
292
+ status: LEAD_STATUS;
293
+ type: LEAD_TYPE;
294
+ }
295
+ /**
296
+ * Join table for QuoteInvoice and Product many-to-many relationship
297
+ */
298
+ interface QuotesInvoicesOnStellarProducts {
299
+ meta?: any;
300
+ productId: string;
301
+ quantity: number;
302
+ quoteInvoiceId: string;
303
+ }
304
+
305
+ export { type AppUserBE, type BankBE, type BranchBE, type CompanyBE, type ContactBE, type CurrencyBE, type CustomerBE, DISCOUNT_UNIT, type ExpenseBE, type ExpenseCategoryBE, GENDER, INVOICE_STATUS, LEAD_SOURCE, LEAD_STATUS, LEAD_TYPE, type LeadBE, type MenuOrderBE, PAYMENT_TYPE, type PaymentBE, type PaymentModeBE, type PreferenceBE, type ProductBE, type ProductCategoryBE, type ProfileBE, QUOTE_INVOICE_CATEGORY, QUOTE_INVOICE_MODE, QUOTE_STATUS, type QuoteInvoiceBE, type QuotesInvoicesOnStellarProducts, type RequestFormBE, type ServiceBE, type TaxBE };
@@ -0,0 +1 @@
1
+ var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var b=(r,n)=>{for(var e in n)a(r,e,{get:n[e],enumerable:!0})},B=(r,n,e,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of l(n))!f.call(r,i)&&i!==e&&a(r,i,{get:()=>n[i],enumerable:!(o=y(n,i))||o.enumerable});return r};var A=r=>B(a({},"__esModule",{value:!0}),r);var C={};b(C,{DISCOUNT_UNIT:()=>E,GENDER:()=>g,INVOICE_STATUS:()=>p,LEAD_SOURCE:()=>N,LEAD_STATUS:()=>I,LEAD_TYPE:()=>x,PAYMENT_TYPE:()=>u,QUOTE_INVOICE_CATEGORY:()=>c,QUOTE_INVOICE_MODE:()=>d,QUOTE_STATUS:()=>m});module.exports=A(C);var g=(e=>(e.MALE="MALE",e.FEMALE="FEMALE",e))(g||{}),c=(e=>(e.QUOTE="QUOTE",e.INVOICE="INVOICE",e))(c||{}),d=(e=>(e.COMPANY="COMPANY",e.CUSTOMER="CUSTOMER",e))(d||{}),E=(e=>(e.FIXED_VALUE="FIXED_VALUE",e.PERCENTAGE_VALUE="PERCENTAGE_VALUE",e))(E||{}),p=(e=>(e.UNPAID="UNPAID",e.PAID="PAID",e))(p||{}),m=(s=>(s.DRAFT="DRAFT",s.PENDING="PENDING",s.SENT="SENT",s.ACCEPTED="ACCEPTED",s.DECLINED="DECLINED",s))(m||{}),u=(e=>(e.FULL_AMOUNT="FULL_AMOUNT",e.PARTIAL_AMOUNT="PARTIAL_AMOUNT",e))(u||{}),N=(t=>(t.WEBSITE="WEBSITE",t.SOCIAL_MEDIA="SOCIAL_MEDIA",t.LINKEDIN="LINKEDIN",t.PROFESSIONAL_NETWORK="PROFESSIONAL_NETWORK",t.CUSTOMER_REFERRAL="CUSTOMER_REFERRAL",t.SALES="SALES",t.ADVERTISING="ADVERTISING",t.FRIEND="FRIEND",t.OTHER="OTHER",t))(N||{}),x=(e=>(e.COMPANY="COMPANY",e.CONTACT="CONTACT",e))(x||{}),I=(t=>(t.NEW="NEW",t.ASSIGNED="ASSIGNED",t.IN_NEGOTIATION="IN_NEGOTIATION",t.ON_HOLD="ON_HOLD",t.WON="WON",t.LOOSE="LOOSE",t.CANCELLED="CANCELLED",t.DRAFT="DRAFT",t.WAITING="WAITING",t))(I||{});0&&(module.exports={DISCOUNT_UNIT,GENDER,INVOICE_STATUS,LEAD_SOURCE,LEAD_STATUS,LEAD_TYPE,PAYMENT_TYPE,QUOTE_INVOICE_CATEGORY,QUOTE_INVOICE_MODE,QUOTE_STATUS});
@@ -0,0 +1,3 @@
1
+ export { BaseEntity, LS_KEYS } from './common.js';
2
+ export { AppUserBE, BankBE, BranchBE, CompanyBE, ContactBE, CurrencyBE, CustomerBE, DISCOUNT_UNIT, ExpenseBE, ExpenseCategoryBE, GENDER, INVOICE_STATUS, LEAD_SOURCE, LEAD_STATUS, LEAD_TYPE, LeadBE, MenuOrderBE, PAYMENT_TYPE, PaymentBE, PaymentModeBE, PreferenceBE, ProductBE, ProductCategoryBE, ProfileBE, QUOTE_INVOICE_CATEGORY, QUOTE_INVOICE_MODE, QUOTE_STATUS, QuoteInvoiceBE, QuotesInvoicesOnStellarProducts, RequestFormBE, ServiceBE, TaxBE } from './erp.js';
3
+ export { POSCategoryBE, POSCustomerBE, POSDiscountBE, POSOrderBE, POSOrderItemBE, POSPaymentBE, POSProductBE, POSProductVariantBE, POSRegisterBE, POSReservationBE, POSShiftBE, POSStoreBE, POSTableBE, POSTaxBE, POS_DISCOUNT_TYPE, POS_ORDER_STATUS, POS_PAYMENT_METHOD_TYPE, POS_PAYMENT_STATUS, POS_REGISTER_STATUS, POS_RESERVATION_STATUS, POS_SHIFT_STATUS, POS_TABLE_STATUS, POS_TAX_TYPE } from './pos.js';
@@ -0,0 +1 @@
1
+ var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(f,r,p,x)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of c(r))!d.call(f,m)&&m!==p&&a(f,m,{get:()=>r[m],enumerable:!(x=b(r,m))||x.enumerable});return f},e=(f,r,p)=>(t(f,r,"default"),p&&t(p,r,"default"));var g=f=>t(a({},"__esModule",{value:!0}),f);var o={};module.exports=g(o);e(o,require("./common"),module.exports);e(o,require("./erp"),module.exports);e(o,require("./pos"),module.exports);0&&(module.exports={...require("./common"),...require("./erp"),...require("./pos")});
@@ -0,0 +1,179 @@
1
+ import { BaseEntity } from './common.js';
2
+
3
+ declare enum POS_ORDER_STATUS {
4
+ OPEN = "OPEN",
5
+ CLOSED = "CLOSED",
6
+ CANCELLED = "CANCELLED",
7
+ REFUNDED = "REFUNDED"
8
+ }
9
+ declare enum POS_PAYMENT_STATUS {
10
+ PENDING = "PENDING",
11
+ PAID = "PAID",
12
+ FAILED = "FAILED",
13
+ REFUNDED = "REFUNDED"
14
+ }
15
+ declare enum POS_PAYMENT_METHOD_TYPE {
16
+ CASH = "CASH",
17
+ CARD = "CARD",
18
+ GIFT_CARD = "GIFT_CARD",
19
+ MOBILE_WALLET = "MOBILE_WALLET",
20
+ OTHER = "OTHER"
21
+ }
22
+ declare enum POS_REGISTER_STATUS {
23
+ ACTIVE = "ACTIVE",
24
+ INACTIVE = "INACTIVE"
25
+ }
26
+ declare enum POS_TAX_TYPE {
27
+ EXCLUSIVE = "EXCLUSIVE",
28
+ INCLUSIVE = "INCLUSIVE"
29
+ }
30
+ declare enum POS_TABLE_STATUS {
31
+ AVAILABLE = "AVAILABLE",
32
+ OCCUPIED = "OCCUPIED",
33
+ RESERVED = "RESERVED"
34
+ }
35
+ declare enum POS_RESERVATION_STATUS {
36
+ PENDING = "PENDING",
37
+ CONFIRMED = "CONFIRMED",
38
+ CANCELLED = "CANCELLED",
39
+ COMPLETED = "COMPLETED"
40
+ }
41
+ declare enum POS_SHIFT_STATUS {
42
+ OPEN = "OPEN",
43
+ CLOSED = "CLOSED"
44
+ }
45
+ declare enum POS_DISCOUNT_TYPE {
46
+ FIXED = "FIXED",
47
+ PERCENTAGE = "PERCENTAGE"
48
+ }
49
+ interface POSStoreBE extends BaseEntity {
50
+ name: string;
51
+ code?: string;
52
+ address?: string;
53
+ phone?: string;
54
+ email?: string;
55
+ currency: string;
56
+ meta?: any;
57
+ enabled: boolean;
58
+ }
59
+ interface POSRegisterBE extends BaseEntity {
60
+ name: string;
61
+ storeId: string;
62
+ status: POS_REGISTER_STATUS;
63
+ meta?: any;
64
+ }
65
+ interface POSShiftBE extends BaseEntity {
66
+ registerId: string;
67
+ openedByUserId?: string;
68
+ openedAt: Date;
69
+ closedAt?: Date;
70
+ openingAmount: number;
71
+ closingAmount?: number;
72
+ status: POS_SHIFT_STATUS;
73
+ meta?: any;
74
+ }
75
+ interface POSCategoryBE extends BaseEntity {
76
+ name: string;
77
+ description?: string;
78
+ storeId: string;
79
+ parentId?: string;
80
+ meta?: any;
81
+ }
82
+ interface POSProductBE extends BaseEntity {
83
+ sku?: string;
84
+ name: string;
85
+ description?: string;
86
+ price: number;
87
+ cost?: number;
88
+ stock: number;
89
+ storeId: string;
90
+ categoryId?: string;
91
+ meta?: any;
92
+ }
93
+ interface POSProductVariantBE extends BaseEntity {
94
+ productId: string;
95
+ name: string;
96
+ sku?: string;
97
+ price: number;
98
+ stock: number;
99
+ meta?: any;
100
+ }
101
+ interface POSCustomerBE extends BaseEntity {
102
+ name: string;
103
+ email?: string;
104
+ phone?: string;
105
+ storeId: string;
106
+ loyaltyPoints: number;
107
+ meta?: any;
108
+ }
109
+ interface POSTableBE extends BaseEntity {
110
+ storeId: string;
111
+ name: string;
112
+ seats: number;
113
+ status: POS_TABLE_STATUS;
114
+ meta?: any;
115
+ }
116
+ interface POSReservationBE extends BaseEntity {
117
+ tableId: string;
118
+ customerId: string;
119
+ startAt: Date;
120
+ endAt: Date;
121
+ partySize: number;
122
+ status: POS_RESERVATION_STATUS;
123
+ meta?: any;
124
+ }
125
+ interface POSOrderBE extends BaseEntity {
126
+ orderNumber: string;
127
+ storeId: string;
128
+ registerId?: string;
129
+ customerId?: string;
130
+ tableId?: string;
131
+ status: POS_ORDER_STATUS;
132
+ paymentStatus: POS_PAYMENT_STATUS;
133
+ subTotal: number;
134
+ taxTotal: number;
135
+ discountTotal: number;
136
+ serviceCharge: number;
137
+ total: number;
138
+ note?: string;
139
+ meta?: any;
140
+ }
141
+ interface POSOrderItemBE extends BaseEntity {
142
+ orderId: string;
143
+ productId?: string;
144
+ variantId?: string;
145
+ name: string;
146
+ quantity: number;
147
+ unitPrice: number;
148
+ total: number;
149
+ taxAmount: number;
150
+ discountAmount: number;
151
+ meta?: any;
152
+ }
153
+ interface POSPaymentBE extends BaseEntity {
154
+ orderId: string;
155
+ amount: number;
156
+ method: POS_PAYMENT_METHOD_TYPE;
157
+ methodLabel?: string;
158
+ status: POS_PAYMENT_STATUS;
159
+ transactionRef?: string;
160
+ processedAt?: Date;
161
+ meta?: any;
162
+ }
163
+ interface POSTaxBE extends BaseEntity {
164
+ name: string;
165
+ rate: number;
166
+ type: POS_TAX_TYPE;
167
+ isDefault: boolean;
168
+ storeId: string;
169
+ meta?: any;
170
+ }
171
+ interface POSDiscountBE extends BaseEntity {
172
+ name: string;
173
+ type: POS_DISCOUNT_TYPE;
174
+ value: number;
175
+ storeId: string;
176
+ meta?: any;
177
+ }
178
+
179
+ export { type POSCategoryBE, type POSCustomerBE, type POSDiscountBE, type POSOrderBE, type POSOrderItemBE, type POSPaymentBE, type POSProductBE, type POSProductVariantBE, type POSRegisterBE, type POSReservationBE, type POSShiftBE, type POSStoreBE, type POSTableBE, type POSTaxBE, POS_DISCOUNT_TYPE, POS_ORDER_STATUS, POS_PAYMENT_METHOD_TYPE, POS_PAYMENT_STATUS, POS_REGISTER_STATUS, POS_RESERVATION_STATUS, POS_SHIFT_STATUS, POS_TABLE_STATUS, POS_TAX_TYPE };
@@ -0,0 +1 @@
1
+ var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var D=(r,n)=>{for(var e in n)i(r,e,{get:n[e],enumerable:!0})},b=(r,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of x(n))!C.call(r,t)&&t!==e&&i(r,t,{get:()=>n[t],enumerable:!(s=c(n,t))||s.enumerable});return r};var B=r=>b(i({},"__esModule",{value:!0}),r);var L={};D(L,{POS_DISCOUNT_TYPE:()=>y,POS_ORDER_STATUS:()=>o,POS_PAYMENT_METHOD_TYPE:()=>E,POS_PAYMENT_STATUS:()=>m,POS_REGISTER_STATUS:()=>u,POS_RESERVATION_STATUS:()=>I,POS_SHIFT_STATUS:()=>p,POS_TABLE_STATUS:()=>g,POS_TAX_TYPE:()=>d});module.exports=B(L);var o=(t=>(t.OPEN="OPEN",t.CLOSED="CLOSED",t.CANCELLED="CANCELLED",t.REFUNDED="REFUNDED",t))(o||{}),m=(t=>(t.PENDING="PENDING",t.PAID="PAID",t.FAILED="FAILED",t.REFUNDED="REFUNDED",t))(m||{}),E=(a=>(a.CASH="CASH",a.CARD="CARD",a.GIFT_CARD="GIFT_CARD",a.MOBILE_WALLET="MOBILE_WALLET",a.OTHER="OTHER",a))(E||{}),u=(e=>(e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e))(u||{}),d=(e=>(e.EXCLUSIVE="EXCLUSIVE",e.INCLUSIVE="INCLUSIVE",e))(d||{}),g=(s=>(s.AVAILABLE="AVAILABLE",s.OCCUPIED="OCCUPIED",s.RESERVED="RESERVED",s))(g||{}),I=(t=>(t.PENDING="PENDING",t.CONFIRMED="CONFIRMED",t.CANCELLED="CANCELLED",t.COMPLETED="COMPLETED",t))(I||{}),p=(e=>(e.OPEN="OPEN",e.CLOSED="CLOSED",e))(p||{}),y=(e=>(e.FIXED="FIXED",e.PERCENTAGE="PERCENTAGE",e))(y||{});0&&(module.exports={POS_DISCOUNT_TYPE,POS_ORDER_STATUS,POS_PAYMENT_METHOD_TYPE,POS_PAYMENT_STATUS,POS_REGISTER_STATUS,POS_RESERVATION_STATUS,POS_SHIFT_STATUS,POS_TABLE_STATUS,POS_TAX_TYPE});