@react-pakistan/util-functions 1.24.72 → 1.24.74
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.
|
@@ -9,12 +9,12 @@ export interface ListBankArgs {
|
|
|
9
9
|
prisma: PrismaClient;
|
|
10
10
|
searchQuery?: string;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface UnitBankByIdArgs {
|
|
13
13
|
id: string;
|
|
14
14
|
includePreference?: boolean;
|
|
15
15
|
prisma: PrismaClient;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface UpdateBankArgs {
|
|
18
18
|
accountNumber: string;
|
|
19
19
|
accountTitle: string;
|
|
20
20
|
bankAddress?: string;
|
|
@@ -39,16 +39,16 @@ export interface DeleteBankArgs {
|
|
|
39
39
|
export declare const listBank: ({ currentPage, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListBankArgs) => Promise<[number, Array<BankBE>]>;
|
|
40
40
|
/**
|
|
41
41
|
* Retrieves a single bank by ID
|
|
42
|
-
* @param {
|
|
42
|
+
* @param {UnitBankByIdArgs} args - Object containing prisma client and bank id
|
|
43
43
|
* @returns {Promise<BankBE | null>} Bank if found, null otherwise
|
|
44
44
|
*/
|
|
45
|
-
export declare const unitBankById: ({ id, includePreference, prisma, }:
|
|
45
|
+
export declare const unitBankById: ({ id, includePreference, prisma, }: UnitBankByIdArgs) => Promise<BankBE | null>;
|
|
46
46
|
/**
|
|
47
47
|
* Creates a new bank or updates an existing one
|
|
48
|
-
* @param {
|
|
48
|
+
* @param {UpdateBankArgs} args - Object containing prisma client and bank data
|
|
49
49
|
* @returns {Promise<BankBE>} Created or updated bank
|
|
50
50
|
*/
|
|
51
|
-
export declare const updateBank: ({ accountNumber, accountTitle, bankAddress, bankName, enabled, iban, id, isDefault, preferenceId, prisma, swiftCode, }:
|
|
51
|
+
export declare const updateBank: ({ accountNumber, accountTitle, bankAddress, bankName, enabled, iban, id, isDefault, preferenceId, prisma, swiftCode, }: UpdateBankArgs) => Promise<BankBE>;
|
|
52
52
|
/**
|
|
53
53
|
* Deletes a bank by ID
|
|
54
54
|
* @param {DeleteBankArgs} args - Object containing prisma client and bank id
|
|
@@ -114,7 +114,7 @@ var listBank = function (_a) { return __awaiter(void 0, [_a], void 0, function (
|
|
|
114
114
|
exports.listBank = listBank;
|
|
115
115
|
/**
|
|
116
116
|
* Retrieves a single bank by ID
|
|
117
|
-
* @param {
|
|
117
|
+
* @param {UnitBankByIdArgs} args - Object containing prisma client and bank id
|
|
118
118
|
* @returns {Promise<BankBE | null>} Bank if found, null otherwise
|
|
119
119
|
*/
|
|
120
120
|
var unitBankById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -143,7 +143,7 @@ var unitBankById = function (_a) { return __awaiter(void 0, [_a], void 0, functi
|
|
|
143
143
|
exports.unitBankById = unitBankById;
|
|
144
144
|
/**
|
|
145
145
|
* Creates a new bank or updates an existing one
|
|
146
|
-
* @param {
|
|
146
|
+
* @param {UpdateBankArgs} args - Object containing prisma client and bank data
|
|
147
147
|
* @returns {Promise<BankBE>} Created or updated bank
|
|
148
148
|
*/
|
|
149
149
|
var updateBank = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -168,7 +168,7 @@ var unitCustomerByPhone = function (_a) { return __awaiter(void 0, [_a], void 0,
|
|
|
168
168
|
throw new Error('Phone number is required');
|
|
169
169
|
}
|
|
170
170
|
include = {
|
|
171
|
-
|
|
171
|
+
quoteInvoices: includeQuotesInvoices,
|
|
172
172
|
};
|
|
173
173
|
where = { phone: phone };
|
|
174
174
|
return [4 /*yield*/, prisma.customer.findUnique({
|