@react-pakistan/util-functions 1.24.97 → 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.
Files changed (53) hide show
  1. package/api/stellar-solutions/app-user/index.d.ts +9 -9
  2. package/api/stellar-solutions/app-user/index.js +4 -4
  3. package/api/stellar-solutions/bank/index.d.ts +9 -9
  4. package/api/stellar-solutions/bank/index.js +4 -4
  5. package/api/stellar-solutions/branch/index.d.ts +9 -9
  6. package/api/stellar-solutions/branch/index.js +4 -4
  7. package/api/stellar-solutions/company/index.d.ts +9 -9
  8. package/api/stellar-solutions/company/index.js +4 -4
  9. package/api/stellar-solutions/company-report/index.d.ts +3 -3
  10. package/api/stellar-solutions/company-report/index.js +1 -1
  11. package/api/stellar-solutions/constants.d.ts +9 -0
  12. package/api/stellar-solutions/constants.js +12 -0
  13. package/api/stellar-solutions/contact/index.d.ts +9 -9
  14. package/api/stellar-solutions/contact/index.js +4 -4
  15. package/api/stellar-solutions/currency/index.d.ts +9 -9
  16. package/api/stellar-solutions/currency/index.js +4 -4
  17. package/api/stellar-solutions/customer/index.d.ts +11 -11
  18. package/api/stellar-solutions/customer/index.js +5 -5
  19. package/api/stellar-solutions/expense/index.d.ts +9 -9
  20. package/api/stellar-solutions/expense/index.js +4 -4
  21. package/api/stellar-solutions/expense-category/index.d.ts +9 -9
  22. package/api/stellar-solutions/expense-category/index.js +4 -4
  23. package/api/stellar-solutions/lead/index.d.ts +9 -9
  24. package/api/stellar-solutions/lead/index.js +4 -4
  25. package/api/stellar-solutions/menu-order/index.d.ts +9 -9
  26. package/api/stellar-solutions/menu-order/index.js +4 -4
  27. package/api/stellar-solutions/payment/index.d.ts +9 -9
  28. package/api/stellar-solutions/payment/index.js +4 -4
  29. package/api/stellar-solutions/payment-mode/index.d.ts +9 -9
  30. package/api/stellar-solutions/payment-mode/index.js +4 -4
  31. package/api/stellar-solutions/preference/index.d.ts +5 -5
  32. package/api/stellar-solutions/preference/index.js +2 -2
  33. package/api/stellar-solutions/product/cache.d.ts +94 -0
  34. package/api/stellar-solutions/product/cache.js +280 -0
  35. package/api/stellar-solutions/product/index.d.ts +12 -14
  36. package/api/stellar-solutions/product/index.js +28 -12
  37. package/api/stellar-solutions/product-category/cache.d.ts +94 -0
  38. package/api/stellar-solutions/product-category/cache.js +280 -0
  39. package/api/stellar-solutions/product-category/index.d.ts +10 -10
  40. package/api/stellar-solutions/product-category/index.js +19 -4
  41. package/api/stellar-solutions/profile/index.d.ts +13 -13
  42. package/api/stellar-solutions/profile/index.js +6 -6
  43. package/api/stellar-solutions/quote-invoice/index.d.ts +9 -9
  44. package/api/stellar-solutions/quote-invoice/index.js +4 -4
  45. package/api/stellar-solutions/quote-invoice-report/index.d.ts +3 -3
  46. package/api/stellar-solutions/quote-invoice-report/index.js +1 -1
  47. package/api/stellar-solutions/tax/index.d.ts +9 -9
  48. package/api/stellar-solutions/tax/index.js +4 -4
  49. package/api/stellar-solutions/type.d.ts +49 -45
  50. package/api/stellar-solutions/type.js +6 -1
  51. package/index.d.ts +6 -5
  52. package/index.js +6 -6
  53. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { AppUserBE } from '../type';
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<AppUserBE>]>} Tuple of [total count, array of app users]
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<AppUserBE>]>;
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<AppUserBE | null>} App user if found, null otherwise
35
+ * @returns {Promise<AppUserTypeBE | null>} App user if found, null otherwise
36
36
  */
37
- export declare const unitAppUserById: ({ id, prisma, }: UnitAppUserByIdArgs) => Promise<AppUserBE | null>;
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<AppUserBE>} Created or updated app user
41
+ * @returns {Promise<AppUserTypeBE>} Created or updated app user
42
42
  */
43
- export declare const updateAppUser: ({ email, firstName, id, lastName, prisma, }: UpdateAppUserArgs) => Promise<AppUserBE>;
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<AppUserBE>} Deleted app user
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<AppUserBE>;
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<AppUserBE>]>} Tuple of [total count, array of app users]
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<AppUserBE | null>} App user if found, null otherwise
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<AppUserBE>} Created or updated app user
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<AppUserBE>} Deleted app user
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 { BankBE } from '../type';
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<BankBE>]>} Tuple of [total count, array of banks]
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<BankBE>]>;
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<BankBE | null>} Bank if found, null otherwise
43
+ * @returns {Promise<BankTypeBE | null>} Bank if found, null otherwise
44
44
  */
45
- export declare const unitBankById: ({ id, includePreference, prisma, }: UnitBankByIdArgs) => Promise<BankBE | null>;
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<BankBE>} Created or updated bank
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<BankBE>;
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<BankBE>} Deleted bank
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<BankBE>;
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<BankBE>]>} Tuple of [total count, array of banks]
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<BankBE | null>} Bank if found, null otherwise
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<BankBE>} Created or updated bank
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<BankBE>} Deleted bank
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 { BranchBE } from '../type';
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<BranchBE>]>} Tuple of [total count, array of branches]
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<BranchBE>]>;
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<BranchBE | null>} Branch if found, null otherwise
42
+ * @returns {Promise<BranchTypeBE | null>} Branch if found, null otherwise
43
43
  */
