@react-pakistan/util-functions 1.24.64 → 1.24.66
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/README.md +6 -3
- package/api/stellar-solutions/app-user/index.d.ts +63 -14
- package/api/stellar-solutions/app-user/index.js +106 -52
- package/api/stellar-solutions/bank/index.d.ts +65 -16
- package/api/stellar-solutions/bank/index.js +115 -65
- package/api/stellar-solutions/branch/index.d.ts +64 -15
- package/api/stellar-solutions/branch/index.js +119 -65
- package/api/stellar-solutions/company/index.d.ts +58 -24
- package/api/stellar-solutions/company/index.js +106 -78
- package/api/stellar-solutions/company-report/index.d.ts +12 -5
- package/api/stellar-solutions/company-report/index.js +12 -7
- package/api/stellar-solutions/contact/index.d.ts +54 -20
- package/api/stellar-solutions/contact/index.js +109 -88
- package/api/stellar-solutions/currency/index.d.ts +63 -14
- package/api/stellar-solutions/currency/index.js +113 -61
- package/api/stellar-solutions/customer/index.d.ts +70 -28
- package/api/stellar-solutions/customer/index.js +131 -101
- package/api/stellar-solutions/expense/index.d.ts +58 -22
- package/api/stellar-solutions/expense/index.js +128 -92
- package/api/stellar-solutions/expense-category/index.d.ts +58 -22
- package/api/stellar-solutions/expense-category/index.js +125 -86
- package/api/stellar-solutions/lead/index.js +0 -1
- package/api/stellar-solutions/menu-order/index.d.ts +29 -7
- package/api/stellar-solutions/menu-order/index.js +74 -27
- package/api/stellar-solutions/payment/index.d.ts +62 -27
- package/api/stellar-solutions/payment/index.js +144 -123
- package/api/stellar-solutions/payment-mode/index.d.ts +44 -12
- package/api/stellar-solutions/payment-mode/index.js +115 -49
- package/api/stellar-solutions/preference/index.d.ts +14 -3
- package/api/stellar-solutions/preference/index.js +44 -14
- package/api/stellar-solutions/product/index.d.ts +46 -31
- package/api/stellar-solutions/product/index.js +142 -113
- package/api/stellar-solutions/product-category/index.d.ts +44 -27
- package/api/stellar-solutions/product-category/index.js +123 -87
- package/api/stellar-solutions/profile/index.d.ts +48 -17
- package/api/stellar-solutions/profile/index.js +124 -65
- package/api/stellar-solutions/quote-invoice/index.d.ts +67 -8
- package/api/stellar-solutions/quote-invoice/index.js +123 -57
- package/api/stellar-solutions/quote-invoice-report/index.d.ts +12 -5
- package/api/stellar-solutions/quote-invoice-report/index.js +10 -5
- package/api/stellar-solutions/tax/index.d.ts +46 -14
- package/api/stellar-solutions/tax/index.js +135 -63
- package/api/stellar-solutions/type.d.ts +292 -177
- package/api/stellar-solutions/type.js +93 -1
- package/constants/countries-timezones.js +0 -1
- package/constants/currencies.js +0 -1
- package/general/basic-get.js +22 -21
- package/general/basic-post.js +19 -18
- package/general/calculate-pages.js +3 -1
- package/general/check-even-odd-length.js +3 -2
- package/general/delete-image-from-private-supabase.js +0 -1
- package/general/delete-image-from-public-supabase.js +0 -1
- package/general/dynamic-page-limit.js +3 -2
- package/general/enum-to-text.js +7 -4
- package/general/fetch-data.js +0 -1
- package/general/fetch-supabase-image.js +0 -1
- package/general/fetch-supabase-private-assets.js +15 -14
- package/general/format-date.js +8 -8
- package/general/format-number.js +3 -2
- package/general/format-time.js +3 -2
- package/general/full-year-range.js +2 -2
- package/general/generate-blog-schema.d.ts +3 -3
- package/general/generate-blog-schema.js +20 -13
- package/general/generate-breadcrumb-schema.d.ts +4 -4
- package/general/generate-breadcrumb-schema.js +9 -10
- package/general/generate-faq-schema.d.ts +5 -5
- package/general/generate-faq-schema.js +18 -11
- package/general/generate-grid.js +0 -1
- package/general/generate-organization-schema.d.ts +3 -3
- package/general/generate-organization-schema.js +25 -18
- package/general/get-available-page-limit.js +2 -2
- package/general/get-calendar-dates.js +14 -3
- package/general/get-full-name.d.ts +1 -1
- package/general/get-number-of-days-in-month.d.ts +1 -1
- package/general/get-pathname.js +4 -1
- package/general/is-odd.js +1 -1
- package/general/is-previous-button-disabled.js +3 -1
- package/general/parse-frontmatter.js +0 -1
- package/general/remove-data-image-prefix.js +3 -2
- package/general/repeat-times.js +0 -1
- package/general/resolve-current-date.js +1 -2
- package/general/resolve-grid.js +3 -2
- package/general/slugify.js +11 -9
- package/general/text-to-enum.js +6 -1
- package/general/text-to-sentence-case.js +3 -1
- package/general/time-out.js +5 -4
- package/general/truncate-text.js +3 -1
- package/general/upload-blob-to-private-supabase.js +2 -2
- package/general/upload-blob-to-public-supabase.js +2 -2
- package/general/upload-image-to-private-supabase.js +2 -2
- package/general/upload-image-to-public-supabase.js +2 -2
- package/general/validate-email.js +1 -1
- package/hooks/use-fetch.js +11 -12
- package/hooks/use-module-entity.js +5 -6
- package/hooks/use-sticky.js +0 -1
- package/hooks/with-seo.d.ts +1 -1
- package/hooks/with-seo.js +3 -4
- package/local-storage/get-storage-value.js +0 -1
- package/package.json +22 -13
- package/setupTests.js +1 -2
- package/storybook/generate-sitemap.js +0 -1
- package/storybook/preview.js +1 -4
- package/storybook/react-design-story-script.js +0 -2
- package/storybook/react-emoji-collection.js +8 -6
- package/storybook/react-emoji-story-script.js +0 -2
- package/storybook/react-icon-collection.js +4 -3
- package/storybook/react-icon-story-script.js +0 -2
- package/storybook/react-logo-collection.js +4 -3
- package/storybook/react-logo-story-script.js +0 -2
- package/storybook/responsive-component.js +14 -7
|
@@ -1,244 +1,359 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Gender options for user profiles
|
|
3
|
+
*/
|
|
4
|
+
export declare enum GENDER {
|
|
5
|
+
MALE = "MALE",
|
|
6
|
+
FEMALE = "FEMALE"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Quote and Invoice category types
|
|
10
|
+
*/
|
|
11
|
+
export declare enum QUOTE_INVOICE_CATEGORY {
|
|
12
|
+
QUOTE = "QUOTE",
|
|
13
|
+
INVOICE = "INVOICE"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Discount unit types (fixed amount or percentage)
|
|
17
|
+
*/
|
|
18
|
+
export declare enum DISCOUNT_UNIT {
|
|
19
|
+
FIXED_VALUE = "FIXED_VALUE",
|
|
20
|
+
PERCENTAGE_VALUE = "PERCENTAGE_VALUE"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Invoice payment status
|
|
24
|
+
*/
|
|
25
|
+
export declare enum INVOICE_STATUS {
|
|
26
|
+
UNPAID = "UNPAID",
|
|
27
|
+
PAID = "PAID"
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Quote lifecycle status
|
|
31
|
+
*/
|
|
32
|
+
export declare enum QUOTE_STATUS {
|
|
33
|
+
DRAFT = "DRAFT",
|
|
34
|
+
PENDING = "PENDING",
|
|
35
|
+
SENT = "SENT",
|
|
36
|
+
ACCEPTED = "ACCEPTED",
|
|
37
|
+
DECLINED = "DECLINED"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Payment type (full or partial)
|
|
41
|
+
*/
|
|
42
|
+
export declare enum PAYMENT_TYPE {
|
|
43
|
+
FULL_AMOUNT = "FULL_AMOUNT",
|
|
44
|
+
PARTIAL_AMOUNT = "PARTIAL_AMOUNT"
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Lead source options
|
|
48
|
+
*/
|
|
49
|
+
export declare enum LEAD_SOURCE {
|
|
50
|
+
ADVERTISING = "ADVERTISING",
|
|
51
|
+
CUSTOMER_REFERRAL = "CUSTOMER_REFERRAL",
|
|
52
|
+
FRIEND = "FRIEND",
|
|
53
|
+
LINKEDIN = "LINKEDIN",
|
|
54
|
+
OTHER = "OTHER",
|
|
55
|
+
PROFESSIONAL_NETWORK = "PROFESSIONAL_NETWORK",
|
|
56
|
+
SALES = "SALES",
|
|
57
|
+
SOCIAL_MEDIA = "SOCIAL_MEDIA",
|
|
58
|
+
WEBSITE = "WEBSITE"
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Lead status options
|
|
62
|
+
*/
|
|
63
|
+
export declare enum LEAD_STATUS {
|
|
64
|
+
ASSIGNED = "ASSIGNED",
|
|
65
|
+
CANCELLED = "CANCELLED",
|
|
66
|
+
DRAFT = "DRAFT",
|
|
67
|
+
IN_NEGOTIATION = "IN_NEGOTIATION",
|
|
68
|
+
LOOSE = "LOOSE",
|
|
69
|
+
NEW = "NEW",
|
|
70
|
+
ON_HOLD = "ON_HOLD",
|
|
71
|
+
WAITING = "WAITING",
|
|
72
|
+
WON = "WON"
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Lead type (company or contact)
|
|
76
|
+
*/
|
|
77
|
+
export declare enum LEAD_TYPE {
|
|
78
|
+
COMPANY = "COMPANY",
|
|
79
|
+
CONTACT = "CONTACT"
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Base timestamp fields present in all entities
|
|
83
|
+
*/
|
|
84
|
+
export interface TimestampFields {
|
|
2
85
|
createdAt: string;
|
|
3
|
-
email: string;
|
|
4
|
-
firstName: string;
|
|
5
|
-
id: string;
|
|
6
|
-
lastName: string;
|
|
7
86
|
updatedAt: string;
|
|
8
87
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
bankName: string;
|
|
14
|
-
createdAt: string;
|
|
88
|
+
/**
|
|
89
|
+
* Common fields for preference-related entities
|
|
90
|
+
*/
|
|
91
|
+
export interface PreferenceRelatedFields extends TimestampFields {
|
|
15
92
|
enabled: boolean;
|
|
16
|
-
iban: string;
|
|
17
93
|
id: string;
|
|
18
94
|
isDefault: boolean;
|
|
19
|
-
preference: PreferenceBE;
|
|
20
|
-
swiftCode: string;
|
|
21
|
-
updatedAt: string;
|
|
22
95
|
preferenceId: string;
|
|
96
|
+
preference?: PreferenceBE;
|
|
23
97
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Application user entity
|
|
100
|
+
*/
|
|
101
|
+
export interface AppUserBE extends TimestampFields {
|
|
102
|
+
email: string;
|
|
103
|
+
firstName: string;
|
|
29
104
|
id: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
105
|
+
lastName: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* User profile entity with extended personal information
|
|
109
|
+
*/
|
|
110
|
+
export interface ProfileBE extends TimestampFields {
|
|
111
|
+
avatar?: string;
|
|
112
|
+
dob?: string;
|
|
113
|
+
email: string;
|
|
114
|
+
firstName: string;
|
|
115
|
+
gender: GENDER;
|
|
116
|
+
id: string;
|
|
117
|
+
language?: string;
|
|
118
|
+
lastName: string;
|
|
119
|
+
location?: string;
|
|
120
|
+
phone: string;
|
|
121
|
+
skill?: string;
|
|
122
|
+
userId: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Product category entity
|
|
126
|
+
*/
|
|
127
|
+
export interface ProductCategoryBE extends TimestampFields {
|
|
128
|
+
description?: string;
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
products: Array<ProductBE>;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Product entity
|
|
135
|
+
*/
|
|
136
|
+
export interface ProductBE extends TimestampFields {
|
|
137
|
+
buyPrice: string;
|
|
138
|
+
currency: string;
|
|
139
|
+
description?: string;
|
|
140
|
+
id: string;
|
|
141
|
+
image?: string;
|
|
142
|
+
name: string;
|
|
143
|
+
productCategory?: ProductCategoryBE;
|
|
144
|
+
productCategoryId: string;
|
|
145
|
+
quantity: string;
|
|
146
|
+
ref?: string;
|
|
147
|
+
salePrice: string;
|
|
37
148
|
}
|
|
38
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Company entity
|
|
151
|
+
*/
|
|
152
|
+
export interface CompanyBE extends TimestampFields {
|
|
39
153
|
contacts: Array<ContactBE>;
|
|
40
154
|
country: string;
|
|
41
|
-
createdAt: string;
|
|
42
155
|
email: string;
|
|
43
156
|
id: string;
|
|
44
157
|
name: string;
|
|
45
|
-
phone:
|
|
158
|
+
phone: string;
|
|
46
159
|
quotesInvoices: Array<QuoteInvoiceBE>;
|
|
47
|
-
|
|
48
|
-
website: boolean;
|
|
160
|
+
website?: string;
|
|
49
161
|
}
|
|
50
|
-
|
|
51
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Contact entity (associated with a company)
|
|
164
|
+
*/
|
|
165
|
+
export interface ContactBE extends TimestampFields {
|
|
166
|
+
company?: CompanyBE;
|
|
167
|
+
companyId: string;
|
|
52
168
|
country: string;
|
|
53
|
-
createdAt: string;
|
|
54
169
|
email: string;
|
|
55
170
|
firstName: string;
|
|
56
171
|
id: string;
|
|
57
172
|
lastName: string;
|
|
58
173
|
phone: string;
|
|
59
|
-
updatedAt: string;
|
|
60
174
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
isDefault: boolean;
|
|
67
|
-
label: string;
|
|
68
|
-
preference: PreferenceBE;
|
|
69
|
-
updatedAt: string;
|
|
70
|
-
preferenceId: string;
|
|
71
|
-
}
|
|
72
|
-
export interface CustomerBE {
|
|
73
|
-
address: string;
|
|
175
|
+
/**
|
|
176
|
+
* Customer entity
|
|
177
|
+
*/
|
|
178
|
+
export interface CustomerBE extends TimestampFields {
|
|
179
|
+
address?: string;
|
|
74
180
|
city: string;
|
|
75
181
|
country: string;
|
|
76
|
-
|
|
77
|
-
email: string;
|
|
182
|
+
email?: string;
|
|
78
183
|
firstName: string;
|
|
79
184
|
id: string;
|
|
80
185
|
invoices: Array<QuoteInvoiceBE>;
|
|
81
186
|
lastName: string;
|
|
82
187
|
phone: string;
|
|
83
|
-
updatedAt: string;
|
|
84
188
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
189
|
+
/**
|
|
190
|
+
* Expense category entity
|
|
191
|
+
*/
|
|
192
|
+
export interface ExpenseCategoryBE extends TimestampFields {
|
|
193
|
+
color: string;
|
|
194
|
+
description?: string;
|
|
195
|
+
expenses: Array<ExpenseBE>;
|
|
90
196
|
id: string;
|
|
91
197
|
name: string;
|
|
92
|
-
ref: string;
|
|
93
|
-
total: string;
|
|
94
|
-
updatedAt: string;
|
|
95
198
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Expense entity
|
|
201
|
+
*/
|
|
202
|
+
export interface ExpenseBE extends TimestampFields {
|
|
203
|
+
currency: string;
|
|
99
204
|
description: string;
|
|
100
|
-
|
|
205
|
+
expenseCategory?: ExpenseCategoryBE;
|
|
206
|
+
expenseCategoryId: string;
|
|
101
207
|
id: string;
|
|
102
208
|
name: string;
|
|
103
|
-
|
|
209
|
+
ref?: string;
|
|
210
|
+
total: string;
|
|
104
211
|
}
|
|
105
|
-
|
|
106
|
-
|
|
212
|
+
/**
|
|
213
|
+
* Quote/Invoice entity
|
|
214
|
+
*/
|
|
215
|
+
export interface QuoteInvoiceBE extends TimestampFields {
|
|
216
|
+
category: QUOTE_INVOICE_CATEGORY;
|
|
217
|
+
company?: CompanyBE;
|
|
218
|
+
companyId?: string;
|
|
219
|
+
currency: string;
|
|
220
|
+
customer?: CustomerBE;
|
|
221
|
+
customerId?: string;
|
|
222
|
+
date: string;
|
|
223
|
+
discount?: string;
|
|
224
|
+
discountUnit: DISCOUNT_UNIT;
|
|
225
|
+
expiryDate: string;
|
|
107
226
|
id: string;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
227
|
+
invoiceStatus: INVOICE_STATUS;
|
|
228
|
+
note: string;
|
|
229
|
+
payments: Array<PaymentBE>;
|
|
230
|
+
products: Array<ProductBE>;
|
|
231
|
+
quoteStatus: QUOTE_STATUS;
|
|
232
|
+
ref: string;
|
|
233
|
+
services: Array<ServiceBE>;
|
|
234
|
+
subTotal: string;
|
|
235
|
+
taxRate: string;
|
|
236
|
+
total: string;
|
|
113
237
|
}
|
|
114
|
-
|
|
115
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Service entity (for quotes/invoices)
|
|
240
|
+
*/
|
|
241
|
+
export interface ServiceBE extends TimestampFields {
|
|
242
|
+
description?: string;
|
|
116
243
|
id: string;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
244
|
+
name: string;
|
|
245
|
+
price: string;
|
|
246
|
+
quantity: string;
|
|
247
|
+
quoteInvoice?: QuoteInvoiceBE;
|
|
248
|
+
quoteInvoiceId: string;
|
|
122
249
|
}
|
|
123
|
-
|
|
250
|
+
/**
|
|
251
|
+
* Payment entity
|
|
252
|
+
*/
|
|
253
|
+
export interface PaymentBE extends TimestampFields {
|
|
124
254
|
amount: string;
|
|
125
|
-
attachment
|
|
126
|
-
|
|
255
|
+
attachment?: string;
|
|
256
|
+
balance: string;
|
|
127
257
|
currency: string;
|
|
128
258
|
date: string;
|
|
129
|
-
description
|
|
130
|
-
id: string;
|
|
131
|
-
mode: 'BANK TRANSFER' | 'CASH' | 'CHEQUE' | 'OTHER';
|
|
132
|
-
paymentType: 'FULL_AMOUNT' | 'PARTIAL_AMOUNT';
|
|
133
|
-
quoteInvoice: QuoteInvoiceBE;
|
|
134
|
-
ref: string;
|
|
135
|
-
updatedAt: string;
|
|
136
|
-
}
|
|
137
|
-
export interface PaymentModeBE {
|
|
138
|
-
createdAt: string;
|
|
139
|
-
enabled: boolean;
|
|
259
|
+
description?: string;
|
|
140
260
|
id: string;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
261
|
+
paymentMode?: PaymentModeBE;
|
|
262
|
+
paymentModeId: string;
|
|
263
|
+
paymentType: PAYMENT_TYPE;
|
|
264
|
+
quoteInvoice?: QuoteInvoiceBE;
|
|
265
|
+
quoteInvoiceId: string;
|
|
266
|
+
ref?: string;
|
|
146
267
|
}
|
|
147
|
-
|
|
268
|
+
/**
|
|
269
|
+
* User preferences and settings entity
|
|
270
|
+
*/
|
|
271
|
+
export interface PreferenceBE extends TimestampFields {
|
|
148
272
|
banks: Array<BankBE>;
|
|
149
273
|
branches: Array<BranchBE>;
|
|
150
|
-
createdAt: string;
|
|
151
274
|
currencies: Array<CurrencyBE>;
|
|
152
275
|
id: string;
|
|
153
276
|
menuOrder: Array<MenuOrderBE>;
|
|
154
277
|
onboarding: boolean;
|
|
155
278
|
paymentModes: Array<PaymentModeBE>;
|
|
156
279
|
taxes: Array<TaxBE>;
|
|
157
|
-
updatedAt: string;
|
|
158
280
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
currency: string;
|
|
164
|
-
description: string;
|
|
281
|
+
/**
|
|
282
|
+
* Menu order configuration entity
|
|
283
|
+
*/
|
|
284
|
+
export interface MenuOrderBE extends TimestampFields {
|
|
165
285
|
id: string;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
quantity: string;
|
|
171
|
-
ref: string;
|
|
172
|
-
salePrice: string;
|
|
173
|
-
updatedAt: string;
|
|
286
|
+
label: string;
|
|
287
|
+
order: number;
|
|
288
|
+
preference?: PreferenceBE;
|
|
289
|
+
preferenceId: string;
|
|
174
290
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
updatedAt: string;
|
|
291
|
+
/**
|
|
292
|
+
* Payment mode entity
|
|
293
|
+
*/
|
|
294
|
+
export interface PaymentModeBE extends PreferenceRelatedFields {
|
|
295
|
+
label: string;
|
|
296
|
+
payments: Array<PaymentBE>;
|
|
182
297
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
location: string;
|
|
194
|
-
phone: string;
|
|
195
|
-
skill: string;
|
|
196
|
-
updatedAt: string;
|
|
197
|
-
userId: string;
|
|
298
|
+
/**
|
|
299
|
+
* Bank account entity
|
|
300
|
+
*/
|
|
301
|
+
export interface BankBE extends PreferenceRelatedFields {
|
|
302
|
+
accountNumber: string;
|
|
303
|
+
accountTitle: string;
|
|
304
|
+
bankAddress?: string;
|
|
305
|
+
bankName: string;
|
|
306
|
+
iban?: string;
|
|
307
|
+
swiftCode?: string;
|
|
198
308
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
date: string;
|
|
206
|
-
discount: string;
|
|
207
|
-
discountUnit: string;
|
|
208
|
-
expiryDate: string;
|
|
209
|
-
id: string;
|
|
210
|
-
invoiceStatus: 'UNPAID' | 'PAID';
|
|
211
|
-
note: string;
|
|
212
|
-
payments: Array<PaymentBE>;
|
|
213
|
-
products: Array<ProductBE>;
|
|
214
|
-
quoteStatus: 'DRAFT' | 'PENDING' | 'SENT' | 'ACCEPTED' | 'DECLINED';
|
|
215
|
-
ref: string;
|
|
216
|
-
services: Array<ServiceBE>;
|
|
217
|
-
subTotal: string;
|
|
309
|
+
/**
|
|
310
|
+
* Tax configuration entity
|
|
311
|
+
*/
|
|
312
|
+
export interface TaxBE extends PreferenceRelatedFields {
|
|
313
|
+
description?: string;
|
|
314
|
+
taxName: string;
|
|
218
315
|
taxRate: string;
|
|
219
|
-
total: string;
|
|
220
|
-
updatedAt: string;
|
|
221
316
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
317
|
+
/**
|
|
318
|
+
* Branch/Location entity
|
|
319
|
+
*/
|
|
320
|
+
export interface BranchBE extends PreferenceRelatedFields {
|
|
321
|
+
branchAddress: string;
|
|
322
|
+
branchName: string;
|
|
323
|
+
personEmail: string;
|
|
324
|
+
personName: string;
|
|
325
|
+
personPhone: string;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Currency entity
|
|
329
|
+
*/
|
|
330
|
+
export interface CurrencyBE extends PreferenceRelatedFields {
|
|
331
|
+
code: string;
|
|
332
|
+
label: string;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Lead entity for CRM
|
|
336
|
+
*/
|
|
337
|
+
export interface LeadBE extends TimestampFields {
|
|
226
338
|
id: string;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
updatedAt: string;
|
|
232
|
-
preferenceId: string;
|
|
339
|
+
notes?: string;
|
|
340
|
+
source: LEAD_SOURCE;
|
|
341
|
+
status: LEAD_STATUS;
|
|
342
|
+
type: LEAD_TYPE;
|
|
233
343
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Request form submission entity
|
|
346
|
+
*/
|
|
347
|
+
export interface RequestFormBE extends TimestampFields {
|
|
348
|
+
businessType: string;
|
|
349
|
+
companyName: string;
|
|
350
|
+
companySize?: string;
|
|
351
|
+
designation: string;
|
|
352
|
+
firstName: string;
|
|
353
|
+
headOffice?: string;
|
|
237
354
|
id: string;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
quoteInvoiceId: string;
|
|
243
|
-
updatedAt: string;
|
|
355
|
+
lastName: string;
|
|
356
|
+
phoneNumber: string;
|
|
357
|
+
website?: string;
|
|
358
|
+
workEmail: string;
|
|
244
359
|
}
|
|
@@ -1,3 +1,95 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// ENUMS
|
|
4
|
+
// ============================================================================
|
|
3
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LEAD_TYPE = exports.LEAD_STATUS = exports.LEAD_SOURCE = exports.PAYMENT_TYPE = exports.QUOTE_STATUS = exports.INVOICE_STATUS = exports.DISCOUNT_UNIT = exports.QUOTE_INVOICE_CATEGORY = exports.GENDER = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Gender options for user profiles
|
|
9
|
+
*/
|
|
10
|
+
var GENDER;
|
|
11
|
+
(function (GENDER) {
|
|
12
|
+
GENDER["MALE"] = "MALE";
|
|
13
|
+
GENDER["FEMALE"] = "FEMALE";
|
|
14
|
+
})(GENDER || (exports.GENDER = GENDER = {}));
|
|
15
|
+
/**
|
|
16
|
+
* Quote and Invoice category types
|
|
17
|
+
*/
|
|
18
|
+
var QUOTE_INVOICE_CATEGORY;
|
|
19
|
+
(function (QUOTE_INVOICE_CATEGORY) {
|
|
20
|
+
QUOTE_INVOICE_CATEGORY["QUOTE"] = "QUOTE";
|
|
21
|
+
QUOTE_INVOICE_CATEGORY["INVOICE"] = "INVOICE";
|
|
22
|
+
})(QUOTE_INVOICE_CATEGORY || (exports.QUOTE_INVOICE_CATEGORY = QUOTE_INVOICE_CATEGORY = {}));
|
|
23
|
+
/**
|
|
24
|
+
* Discount unit types (fixed amount or percentage)
|
|
25
|
+
*/
|
|
26
|
+
var DISCOUNT_UNIT;
|
|
27
|
+
(function (DISCOUNT_UNIT) {
|
|
28
|
+
DISCOUNT_UNIT["FIXED_VALUE"] = "FIXED_VALUE";
|
|
29
|
+
DISCOUNT_UNIT["PERCENTAGE_VALUE"] = "PERCENTAGE_VALUE";
|
|
30
|
+
})(DISCOUNT_UNIT || (exports.DISCOUNT_UNIT = DISCOUNT_UNIT = {}));
|
|
31
|
+
/**
|
|
32
|
+
* Invoice payment status
|
|
33
|
+
*/
|
|
34
|
+
var INVOICE_STATUS;
|
|
35
|
+
(function (INVOICE_STATUS) {
|
|
36
|
+
INVOICE_STATUS["UNPAID"] = "UNPAID";
|
|
37
|
+
INVOICE_STATUS["PAID"] = "PAID";
|
|
38
|
+
})(INVOICE_STATUS || (exports.INVOICE_STATUS = INVOICE_STATUS = {}));
|
|
39
|
+
/**
|
|
40
|
+
* Quote lifecycle status
|
|
41
|
+
*/
|
|
42
|
+
var QUOTE_STATUS;
|
|
43
|
+
(function (QUOTE_STATUS) {
|
|
44
|
+
QUOTE_STATUS["DRAFT"] = "DRAFT";
|
|
45
|
+
QUOTE_STATUS["PENDING"] = "PENDING";
|
|
46
|
+
QUOTE_STATUS["SENT"] = "SENT";
|
|
47
|
+
QUOTE_STATUS["ACCEPTED"] = "ACCEPTED";
|
|
48
|
+
QUOTE_STATUS["DECLINED"] = "DECLINED";
|
|
49
|
+
})(QUOTE_STATUS || (exports.QUOTE_STATUS = QUOTE_STATUS = {}));
|
|
50
|
+
/**
|
|
51
|
+
* Payment type (full or partial)
|
|
52
|
+
*/
|
|
53
|
+
var PAYMENT_TYPE;
|
|
54
|
+
(function (PAYMENT_TYPE) {
|
|
55
|
+
PAYMENT_TYPE["FULL_AMOUNT"] = "FULL_AMOUNT";
|
|
56
|
+
PAYMENT_TYPE["PARTIAL_AMOUNT"] = "PARTIAL_AMOUNT";
|
|
57
|
+
})(PAYMENT_TYPE || (exports.PAYMENT_TYPE = PAYMENT_TYPE = {}));
|
|
58
|
+
/**
|
|
59
|
+
* Lead source options
|
|
60
|
+
*/
|
|
61
|
+
var LEAD_SOURCE;
|
|
62
|
+
(function (LEAD_SOURCE) {
|
|
63
|
+
LEAD_SOURCE["ADVERTISING"] = "ADVERTISING";
|
|
64
|
+
LEAD_SOURCE["CUSTOMER_REFERRAL"] = "CUSTOMER_REFERRAL";
|
|
65
|
+
LEAD_SOURCE["FRIEND"] = "FRIEND";
|
|
66
|
+
LEAD_SOURCE["LINKEDIN"] = "LINKEDIN";
|
|
67
|
+
LEAD_SOURCE["OTHER"] = "OTHER";
|
|
68
|
+
LEAD_SOURCE["PROFESSIONAL_NETWORK"] = "PROFESSIONAL_NETWORK";
|
|
69
|
+
LEAD_SOURCE["SALES"] = "SALES";
|
|
70
|
+
LEAD_SOURCE["SOCIAL_MEDIA"] = "SOCIAL_MEDIA";
|
|
71
|
+
LEAD_SOURCE["WEBSITE"] = "WEBSITE";
|
|
72
|
+
})(LEAD_SOURCE || (exports.LEAD_SOURCE = LEAD_SOURCE = {}));
|
|
73
|
+
/**
|
|
74
|
+
* Lead status options
|
|
75
|
+
*/
|
|
76
|
+
var LEAD_STATUS;
|
|
77
|
+
(function (LEAD_STATUS) {
|
|
78
|
+
LEAD_STATUS["ASSIGNED"] = "ASSIGNED";
|
|
79
|
+
LEAD_STATUS["CANCELLED"] = "CANCELLED";
|
|
80
|
+
LEAD_STATUS["DRAFT"] = "DRAFT";
|
|
81
|
+
LEAD_STATUS["IN_NEGOTIATION"] = "IN_NEGOTIATION";
|
|
82
|
+
LEAD_STATUS["LOOSE"] = "LOOSE";
|
|
83
|
+
LEAD_STATUS["NEW"] = "NEW";
|
|
84
|
+
LEAD_STATUS["ON_HOLD"] = "ON_HOLD";
|
|
85
|
+
LEAD_STATUS["WAITING"] = "WAITING";
|
|
86
|
+
LEAD_STATUS["WON"] = "WON";
|
|
87
|
+
})(LEAD_STATUS || (exports.LEAD_STATUS = LEAD_STATUS = {}));
|
|
88
|
+
/**
|
|
89
|
+
* Lead type (company or contact)
|
|
90
|
+
*/
|
|
91
|
+
var LEAD_TYPE;
|
|
92
|
+
(function (LEAD_TYPE) {
|
|
93
|
+
LEAD_TYPE["COMPANY"] = "COMPANY";
|
|
94
|
+
LEAD_TYPE["CONTACT"] = "CONTACT";
|
|
95
|
+
})(LEAD_TYPE || (exports.LEAD_TYPE = LEAD_TYPE = {}));
|