@goweekdays/core 2.13.0 → 2.15.0
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/CHANGELOG.md +21 -0
- package/CLAUDE.md +274 -0
- package/dist/index.d.ts +252 -39
- package/dist/index.js +6528 -4402
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5783 -3680
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1697,6 +1697,70 @@ declare function useJobSummaryCtrl(): {
|
|
|
1697
1697
|
getByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1698
1698
|
};
|
|
1699
1699
|
|
|
1700
|
+
type TBusinessProfileTaxType = "VAT" | "NON-VAT";
|
|
1701
|
+
declare const taxTypes: string[];
|
|
1702
|
+
type TBusinessProfile = {
|
|
1703
|
+
_id?: ObjectId;
|
|
1704
|
+
org: ObjectId | string;
|
|
1705
|
+
businessName: string;
|
|
1706
|
+
tradeName?: string;
|
|
1707
|
+
TIN: string;
|
|
1708
|
+
registeredAddress: string;
|
|
1709
|
+
taxType: TBusinessProfileTaxType;
|
|
1710
|
+
RDOCode: string;
|
|
1711
|
+
fiscalYearStart: string;
|
|
1712
|
+
fiscalYearEnd: string;
|
|
1713
|
+
currentFiscalYear: string;
|
|
1714
|
+
currentFiscalYearStartDate: Date | string;
|
|
1715
|
+
currentFiscalYearEndDate: Date | string;
|
|
1716
|
+
createdAt?: Date | string;
|
|
1717
|
+
updatedAt?: Date | string;
|
|
1718
|
+
};
|
|
1719
|
+
declare const schemaBusinessProfile: Joi.ObjectSchema<any>;
|
|
1720
|
+
declare const schemaBusinessProfileBusinessName: Joi.ObjectSchema<any>;
|
|
1721
|
+
declare const schemaBusinessProfileTradeName: Joi.ObjectSchema<any>;
|
|
1722
|
+
declare const schemaBusinessProfileRegisteredAddress: Joi.ObjectSchema<any>;
|
|
1723
|
+
declare const schemaBusinessProfileTIN: Joi.ObjectSchema<any>;
|
|
1724
|
+
declare const schemaBusinessProfileRDOCode: Joi.ObjectSchema<any>;
|
|
1725
|
+
declare const schemaBusinessProfileCurrentFiscalYear: Joi.ObjectSchema<any>;
|
|
1726
|
+
declare const schemaBusinessProfileFiscalYear: Joi.ObjectSchema<any>;
|
|
1727
|
+
declare function modelBusinessProfile(data: TBusinessProfile): TBusinessProfile;
|
|
1728
|
+
|
|
1729
|
+
declare function useBusinessProfileRepo(): {
|
|
1730
|
+
createIndexes: () => Promise<void>;
|
|
1731
|
+
add: (data: TBusinessProfile) => Promise<string>;
|
|
1732
|
+
getByOrg: (org: string | ObjectId) => Promise<mongodb.WithId<bson.Document> | TBusinessProfile | null>;
|
|
1733
|
+
updateBusinessNameByOrg: (org: string | ObjectId, value: {
|
|
1734
|
+
businessName: string;
|
|
1735
|
+
taxType: string;
|
|
1736
|
+
}) => Promise<string>;
|
|
1737
|
+
updateTradeNameByOrg: (org: string | ObjectId, value: string) => Promise<string>;
|
|
1738
|
+
updateRegisteredAddressByOrg: (org: string | ObjectId, value: string) => Promise<string>;
|
|
1739
|
+
updateTINByOrg: (org: string | ObjectId, value: string) => Promise<string>;
|
|
1740
|
+
updateRDOCodeByOrg: (org: string | ObjectId, value: string) => Promise<string>;
|
|
1741
|
+
updateFiscalYearByOrg: (org: string | ObjectId, value: {
|
|
1742
|
+
fiscalYearStart: string;
|
|
1743
|
+
fiscalYearEnd: string;
|
|
1744
|
+
}) => Promise<string>;
|
|
1745
|
+
updateCurrentFiscalYearByOrg: (org: string | ObjectId, value: {
|
|
1746
|
+
currentFiscalYear: string;
|
|
1747
|
+
currentFiscalYearStartDate: string;
|
|
1748
|
+
currentFiscalYearEndDate: string;
|
|
1749
|
+
}) => Promise<string>;
|
|
1750
|
+
};
|
|
1751
|
+
|
|
1752
|
+
declare function useBusinessProfileCtrl(): {
|
|
1753
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1754
|
+
getByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1755
|
+
updateBusinessNameByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1756
|
+
updateTradeNameByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1757
|
+
updateRegisteredAddressByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1758
|
+
updateTINByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1759
|
+
updateRDOCodeByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1760
|
+
updateCurrentFiscalYearByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1761
|
+
updateFiscalYearByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1762
|
+
};
|
|
1763
|
+
|
|
1700
1764
|
type TTax = {
|
|
1701
1765
|
_id?: ObjectId;
|
|
1702
1766
|
org: ObjectId;
|
|
@@ -1754,7 +1818,10 @@ declare function useTaxController(): {
|
|
|
1754
1818
|
|
|
1755
1819
|
type TChartOfAccountType = "asset" | "liability" | "equity" | "income" | "expense";
|
|
1756
1820
|
type TChartOfAccountStatus = "active" | "inactive" | "archived";
|
|
1821
|
+
declare const chartOfAccountStatuses: TChartOfAccountStatus[];
|
|
1757
1822
|
type TChartOfAccountNormalBalance = "debit" | "credit";
|
|
1823
|
+
type TChartOfAccountControlType = "AR" | "AP" | "inventory" | "fixed-asset" | "none";
|
|
1824
|
+
declare const chartOfAccountControlTypes: TChartOfAccountControlType[];
|
|
1758
1825
|
type TChartOfAccount = {
|
|
1759
1826
|
_id?: ObjectId;
|
|
1760
1827
|
org: ObjectId;
|
|
@@ -1767,7 +1834,9 @@ type TChartOfAccount = {
|
|
|
1767
1834
|
code: string;
|
|
1768
1835
|
tax?: ObjectId;
|
|
1769
1836
|
isContra: boolean;
|
|
1770
|
-
|
|
1837
|
+
controlType: TChartOfAccountControlType;
|
|
1838
|
+
childrenCount?: number;
|
|
1839
|
+
status: TChartOfAccountStatus;
|
|
1771
1840
|
createdAt?: Date | string;
|
|
1772
1841
|
updatedAt?: Date | string;
|
|
1773
1842
|
};
|
|
@@ -1787,6 +1856,8 @@ declare function useChartOfAccountRepo(): {
|
|
|
1787
1856
|
page?: number;
|
|
1788
1857
|
limit?: number;
|
|
1789
1858
|
status?: string;
|
|
1859
|
+
type?: string;
|
|
1860
|
+
canPost?: boolean;
|
|
1790
1861
|
}) => Promise<Record<string, any>>;
|
|
1791
1862
|
getByOrg: ({ search, page, limit, org, status }?: {
|
|
1792
1863
|
org: string | ObjectId;
|
|
@@ -1803,10 +1874,11 @@ declare function useChartOfAccountRepo(): {
|
|
|
1803
1874
|
name: string;
|
|
1804
1875
|
}[]>;
|
|
1805
1876
|
getById: (_id: string | ObjectId) => Promise<TChartOfAccount>;
|
|
1806
|
-
updateById: (_id: string | ObjectId, options:
|
|
1877
|
+
updateById: (_id: string | ObjectId, options: Pick<TChartOfAccount, "name" | "code" | "type" | "normalBalance" | "tax" | "isContra" | "parent" | "controlType">, session?: ClientSession) => Promise<string>;
|
|
1807
1878
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
1808
1879
|
updateStatusById: (_id: string | ObjectId, status: string) => Promise<string>;
|
|
1809
1880
|
countByPath: (path: string) => Promise<number>;
|
|
1881
|
+
updateChildrenCountById: (_id: string | ObjectId, increment: number, session?: ClientSession) => Promise<string>;
|
|
1810
1882
|
};
|
|
1811
1883
|
|
|
1812
1884
|
declare function useChartOfAccountController(): {
|
|
@@ -1819,77 +1891,161 @@ declare function useChartOfAccountController(): {
|
|
|
1819
1891
|
updateStatusById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1820
1892
|
};
|
|
1821
1893
|
|
|
1822
|
-
type
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1894
|
+
type TAccountBalance = {
|
|
1895
|
+
_id?: ObjectId;
|
|
1896
|
+
org: ObjectId | string;
|
|
1897
|
+
account: ObjectId | string;
|
|
1898
|
+
accountType: string;
|
|
1899
|
+
period: {
|
|
1900
|
+
fiscalYear: number;
|
|
1901
|
+
month: string;
|
|
1902
|
+
};
|
|
1903
|
+
openingDebit: number;
|
|
1904
|
+
openingCredit: number;
|
|
1905
|
+
movementDebit: number;
|
|
1906
|
+
movementCredit: number;
|
|
1907
|
+
closingDebit: number;
|
|
1908
|
+
closingCredit: number;
|
|
1909
|
+
netBalance: number;
|
|
1910
|
+
createdAt: Date | string;
|
|
1911
|
+
updatedAt: Date | string;
|
|
1912
|
+
};
|
|
1913
|
+
declare const schemaAccountBalance: Joi.ObjectSchema<TAccountBalance>;
|
|
1914
|
+
declare function modelAccountBalance(value: TAccountBalance): {
|
|
1915
|
+
createdAt: string | Date;
|
|
1916
|
+
updatedAt: string | Date;
|
|
1917
|
+
_id?: ObjectId | undefined;
|
|
1918
|
+
org: string | ObjectId;
|
|
1919
|
+
account: string | ObjectId;
|
|
1920
|
+
accountType: string;
|
|
1921
|
+
period: {
|
|
1922
|
+
fiscalYear: number;
|
|
1923
|
+
month: string;
|
|
1924
|
+
};
|
|
1925
|
+
openingDebit: number;
|
|
1926
|
+
openingCredit: number;
|
|
1927
|
+
movementDebit: number;
|
|
1928
|
+
movementCredit: number;
|
|
1929
|
+
closingDebit: number;
|
|
1930
|
+
closingCredit: number;
|
|
1931
|
+
netBalance: number;
|
|
1833
1932
|
};
|
|
1834
|
-
|
|
1933
|
+
|
|
1934
|
+
declare function useAccountBalanceRepo(): {
|
|
1935
|
+
createIndexes: () => Promise<void>;
|
|
1936
|
+
add: (value: TAccountBalance, session?: ClientSession) => Promise<ObjectId>;
|
|
1937
|
+
getAll: (options: {
|
|
1938
|
+
org: ObjectId | string;
|
|
1939
|
+
account?: ObjectId | string;
|
|
1940
|
+
fiscalYear?: number;
|
|
1941
|
+
page?: number;
|
|
1942
|
+
limit?: number;
|
|
1943
|
+
}) => Promise<Record<string, any>>;
|
|
1944
|
+
getById: (_id: string | ObjectId) => Promise<TAccountBalance | null>;
|
|
1945
|
+
getByAccount: (options: {
|
|
1946
|
+
account: ObjectId | string;
|
|
1947
|
+
org: ObjectId | string;
|
|
1948
|
+
fiscalYear: number;
|
|
1949
|
+
month: string;
|
|
1950
|
+
}) => Promise<TAccountBalance | null>;
|
|
1951
|
+
getYearBalancesByAccount: (options: {
|
|
1952
|
+
account: ObjectId | string;
|
|
1953
|
+
org: ObjectId | string;
|
|
1954
|
+
fiscalYear: number;
|
|
1955
|
+
}) => Promise<TAccountBalance[]>;
|
|
1956
|
+
updateById: (account: string | ObjectId, org: string | ObjectId, fiscalYear: number, month: string, options: Partial<Pick<TAccountBalance, "openingDebit" | "openingCredit" | "movementDebit" | "movementCredit" | "closingDebit" | "closingCredit" | "netBalance">>, session?: ClientSession) => Promise<string>;
|
|
1957
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
1958
|
+
};
|
|
1959
|
+
|
|
1960
|
+
type TJournalStatus = "draft" | "posted" | "voided";
|
|
1961
|
+
declare const JournalStatuses: TJournalStatus[];
|
|
1962
|
+
type TJournalType = "general" | "cash-receipts" | "cash-disbursements" | "sales" | "purchases";
|
|
1963
|
+
declare const journalTypes: TJournalType[];
|
|
1964
|
+
type TJournal = {
|
|
1835
1965
|
_id?: ObjectId;
|
|
1836
1966
|
id: string;
|
|
1837
|
-
org: ObjectId;
|
|
1838
|
-
type:
|
|
1839
|
-
|
|
1967
|
+
org: ObjectId | string;
|
|
1968
|
+
type: TJournalType;
|
|
1969
|
+
transaction: string;
|
|
1970
|
+
invoiceNumber?: string;
|
|
1971
|
+
customer?: ObjectId | string;
|
|
1972
|
+
customerName?: string;
|
|
1840
1973
|
date: Date | string;
|
|
1841
1974
|
description: string;
|
|
1842
|
-
createdBy: ObjectId;
|
|
1975
|
+
createdBy: ObjectId | string;
|
|
1843
1976
|
createdByName: string;
|
|
1844
|
-
|
|
1845
|
-
|
|
1977
|
+
reversalDraft?: ObjectId | string;
|
|
1978
|
+
reversedEntry?: ObjectId | string;
|
|
1979
|
+
reversedEntryNumber?: string;
|
|
1980
|
+
reversedBy?: ObjectId | string;
|
|
1981
|
+
reversedByName?: string;
|
|
1982
|
+
status: TJournalStatus;
|
|
1846
1983
|
postedAt?: Date | string;
|
|
1984
|
+
reversedAt?: Date | string;
|
|
1847
1985
|
createdAt?: Date | string;
|
|
1848
1986
|
updatedAt?: Date | string;
|
|
1849
1987
|
};
|
|
1850
|
-
declare const
|
|
1851
|
-
declare const
|
|
1852
|
-
declare const
|
|
1853
|
-
declare
|
|
1988
|
+
declare const schemaJournalCtrl: Joi.ObjectSchema<any>;
|
|
1989
|
+
declare const schemaJournalCtrlUpdate: Joi.ObjectSchema<any>;
|
|
1990
|
+
declare const schemaJournalRepo: Joi.ObjectSchema<any>;
|
|
1991
|
+
declare const schemaJournalRepoUpdate: Joi.ObjectSchema<any>;
|
|
1992
|
+
declare const schemaJournalGetAll: Joi.ObjectSchema<any>;
|
|
1993
|
+
declare function modelJournal(data: TJournal): TJournal;
|
|
1854
1994
|
|
|
1855
|
-
declare function
|
|
1856
|
-
|
|
1995
|
+
declare function useJournalRepo(): {
|
|
1996
|
+
createIndexes: () => Promise<void>;
|
|
1997
|
+
delCachedData: () => void;
|
|
1998
|
+
add: (value: TJournal, session?: ClientSession) => Promise<ObjectId>;
|
|
1857
1999
|
getAll: (options: {
|
|
1858
2000
|
org: ObjectId | string;
|
|
1859
2001
|
search?: string;
|
|
1860
2002
|
page?: number;
|
|
1861
2003
|
limit?: number;
|
|
1862
|
-
book: string;
|
|
1863
2004
|
type: string;
|
|
1864
2005
|
status?: string;
|
|
1865
2006
|
}) => Promise<Record<string, any>>;
|
|
1866
|
-
getById: (_id: string | ObjectId) => Promise<
|
|
1867
|
-
updateById: (_id: string | ObjectId, options: Partial<
|
|
2007
|
+
getById: (_id: string | ObjectId) => Promise<TJournal>;
|
|
2008
|
+
updateById: (_id: string | ObjectId, options: Partial<TJournal>, session?: ClientSession) => Promise<string>;
|
|
1868
2009
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
1869
|
-
updateStatusById: (_id: string | ObjectId, status: string) => Promise<string>;
|
|
2010
|
+
updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<string>;
|
|
1870
2011
|
};
|
|
1871
2012
|
|
|
2013
|
+
type TJournalLineStatus = "draft" | "posted" | "voided";
|
|
2014
|
+
declare const journalLineStatuses: TJournalLineStatus[];
|
|
1872
2015
|
type TJournalLine = {
|
|
1873
2016
|
_id?: ObjectId;
|
|
1874
|
-
org: ObjectId;
|
|
2017
|
+
org: ObjectId | string;
|
|
1875
2018
|
journalEntry: ObjectId | string;
|
|
1876
|
-
|
|
2019
|
+
journalNumber: string;
|
|
2020
|
+
account: ObjectId | string;
|
|
1877
2021
|
accountName: string;
|
|
2022
|
+
accountCode: string;
|
|
2023
|
+
accountType: string;
|
|
1878
2024
|
debit: number;
|
|
1879
2025
|
credit: number;
|
|
1880
2026
|
postReference?: string;
|
|
2027
|
+
particulars: string;
|
|
2028
|
+
status: TJournalLineStatus;
|
|
1881
2029
|
createdAt?: Date | string;
|
|
1882
2030
|
updatedAt?: Date | string;
|
|
1883
2031
|
};
|
|
2032
|
+
declare const schemaJournalLineBase: {
|
|
2033
|
+
account: Joi.StringSchema<string>;
|
|
2034
|
+
debit: Joi.NumberSchema<number>;
|
|
2035
|
+
credit: Joi.NumberSchema<number>;
|
|
2036
|
+
};
|
|
1884
2037
|
declare const schemaJournalLineCtrl: Joi.ObjectSchema<any>;
|
|
2038
|
+
declare const schemaJournalLineCtrlUpdate: Joi.ObjectSchema<any>;
|
|
1885
2039
|
declare const schemaJournalLineRepo: Joi.ObjectSchema<any>;
|
|
1886
2040
|
declare function modelJournalLine(data: TJournalLine): TJournalLine;
|
|
1887
2041
|
|
|
1888
|
-
declare function
|
|
1889
|
-
add: (entry:
|
|
2042
|
+
declare function useJournalService(): {
|
|
2043
|
+
add: (entry: TJournal, lines: TJournalLine[]) => Promise<string>;
|
|
2044
|
+
updateStatusById: (_id: string, status: TJournalStatus, user: string) => Promise<string>;
|
|
2045
|
+
updateById: (id: string, entry: TJournal, lines: TJournalLine[], user: string) => Promise<string>;
|
|
1890
2046
|
};
|
|
1891
2047
|
|
|
1892
|
-
declare function
|
|
2048
|
+
declare function useJournalController(): {
|
|
1893
2049
|
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1894
2050
|
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1895
2051
|
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
@@ -1899,21 +2055,78 @@ declare function useJournalEntryController(): {
|
|
|
1899
2055
|
};
|
|
1900
2056
|
|
|
1901
2057
|
declare function useJournalLineRepo(): {
|
|
2058
|
+
createIndexes: () => Promise<void>;
|
|
1902
2059
|
add: (value: TJournalLine, session?: ClientSession) => Promise<ObjectId>;
|
|
1903
2060
|
getAll: (options: {
|
|
1904
2061
|
org: ObjectId | string;
|
|
1905
|
-
|
|
2062
|
+
JournalGeneral?: ObjectId | string;
|
|
1906
2063
|
page?: number;
|
|
1907
2064
|
limit?: number;
|
|
2065
|
+
account?: string | ObjectId;
|
|
2066
|
+
search?: string;
|
|
2067
|
+
status?: TJournalLineStatus;
|
|
1908
2068
|
}) => Promise<Record<string, any>>;
|
|
1909
|
-
getById: (_id: string | ObjectId) => Promise<TJournalLine>;
|
|
1910
|
-
|
|
2069
|
+
getById: (_id: string | ObjectId) => Promise<TJournalLine | null>;
|
|
2070
|
+
getByEntry: (journalEntry: string | ObjectId) => Promise<TJournalLine[]>;
|
|
2071
|
+
updateById: (_id: string | ObjectId, options: Pick<TJournalLine, "account" | "accountName" | "debit" | "credit">, session?: ClientSession) => Promise<string>;
|
|
1911
2072
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
2073
|
+
updateStatusByJournal: (journalEntry: string | ObjectId, status: TJournalLineStatus, session?: ClientSession) => Promise<string>;
|
|
1912
2074
|
};
|
|
1913
2075
|
|
|
1914
2076
|
declare function useJournalLineController(): {
|
|
1915
2077
|
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1916
2078
|
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2079
|
+
};
|
|
2080
|
+
|
|
2081
|
+
declare const customerStatuses: string[];
|
|
2082
|
+
type TCustomer = {
|
|
2083
|
+
_id?: ObjectId;
|
|
2084
|
+
firstName: string;
|
|
2085
|
+
lastName: string;
|
|
2086
|
+
middleName?: string;
|
|
2087
|
+
email?: string;
|
|
2088
|
+
contractNumber?: string;
|
|
2089
|
+
phoneNumber?: string;
|
|
2090
|
+
address?: {
|
|
2091
|
+
street: string;
|
|
2092
|
+
cityMunicipality: string;
|
|
2093
|
+
postalCode: string;
|
|
2094
|
+
country: string;
|
|
2095
|
+
};
|
|
2096
|
+
org?: ObjectId | string;
|
|
2097
|
+
status: string;
|
|
2098
|
+
createdAt?: Date | string;
|
|
2099
|
+
updatedAt?: Date | string;
|
|
2100
|
+
};
|
|
2101
|
+
declare const schemaCustomer: Joi.ObjectSchema<any>;
|
|
2102
|
+
declare const schemaCustomerUpdate: Joi.ObjectSchema<any>;
|
|
2103
|
+
declare function modelCustomer(data: TCustomer): TCustomer;
|
|
2104
|
+
|
|
2105
|
+
declare function useCustomerRepo(): {
|
|
2106
|
+
createIndexes: () => Promise<string>;
|
|
2107
|
+
delCachedData: () => void;
|
|
2108
|
+
add: (value: TCustomer, session?: ClientSession) => Promise<ObjectId>;
|
|
2109
|
+
getAll: ({ search, page, limit, org, status, }?: {
|
|
2110
|
+
search?: string | undefined;
|
|
2111
|
+
page?: number | undefined;
|
|
2112
|
+
limit?: number | undefined;
|
|
2113
|
+
org?: string | undefined;
|
|
2114
|
+
status?: string | undefined;
|
|
2115
|
+
}) => Promise<Record<string, any>>;
|
|
2116
|
+
getById: (id: string) => Promise<TCustomer>;
|
|
2117
|
+
getByName: ({ firstName, lastName, middleName, }?: {
|
|
2118
|
+
firstName?: string | undefined;
|
|
2119
|
+
lastName?: string | undefined;
|
|
2120
|
+
middleName?: string | undefined;
|
|
2121
|
+
}) => Promise<TCustomer | null>;
|
|
2122
|
+
updateById: (_id: string | ObjectId, value: Pick<TCustomer, "firstName" | "lastName" | "middleName" | "email" | "contractNumber" | "phoneNumber" | "address">, session?: ClientSession) => Promise<string>;
|
|
2123
|
+
deleteById: (id: string, session?: ClientSession) => Promise<mongodb.WithId<bson.Document>>;
|
|
2124
|
+
};
|
|
2125
|
+
|
|
2126
|
+
declare function useCustomerCtrl(): {
|
|
2127
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2128
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2129
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1917
2130
|
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1918
2131
|
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1919
2132
|
};
|
|
@@ -1957,4 +2170,4 @@ declare const XENDIT_BASE_URL: string;
|
|
|
1957
2170
|
declare const DOMAIN: string;
|
|
1958
2171
|
declare const APP_ORG: string;
|
|
1959
2172
|
|
|
1960
|
-
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, APP_ORG, DEFAULT_JOB_STATUS_SETUP, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MBuilding, MBuildingUnit, MFile, MONGO_DB, MONGO_URI, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_WEBHOOK_ID, PORT, PaypalWebhookHeaders, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TApp, TBuilding, TBuildingUnit, TChartOfAccount, TChartOfAccountNormalBalance, TChartOfAccountStatus, TChartOfAccountType, TCounter, TFile, TJobApplication, TJobApplicationMetadata, TJobPost, TJobProfile, TJobProfileAward, TJobProfileCert, TJobProfileEdu, TJobProfileGroup, TJobProfileLang, TJobProfileMilitaryExp, TJobProfilePatent, TJobProfilePublication, TJobProfileSkill, TJobProfileWorkExp, TJobStatusSetup, TJobStatusTrans, TJobSummary, TJobSummaryMetadata,
|
|
2173
|
+
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, APP_ORG, DEFAULT_JOB_STATUS_SETUP, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, JournalStatuses, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MBuilding, MBuildingUnit, MFile, MONGO_DB, MONGO_URI, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_WEBHOOK_ID, PORT, PaypalWebhookHeaders, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAccountBalance, TApp, TBuilding, TBuildingUnit, TBusinessProfile, TBusinessProfileTaxType, TChartOfAccount, TChartOfAccountControlType, TChartOfAccountNormalBalance, TChartOfAccountStatus, TChartOfAccountType, TCounter, TCustomer, TFile, TJobApplication, TJobApplicationMetadata, TJobPost, TJobProfile, TJobProfileAward, TJobProfileCert, TJobProfileEdu, TJobProfileGroup, TJobProfileLang, TJobProfileMilitaryExp, TJobProfilePatent, TJobProfilePublication, TJobProfileSkill, TJobProfileWorkExp, TJobStatusSetup, TJobStatusTrans, TJobSummary, TJobSummaryMetadata, TJournal, TJournalLine, TJournalLineStatus, TJournalStatus, TJournalType, TLedgerBill, TMember, TOption, TOrg, TPermission, TPermissionGroup, TPlan, TPromo, TRole, TSubscribe, TSubscription, TSubscriptionTransaction, TTax, TUser, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, chartOfAccountControlTypes, chartOfAccountNormalBalances, chartOfAccountStatuses, chartOfAccountTypes, currencies, customerStatuses, isDev, jobApplicationStatuses, journalLineStatuses, journalTypes, ledgerBillStatuses, ledgerBillTypes, modelAccountBalance, modelApp, modelBusinessProfile, modelChartOfAccount, modelCustomer, modelJobApplication, modelJobPost, modelJobProfile, modelJobProfileCert, modelJobProfileEdu, modelJobProfileLang, modelJobProfileSkill, modelJobProfileWorkExp, modelJobStatusSetup, modelJobStatusTrans, modelJobSummary, modelJournal, modelJournalLine, modelLedgerBill, modelMember, modelOption, modelOrg, modelPermission, modelPermissionGroup, modelPlan, modelPromo, modelRole, modelSubscription, modelSubscriptionTransaction, modelTax, modelUser, modelVerification, schemaAccountBalance, schemaApp, schemaAppUpdate, schemaAward, schemaBuilding, schemaBuildingUnit, schemaBusinessProfile, schemaBusinessProfileBusinessName, schemaBusinessProfileCurrentFiscalYear, schemaBusinessProfileFiscalYear, schemaBusinessProfileRDOCode, schemaBusinessProfileRegisteredAddress, schemaBusinessProfileTIN, schemaBusinessProfileTradeName, schemaCertification, schemaChartOfAccountBase, schemaChartOfAccountStd, schemaChartOfAccountUpdate, schemaCustomer, schemaCustomerUpdate, schemaEducation, schemaGroup, schemaInviteMember, schemaJobApplication, schemaJobPost, schemaJobPostUpdate, schemaJobProfile, schemaJobProfileAdditionalInfo, schemaJobProfileCert, schemaJobProfileCertDel, schemaJobProfileContactInfo, schemaJobProfileEdu, schemaJobProfileEduDel, schemaJobProfileLang, schemaJobProfileLangDel, schemaJobProfilePersonalInfo, schemaJobProfileSkill, schemaJobProfileSkillDel, schemaJobProfileSummary, schemaJobProfileWorkExp, schemaJobProfileWorkExpDel, schemaJobStatusSetup, schemaJobStatusSetupUpdate, schemaJobStatusTrans, schemaJobSummary, schemaJobSummaryInc, schemaJournalCtrl, schemaJournalCtrlUpdate, schemaJournalGetAll, schemaJournalLineBase, schemaJournalLineCtrl, schemaJournalLineCtrlUpdate, schemaJournalLineRepo, schemaJournalRepo, schemaJournalRepoUpdate, schemaLanguage, schemaLedgerBill, schemaLedgerBillingSummary, schemaMember, schemaMemberRole, schemaMemberStatus, schemaMilitaryExp, schemaOption, schemaOrg, schemaOrgAdd, schemaOrgPilot, schemaOrgUpdate, schemaPatent, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaPlan, schemaPromo, schemaPublication, schemaRole, schemaRoleUpdate, schemaSkill, schemaSubscribe, schemaSubscription, schemaSubscriptionCompute, schemaSubscriptionPromoCode, schemaSubscriptionSeats, schemaSubscriptionTransaction, schemaSubscriptionUpdate, schemaTax, schemaTaxUpdate, schemaUpdateOptions, schemaUser, schemaVerification, schemaVerificationOrgInvite, schemaWorkExp, taxDirections, taxTypes, transactionSchema, useAccountBalanceRepo, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useBusinessProfileCtrl, useBusinessProfileRepo, useChartOfAccountController, useChartOfAccountRepo, useCounterModel, useCounterRepo, useCustomerCtrl, useCustomerRepo, useFileController, useFileRepo, useFileService, useGitHubService, useJobApplicationController, useJobApplicationRepo, useJobPostController, useJobPostRepo, useJobPostService, useJobProfileCtrl, useJobProfileRepo, useJobStatusConfigController, useJobStatusConfigRepo, useJobSummaryCtrl, useJobSummaryRepo, useJobSummarySvc, useJournalController, useJournalLineController, useJournalLineRepo, useJournalRepo, useJournalService, useLedgerBillingController, useLedgerBillingRepo, useMemberController, useMemberRepo, useOptionCtrl, useOptionRepo, useOrgController, useOrgRepo, useOrgService, usePaypalService, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, usePlanController, usePlanRepo, usePlanService, usePromoController, usePromoRepo, usePromoUsageRepo, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useSubscriptionTransactionController, useSubscriptionTransactionRepo, useTaxController, useTaxRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
|