@carbonorm/carbonnode 2.0.34 → 3.0.1
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/dist/api/builders/sqlBuilder.d.ts +3 -0
- package/dist/api/carbonSqlExecutor.d.ts +17 -0
- package/dist/api/convertForRequestBody.d.ts +1 -1
- package/dist/api/executors/Executor.d.ts +18 -0
- package/dist/api/executors/HttpExecutor.d.ts +15 -0
- package/dist/api/executors/SqlExecutor.d.ts +11 -0
- package/dist/api/interfaces/ormInterfaces.d.ts +22 -1
- package/dist/api/rest/Blog_Categories.d.ts +37 -0
- package/dist/api/rest/Blog_Categories.test.d.ts +11 -0
- package/dist/api/rest/Blog_Images.d.ts +37 -0
- package/dist/api/rest/Blog_Images.test.d.ts +15 -0
- package/dist/api/rest/Blog_Post_Categories.d.ts +37 -0
- package/dist/api/rest/Blog_Post_Categories.test.d.ts +13 -0
- package/dist/api/rest/Blog_Post_Tags.d.ts +37 -0
- package/dist/api/rest/Blog_Post_Tags.test.d.ts +13 -0
- package/dist/api/rest/Blog_Posts.d.ts +37 -0
- package/dist/api/rest/Blog_Posts.test.d.ts +21 -0
- package/dist/api/rest/Blog_Tags.d.ts +37 -0
- package/dist/api/rest/Blog_Tags.test.d.ts +11 -0
- package/dist/api/rest/C6.d.ts +1000 -0
- package/dist/api/rest/Cache.d.ts +37 -0
- package/dist/api/rest/Cache.test.d.ts +12 -0
- package/dist/api/rest/Cities.d.ts +37 -0
- package/dist/api/rest/Cities.test.d.ts +17 -0
- package/dist/api/rest/Counties.d.ts +37 -0
- package/dist/api/rest/Counties.test.d.ts +18 -0
- package/dist/api/rest/Countries.d.ts +37 -0
- package/dist/api/rest/Countries.test.d.ts +24 -0
- package/dist/api/rest/Geometries.d.ts +37 -0
- package/dist/api/rest/Geometries.test.d.ts +16 -0
- package/dist/api/rest/Images.d.ts +37 -0
- package/dist/api/rest/Images.test.d.ts +16 -0
- package/dist/api/rest/Land_Section_Info.d.ts +37 -0
- package/dist/api/rest/Land_Section_Info.test.d.ts +15 -0
- package/dist/api/rest/Neighborhoods.d.ts +37 -0
- package/dist/api/rest/Neighborhoods.test.d.ts +12 -0
- package/dist/api/rest/Parcel_Building_Details.d.ts +37 -0
- package/dist/api/rest/Parcel_Building_Details.test.d.ts +40 -0
- package/dist/api/rest/Parcel_Neighborhoods.d.ts +37 -0
- package/dist/api/rest/Parcel_Neighborhoods.test.d.ts +15 -0
- package/dist/api/rest/Parcel_Owners.d.ts +37 -0
- package/dist/api/rest/Parcel_Owners.test.d.ts +23 -0
- package/dist/api/rest/Parcel_Sales.d.ts +37 -0
- package/dist/api/rest/Parcel_Sales.test.d.ts +19 -0
- package/dist/api/rest/Parcel_Tax_History.d.ts +37 -0
- package/dist/api/rest/Parcel_Tax_History.test.d.ts +24 -0
- package/dist/api/rest/Parcels.d.ts +37 -0
- package/dist/api/rest/Parcels.test.d.ts +42 -0
- package/dist/api/rest/Payment_Charge_Logs.d.ts +37 -0
- package/dist/api/rest/Payment_Charge_Logs.test.d.ts +17 -0
- package/dist/api/rest/Payment_Subscriptions.d.ts +37 -0
- package/dist/api/rest/Payment_Subscriptions.test.d.ts +20 -0
- package/dist/api/rest/Property_Units.d.ts +37 -0
- package/dist/api/rest/Property_Units.test.d.ts +55 -0
- package/dist/api/rest/Sources.d.ts +37 -0
- package/dist/api/rest/Sources.test.d.ts +17 -0
- package/dist/api/rest/States.d.ts +37 -0
- package/dist/api/rest/States.test.d.ts +20 -0
- package/dist/api/rest/Tax_Districts.d.ts +37 -0
- package/dist/api/rest/Tax_Districts.test.d.ts +12 -0
- package/dist/api/rest/Users.d.ts +37 -0
- package/dist/api/rest/Users.test.d.ts +14 -0
- package/dist/api/rest/Valuation_Reports.d.ts +37 -0
- package/dist/api/rest/Valuation_Reports.test.d.ts +36 -0
- package/dist/api/rest/Zip_Codes.d.ts +37 -0
- package/dist/api/rest/Zip_Codes.test.d.ts +15 -0
- package/dist/api/restRequest.d.ts +5 -141
- package/dist/api/types/dynamicFetching.d.ts +10 -0
- package/dist/api/types/modifyTypes.d.ts +9 -0
- package/dist/api/types/mysqlTypes.d.ts +4 -0
- package/dist/api/types/ormInterfaces.d.ts +223 -0
- package/dist/api/utils/apiHelpers.d.ts +9 -0
- package/dist/api/utils/cacheManager.d.ts +10 -0
- package/dist/api/utils/logger.d.ts +7 -0
- package/dist/api/utils/sortAndSerializeQueryObject.d.ts +1 -0
- package/dist/api/utils/testHelpers.d.ts +1 -0
- package/dist/api/utils/toastNotifier.d.ts +2 -0
- package/dist/index.cjs.js +973 -537
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.esm.js +958 -537
- package/dist/index.esm.js.map +1 -1
- package/dist/variables/isNode.d.ts +2 -0
- package/package.json +32 -6
- package/scripts/assets/handlebars/C6.ts.handlebars +5 -1
- package/scripts/generateRestBindings.cjs +89 -23
- package/scripts/generateRestBindings.ts +100 -27
- package/src/api/builders/sqlBuilder.ts +173 -0
- package/src/api/convertForRequestBody.ts +1 -2
- package/src/api/executors/Executor.ts +26 -0
- package/src/api/executors/HttpExecutor.ts +790 -0
- package/src/api/executors/SqlExecutor.ts +90 -0
- package/src/api/restRequest.ts +20 -1128
- package/src/api/types/dynamicFetching.ts +10 -0
- package/src/api/types/modifyTypes.ts +25 -0
- package/src/api/types/mysqlTypes.ts +33 -0
- package/src/api/types/ormInterfaces.ts +287 -0
- package/src/api/utils/apiHelpers.ts +83 -0
- package/src/api/utils/cacheManager.ts +67 -0
- package/src/api/utils/logger.ts +24 -0
- package/src/api/utils/sortAndSerializeQueryObject.ts +12 -0
- package/src/api/utils/testHelpers.ts +24 -0
- package/src/api/utils/toastNotifier.ts +11 -0
- package/src/index.ts +16 -1
- package/src/variables/isNode.ts +3 -0
- package/src/api/interfaces/ormInterfaces.ts +0 -79
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
apiReturn,
|
|
3
|
-
iAPI,
|
|
4
|
-
iDeleteC6RestResponse,
|
|
5
|
-
iPostC6RestResponse,
|
|
6
|
-
iGetC6RestResponse,
|
|
7
|
-
iPutC6RestResponse
|
|
8
|
-
} from "api/restRequest";
|
|
9
|
-
import {AxiosResponse} from "axios";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export interface stringMap {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface stringNumberMap {
|
|
17
|
-
[key: string]: string | number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface RegExpMap {
|
|
21
|
-
[key: string]: RegExp | RegExpMap;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface complexMap {
|
|
25
|
-
[key: string]: stringMap | stringNumberMap | stringMap[] | RegExpMap;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface iTypeValidation {
|
|
29
|
-
MYSQL_TYPE: string,
|
|
30
|
-
MAX_LENGTH: string,
|
|
31
|
-
AUTO_INCREMENT: boolean,
|
|
32
|
-
SKIP_COLUMN_IN_POST: boolean
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface iConstraint {
|
|
36
|
-
TABLE: string,
|
|
37
|
-
COLUMN: string,
|
|
38
|
-
CONSTRAINT: string
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface iC6RestfulModel<RestShortTableNames extends string = string> {
|
|
42
|
-
TABLE_NAME: RestShortTableNames,
|
|
43
|
-
PRIMARY: string[],
|
|
44
|
-
PRIMARY_SHORT: string[],
|
|
45
|
-
COLUMNS: stringMap,
|
|
46
|
-
REGEX_VALIDATION: RegExpMap,
|
|
47
|
-
TYPE_VALIDATION: { [key: string]: iTypeValidation },
|
|
48
|
-
TABLE_REFERENCES: { [columnName: string]: iConstraint[] },
|
|
49
|
-
TABLE_REFERENCED_BY: { [columnName: string]: iConstraint[] },
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface iRestApiFunctions<RestData = any> {
|
|
53
|
-
Delete: (request?: (iAPI<any> & any)) => apiReturn<iDeleteC6RestResponse<RestData>>;
|
|
54
|
-
Post: (request?: (iAPI<any> & any)) => apiReturn<iPostC6RestResponse<RestData>>;
|
|
55
|
-
Get: (request?: (iAPI<any> & any)) => apiReturn<iGetC6RestResponse<RestData>>;
|
|
56
|
-
Put: (request?: (iAPI<any> & any)) => apiReturn<iPutC6RestResponse<RestData>>,
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface iDynamicApiImport<RestData = any> {
|
|
60
|
-
default: iRestApiFunctions<RestData>
|
|
61
|
-
// the methods below are optional
|
|
62
|
-
postState?: (response: AxiosResponse<iPostC6RestResponse<RestData>>, request: iAPI<any>, id: string | number | boolean) => void,
|
|
63
|
-
deleteState?: (response: AxiosResponse<iDeleteC6RestResponse<RestData>>, request: iAPI<any>) => void,
|
|
64
|
-
putState?: (response: AxiosResponse<iPutC6RestResponse<RestData>>, request: iAPI<any>) => void
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface tC6Tables { [key: string]: (iC6RestfulModel & { [key: string]: any }) }
|
|
68
|
-
|
|
69
|
-
export interface tC6RestApi {
|
|
70
|
-
[key: string]: {
|
|
71
|
-
REST: iRestApiFunctions,
|
|
72
|
-
PUT: Function;
|
|
73
|
-
POST: Function;
|
|
74
|
-
DELETE: Function;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|