44
- export declare const unitBranchById: ({ prisma, id, }: UnitBranchByIdArgs) => Promise<BranchBE | null>;
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<BranchBE>} Created or updated branch
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<BranchBE>;
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<BranchBE>} Deleted branch
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<BranchBE>;
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<BranchBE>]>} Tuple of [total count, array of branches]
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<BranchBE | null>} Branch if found, null otherwise
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<BranchBE>} Created or updated branch
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<BranchBE>} Deleted branch
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 { CompanyBE } from '../type';
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<CompanyBE>]>} Tuple of [total count, array of companies]
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<CompanyBE>]>;
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<CompanyBE | null>} Company if found, null otherwise
41
+ * @returns {Promise<CompanyTypeBE | null>} Company if found, null otherwise
42
42
  */
43
- export declare const unitCompanyById: ({ id, includeContacts, includeQuotesInvoices, prisma, }: UnitCompanyByIdArgs) => Promise<CompanyBE | null>;
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<CompanyBE>} Created or updated company
47
+ * @returns {Promise<CompanyTypeBE>} Created or updated company
48
48
  */
49
- export declare const updateCompany: ({ country, email, id, name, phone, prisma, website, }: UpdateCompanyArgs) => Promise<CompanyBE>;
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<CompanyBE>} Deleted company
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<CompanyBE>;
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<CompanyBE>]>} Tuple of [total count, array of companies]
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<CompanyBE | null>} Company if found, null otherwise
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<CompanyBE>} Created or updated company
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<CompanyBE>} Deleted company
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 { CompanyBE } from '../type';
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<CompanyBE>]>} Tuple containing total count and array of all companies
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<CompanyBE>]>;
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<CompanyBE>]>} Tuple containing total count and array of all companies
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,9 @@
1
+ export declare const ONE_DAY_IN_MS: number;
2
+ export declare const API_ROUTES: {
3
+ PRODUCT_BY_ID: string;
4
+ PRODUCT_CATEGORIES: string;
5
+ PRODUCT_CATEGORY_BY_ID: string;
6
+ PRODUCT_CATEGORY: string;
7
+ PRODUCT: string;
8
+ PRODUCTS: string;
9
+ };
@@ -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 { ContactBE } from '../type';
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<ContactBE>]>} Tuple containing total count and array of contacts
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<ContactBE>]>;
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<ContactBE | null>} Contact if found, null otherwise
40
+ * @returns {Promise<ContactTypeBE | null>} Contact if found, null otherwise
41
41
  */
42
- export declare const unitContactById: ({ id, includeCompany, prisma, }: UnitContactByIdArgs) => Promise<ContactBE | null>;
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<ContactBE>} Created or updated contact
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<ContactBE>;
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<ContactBE>} Deleted contact
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<ContactBE>;
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<ContactBE>]>} Tuple containing total count and array of contacts
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<ContactBE | null>} Contact if found, null otherwise
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<ContactBE>} Created or updated contact
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<ContactBE>} Deleted contact
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 { CurrencyBE } from '../type';
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<CurrencyBE>]>} Tuple containing total count and array of currencies
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<CurrencyBE>]>;
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<CurrencyBE | null>} Currency if found, null otherwise
39
+ * @returns {Promise<CurrencyTypeBE | null>} Currency if found, null otherwise
40
40
  */
41
- export declare const unitCurrencyById: ({ id, includePreference, prisma, }: UnitCurrencyByIdArgs) => Promise<CurrencyBE | null>;
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<CurrencyBE>} Created or updated currency
45
+ * @returns {Promise<CurrencyTypeBE>} Created or updated currency
46
46
  */
47
- export declare const updateCurrency: ({ code, enabled, id, isDefault, label, preferenceId, prisma, }: UpdateCurrencyArgs) => Promise<CurrencyBE>;
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<CurrencyBE>} Deleted currency
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<CurrencyBE>;
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<CurrencyBE>]>} Tuple containing total count and array of currencies
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<CurrencyBE | null>} Currency if found, null otherwise
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<CurrencyBE>} Created or updated currency
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<CurrencyBE>} Deleted currency
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 { CustomerBE } from '../type';
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<CustomerBE>]>} Tuple containing total count and array of customers
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<CustomerBE>]>;
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<CustomerBE | null>} Customer if found, null otherwise
46
+ * @returns {Promise<CustomerTypeBE | null>} Customer if found, null otherwise
47
47
  */
48
- export declare const unitCustomerById: ({ id, prisma, includeQuotesInvoices, }: UnitCustomerByIdArgs) => Promise<CustomerBE | null>;
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<CustomerBE | null>} Customer if found, null otherwise
52
+ * @returns {Promise<CustomerTypeBE | null>} Customer if found, null otherwise
53
53
  */
54
- export declare const unitCustomerByPhone: ({ includeQuotesInvoices, phone, prisma, }: UnitCustomerByPhoneArgs) => Promise<CustomerBE | null>;
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<CustomerBE>} Created or updated customer
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<CustomerBE>;
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<CustomerBE>} Deleted customer
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<CustomerBE>;
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<CustomerBE>]>} Tuple containing total count and array of customers
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<CustomerBE | null>} Customer if found, null otherwise
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<CustomerBE | null>} Customer if found, null otherwise
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<CustomerBE>} Created or updated customer
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<CustomerBE>} Deleted customer
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) {