@react-pakistan/util-functions 1.24.98 → 1.24.99
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 +9 -9
- package/api/stellar-solutions/app-user/index.js +4 -4
- package/api/stellar-solutions/bank/index.d.ts +9 -9
- package/api/stellar-solutions/bank/index.js +4 -4
- package/api/stellar-solutions/branch/index.d.ts +9 -9
- package/api/stellar-solutions/branch/index.js +4 -4
- package/api/stellar-solutions/company/index.d.ts +9 -9
- package/api/stellar-solutions/company/index.js +4 -4
- package/api/stellar-solutions/company-report/index.d.ts +3 -3
- package/api/stellar-solutions/company-report/index.js +1 -1
- package/api/stellar-solutions/constants.d.ts +9 -0
- package/api/stellar-solutions/constants.js +12 -0
- package/api/stellar-solutions/contact/index.d.ts +9 -9
- package/api/stellar-solutions/contact/index.js +4 -4
- package/api/stellar-solutions/currency/index.d.ts +9 -9
- package/api/stellar-solutions/currency/index.js +4 -4
- package/api/stellar-solutions/customer/index.d.ts +11 -11
- package/api/stellar-solutions/customer/index.js +5 -5
- package/api/stellar-solutions/expense/index.d.ts +9 -9
- package/api/stellar-solutions/expense/index.js +4 -4
- package/api/stellar-solutions/expense-category/index.d.ts +9 -9
- package/api/stellar-solutions/expense-category/index.js +4 -4
- package/api/stellar-solutions/lead/index.d.ts +9 -9
- package/api/stellar-solutions/lead/index.js +4 -4
- package/api/stellar-solutions/menu-order/index.d.ts +9 -9
- package/api/stellar-solutions/menu-order/index.js +4 -4
- package/api/stellar-solutions/payment/index.d.ts +9 -9
- package/api/stellar-solutions/payment/index.js +4 -4
- package/api/stellar-solutions/payment-mode/index.d.ts +9 -9
- package/api/stellar-solutions/payment-mode/index.js +4 -4
- package/api/stellar-solutions/preference/index.d.ts +5 -5
- package/api/stellar-solutions/preference/index.js +2 -2
- package/api/stellar-solutions/product/cache.d.ts +94 -0
- package/api/stellar-solutions/product/cache.js +280 -0
- package/api/stellar-solutions/product/index.d.ts +12 -14
- package/api/stellar-solutions/product/index.js +28 -12
- package/api/stellar-solutions/product-category/cache.d.ts +94 -0
- package/api/stellar-solutions/product-category/cache.js +280 -0
- package/api/stellar-solutions/product-category/index.d.ts +10 -10
- package/api/stellar-solutions/product-category/index.js +19 -4
- package/api/stellar-solutions/profile/index.d.ts +13 -13
- package/api/stellar-solutions/profile/index.js +6 -6
- package/api/stellar-solutions/quote-invoice/index.d.ts +9 -9
- package/api/stellar-solutions/quote-invoice/index.js +4 -4
- package/api/stellar-solutions/quote-invoice-report/index.d.ts +3 -3
- package/api/stellar-solutions/quote-invoice-report/index.js +1 -1
- package/api/stellar-solutions/tax/index.d.ts +9 -9
- package/api/stellar-solutions/tax/index.js +4 -4
- package/api/stellar-solutions/type.d.ts +49 -45
- package/api/stellar-solutions/type.js +6 -1
- package/index.d.ts +6 -5
- package/index.js +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AppUserTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListAppUserArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -26,26 +26,26 @@ export interface DeleteAppUserArgs {
|
|
|
26
26
|
/**
|
|
27
27
|
* Retrieves all app users from the database with pagination
|
|
28
28
|
* @param {ListAppUserArgs} args - Object containing prisma client, pagination, and query options
|
|
29
|
-
* @returns {Promise<[number, Array<
|
|
29
|
+
* @returns {Promise<[number, Array<AppUserTypeBE>]>} Tuple of [total count, array of app users]
|
|
30
30
|
*/
|
|
31
|
-
export declare const listAppUser: ({ currentPage, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListAppUserArgs) => Promise<[number, Array<
|
|
31
|
+
export declare const listAppUser: ({ currentPage, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListAppUserArgs) => Promise<[number, Array<AppUserTypeBE>]>;
|
|
32
32
|
/**
|
|
33
33
|
* Retrieves a single app user by ID
|
|
34
34
|
* @param {UnitAppUserByIdArgs} args - Object containing prisma client and user query
|
|
35
|
-
* @returns {Promise<
|
|
35
|
+
* @returns {Promise<AppUserTypeBE | null>} App user if found, null otherwise
|
|
36
36
|
*/
|
|
37
|
-
export declare const unitAppUserById: ({ id, prisma, }: UnitAppUserByIdArgs) => Promise<
|
|
37
|
+
export declare const unitAppUserById: ({ id, prisma, }: UnitAppUserByIdArgs) => Promise<AppUserTypeBE | null>;
|
|
38
38
|
/**
|
|
39
39
|
* Creates a new app user or updates an existing one
|
|
40
40
|
* @param {UpdateAppUserArgs} args - Object containing prisma client and user data
|
|
41
|
-
* @returns {Promise<
|
|
41
|
+
* @returns {Promise<AppUserTypeBE>} Created or updated app user
|
|
42
42
|
*/
|
|
43
|
-
export declare const updateAppUser: ({ email, firstName, id, lastName, prisma, }: UpdateAppUserArgs) => Promise<
|
|
43
|
+
export declare const updateAppUser: ({ email, firstName, id, lastName, prisma, }: UpdateAppUserArgs) => Promise<AppUserTypeBE>;
|
|
44
44
|
/**
|
|
45
45
|
* Deletes an app user by ID
|
|
46
46
|
* @param {DeleteAppUserArgs} args - Object containing prisma client and user query
|
|
47
|
-
* @returns {Promise<
|
|
47
|
+
* @returns {Promise<AppUserTypeBE>} Deleted app user
|
|
48
48
|
* @throws {Error} If user ID is not provided or user not found
|
|
49
49
|
*/
|
|
50
|
-
export declare const deleteAppUser: ({ id, prisma, }: DeleteAppUserArgs) => Promise<
|
|
50
|
+
export declare const deleteAppUser: ({ id, prisma, }: DeleteAppUserArgs) => Promise<AppUserTypeBE>;
|
|
51
51
|
export {};
|
|
@@ -61,7 +61,7 @@ var general_1 = require("../../../general");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves all app users from the database with pagination
|
|
63
63
|
* @param {ListAppUserArgs} args - Object containing prisma client, pagination, and query options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<AppUserTypeBE>]>} Tuple of [total count, array of app users]
|
|
65
65
|
*/
|
|
66
66
|
var listAppUser = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var orderBy, idSearchQuery, emailSearchQuery, firstNameSearchQuery, lastNameSearchQuery, where, _c, count, items;
|
|
@@ -119,7 +119,7 @@ exports.listAppUser = listAppUser;
|
|
|
119
119
|
/**
|
|
120
120
|
* Retrieves a single app user by ID
|
|
121
121
|
* @param {UnitAppUserByIdArgs} args - Object containing prisma client and user query
|
|
122
|
-
* @returns {Promise<
|
|
122
|
+
* @returns {Promise<AppUserTypeBE | null>} App user if found, null otherwise
|
|
123
123
|
*/
|
|
124
124
|
var unitAppUserById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
125
125
|
var where, appUser;
|
|
@@ -146,7 +146,7 @@ exports.unitAppUserById = unitAppUserById;
|
|
|
146
146
|
/**
|
|
147
147
|
* Creates a new app user or updates an existing one
|
|
148
148
|
* @param {UpdateAppUserArgs} args - Object containing prisma client and user data
|
|
149
|
-
* @returns {Promise<
|
|
149
|
+
* @returns {Promise<AppUserTypeBE>} Created or updated app user
|
|
150
150
|
*/
|
|
151
151
|
var updateAppUser = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
152
152
|
var userData, where, appUser;
|
|
@@ -183,7 +183,7 @@ exports.updateAppUser = updateAppUser;
|
|
|
183
183
|
/**
|
|
184
184
|
* Deletes an app user by ID
|
|
185
185
|
* @param {DeleteAppUserArgs} args - Object containing prisma client and user query
|
|
186
|
-
* @returns {Promise<
|
|
186
|
+
* @returns {Promise<AppUserTypeBE>} Deleted app user
|
|
187
187
|
* @throws {Error} If user ID is not provided or user not found
|
|
188
188
|
*/
|
|
189
189
|
var deleteAppUser = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BankTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListBankArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -34,26 +34,26 @@ export interface DeleteBankArgs {
|
|
|
34
34
|
/**
|
|
35
35
|
* Retrieves all banks from the database with pagination
|
|
36
36
|
* @param {ListBankArgs} args - Object containing prisma client, pagination, and filter options
|
|
37
|
-
* @returns {Promise<[number, Array<
|
|
37
|
+
* @returns {Promise<[number, Array<BankTypeBE>]>} Tuple of [total count, array of banks]
|
|
38
38
|
*/
|
|
39
|
-
export declare const listBank: ({ currentPage, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListBankArgs) => Promise<[number, Array<
|
|
39
|
+
export declare const listBank: ({ currentPage, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListBankArgs) => Promise<[number, Array<BankTypeBE>]>;
|
|
40
40
|
/**
|
|
41
41
|
* Retrieves a single bank by ID
|
|
42
42
|
* @param {UnitBankByIdArgs} args - Object containing prisma client and bank id
|
|
43
|
-
* @returns {Promise<
|
|
43
|
+
* @returns {Promise<BankTypeBE | null>} Bank if found, null otherwise
|
|
44
44
|
*/
|
|
45
|
-
export declare const unitBankById: ({ id, includePreference, prisma, }: UnitBankByIdArgs) => Promise<
|
|
45
|
+
export declare const unitBankById: ({ id, includePreference, prisma, }: UnitBankByIdArgs) => Promise<BankTypeBE | null>;
|
|
46
46
|
/**
|
|
47
47
|
* Creates a new bank or updates an existing one
|
|
48
48
|
* @param {UpdateBankArgs} args - Object containing prisma client and bank data
|
|
49
|
-
* @returns {Promise<
|
|
49
|
+
* @returns {Promise<BankTypeBE>} Created or updated bank
|
|
50
50
|
*/
|
|
51
|
-
export declare const updateBank: ({ accountNumber, accountTitle, bankAddress, bankName, enabled, iban, id, isDefault, preferenceId, prisma, swiftCode, }: UpdateBankArgs) => Promise<
|
|
51
|
+
export declare const updateBank: ({ accountNumber, accountTitle, bankAddress, bankName, enabled, iban, id, isDefault, preferenceId, prisma, swiftCode, }: UpdateBankArgs) => Promise<BankTypeBE>;
|
|
52
52
|
/**
|
|
53
53
|
* Deletes a bank by ID
|
|
54
54
|
* @param {DeleteBankArgs} args - Object containing prisma client and bank id
|
|
55
|
-
* @returns {Promise<
|
|
55
|
+
* @returns {Promise<BankTypeBE>} Deleted bank
|
|
56
56
|
* @throws {Error} If bank ID is not provided or bank not found
|
|
57
57
|
*/
|
|
58
|
-
export declare const deleteBank: ({ prisma, id, }: DeleteBankArgs) => Promise<
|
|
58
|
+
export declare const deleteBank: ({ prisma, id, }: DeleteBankArgs) => Promise<BankTypeBE>;
|
|
59
59
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves all banks from the database with pagination
|
|
63
63
|
* @param {ListBankArgs} args - Object containing prisma client, pagination, and filter options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<BankTypeBE>]>} Tuple of [total count, array of banks]
|
|
65
65
|
*/
|
|
66
66
|
var listBank = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var include, orderBy, idSearchQuery, bankNameSearchQuery, where, _c, count, items;
|
|
@@ -115,7 +115,7 @@ exports.listBank = listBank;
|
|
|
115
115
|
/**
|
|
116
116
|
* Retrieves a single bank by ID
|
|
117
117
|
* @param {UnitBankByIdArgs} args - Object containing prisma client and bank id
|
|
118
|
-
* @returns {Promise<
|
|
118
|
+
* @returns {Promise<BankTypeBE | null>} Bank if found, null otherwise
|
|
119
119
|
*/
|
|
120
120
|
var unitBankById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
121
121
|
var include, where, bank;
|
|
@@ -144,7 +144,7 @@ exports.unitBankById = unitBankById;
|
|
|
144
144
|
/**
|
|
145
145
|
* Creates a new bank or updates an existing one
|
|
146
146
|
* @param {UpdateBankArgs} args - Object containing prisma client and bank data
|
|
147
|
-
* @returns {Promise<
|
|
147
|
+
* @returns {Promise<BankTypeBE>} Created or updated bank
|
|
148
148
|
*/
|
|
149
149
|
var updateBank = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
150
150
|
var bankData, where, bank;
|
|
@@ -185,7 +185,7 @@ exports.updateBank = updateBank;
|
|
|
185
185
|
/**
|
|
186
186
|
* Deletes a bank by ID
|
|
187
187
|
* @param {DeleteBankArgs} args - Object containing prisma client and bank id
|
|
188
|
-
* @returns {Promise<
|
|
188
|
+
* @returns {Promise<BankTypeBE>} Deleted bank
|
|
189
189
|
* @throws {Error} If bank ID is not provided or bank not found
|
|
190
190
|
*/
|
|
191
191
|
var deleteBank = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BranchTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListBranchArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -33,26 +33,26 @@ export interface DeleteBranchArgs {
|
|
|
33
33
|
/**
|
|
34
34
|
* Retrieves all branches from the database with pagination
|
|
35
35
|
* @param {ListBranchArgs} args - Object containing prisma client, pagination, and filter options
|
|
36
|
-
* @returns {Promise<[number, Array<
|
|
36
|
+
* @returns {Promise<[number, Array<BranchTypeBE>]>} Tuple of [total count, array of branches]
|
|
37
37
|
*/
|
|
38
|
-
export declare const listBranch: ({ currentPage, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListBranchArgs) => Promise<[number, Array<
|
|
38
|
+
export declare const listBranch: ({ currentPage, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListBranchArgs) => Promise<[number, Array<BranchTypeBE>]>;
|
|
39
39
|
/**
|
|
40
40
|
* Retrieves a single branch by ID
|
|
41
41
|
* @param {UnitBranchByIdArgs} args - Object containing prisma client and branch id
|
|
42
|
-
* @returns {Promise<
|
|
42
|
+
* @returns {Promise<BranchTypeBE | null>} Branch if found, null otherwise
|
|
43
43
|
*/
|
|
44
|
-
export declare const unitBranchById: ({ prisma, id, }: UnitBranchByIdArgs) => Promise<
|
|
44
|
+
export declare const unitBranchById: ({ prisma, id, }: UnitBranchByIdArgs) => Promise<BranchTypeBE | null>;
|
|
45
45
|
/**
|
|
46
46
|
* Creates a new branch or updates an existing one
|
|
47
47
|
* @param {UpdateBranchArgs} args - Object containing prisma client and branch data
|
|
48
|
-
* @returns {Promise<
|
|
48
|
+
* @returns {Promise<BranchTypeBE>} Created or updated branch
|
|
49
49
|
*/
|
|
50
|
-
export declare const updateBranch: ({ branchAddress, branchName, enabled, id, isDefault, personEmail, personName, personPhone, preferenceId, prisma, }: UpdateBranchArgs) => Promise<
|
|
50
|
+
export declare const updateBranch: ({ branchAddress, branchName, enabled, id, isDefault, personEmail, personName, personPhone, preferenceId, prisma, }: UpdateBranchArgs) => Promise<BranchTypeBE>;
|
|
51
51
|
/**
|
|
52
52
|
* Deletes a branch by ID
|
|
53
53
|
* @param {DeleteBranchArgs} args - Object containing prisma client and branch id
|
|
54
|
-
* @returns {Promise<
|
|
54
|
+
* @returns {Promise<BranchTypeBE>} Deleted branch
|
|
55
55
|
* @throws {Error} If branch ID is not provided or branch not found
|
|
56
56
|
*/
|
|
57
|
-
export declare const deleteBranch: ({ id, prisma, }: DeleteBranchArgs) => Promise<
|
|
57
|
+
export declare const deleteBranch: ({ id, prisma, }: DeleteBranchArgs) => Promise<BranchTypeBE>;
|
|
58
58
|
export {};
|
|
@@ -61,7 +61,7 @@ var general_1 = require("../../../general");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves all branches from the database with pagination
|
|
63
63
|
* @param {ListBranchArgs} args - Object containing prisma client, pagination, and filter options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<BranchTypeBE>]>} Tuple of [total count, array of branches]
|
|
65
65
|
*/
|
|
66
66
|
var listBranch = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var include, orderBy, idSearchQuery, branchNameSearchQuery, personNameSearchQuery, personEmailSearchQuery, where, _c, count, items;
|
|
@@ -123,7 +123,7 @@ exports.listBranch = listBranch;
|
|
|
123
123
|
/**
|
|
124
124
|
* Retrieves a single branch by ID
|
|
125
125
|
* @param {UnitBranchByIdArgs} args - Object containing prisma client and branch id
|
|
126
|
-
* @returns {Promise<
|
|
126
|
+
* @returns {Promise<BranchTypeBE | null>} Branch if found, null otherwise
|
|
127
127
|
*/
|
|
128
128
|
var unitBranchById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
129
129
|
var where, branch;
|
|
@@ -148,7 +148,7 @@ exports.unitBranchById = unitBranchById;
|
|
|
148
148
|
/**
|
|
149
149
|
* Creates a new branch or updates an existing one
|
|
150
150
|
* @param {UpdateBranchArgs} args - Object containing prisma client and branch data
|
|
151
|
-
* @returns {Promise<
|
|
151
|
+
* @returns {Promise<BranchTypeBE>} Created or updated branch
|
|
152
152
|
*/
|
|
153
153
|
var updateBranch = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
154
154
|
var branchData, where, branch;
|
|
@@ -195,7 +195,7 @@ exports.updateBranch = updateBranch;
|
|
|
195
195
|
/**
|
|
196
196
|
* Deletes a branch by ID
|
|
197
197
|
* @param {DeleteBranchArgs} args - Object containing prisma client and branch id
|
|
198
|
-
* @returns {Promise<
|
|
198
|
+
* @returns {Promise<BranchTypeBE>} Deleted branch
|
|
199
199
|
* @throws {Error} If branch ID is not provided or branch not found
|
|
200
200
|
*/
|
|
201
201
|
var deleteBranch = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompanyTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListCompanyArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -32,26 +32,26 @@ export interface DeleteCompanyArgs {
|
|
|
32
32
|
/**
|
|
33
33
|
* Retrieves all companies from the database with pagination
|
|
34
34
|
* @param {ListCompanyArgs} args - Object containing prisma client, pagination, and filter options
|
|
35
|
-
* @returns {Promise<[number, Array<
|
|
35
|
+
* @returns {Promise<[number, Array<CompanyTypeBE>]>} Tuple of [total count, array of companies]
|
|
36
36
|
*/
|
|
37
|
-
export declare const listCompany: ({ currentPage, includeContacts, includeQuotesInvoices, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListCompanyArgs) => Promise<[number, Array<
|
|
37
|
+
export declare const listCompany: ({ currentPage, includeContacts, includeQuotesInvoices, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListCompanyArgs) => Promise<[number, Array<CompanyTypeBE>]>;
|
|
38
38
|
/**
|
|
39
39
|
* Retrieves a single company by ID
|
|
40
40
|
* @param {UnitCompanyByIdArgs} args - Object containing prisma client and company id
|
|
41
|
-
* @returns {Promise<
|
|
41
|
+
* @returns {Promise<CompanyTypeBE | null>} Company if found, null otherwise
|
|
42
42
|
*/
|
|
43
|
-
export declare const unitCompanyById: ({ id, includeContacts, includeQuotesInvoices, prisma, }: UnitCompanyByIdArgs) => Promise<
|
|
43
|
+
export declare const unitCompanyById: ({ id, includeContacts, includeQuotesInvoices, prisma, }: UnitCompanyByIdArgs) => Promise<CompanyTypeBE | null>;
|
|
44
44
|
/**
|
|
45
45
|
* Creates a new company or updates an existing one
|
|
46
46
|
* @param {UpdateCompanyArgs} args - Object containing prisma client and company data
|
|
47
|
-
* @returns {Promise<
|
|
47
|
+
* @returns {Promise<CompanyTypeBE>} Created or updated company
|
|
48
48
|
*/
|
|
49
|
-
export declare const updateCompany: ({ country, email, id, name, phone, prisma, website, }: UpdateCompanyArgs) => Promise<
|
|
49
|
+
export declare const updateCompany: ({ country, email, id, name, phone, prisma, website, }: UpdateCompanyArgs) => Promise<CompanyTypeBE>;
|
|
50
50
|
/**
|
|
51
51
|
* Deletes a company by ID
|
|
52
52
|
* @param {DeleteCompanyArgs} args - Object containing prisma client and company id
|
|
53
|
-
* @returns {Promise<
|
|
53
|
+
* @returns {Promise<CompanyTypeBE>} Deleted company
|
|
54
54
|
* @throws {Error} If company ID is not provided or company not found
|
|
55
55
|
*/
|
|
56
|
-
export declare const deleteCompany: ({ id, prisma, }: DeleteCompanyArgs) => Promise<
|
|
56
|
+
export declare const deleteCompany: ({ id, prisma, }: DeleteCompanyArgs) => Promise<CompanyTypeBE>;
|
|
57
57
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves all companies from the database with pagination
|
|
63
63
|
* @param {ListCompanyArgs} args - Object containing prisma client, pagination, and filter options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<CompanyTypeBE>]>} Tuple of [total count, array of companies]
|
|
65
65
|
*/
|
|
66
66
|
var listCompany = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var include, orderBy, idSearchQuery, nameSearchQuery, emailSearchQuery, where, _c, count, items;
|
|
@@ -120,7 +120,7 @@ exports.listCompany = listCompany;
|
|
|
120
120
|
/**
|
|
121
121
|
* Retrieves a single company by ID
|
|
122
122
|
* @param {UnitCompanyByIdArgs} args - Object containing prisma client and company id
|
|
123
|
-
* @returns {Promise<
|
|
123
|
+
* @returns {Promise<CompanyTypeBE | null>} Company if found, null otherwise
|
|
124
124
|
*/
|
|
125
125
|
var unitCompanyById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
126
126
|
var include, where, company;
|
|
@@ -152,7 +152,7 @@ exports.unitCompanyById = unitCompanyById;
|
|
|
152
152
|
/**
|
|
153
153
|
* Creates a new company or updates an existing one
|
|
154
154
|
* @param {UpdateCompanyArgs} args - Object containing prisma client and company data
|
|
155
|
-
* @returns {Promise<
|
|
155
|
+
* @returns {Promise<CompanyTypeBE>} Created or updated company
|
|
156
156
|
*/
|
|
157
157
|
var updateCompany = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
158
158
|
var companyData, where, company;
|
|
@@ -191,7 +191,7 @@ exports.updateCompany = updateCompany;
|
|
|
191
191
|
/**
|
|
192
192
|
* Deletes a company by ID
|
|
193
193
|
* @param {DeleteCompanyArgs} args - Object containing prisma client and company id
|
|
194
|
-
* @returns {Promise<
|
|
194
|
+
* @returns {Promise<CompanyTypeBE>} Deleted company
|
|
195
195
|
* @throws {Error} If company ID is not provided or company not found
|
|
196
196
|
*/
|
|
197
197
|
var deleteCompany = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompanyTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface PostCompaniesReportArgs {
|
|
4
4
|
orderByColumn?: string;
|
|
@@ -9,7 +9,7 @@ export interface PostCompaniesReportArgs {
|
|
|
9
9
|
* Retrieves companies report data with count and full list
|
|
10
10
|
* This is typically used for generating reports without pagination
|
|
11
11
|
* @param {PostCompaniesReportArgs} args - Object containing prisma client and ordering options
|
|
12
|
-
* @returns {Promise<[number, Array<
|
|
12
|
+
* @returns {Promise<[number, Array<CompanyTypeBE>]>} Tuple containing total count and array of all companies
|
|
13
13
|
*/
|
|
14
|
-
export declare const postCompaniesReport: ({ orderByColumn, orderByDirection, prisma, }: PostCompaniesReportArgs) => Promise<[number, Array<
|
|
14
|
+
export declare const postCompaniesReport: ({ orderByColumn, orderByDirection, prisma, }: PostCompaniesReportArgs) => Promise<[number, Array<CompanyTypeBE>]>;
|
|
15
15
|
export {};
|
|
@@ -41,7 +41,7 @@ exports.postCompaniesReport = void 0;
|
|
|
41
41
|
* Retrieves companies report data with count and full list
|
|
42
42
|
* This is typically used for generating reports without pagination
|
|
43
43
|
* @param {PostCompaniesReportArgs} args - Object containing prisma client and ordering options
|
|
44
|
-
* @returns {Promise<[number, Array<
|
|
44
|
+
* @returns {Promise<[number, Array<CompanyTypeBE>]>} Tuple containing total count and array of all companies
|
|
45
45
|
*/
|
|
46
46
|
var postCompaniesReport = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
47
47
|
var include, orderBy, where, _c, count, items;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_ROUTES = exports.ONE_DAY_IN_MS = void 0;
|
|
4
|
+
exports.ONE_DAY_IN_MS = 1 * 24 * 60 * 60 * 1000; // 1 day in milliseconds
|
|
5
|
+
exports.API_ROUTES = {
|
|
6
|
+
PRODUCT_BY_ID: '/api/product/product-by-id',
|
|
7
|
+
PRODUCT_CATEGORIES: '/api/product-categories',
|
|
8
|
+
PRODUCT_CATEGORY_BY_ID: '/api/product-category/product-category-by-id',
|
|
9
|
+
PRODUCT_CATEGORY: '/api/product-category',
|
|
10
|
+
PRODUCT: '/api/product',
|
|
11
|
+
PRODUCTS: '/api/products',
|
|
12
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ContactTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListContactArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -31,26 +31,26 @@ export interface DeleteContactArgs {
|
|
|
31
31
|
/**
|
|
32
32
|
* Retrieves contacts with pagination and filtering
|
|
33
33
|
* @param {ListContactArgs} args - Object containing prisma client, pagination, and query options
|
|
34
|
-
* @returns {Promise<[number, Array<
|
|
34
|
+
* @returns {Promise<[number, Array<ContactTypeBE>]>} Tuple containing total count and array of contacts
|
|
35
35
|
*/
|
|
36
|
-
export declare const listContact: ({ currentPage, includeCompany, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListContactArgs) => Promise<[number, Array<
|
|
36
|
+
export declare const listContact: ({ currentPage, includeCompany, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListContactArgs) => Promise<[number, Array<ContactTypeBE>]>;
|
|
37
37
|
/**
|
|
38
38
|
* Retrieves a single contact by ID
|
|
39
39
|
* @param {UnitContactByIdArgs} args - Object containing prisma client and query where conditions
|
|
40
|
-
* @returns {Promise<
|
|
40
|
+
* @returns {Promise<ContactTypeBE | null>} Contact if found, null otherwise
|
|
41
41
|
*/
|
|
42
|
-
export declare const unitContactById: ({ id, includeCompany, prisma, }: UnitContactByIdArgs) => Promise<
|
|
42
|
+
export declare const unitContactById: ({ id, includeCompany, prisma, }: UnitContactByIdArgs) => Promise<ContactTypeBE | null>;
|
|
43
43
|
/**
|
|
44
44
|
* Creates or updates a contact
|
|
45
45
|
* @param {UpdateContactArgs} args - Object containing prisma client and contact data
|
|
46
|
-
* @returns {Promise<
|
|
46
|
+
* @returns {Promise<ContactTypeBE>} Created or updated contact
|
|
47
47
|
*/
|
|
48
|
-
export declare const updateContact: ({ prisma, id, companyId, country, email, firstName, lastName, phone, }: UpdateContactArgs) => Promise<
|
|
48
|
+
export declare const updateContact: ({ prisma, id, companyId, country, email, firstName, lastName, phone, }: UpdateContactArgs) => Promise<ContactTypeBE>;
|
|
49
49
|
/**
|
|
50
50
|
* Deletes a contact by ID
|
|
51
51
|
* @param {DeleteContactArgs} args - Object containing prisma client and query where conditions
|
|
52
|
-
* @returns {Promise<
|
|
52
|
+
* @returns {Promise<ContactTypeBE>} Deleted contact
|
|
53
53
|
* @throws {Error} If contact ID is not provided or contact not found
|
|
54
54
|
*/
|
|
55
|
-
export declare const deleteContact: ({ id, prisma, }: DeleteContactArgs) => Promise<
|
|
55
|
+
export declare const deleteContact: ({ id, prisma, }: DeleteContactArgs) => Promise<ContactTypeBE>;
|
|
56
56
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves contacts with pagination and filtering
|
|
63
63
|
* @param {ListContactArgs} args - Object containing prisma client, pagination, and query options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<ContactTypeBE>]>} Tuple containing total count and array of contacts
|
|
65
65
|
*/
|
|
66
66
|
var listContact = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var include, orderBy, idSearchQuery, firstNameSearchQuery, lastNameSearchQuery, emailSearchQuery, where, _c, count, items;
|
|
@@ -123,7 +123,7 @@ exports.listContact = listContact;
|
|
|
123
123
|
/**
|
|
124
124
|
* Retrieves a single contact by ID
|
|
125
125
|
* @param {UnitContactByIdArgs} args - Object containing prisma client and query where conditions
|
|
126
|
-
* @returns {Promise<
|
|
126
|
+
* @returns {Promise<ContactTypeBE | null>} Contact if found, null otherwise
|
|
127
127
|
*/
|
|
128
128
|
var unitContactById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
129
129
|
var include, where, contact;
|
|
@@ -154,7 +154,7 @@ exports.unitContactById = unitContactById;
|
|
|
154
154
|
/**
|
|
155
155
|
* Creates or updates a contact
|
|
156
156
|
* @param {UpdateContactArgs} args - Object containing prisma client and contact data
|
|
157
|
-
* @returns {Promise<
|
|
157
|
+
* @returns {Promise<ContactTypeBE>} Created or updated contact
|
|
158
158
|
*/
|
|
159
159
|
var updateContact = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
160
160
|
var contactData, where, contact;
|
|
@@ -192,7 +192,7 @@ exports.updateContact = updateContact;
|
|
|
192
192
|
/**
|
|
193
193
|
* Deletes a contact by ID
|
|
194
194
|
* @param {DeleteContactArgs} args - Object containing prisma client and query where conditions
|
|
195
|
-
* @returns {Promise<
|
|
195
|
+
* @returns {Promise<ContactTypeBE>} Deleted contact
|
|
196
196
|
* @throws {Error} If contact ID is not provided or contact not found
|
|
197
197
|
*/
|
|
198
198
|
var deleteContact = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CurrencyTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListCurrencyArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -30,26 +30,26 @@ export interface DeleteCurrencyArgs {
|
|
|
30
30
|
/**
|
|
31
31
|
* Retrieves currencies with pagination and filtering
|
|
32
32
|
* @param {ListCurrencyArgs} args - Object containing prisma client, pagination, and query options
|
|
33
|
-
* @returns {Promise<[number, Array<
|
|
33
|
+
* @returns {Promise<[number, Array<CurrencyTypeBE>]>} Tuple containing total count and array of currencies
|
|
34
34
|
*/
|
|
35
|
-
export declare const listCurrency: ({ currentPage, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListCurrencyArgs) => Promise<[number, Array<
|
|
35
|
+
export declare const listCurrency: ({ currentPage, includePreference, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListCurrencyArgs) => Promise<[number, Array<CurrencyTypeBE>]>;
|
|
36
36
|
/**
|
|
37
37
|
* Retrieves a single currency by ID
|
|
38
38
|
* @param {UnitCurrencyByIdArgs} args - Object containing prisma client and query where conditions
|
|
39
|
-
* @returns {Promise<
|
|
39
|
+
* @returns {Promise<CurrencyTypeBE | null>} Currency if found, null otherwise
|
|
40
40
|
*/
|
|
41
|
-
export declare const unitCurrencyById: ({ id, includePreference, prisma, }: UnitCurrencyByIdArgs) => Promise<
|
|
41
|
+
export declare const unitCurrencyById: ({ id, includePreference, prisma, }: UnitCurrencyByIdArgs) => Promise<CurrencyTypeBE | null>;
|
|
42
42
|
/**
|
|
43
43
|
* Creates or updates a currency
|
|
44
44
|
* @param {UpdateCurrencyArgs} args - Object containing prisma client and currency data
|
|
45
|
-
* @returns {Promise<
|
|
45
|
+
* @returns {Promise<CurrencyTypeBE>} Created or updated currency
|
|
46
46
|
*/
|
|
47
|
-
export declare const updateCurrency: ({ code, enabled, id, isDefault, label, preferenceId, prisma, }: UpdateCurrencyArgs) => Promise<
|
|
47
|
+
export declare const updateCurrency: ({ code, enabled, id, isDefault, label, preferenceId, prisma, }: UpdateCurrencyArgs) => Promise<CurrencyTypeBE>;
|
|
48
48
|
/**
|
|
49
49
|
* Deletes a currency by ID
|
|
50
50
|
* @param {DeleteCurrencyArgs} args - Object containing prisma client and query where conditions
|
|
51
|
-
* @returns {Promise<
|
|
51
|
+
* @returns {Promise<CurrencyTypeBE>} Deleted currency
|
|
52
52
|
* @throws {Error} If currency ID is not provided or currency not found
|
|
53
53
|
*/
|
|
54
|
-
export declare const deleteCurrency: ({ id, prisma, }: DeleteCurrencyArgs) => Promise<
|
|
54
|
+
export declare const deleteCurrency: ({ id, prisma, }: DeleteCurrencyArgs) => Promise<CurrencyTypeBE>;
|
|
55
55
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves currencies with pagination and filtering
|
|
63
63
|
* @param {ListCurrencyArgs} args - Object containing prisma client, pagination, and query options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<CurrencyTypeBE>]>} Tuple containing total count and array of currencies
|
|
65
65
|
*/
|
|
66
66
|
var listCurrency = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var orderBy, include, idSearchQuery, labelSearchQuery, where, _c, count, items;
|
|
@@ -115,7 +115,7 @@ exports.listCurrency = listCurrency;
|
|
|
115
115
|
/**
|
|
116
116
|
* Retrieves a single currency by ID
|
|
117
117
|
* @param {UnitCurrencyByIdArgs} args - Object containing prisma client and query where conditions
|
|
118
|
-
* @returns {Promise<
|
|
118
|
+
* @returns {Promise<CurrencyTypeBE | null>} Currency if found, null otherwise
|
|
119
119
|
*/
|
|
120
120
|
var unitCurrencyById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
121
121
|
var include, where, currency;
|
|
@@ -146,7 +146,7 @@ exports.unitCurrencyById = unitCurrencyById;
|
|
|
146
146
|
/**
|
|
147
147
|
* Creates or updates a currency
|
|
148
148
|
* @param {UpdateCurrencyArgs} args - Object containing prisma client and currency data
|
|
149
|
-
* @returns {Promise<
|
|
149
|
+
* @returns {Promise<CurrencyTypeBE>} Created or updated currency
|
|
150
150
|
*/
|
|
151
151
|
var updateCurrency = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
152
152
|
var currencyData, where, currency;
|
|
@@ -185,7 +185,7 @@ exports.updateCurrency = updateCurrency;
|
|
|
185
185
|
/**
|
|
186
186
|
* Deletes a currency by ID
|
|
187
187
|
* @param {DeleteCurrencyArgs} args - Object containing prisma client and query where conditions
|
|
188
|
-
* @returns {Promise<
|
|
188
|
+
* @returns {Promise<CurrencyTypeBE>} Deleted currency
|
|
189
189
|
* @throws {Error} If currency ID is not provided or currency not found
|
|
190
190
|
*/
|
|
191
191
|
var deleteCurrency = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomerTypeBE } from '../type';
|
|
2
2
|
type PrismaClient = any;
|
|
3
3
|
export interface ListCustomerArgs {
|
|
4
4
|
currentPage?: number;
|
|
@@ -37,32 +37,32 @@ export interface DeleteCustomerArgs {
|
|
|
37
37
|
/**
|
|
38
38
|
* Retrieves customers with pagination and filtering
|
|
39
39
|
* @param {ListCustomerArgs} args - Object containing prisma client, pagination, and query options
|
|
40
|
-
* @returns {Promise<[number, Array<
|
|
40
|
+
* @returns {Promise<[number, Array<CustomerTypeBE>]>} Tuple containing total count and array of customers
|
|
41
41
|
*/
|
|
42
|
-
export declare const listCustomer: ({ currentPage, includeQuotesInvoices, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListCustomerArgs) => Promise<[number, Array<
|
|
42
|
+
export declare const listCustomer: ({ currentPage, includeQuotesInvoices, orderByColumn, orderByDirection, pageLimit, prisma, searchQuery, }: ListCustomerArgs) => Promise<[number, Array<CustomerTypeBE>]>;
|
|
43
43
|
/**
|
|
44
44
|
* Retrieves a single customer by ID
|
|
45
45
|
* @param {UnitCustomerByIdArgs} args - Object containing prisma client and query where conditions
|
|
46
|
-
* @returns {Promise<
|
|
46
|
+
* @returns {Promise<CustomerTypeBE | null>} Customer if found, null otherwise
|
|
47
47
|
*/
|
|
48
|
-
export declare const unitCustomerById: ({ id, prisma, includeQuotesInvoices, }: UnitCustomerByIdArgs) => Promise<
|
|
48
|
+
export declare const unitCustomerById: ({ id, prisma, includeQuotesInvoices, }: UnitCustomerByIdArgs) => Promise<CustomerTypeBE | null>;
|
|
49
49
|
/**
|
|
50
50
|
* Retrieves a single customer by phone number
|
|
51
51
|
* @param {UnitCustomerByPhoneArgs} args - Object containing prisma client and phone number
|
|
52
|
-
* @returns {Promise<
|
|
52
|
+
* @returns {Promise<CustomerTypeBE | null>} Customer if found, null otherwise
|
|
53
53
|
*/
|
|
54
|
-
export declare const unitCustomerByPhone: ({ includeQuotesInvoices, phone, prisma, }: UnitCustomerByPhoneArgs) => Promise<
|
|
54
|
+
export declare const unitCustomerByPhone: ({ includeQuotesInvoices, phone, prisma, }: UnitCustomerByPhoneArgs) => Promise<CustomerTypeBE | null>;
|
|
55
55
|
/**
|
|
56
56
|
* Creates or updates a customer
|
|
57
57
|
* @param {UpdateCustomerArgs} args - Object containing prisma client and customer data
|
|
58
|
-
* @returns {Promise<
|
|
58
|
+
* @returns {Promise<CustomerTypeBE>} Created or updated customer
|
|
59
59
|
*/
|
|
60
|
-
export declare const updateCustomer: ({ address, city, country, email, firstName, id, lastName, phone, prisma, }: UpdateCustomerArgs) => Promise<
|
|
60
|
+
export declare const updateCustomer: ({ address, city, country, email, firstName, id, lastName, phone, prisma, }: UpdateCustomerArgs) => Promise<CustomerTypeBE>;
|
|
61
61
|
/**
|
|
62
62
|
* Deletes a customer by ID
|
|
63
63
|
* @param {DeleteCustomerArgs} args - Object containing prisma client and query where conditions
|
|
64
|
-
* @returns {Promise<
|
|
64
|
+
* @returns {Promise<CustomerTypeBE>} Deleted customer
|
|
65
65
|
* @throws {Error} If customer ID is not provided or customer not found
|
|
66
66
|
*/
|
|
67
|
-
export declare const deleteCustomer: ({ id, prisma, }: DeleteCustomerArgs) => Promise<
|
|
67
|
+
export declare const deleteCustomer: ({ id, prisma, }: DeleteCustomerArgs) => Promise<CustomerTypeBE>;
|
|
68
68
|
export {};
|
|
@@ -61,7 +61,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
|
|
|
61
61
|
/**
|
|
62
62
|
* Retrieves customers with pagination and filtering
|
|
63
63
|
* @param {ListCustomerArgs} args - Object containing prisma client, pagination, and query options
|
|
64
|
-
* @returns {Promise<[number, Array<
|
|
64
|
+
* @returns {Promise<[number, Array<CustomerTypeBE>]>} Tuple containing total count and array of customers
|
|
65
65
|
*/
|
|
66
66
|
var listCustomer = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var include, orderBy, idSearchQuery, firstNameSearchQuery, lastNameSearchQuery, emailSearchQuery, phoneSearchQuery, where, _c, count, items;
|
|
@@ -127,7 +127,7 @@ exports.listCustomer = listCustomer;
|
|
|
127
127
|
/**
|
|
128
128
|
* Retrieves a single customer by ID
|
|
129
129
|
* @param {UnitCustomerByIdArgs} args - Object containing prisma client and query where conditions
|
|
130
|
-
* @returns {Promise<
|
|
130
|
+
* @returns {Promise<CustomerTypeBE | null>} Customer if found, null otherwise
|
|
131
131
|
*/
|
|
132
132
|
var unitCustomerById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
133
133
|
var include, where, customer;
|
|
@@ -156,7 +156,7 @@ exports.unitCustomerById = unitCustomerById;
|
|
|
156
156
|
/**
|
|
157
157
|
* Retrieves a single customer by phone number
|
|
158
158
|
* @param {UnitCustomerByPhoneArgs} args - Object containing prisma client and phone number
|
|
159
|
-
* @returns {Promise<
|
|
159
|
+
* @returns {Promise<CustomerTypeBE | null>} Customer if found, null otherwise
|
|
160
160
|
*/
|
|
161
161
|
var unitCustomerByPhone = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
162
162
|
var include, where, customer;
|
|
@@ -185,7 +185,7 @@ exports.unitCustomerByPhone = unitCustomerByPhone;
|
|
|
185
185
|
/**
|
|
186
186
|
* Creates or updates a customer
|
|
187
187
|
* @param {UpdateCustomerArgs} args - Object containing prisma client and customer data
|
|
188
|
-
* @returns {Promise<
|
|
188
|
+
* @returns {Promise<CustomerTypeBE>} Created or updated customer
|
|
189
189
|
*/
|
|
190
190
|
var updateCustomer = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
191
191
|
var customerData, where, customer;
|
|
@@ -224,7 +224,7 @@ exports.updateCustomer = updateCustomer;
|
|
|
224
224
|
/**
|
|
225
225
|
* Deletes a customer by ID
|
|
226
226
|
* @param {DeleteCustomerArgs} args - Object containing prisma client and query where conditions
|
|
227
|
-
* @returns {Promise<
|
|
227
|
+
* @returns {Promise<CustomerTypeBE>} Deleted customer
|
|
228
228
|
* @throws {Error} If customer ID is not provided or customer not found
|
|
229
229
|
*/
|
|
230
230
|
var deleteCustomer = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|