@react-pakistan/util-functions 1.22.39 → 1.22.41
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/api/stellar-solutions/app-user/index.d.ts +1 -8
- package/api/stellar-solutions/banking-detail/index.d.ts +1 -12
- package/api/stellar-solutions/branch/index.d.ts +2 -13
- package/api/stellar-solutions/company/index.d.ts +1 -9
- package/api/stellar-solutions/company/index.js +1 -1
- package/api/stellar-solutions/contact/index.d.ts +1 -11
- package/api/stellar-solutions/currency/index.d.ts +1 -10
- package/api/stellar-solutions/customer/index.d.ts +10 -12
- package/api/stellar-solutions/customer/index.js +21 -4
- package/api/stellar-solutions/expense/index.d.ts +36 -0
- package/api/stellar-solutions/expense/index.js +91 -0
- package/api/stellar-solutions/expense-category/index.d.ts +33 -0
- package/api/stellar-solutions/expense-category/index.js +85 -0
- package/api/stellar-solutions/lead/index.d.ts +34 -0
- package/api/stellar-solutions/lead/index.js +87 -0
- package/api/stellar-solutions/menu-order/index.d.ts +24 -0
- package/api/stellar-solutions/menu-order/index.js +59 -0
- package/api/stellar-solutions/payment/index.d.ts +30 -0
- package/api/stellar-solutions/payment/index.js +71 -0
- package/api/stellar-solutions/payment-mode/index.d.ts +22 -0
- package/api/stellar-solutions/payment-mode/index.js +52 -0
- package/api/stellar-solutions/preference/index.d.ts +5 -0
- package/api/stellar-solutions/preference/index.js +30 -0
- package/api/stellar-solutions/product/index.d.ts +41 -0
- package/api/stellar-solutions/product/index.js +100 -0
- package/api/stellar-solutions/product-category/index.d.ts +32 -0
- package/api/stellar-solutions/product-category/index.js +80 -0
- package/api/stellar-solutions/profile/index.d.ts +46 -0
- package/api/stellar-solutions/profile/index.js +101 -0
- package/api/stellar-solutions/quote-invoice/index.d.ts +54 -0
- package/api/stellar-solutions/quote-invoice/index.js +214 -0
- package/api/stellar-solutions/tax/index.d.ts +27 -0
- package/api/stellar-solutions/tax/index.js +65 -0
- package/api/stellar-solutions/type.d.ts +226 -0
- package/api/stellar-solutions/type.js +3 -0
- package/index.d.ts +13 -1
- package/index.js +13 -1
- package/package.json +1 -1
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, no-restricted-globals, @typescript-eslint/array-type */
|
|
3
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
8
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
9
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.DeleteQuoteInvoice = exports.postQuoteInvoice = exports.postQuotesInvoices = exports.getQuoteInvoiceById = exports.getQuotesInvoices = void 0;
|
|
14
|
+
const getQuotesInvoices = (_a) => __awaiter(void 0, [_a], void 0, function* ({ prisma, }) {
|
|
15
|
+
const quotesInvoices = yield prisma.stellarQuoteInvoice.findMany({
|
|
16
|
+
orderBy: {
|
|
17
|
+
createdAt: 'desc',
|
|
18
|
+
},
|
|
19
|
+
include: {
|
|
20
|
+
company: true,
|
|
21
|
+
customer: true,
|
|
22
|
+
payments: true,
|
|
23
|
+
products: true,
|
|
24
|
+
services: true,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
return quotesInvoices;
|
|
28
|
+
});
|
|
29
|
+
exports.getQuotesInvoices = getQuotesInvoices;
|
|
30
|
+
const getQuoteInvoiceById = (_b) => __awaiter(void 0, [_b], void 0, function* ({ prisma, id, }) {
|
|
31
|
+
const quoteInvoice = yield prisma.stellarQuoteInvoice.findUnique({
|
|
32
|
+
where: {
|
|
33
|
+
id,
|
|
34
|
+
},
|
|
35
|
+
include: {
|
|
36
|
+
company: true,
|
|
37
|
+
customer: true,
|
|
38
|
+
payments: true,
|
|
39
|
+
products: true,
|
|
40
|
+
services: true,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
return quoteInvoice;
|
|
44
|
+
});
|
|
45
|
+
exports.getQuoteInvoiceById = getQuoteInvoiceById;
|
|
46
|
+
const postQuotesInvoices = (_c) => __awaiter(void 0, [_c], void 0, function* ({ currentPage, pageLimit, prisma, queryWhere, }) {
|
|
47
|
+
const quotesInvoices = yield prisma.$transaction([
|
|
48
|
+
prisma.stellarQuoteInvoice.count({
|
|
49
|
+
where: queryWhere,
|
|
50
|
+
}),
|
|
51
|
+
prisma.stellarQuoteInvoice.findMany({
|
|
52
|
+
orderBy: {
|
|
53
|
+
createdAt: 'desc',
|
|
54
|
+
},
|
|
55
|
+
where: queryWhere,
|
|
56
|
+
take: pageLimit,
|
|
57
|
+
skip: currentPage === 1 ? 0 : currentPage - 1 * pageLimit,
|
|
58
|
+
}),
|
|
59
|
+
]);
|
|
60
|
+
return quotesInvoices;
|
|
61
|
+
});
|
|
62
|
+
exports.postQuotesInvoices = postQuotesInvoices;
|
|
63
|
+
const postQuoteInvoice = (_d) => __awaiter(void 0, [_d], void 0, function* ({ category, companyId, currency, customerId, date, discount, discountUnit, expiryDate, id, mode, note, ref, services, status, subTotal, taxValue, total, productIds, phone, lastName, firstName, email, country, city, address, prisma, }) {
|
|
64
|
+
let quoteInvoice;
|
|
65
|
+
if (mode === 'Create') {
|
|
66
|
+
const mappedServices = services.map((item) => {
|
|
67
|
+
const itemToReturn = Object.assign({}, item);
|
|
68
|
+
delete itemToReturn.mode;
|
|
69
|
+
return itemToReturn;
|
|
70
|
+
});
|
|
71
|
+
if (customerId || companyId) {
|
|
72
|
+
quoteInvoice = yield prisma.stellarQuoteInvoice.create({
|
|
73
|
+
data: {
|
|
74
|
+
category,
|
|
75
|
+
companyId,
|
|
76
|
+
currency,
|
|
77
|
+
customerId,
|
|
78
|
+
date,
|
|
79
|
+
discount,
|
|
80
|
+
discountUnit,
|
|
81
|
+
expiryDate,
|
|
82
|
+
note,
|
|
83
|
+
ref,
|
|
84
|
+
status,
|
|
85
|
+
subTotal,
|
|
86
|
+
taxValue,
|
|
87
|
+
total,
|
|
88
|
+
services: {
|
|
89
|
+
createMany: {
|
|
90
|
+
data: mappedServices,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
include: {
|
|
95
|
+
products: true,
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
yield prisma.stellarQuotesInvoicesOnStellarProducts.create({
|
|
99
|
+
data: {
|
|
100
|
+
quoteInvoiceId: quoteInvoice.id,
|
|
101
|
+
productId: productIds[0].id,
|
|
102
|
+
},
|
|
103
|
+
include: {
|
|
104
|
+
product: true,
|
|
105
|
+
quoteInvoice: true,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
quoteInvoice = yield prisma.stellarQuoteInvoice.create({
|
|
111
|
+
data: {
|
|
112
|
+
category,
|
|
113
|
+
companyId,
|
|
114
|
+
currency,
|
|
115
|
+
customerId,
|
|
116
|
+
date,
|
|
117
|
+
discount,
|
|
118
|
+
discountUnit,
|
|
119
|
+
expiryDate,
|
|
120
|
+
note,
|
|
121
|
+
ref,
|
|
122
|
+
status,
|
|
123
|
+
subTotal,
|
|
124
|
+
taxValue,
|
|
125
|
+
total,
|
|
126
|
+
customer: {
|
|
127
|
+
create: {
|
|
128
|
+
address,
|
|
129
|
+
city,
|
|
130
|
+
country,
|
|
131
|
+
email,
|
|
132
|
+
firstName,
|
|
133
|
+
lastName,
|
|
134
|
+
phone,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
services: {
|
|
138
|
+
createMany: {
|
|
139
|
+
data: mappedServices,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (mode === 'Edit') {
|
|
147
|
+
try {
|
|
148
|
+
const foundQuoteInvoice = yield prisma.stellarQuoteInvoice.findUnique({
|
|
149
|
+
where: {
|
|
150
|
+
id,
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
const filteredEditServices = services.filter(({ mode: _mode }) => _mode === 'Edit');
|
|
154
|
+
const filteredCreateServices = services
|
|
155
|
+
.filter(({ mode: __mode }) => __mode === 'Create')
|
|
156
|
+
.map((item) => {
|
|
157
|
+
const toReturn = Object.assign({}, item);
|
|
158
|
+
delete toReturn.mode;
|
|
159
|
+
return (Object.assign(Object.assign({}, toReturn), { quoteInvoiceId: id }));
|
|
160
|
+
});
|
|
161
|
+
filteredEditServices.map((item) => __awaiter(void 0, void 0, void 0, function* () {
|
|
162
|
+
yield prisma.stellarService.update({
|
|
163
|
+
where: {
|
|
164
|
+
id: item.id,
|
|
165
|
+
},
|
|
166
|
+
data: {
|
|
167
|
+
description: item.description,
|
|
168
|
+
name: item.name,
|
|
169
|
+
price: item.price,
|
|
170
|
+
quantity: item.quantity,
|
|
171
|
+
quoteInvoiceId: item.quoteInvoiceId,
|
|
172
|
+
total: item.total,
|
|
173
|
+
},
|
|
174
|
+
});
|
|
175
|
+
}));
|
|
176
|
+
yield prisma.stellarService.createMany({
|
|
177
|
+
data: filteredCreateServices,
|
|
178
|
+
});
|
|
179
|
+
quoteInvoice = yield prisma.stellarQuoteInvoice.update({
|
|
180
|
+
where: {
|
|
181
|
+
id,
|
|
182
|
+
},
|
|
183
|
+
data: Object.assign(Object.assign({}, foundQuoteInvoice), { category,
|
|
184
|
+
companyId,
|
|
185
|
+
currency,
|
|
186
|
+
customerId,
|
|
187
|
+
date,
|
|
188
|
+
expiryDate,
|
|
189
|
+
note,
|
|
190
|
+
ref,
|
|
191
|
+
status,
|
|
192
|
+
subTotal,
|
|
193
|
+
taxValue,
|
|
194
|
+
total, products: {
|
|
195
|
+
connect: productIds,
|
|
196
|
+
} }),
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
catch (err) {
|
|
200
|
+
// console.log('err', err);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return quoteInvoice;
|
|
204
|
+
});
|
|
205
|
+
exports.postQuoteInvoice = postQuoteInvoice;
|
|
206
|
+
const DeleteQuoteInvoice = (_e) => __awaiter(void 0, [_e], void 0, function* ({ prisma, id, }) {
|
|
207
|
+
const quoteInvoice = yield prisma.stellarQuoteInvoice.delete({
|
|
208
|
+
where: {
|
|
209
|
+
id,
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
return quoteInvoice;
|
|
213
|
+
});
|
|
214
|
+
exports.DeleteQuoteInvoice = DeleteQuoteInvoice;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TaxBE } from '../type';
|
|
2
|
+
interface GetTaxesArgs {
|
|
3
|
+
prisma: any;
|
|
4
|
+
}
|
|
5
|
+
interface GetTaxByIdArgs {
|
|
6
|
+
id: string;
|
|
7
|
+
prisma: any;
|
|
8
|
+
}
|
|
9
|
+
interface PostTaxArgs {
|
|
10
|
+
description: string;
|
|
11
|
+
enabled: string;
|
|
12
|
+
id: string;
|
|
13
|
+
isDefault: string;
|
|
14
|
+
preferenceId: string;
|
|
15
|
+
taxName: string;
|
|
16
|
+
taxValue: string;
|
|
17
|
+
prisma: any;
|
|
18
|
+
}
|
|
19
|
+
interface DeleteTaxArgs {
|
|
20
|
+
prisma: any;
|
|
21
|
+
id: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const getTaxes: ({ prisma, }: GetTaxesArgs) => Promise<Array<TaxBE>>;
|
|
24
|
+
export declare const getTaxById: ({ prisma, id, }: GetTaxByIdArgs) => Promise<TaxBE>;
|
|
25
|
+
export declare const postTax: ({ description, enabled, id, isDefault, preferenceId, prisma, taxName, taxValue, }: PostTaxArgs) => Promise<Array<TaxBE>>;
|
|
26
|
+
export declare const deleteTax: ({ prisma, id, }: DeleteTaxArgs) => Promise<TaxBE>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, no-restricted-globals */
|
|
3
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
8
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
9
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.deleteTax = exports.postTax = exports.getTaxById = exports.getTaxes = void 0;
|
|
14
|
+
const getTaxes = (_a) => __awaiter(void 0, [_a], void 0, function* ({ prisma, }) {
|
|
15
|
+
const taxes = yield prisma.stellarTax.findMany({
|
|
16
|
+
orderBy: {
|
|
17
|
+
createdAt: 'desc',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
return taxes;
|
|
21
|
+
});
|
|
22
|
+
exports.getTaxes = getTaxes;
|
|
23
|
+
const getTaxById = (_b) => __awaiter(void 0, [_b], void 0, function* ({ prisma, id, }) {
|
|
24
|
+
const tax = yield prisma.stellarTax.findUnique({
|
|
25
|
+
where: {
|
|
26
|
+
id,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
return tax;
|
|
30
|
+
});
|
|
31
|
+
exports.getTaxById = getTaxById;
|
|
32
|
+
const postTax = (_c) => __awaiter(void 0, [_c], void 0, function* ({ description, enabled, id, isDefault, preferenceId, prisma, taxName, taxValue, }) {
|
|
33
|
+
const tax = yield prisma.stellarTax.upsert({
|
|
34
|
+
where: {
|
|
35
|
+
id,
|
|
36
|
+
},
|
|
37
|
+
update: {
|
|
38
|
+
description,
|
|
39
|
+
enabled,
|
|
40
|
+
isDefault,
|
|
41
|
+
preferenceId,
|
|
42
|
+
taxName,
|
|
43
|
+
taxValue,
|
|
44
|
+
},
|
|
45
|
+
create: {
|
|
46
|
+
description,
|
|
47
|
+
enabled,
|
|
48
|
+
isDefault,
|
|
49
|
+
preferenceId,
|
|
50
|
+
taxName,
|
|
51
|
+
taxValue,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
return tax;
|
|
55
|
+
});
|
|
56
|
+
exports.postTax = postTax;
|
|
57
|
+
const deleteTax = (_d) => __awaiter(void 0, [_d], void 0, function* ({ prisma, id, }) {
|
|
58
|
+
const tax = yield prisma.stellarTax.delete({
|
|
59
|
+
where: {
|
|
60
|
+
id,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
return tax;
|
|
64
|
+
});
|
|
65
|
+
exports.deleteTax = deleteTax;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
export interface AppUserBE {
|
|
2
|
+
createdAt: string;
|
|
3
|
+
email: string;
|
|
4
|
+
firstName: string;
|
|
5
|
+
id: string;
|
|
6
|
+
lastName: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BankingDetailBE {
|
|
10
|
+
accountNumber: string;
|
|
11
|
+
accountTitle: string;
|
|
12
|
+
bankAddress: string;
|
|
13
|
+
bankName: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
iban: string;
|
|
17
|
+
id: string;
|
|
18
|
+
idDefault: boolean;
|
|
19
|
+
preference: PreferenceBE;
|
|
20
|
+
swiftCode: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
}
|
|
23
|
+
export interface BranchBE {
|
|
24
|
+
branchAddress: string;
|
|
25
|
+
branchName: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
id: string;
|
|
29
|
+
isDefault: boolean;
|
|
30
|
+
personEmail: string;
|
|
31
|
+
personName: string;
|
|
32
|
+
personPhone: string;
|
|
33
|
+
preference: PreferenceBE;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
}
|
|
36
|
+
export interface CompanyBE {
|
|
37
|
+
contacts: Array<ContactBE>;
|
|
38
|
+
country: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
email: string;
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
phone: boolean;
|
|
44
|
+
quotesinvoices: Array<QuoteInvoiceBE>;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
website: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface ContactBE {
|
|
49
|
+
company: CompanyBE;
|
|
50
|
+
country: string;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
email: string;
|
|
53
|
+
firstName: string;
|
|
54
|
+
id: string;
|
|
55
|
+
lastName: string;
|
|
56
|
+
phone: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
}
|
|
59
|
+
export interface CurrencyBE {
|
|
60
|
+
code: 'PKR' | 'USD' | 'EUR' | 'GBP' | 'CAD';
|
|
61
|
+
createdAt: string;
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
id: string;
|
|
64
|
+
isDefault: string;
|
|
65
|
+
label: string;
|
|
66
|
+
preference: PreferenceBE;
|
|
67
|
+
updatedAt: string;
|
|
68
|
+
}
|
|
69
|
+
export interface CustomerBE {
|
|
70
|
+
address: string;
|
|
71
|
+
city: string;
|
|
72
|
+
country: string;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
email: string;
|
|
75
|
+
firstName: string;
|
|
76
|
+
id: string;
|
|
77
|
+
invoices: Array<QuoteInvoiceBE>;
|
|
78
|
+
lastName: string;
|
|
79
|
+
phone: string;
|
|
80
|
+
updatedAt: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ExpenseBE {
|
|
83
|
+
createdAt: string;
|
|
84
|
+
currency: string;
|
|
85
|
+
description: string;
|
|
86
|
+
expenseCategory: ExpenseCategoryBE;
|
|
87
|
+
id: string;
|
|
88
|
+
name: string;
|
|
89
|
+
ref: string;
|
|
90
|
+
total: string;
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
}
|
|
93
|
+
export interface ExpenseCategoryBE {
|
|
94
|
+
color: string;
|
|
95
|
+
createdAt: string;
|
|
96
|
+
description: string;
|
|
97
|
+
expenses: Array<ExpenseBE>;
|
|
98
|
+
id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
updatedAt: string;
|
|
101
|
+
}
|
|
102
|
+
export interface LeadBE {
|
|
103
|
+
createdAt: string;
|
|
104
|
+
id: string;
|
|
105
|
+
notes: string;
|
|
106
|
+
source: string;
|
|
107
|
+
status: string;
|
|
108
|
+
type: string;
|
|
109
|
+
updatedAt: string;
|
|
110
|
+
}
|
|
111
|
+
export interface MenuOrderBE {
|
|
112
|
+
createdAt: string;
|
|
113
|
+
id: string;
|
|
114
|
+
label: string;
|
|
115
|
+
order: number;
|
|
116
|
+
preference: PreferenceBE;
|
|
117
|
+
updatedAt: string;
|
|
118
|
+
}
|
|
119
|
+
export interface PaymentBE {
|
|
120
|
+
amount: string;
|
|
121
|
+
attachment: string;
|
|
122
|
+
createdAt: string;
|
|
123
|
+
currency: string;
|
|
124
|
+
date: string;
|
|
125
|
+
description: string;
|
|
126
|
+
id: string;
|
|
127
|
+
mode: 'BANK TRANSFER' | 'CASH' | 'CHEQUE' | 'OTHER';
|
|
128
|
+
paymentType: 'FULL_AMOUNT' | 'PARTIAL_AMOUNT';
|
|
129
|
+
quoteInvoice: QuoteInvoiceBE;
|
|
130
|
+
ref: string;
|
|
131
|
+
updatedAt: string;
|
|
132
|
+
}
|
|
133
|
+
export interface PaymentModeBE {
|
|
134
|
+
createdAt: string;
|
|
135
|
+
enabled: boolean;
|
|
136
|
+
id: string;
|
|
137
|
+
isDefault: boolean;
|
|
138
|
+
label: 'BANK_TRANSFER' | 'CASH' | 'CHEQUE' | 'OTHER';
|
|
139
|
+
preference: PreferenceBE;
|
|
140
|
+
updatedAt: string;
|
|
141
|
+
}
|
|
142
|
+
export interface PreferenceBE {
|
|
143
|
+
bankingDetails: Array<BankingDetailBE>;
|
|
144
|
+
branches: Array<BranchBE>;
|
|
145
|
+
createdAt: string;
|
|
146
|
+
currencies: Array<CurrencyBE>;
|
|
147
|
+
id: string;
|
|
148
|
+
menuOrder: Array<MenuOrderBE>;
|
|
149
|
+
onboarding: boolean;
|
|
150
|
+
paymentModes: Array<PaymentModeBE>;
|
|
151
|
+
taxes: Array<TaxBE>;
|
|
152
|
+
updatedAt: string;
|
|
153
|
+
}
|
|
154
|
+
export interface ProductBE {
|
|
155
|
+
authorName: string;
|
|
156
|
+
buyPrice: string;
|
|
157
|
+
createdAt: string;
|
|
158
|
+
currency: string;
|
|
159
|
+
description: string;
|
|
160
|
+
id: string;
|
|
161
|
+
image: string;
|
|
162
|
+
isbn: string;
|
|
163
|
+
name: string;
|
|
164
|
+
productCategoryId: string;
|
|
165
|
+
quantity: string;
|
|
166
|
+
ref: string;
|
|
167
|
+
salePrice: string;
|
|
168
|
+
updatedAt: string;
|
|
169
|
+
}
|
|
170
|
+
export interface ProductCategoryBE {
|
|
171
|
+
createdAt: string;
|
|
172
|
+
description: string;
|
|
173
|
+
id: string;
|
|
174
|
+
name: string;
|
|
175
|
+
products: Array<ProductBE>;
|
|
176
|
+
updatedAt: string;
|
|
177
|
+
}
|
|
178
|
+
export interface ProfileBE {
|
|
179
|
+
avatar: string;
|
|
180
|
+
createdAt: string;
|
|
181
|
+
dob: string;
|
|
182
|
+
email: string;
|
|
183
|
+
firstName: string;
|
|
184
|
+
gender: 'Male' | 'Female';
|
|
185
|
+
id: string;
|
|
186
|
+
language: string;
|
|
187
|
+
lastName: string;
|
|
188
|
+
location: string;
|
|
189
|
+
phone: string;
|
|
190
|
+
skill: string;
|
|
191
|
+
updatedAt: string;
|
|
192
|
+
userId: string;
|
|
193
|
+
}
|
|
194
|
+
export interface QuoteInvoiceBE {
|
|
195
|
+
category: 'Quote' | 'Invoice';
|
|
196
|
+
company: CompanyBE;
|
|
197
|
+
createdAt: string;
|
|
198
|
+
currency: string;
|
|
199
|
+
customer: CustomerBE;
|
|
200
|
+
date: string;
|
|
201
|
+
discount: string;
|
|
202
|
+
discountUnit: string;
|
|
203
|
+
expiryDate: string;
|
|
204
|
+
id: string;
|
|
205
|
+
note: string;
|
|
206
|
+
payments: Array<PaymentBE>;
|
|
207
|
+
ref: string;
|
|
208
|
+
services: Array<any>;
|
|
209
|
+
products: Array<ProductBE>;
|
|
210
|
+
status: 'DRAFT' | 'PENDING' | 'SENT' | 'ACCEPTED' | 'DECLINED';
|
|
211
|
+
subTotal: string;
|
|
212
|
+
taxValue: string;
|
|
213
|
+
total: string;
|
|
214
|
+
updatedAt: string;
|
|
215
|
+
}
|
|
216
|
+
export interface TaxBE {
|
|
217
|
+
createdAt: string;
|
|
218
|
+
description: string;
|
|
219
|
+
enabled: boolean;
|
|
220
|
+
id: string;
|
|
221
|
+
isDefault: boolean;
|
|
222
|
+
preference: PreferenceBE;
|
|
223
|
+
taxName: string;
|
|
224
|
+
taxValue: string;
|
|
225
|
+
updatedAt: string;
|
|
226
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './api/cors';
|
|
1
2
|
export * from './api/stellar-solutions/app-user';
|
|
2
3
|
export * from './api/stellar-solutions/banking-detail';
|
|
3
4
|
export * from './api/stellar-solutions/branch';
|
|
@@ -5,7 +6,18 @@ export * from './api/stellar-solutions/company';
|
|
|
5
6
|
export * from './api/stellar-solutions/contact';
|
|
6
7
|
export * from './api/stellar-solutions/currency';
|
|
7
8
|
export * from './api/stellar-solutions/customer';
|
|
8
|
-
export * from './api/
|
|
9
|
+
export * from './api/stellar-solutions/expense';
|
|
10
|
+
export * from './api/stellar-solutions/expense-category';
|
|
11
|
+
export * from './api/stellar-solutions/lead';
|
|
12
|
+
export * from './api/stellar-solutions/menu-order';
|
|
13
|
+
export * from './api/stellar-solutions/payment';
|
|
14
|
+
export * from './api/stellar-solutions/payment-mode';
|
|
15
|
+
export * from './api/stellar-solutions/preference';
|
|
16
|
+
export * from './api/stellar-solutions/product';
|
|
17
|
+
export * from './api/stellar-solutions/product-category';
|
|
18
|
+
export * from './api/stellar-solutions/profile';
|
|
19
|
+
export * from './api/stellar-solutions/quote-invoice';
|
|
20
|
+
export * from './api/stellar-solutions/tax';
|
|
9
21
|
export * from './constants';
|
|
10
22
|
export * from './general';
|
|
11
23
|
export * from './hooks';
|
package/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./api/cors"), exports);
|
|
17
18
|
__exportStar(require("./api/stellar-solutions/app-user"), exports);
|
|
18
19
|
__exportStar(require("./api/stellar-solutions/banking-detail"), exports);
|
|
19
20
|
__exportStar(require("./api/stellar-solutions/branch"), exports);
|
|
@@ -21,7 +22,18 @@ __exportStar(require("./api/stellar-solutions/company"), exports);
|
|
|
21
22
|
__exportStar(require("./api/stellar-solutions/contact"), exports);
|
|
22
23
|
__exportStar(require("./api/stellar-solutions/currency"), exports);
|
|
23
24
|
__exportStar(require("./api/stellar-solutions/customer"), exports);
|
|
24
|
-
__exportStar(require("./api/
|
|
25
|
+
__exportStar(require("./api/stellar-solutions/expense"), exports);
|
|
26
|
+
__exportStar(require("./api/stellar-solutions/expense-category"), exports);
|
|
27
|
+
__exportStar(require("./api/stellar-solutions/lead"), exports);
|
|
28
|
+
__exportStar(require("./api/stellar-solutions/menu-order"), exports);
|
|
29
|
+
__exportStar(require("./api/stellar-solutions/payment"), exports);
|
|
30
|
+
__exportStar(require("./api/stellar-solutions/payment-mode"), exports);
|
|
31
|
+
__exportStar(require("./api/stellar-solutions/preference"), exports);
|
|
32
|
+
__exportStar(require("./api/stellar-solutions/product"), exports);
|
|
33
|
+
__exportStar(require("./api/stellar-solutions/product-category"), exports);
|
|
34
|
+
__exportStar(require("./api/stellar-solutions/profile"), exports);
|
|
35
|
+
__exportStar(require("./api/stellar-solutions/quote-invoice"), exports);
|
|
36
|
+
__exportStar(require("./api/stellar-solutions/tax"), exports);
|
|
25
37
|
__exportStar(require("./constants"), exports);
|
|
26
38
|
__exportStar(require("./general"), exports);
|
|
27
39
|
__exportStar(require("./hooks"), exports);
|