@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.
Files changed (106) hide show
  1. package/dist/api/builders/sqlBuilder.d.ts +3 -0
  2. package/dist/api/carbonSqlExecutor.d.ts +17 -0
  3. package/dist/api/convertForRequestBody.d.ts +1 -1
  4. package/dist/api/executors/Executor.d.ts +18 -0
  5. package/dist/api/executors/HttpExecutor.d.ts +15 -0
  6. package/dist/api/executors/SqlExecutor.d.ts +11 -0
  7. package/dist/api/interfaces/ormInterfaces.d.ts +22 -1
  8. package/dist/api/rest/Blog_Categories.d.ts +37 -0
  9. package/dist/api/rest/Blog_Categories.test.d.ts +11 -0
  10. package/dist/api/rest/Blog_Images.d.ts +37 -0
  11. package/dist/api/rest/Blog_Images.test.d.ts +15 -0
  12. package/dist/api/rest/Blog_Post_Categories.d.ts +37 -0
  13. package/dist/api/rest/Blog_Post_Categories.test.d.ts +13 -0
  14. package/dist/api/rest/Blog_Post_Tags.d.ts +37 -0
  15. package/dist/api/rest/Blog_Post_Tags.test.d.ts +13 -0
  16. package/dist/api/rest/Blog_Posts.d.ts +37 -0
  17. package/dist/api/rest/Blog_Posts.test.d.ts +21 -0
  18. package/dist/api/rest/Blog_Tags.d.ts +37 -0
  19. package/dist/api/rest/Blog_Tags.test.d.ts +11 -0
  20. package/dist/api/rest/C6.d.ts +1000 -0
  21. package/dist/api/rest/Cache.d.ts +37 -0
  22. package/dist/api/rest/Cache.test.d.ts +12 -0
  23. package/dist/api/rest/Cities.d.ts +37 -0
  24. package/dist/api/rest/Cities.test.d.ts +17 -0
  25. package/dist/api/rest/Counties.d.ts +37 -0
  26. package/dist/api/rest/Counties.test.d.ts +18 -0
  27. package/dist/api/rest/Countries.d.ts +37 -0
  28. package/dist/api/rest/Countries.test.d.ts +24 -0
  29. package/dist/api/rest/Geometries.d.ts +37 -0
  30. package/dist/api/rest/Geometries.test.d.ts +16 -0
  31. package/dist/api/rest/Images.d.ts +37 -0
  32. package/dist/api/rest/Images.test.d.ts +16 -0
  33. package/dist/api/rest/Land_Section_Info.d.ts +37 -0
  34. package/dist/api/rest/Land_Section_Info.test.d.ts +15 -0
  35. package/dist/api/rest/Neighborhoods.d.ts +37 -0
  36. package/dist/api/rest/Neighborhoods.test.d.ts +12 -0
  37. package/dist/api/rest/Parcel_Building_Details.d.ts +37 -0
  38. package/dist/api/rest/Parcel_Building_Details.test.d.ts +40 -0
  39. package/dist/api/rest/Parcel_Neighborhoods.d.ts +37 -0
  40. package/dist/api/rest/Parcel_Neighborhoods.test.d.ts +15 -0
  41. package/dist/api/rest/Parcel_Owners.d.ts +37 -0
  42. package/dist/api/rest/Parcel_Owners.test.d.ts +23 -0
  43. package/dist/api/rest/Parcel_Sales.d.ts +37 -0
  44. package/dist/api/rest/Parcel_Sales.test.d.ts +19 -0
  45. package/dist/api/rest/Parcel_Tax_History.d.ts +37 -0
  46. package/dist/api/rest/Parcel_Tax_History.test.d.ts +24 -0
  47. package/dist/api/rest/Parcels.d.ts +37 -0
  48. package/dist/api/rest/Parcels.test.d.ts +42 -0
  49. package/dist/api/rest/Payment_Charge_Logs.d.ts +37 -0
  50. package/dist/api/rest/Payment_Charge_Logs.test.d.ts +17 -0
  51. package/dist/api/rest/Payment_Subscriptions.d.ts +37 -0
  52. package/dist/api/rest/Payment_Subscriptions.test.d.ts +20 -0
  53. package/dist/api/rest/Property_Units.d.ts +37 -0
  54. package/dist/api/rest/Property_Units.test.d.ts +55 -0
  55. package/dist/api/rest/Sources.d.ts +37 -0
  56. package/dist/api/rest/Sources.test.d.ts +17 -0
  57. package/dist/api/rest/States.d.ts +37 -0
  58. package/dist/api/rest/States.test.d.ts +20 -0
  59. package/dist/api/rest/Tax_Districts.d.ts +37 -0
  60. package/dist/api/rest/Tax_Districts.test.d.ts +12 -0
  61. package/dist/api/rest/Users.d.ts +37 -0
  62. package/dist/api/rest/Users.test.d.ts +14 -0
  63. package/dist/api/rest/Valuation_Reports.d.ts +37 -0
  64. package/dist/api/rest/Valuation_Reports.test.d.ts +36 -0
  65. package/dist/api/rest/Zip_Codes.d.ts +37 -0
  66. package/dist/api/rest/Zip_Codes.test.d.ts +15 -0
  67. package/dist/api/restRequest.d.ts +5 -141
  68. package/dist/api/types/dynamicFetching.d.ts +10 -0
  69. package/dist/api/types/modifyTypes.d.ts +9 -0
  70. package/dist/api/types/mysqlTypes.d.ts +4 -0
  71. package/dist/api/types/ormInterfaces.d.ts +223 -0
  72. package/dist/api/utils/apiHelpers.d.ts +9 -0
  73. package/dist/api/utils/cacheManager.d.ts +10 -0
  74. package/dist/api/utils/logger.d.ts +7 -0
  75. package/dist/api/utils/sortAndSerializeQueryObject.d.ts +1 -0
  76. package/dist/api/utils/testHelpers.d.ts +1 -0
  77. package/dist/api/utils/toastNotifier.d.ts +2 -0
  78. package/dist/index.cjs.js +973 -537
  79. package/dist/index.cjs.js.map +1 -1
  80. package/dist/index.d.ts +16 -1
  81. package/dist/index.esm.js +958 -537
  82. package/dist/index.esm.js.map +1 -1
  83. package/dist/variables/isNode.d.ts +2 -0
  84. package/package.json +32 -6
  85. package/scripts/assets/handlebars/C6.ts.handlebars +5 -1
  86. package/scripts/generateRestBindings.cjs +89 -23
  87. package/scripts/generateRestBindings.ts +100 -27
  88. package/src/api/builders/sqlBuilder.ts +173 -0
  89. package/src/api/convertForRequestBody.ts +1 -2
  90. package/src/api/executors/Executor.ts +26 -0
  91. package/src/api/executors/HttpExecutor.ts +790 -0
  92. package/src/api/executors/SqlExecutor.ts +90 -0
  93. package/src/api/restRequest.ts +20 -1128
  94. package/src/api/types/dynamicFetching.ts +10 -0
  95. package/src/api/types/modifyTypes.ts +25 -0
  96. package/src/api/types/mysqlTypes.ts +33 -0
  97. package/src/api/types/ormInterfaces.ts +287 -0
  98. package/src/api/utils/apiHelpers.ts +83 -0
  99. package/src/api/utils/cacheManager.ts +67 -0
  100. package/src/api/utils/logger.ts +24 -0
  101. package/src/api/utils/sortAndSerializeQueryObject.ts +12 -0
  102. package/src/api/utils/testHelpers.ts +24 -0
  103. package/src/api/utils/toastNotifier.ts +11 -0
  104. package/src/index.ts +16 -1
  105. package/src/variables/isNode.ts +3 -0
  106. package/src/api/interfaces/ormInterfaces.ts +0 -79
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iTax_Districts } from "./C6";
3
+ declare const Tax_Districts: {
4
+ Get: (request?: Omit<iTax_Districts, never> & {
5
+ dataInsertMultipleRows?: Omit<iTax_Districts, never>[] | undefined;
6
+ cacheResults?: boolean;
7
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
8
+ debug?: boolean;
9
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
10
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
11
+ }) => Promise<(() => import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<iTax_Districts>>) | import("axios").AxiosResponse<iGetC6RestResponse<iTax_Districts>, any> | null | undefined>;
12
+ Post: (request?: Omit<iTax_Districts, never> & {
13
+ dataInsertMultipleRows?: Omit<iTax_Districts, never>[] | undefined;
14
+ cacheResults?: boolean;
15
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
16
+ debug?: boolean;
17
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
18
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
19
+ }) => Promise<import("axios").AxiosResponse<iPostC6RestResponse<iTax_Districts>, any> | null | undefined>;
20
+ Put: (request?: Omit<iTax_Districts, never> & {
21
+ dataInsertMultipleRows?: Omit<iTax_Districts, never>[] | undefined;
22
+ cacheResults?: boolean;
23
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
24
+ debug?: boolean;
25
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
26
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
27
+ }) => Promise<import("axios").AxiosResponse<iPutC6RestResponse<iTax_Districts, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iTax_Districts, never> & {
29
+ dataInsertMultipleRows?: Omit<iTax_Districts, never>[] | undefined;
30
+ cacheResults?: boolean;
31
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
32
+ debug?: boolean;
33
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
34
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
35
+ }) => Promise<import("axios").AxiosResponse<iDeleteC6RestResponse<iTax_Districts, any>, any> | null | undefined>;
36
+ };
37
+ export default Tax_Districts;
@@ -0,0 +1,12 @@
1
+ import { iTax_Districts } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `tax_districts` (
4
+ `tax_district_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
5
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
6
+ `reduced_mill_levy` decimal(8,2) DEFAULT NULL,
7
+ `reduced_tax_rate` decimal(8,4) DEFAULT NULL,
8
+ PRIMARY KEY (`tax_district_no`)
9
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
10
+ **/
11
+ declare const Test_Data: iTax_Districts;
12
+ export default Test_Data;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iUsers } from "./C6";
3
+ declare const Users: {
4
+ Get: (request?: Omit<iUsers, never> & {
5
+ dataInsertMultipleRows?: Omit<iUsers, never>[] | undefined;
6
+ cacheResults?: boolean;
7
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
8
+ debug?: boolean;
9
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
10
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
11
+ }) => Promise<(() => import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<iUsers>>) | import("axios").AxiosResponse<iGetC6RestResponse<iUsers>, any> | null | undefined>;
12
+ Post: (request?: Omit<iUsers, never> & {
13
+ dataInsertMultipleRows?: Omit<iUsers, never>[] | undefined;
14
+ cacheResults?: boolean;
15
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
16
+ debug?: boolean;
17
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
18
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
19
+ }) => Promise<import("axios").AxiosResponse<iPostC6RestResponse<iUsers>, any> | null | undefined>;
20
+ Put: (request?: Omit<iUsers, never> & {
21
+ dataInsertMultipleRows?: Omit<iUsers, never>[] | undefined;
22
+ cacheResults?: boolean;
23
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
24
+ debug?: boolean;
25
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
26
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
27
+ }) => Promise<import("axios").AxiosResponse<iPutC6RestResponse<iUsers, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iUsers, never> & {
29
+ dataInsertMultipleRows?: Omit<iUsers, never>[] | undefined;
30
+ cacheResults?: boolean;
31
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
32
+ debug?: boolean;
33
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
34
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
35
+ }) => Promise<import("axios").AxiosResponse<iDeleteC6RestResponse<iUsers, any>, any> | null | undefined>;
36
+ };
37
+ export default Users;
@@ -0,0 +1,14 @@
1
+ import { iUsers } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `users` (
4
+ `user_id` binary(16) NOT NULL,
5
+ `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
6
+ `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
7
+ `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
8
+ `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
9
+ PRIMARY KEY (`user_id`),
10
+ UNIQUE KEY `email` (`email`)
11
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
12
+ **/
13
+ declare const Test_Data: iUsers;
14
+ export default Test_Data;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iValuation_Reports } from "./C6";
3
+ declare const Valuation_Reports: {
4
+ Get: (request?: Omit<iValuation_Reports, never> & {
5
+ dataInsertMultipleRows?: Omit<iValuation_Reports, never>[] | undefined;
6
+ cacheResults?: boolean;
7
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
8
+ debug?: boolean;
9
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
10
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
11
+ }) => Promise<(() => import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<iValuation_Reports>>) | import("axios").AxiosResponse<iGetC6RestResponse<iValuation_Reports>, any> | null | undefined>;
12
+ Post: (request?: Omit<iValuation_Reports, never> & {
13
+ dataInsertMultipleRows?: Omit<iValuation_Reports, never>[] | undefined;
14
+ cacheResults?: boolean;
15
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
16
+ debug?: boolean;
17
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
18
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
19
+ }) => Promise<import("axios").AxiosResponse<iPostC6RestResponse<iValuation_Reports>, any> | null | undefined>;
20
+ Put: (request?: Omit<iValuation_Reports, never> & {
21
+ dataInsertMultipleRows?: Omit<iValuation_Reports, never>[] | undefined;
22
+ cacheResults?: boolean;
23
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
24
+ debug?: boolean;
25
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
26
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
27
+ }) => Promise<import("axios").AxiosResponse<iPutC6RestResponse<iValuation_Reports, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iValuation_Reports, never> & {
29
+ dataInsertMultipleRows?: Omit<iValuation_Reports, never>[] | undefined;
30
+ cacheResults?: boolean;
31
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
32
+ debug?: boolean;
33
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
34
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
35
+ }) => Promise<import("axios").AxiosResponse<iDeleteC6RestResponse<iValuation_Reports, any>, any> | null | undefined>;
36
+ };
37
+ export default Valuation_Reports;
@@ -0,0 +1,36 @@
1
+ import { iValuation_Reports } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `valuation_reports` (
4
+ `report_id` binary(16) NOT NULL DEFAULT (uuid_to_bin(uuid(),1)),
5
+ `unit_id` binary(16) NOT NULL,
6
+ `report_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
7
+ `report_data` json NOT NULL,
8
+ `sale_price` decimal(12,4) DEFAULT NULL,
9
+ `tax_amount` decimal(10,4) DEFAULT NULL,
10
+ `savings` decimal(12,4) DEFAULT NULL,
11
+ `agency` decimal(12,4) DEFAULT NULL,
12
+ `status` enum('Ordered','Assigned','Submitted','BOE Required','BOE Scheduled','BOE Complete','Successful','Failed','Refunded') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
13
+ `assigned_to` binary(16) DEFAULT NULL,
14
+ `report_creator` binary(16) DEFAULT NULL,
15
+ `report_filler` binary(16) DEFAULT NULL,
16
+ `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
17
+ `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
18
+ `assessment_year_start` datetime NOT NULL,
19
+ `assessment_year_end` datetime NOT NULL,
20
+ `sales_year_start` datetime NOT NULL,
21
+ `sales_year_end` datetime NOT NULL,
22
+ PRIMARY KEY (`report_id`),
23
+ KEY `idx_unit_id` (`unit_id`),
24
+ KEY `idx_status` (`status`),
25
+ KEY `idx_assigned_to` (`assigned_to`),
26
+ KEY `fk_valuation_reports_user_2` (`report_creator`),
27
+ CONSTRAINT `fk_valuation_reports_unit` FOREIGN KEY (`unit_id`) REFERENCES `property_units` (`unit_id`) ON DELETE CASCADE,
28
+ CONSTRAINT `fk_valuation_reports_user_1` FOREIGN KEY (`assigned_to`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
29
+ CONSTRAINT `fk_valuation_reports_user_2` FOREIGN KEY (`report_creator`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
30
+ CONSTRAINT `fk_valuation_reports_user_3` FOREIGN KEY (`assigned_to`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
31
+ CONSTRAINT `valuation_reports_chk_1` CHECK ((`assessment_year_start` <= `assessment_year_end`)),
32
+ CONSTRAINT `valuation_reports_chk_2` CHECK ((`sales_year_start` <= `sales_year_end`))
33
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
34
+ **/
35
+ declare const Test_Data: iValuation_Reports;
36
+ export default Test_Data;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iZip_Codes } from "./C6";
3
+ declare const Zip_Codes: {
4
+ Get: (request?: Omit<iZip_Codes, never> & {
5
+ dataInsertMultipleRows?: Omit<iZip_Codes, never>[] | undefined;
6
+ cacheResults?: boolean;
7
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
8
+ debug?: boolean;
9
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
10
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
11
+ }) => Promise<(() => import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<iZip_Codes>>) | import("axios").AxiosResponse<iGetC6RestResponse<iZip_Codes>, any> | null | undefined>;
12
+ Post: (request?: Omit<iZip_Codes, never> & {
13
+ dataInsertMultipleRows?: Omit<iZip_Codes, never>[] | undefined;
14
+ cacheResults?: boolean;
15
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
16
+ debug?: boolean;
17
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
18
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
19
+ }) => Promise<import("axios").AxiosResponse<iPostC6RestResponse<iZip_Codes>, any> | null | undefined>;
20
+ Put: (request?: Omit<iZip_Codes, never> & {
21
+ dataInsertMultipleRows?: Omit<iZip_Codes, never>[] | undefined;
22
+ cacheResults?: boolean;
23
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
24
+ debug?: boolean;
25
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
26
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
27
+ }) => Promise<import("axios").AxiosResponse<iPutC6RestResponse<iZip_Codes, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iZip_Codes, never> & {
29
+ dataInsertMultipleRows?: Omit<iZip_Codes, never>[] | undefined;
30
+ cacheResults?: boolean;
31
+ fetchDependencies?: number | import("@carbonorm/carbonnode").eFetchDependencies | Awaited<import("@carbonorm/carbonnode").apiReturn<iGetC6RestResponse<any>>>[];
32
+ debug?: boolean;
33
+ success?: string | ((r: import("axios").AxiosResponse) => (string | void));
34
+ error?: string | ((r: import("axios").AxiosResponse) => (string | void));
35
+ }) => Promise<import("axios").AxiosResponse<iDeleteC6RestResponse<iZip_Codes, any>, any> | null | undefined>;
36
+ };
37
+ export default Zip_Codes;
@@ -0,0 +1,15 @@
1
+ import { iZip_Codes } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `zip_codes` (
4
+ `zip_id` binary(16) NOT NULL DEFAULT (uuid_to_bin(uuid(),1)),
5
+ `zip_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
6
+ `geometry_id` binary(16) NOT NULL,
7
+ `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
8
+ PRIMARY KEY (`zip_id`),
9
+ UNIQUE KEY `uq_zip_geometry` (`geometry_id`),
10
+ KEY `idx_zip_code` (`zip_code`),
11
+ CONSTRAINT `zip_codes_ibfk_1` FOREIGN KEY (`geometry_id`) REFERENCES `geometries` (`geometry_id`) ON DELETE RESTRICT
12
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
13
+ **/
14
+ declare const Test_Data: iZip_Codes;
15
+ export default Test_Data;
@@ -1,148 +1,12 @@
1
- import { iC6RestfulModel, iDynamicApiImport } from "api/interfaces/ormInterfaces";
2
- import { AxiosInstance, AxiosPromise, AxiosResponse } from "axios";
3
- export declare function TestRestfulResponse(response: AxiosResponse | any, success: ((r: AxiosResponse) => (string | void)) | string | undefined, error: ((r: AxiosResponse) => (string | void)) | string | undefined): string | boolean | number;
4
- export declare function removeInvalidKeys<iRestObject>(request: any, c6Tables: {
5
- [key: string]: (iC6RestfulModel & {
6
- [key: string]: any;
7
- });
8
- }): iRestObject;
9
- export type Modify<T, R> = Omit<T, keyof R> & R;
10
- export type ModifyDeep<A, B extends DeepPartialAny<A>> = {
11
- [K in keyof A | keyof B]?: K extends keyof A ? K extends keyof B ? A[K] extends AnyObject ? B[K] extends AnyObject ? ModifyDeep<A[K], B[K]> : B[K] : B[K] : A[K] : B[K];
12
- };
13
- type AnyObject = Record<string, any>;
14
- type DeepPartialAny<T> = {
15
- [P in keyof T]?: T[P] extends AnyObject ? DeepPartialAny<T[P]> : any;
16
- };
17
- export declare enum eFetchDependencies {
18
- NONE = 0,
19
- REFERENCED = 1,
20
- CHILDREN = 1,
21
- REFERENCES = 2,
22
- PARENTS = 2,
23
- ALL = 3,
24
- C6ENTITY = 4,
25
- RECURSIVE = 8
26
- }
27
- export type iAPI<RestTableInterfaces extends {
28
- [key: string]: any;
29
- }> = RestTableInterfaces & {
30
- dataInsertMultipleRows?: RestTableInterfaces[];
31
- cacheResults?: boolean;
32
- fetchDependencies?: number | eFetchDependencies | Awaited<apiReturn<iGetC6RestResponse<any>>>[];
33
- debug?: boolean;
34
- success?: string | ((r: AxiosResponse) => (string | void));
35
- error?: string | ((r: AxiosResponse) => (string | void));
36
- };
37
- export declare function checkAllRequestsComplete(): true | (string[]);
38
- interface iClearCache {
39
- ignoreWarning: boolean;
40
- }
41
- export declare function clearCache(props?: iClearCache): void;
42
- export declare function removePrefixIfExists(tableName: string, prefix: string): string;
1
+ import { Modify } from "./types/modifyTypes";
2
+ import { apiReturn, iAPI, iRest } from "./types/ormInterfaces";
43
3
  /**
44
- * the first argument ....
45
- *
46
- * Our api returns a zero argument function iff the method is get and the previous request reached the predefined limit.
47
- * This function can be aliased as GetNextPageOfResults(). If the end is reached undefined will be returned.
48
- *
49
- *
50
- * For POST, PUT, and DELETE requests one can expect the primary key of the new or modified index, or a boolean success
51
- * indication if no primary key exists.
52
- **/
53
- export declare const POST = "POST";
54
- export declare const PUT = "PUT";
55
- export declare const GET = "GET";
56
- export declare const DELETE = "DELETE";
57
- export type iRestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE';
58
- export type RequestGetPutDeleteBody = {
59
- SELECT?: any;
60
- UPDATE?: any;
61
- DELETE?: any;
62
- WHERE?: any;
63
- JOIN?: {
64
- LEFT?: any;
65
- RIGHT?: any;
66
- INNER?: any;
67
- };
68
- PAGINATION?: {
69
- PAGE?: number;
70
- LIMIT?: number;
71
- };
72
- };
73
- export type RequestQueryBody<RestTableInterfaces extends {
74
- [key: string]: any;
75
- }> = iAPI<RestTableInterfaces> | RequestGetPutDeleteBody;
76
- export declare function isPromise(x: any): boolean;
77
- interface iC6RestResponse<RestData> {
78
- rest: RestData;
79
- session?: any;
80
- sql?: any;
81
- }
82
- interface iChangeC6Data {
83
- rowCount: number;
84
- }
85
- export interface iDeleteC6RestResponse<RestData = any, RequestData = any> extends iChangeC6Data, iC6RestResponse<RestData> {
86
- deleted: boolean | number | string | RequestData;
87
- }
88
- export interface iPostC6RestResponse<RestData = any> extends iC6RestResponse<RestData> {
89
- created: boolean | number | string;
90
- }
91
- export interface iPutC6RestResponse<RestData = any, RequestData = any> extends iChangeC6Data, iC6RestResponse<RestData> {
92
- updated: boolean | number | string | RequestData;
93
- }
94
- export interface iC6Object {
95
- C6VERSION: string;
96
- TABLES: {
97
- [key: string]: iC6RestfulModel & {
98
- [key: string]: string | number;
99
- };
100
- };
101
- PREFIX: string;
102
- IMPORT: (tableName: string) => Promise<iDynamicApiImport>;
103
- [key: string]: any;
104
- }
105
- export type iGetC6RestResponse<ResponseDataType, ResponseDataOverrides = {}> = iC6RestResponse<Modify<ResponseDataType, ResponseDataOverrides> | Modify<ResponseDataType, ResponseDataOverrides>[]>;
106
- export type apiReturn<Response> = null | undefined | AxiosPromise<Response> | (Response extends iPutC6RestResponse | iDeleteC6RestResponse | iPostC6RestResponse ? null : (() => apiReturn<Response>));
107
- interface iRest<CustomAndRequiredFields extends {
108
- [key: string]: any;
109
- }, RestTableInterfaces extends {
110
- [key: string]: any;
111
- }, RequestTableOverrides = {
112
- [key in keyof RestTableInterfaces]: any;
113
- }, ResponseDataType = any, RestShortTableNames extends string = any> {
114
- C6: iC6Object;
115
- axios?: AxiosInstance;
116
- restURL?: string;
117
- withCredentials?: boolean;
118
- tableName: RestShortTableNames | RestShortTableNames[];
119
- requestMethod: iRestMethods;
120
- clearCache?: () => void;
121
- skipPrimaryCheck?: boolean;
122
- queryCallback: RequestQueryBody<Modify<RestTableInterfaces, RequestTableOverrides>> | ((request: iAPI<Modify<RestTableInterfaces, RequestTableOverrides>> & CustomAndRequiredFields) => (null | undefined | RequestQueryBody<Modify<RestTableInterfaces, RequestTableOverrides>>));
123
- responseCallback?: (response: AxiosResponse<ResponseDataType>, request: iAPI<Modify<RestTableInterfaces, RequestTableOverrides>> & CustomAndRequiredFields, success: (ResponseDataType extends iPutC6RestResponse | iDeleteC6RestResponse ? RequestQueryBody<Modify<RestTableInterfaces, RequestTableOverrides>> : string) | string | number | boolean) => any;
124
- }
125
- export declare function extendedTypeHints<RestTableInterfaces extends {
126
- [key: string]: any;
127
- }, RestShortTableNames extends string>(): <CustomAndRequiredFields extends {
128
- [key: string]: any;
129
- } = any, RequestTableTypes extends RestTableInterfaces = any, RequestTableOverrides extends {
130
- [key: string]: any;
131
- } = any, ResponseDataType extends {
132
- [key: string]: any;
133
- } = any>(argv: any) => (request?: Omit<RequestTableTypes, keyof RequestTableOverrides> & RequestTableOverrides & {
134
- dataInsertMultipleRows?: Modify<RequestTableTypes, RequestTableOverrides>[] | undefined;
135
- cacheResults?: boolean;
136
- fetchDependencies?: number | eFetchDependencies | Awaited<apiReturn<iGetC6RestResponse<any>>>[];
137
- debug?: boolean;
138
- success?: string | ((r: AxiosResponse) => (string | void));
139
- error?: string | ((r: AxiosResponse) => (string | void));
140
- } & CustomAndRequiredFields) => apiReturn<ResponseDataType>;
4
+ * Facade: routes API calls to SQL or HTTP executors based on runtime context.
5
+ */
141
6
  export default function restRequest<CustomAndRequiredFields extends {
142
7
  [key: string]: any;
143
8
  } = any, RestTableInterfaces extends {
144
9
  [key: string]: any;
145
10
  } = any, RequestTableOverrides extends {
146
11
  [key: string]: any;
147
- } = any, ResponseDataType = any, RestShortTableNames extends string = any>({ C6, axios, restURL, withCredentials, tableName, requestMethod, queryCallback, responseCallback, skipPrimaryCheck, clearCache }: iRest<CustomAndRequiredFields, RestTableInterfaces, RequestTableOverrides, ResponseDataType, RestShortTableNames>): (request?: iAPI<Modify<RestTableInterfaces, RequestTableOverrides>> & CustomAndRequiredFields) => apiReturn<ResponseDataType>;
148
- export {};
12
+ } = any, ResponseDataType = any, RestShortTableNames extends string = any>(config: iRest<CustomAndRequiredFields, RestTableInterfaces, RequestTableOverrides, ResponseDataType, RestShortTableNames>): (request?: iAPI<Modify<RestTableInterfaces, RequestTableOverrides>> & CustomAndRequiredFields) => Promise<apiReturn<ResponseDataType>>;
@@ -0,0 +1,10 @@
1
+ export declare enum eFetchDependencies {
2
+ NONE = 0,
3
+ REFERENCED = 1,
4
+ CHILDREN = 1,
5
+ REFERENCES = 2,
6
+ PARENTS = 2,
7
+ ALL = 3,
8
+ C6ENTITY = 4,
9
+ RECURSIVE = 8
10
+ }
@@ -0,0 +1,9 @@
1
+ export type Modify<T, R> = Omit<T, keyof R> & R;
2
+ export type ModifyDeep<A, B extends DeepPartialAny<A>> = {
3
+ [K in keyof A | keyof B]?: K extends keyof A ? K extends keyof B ? A[K] extends AnyObject ? B[K] extends AnyObject ? ModifyDeep<A[K], B[K]> : B[K] : B[K] : A[K] : B[K];
4
+ };
5
+ type AnyObject = Record<string, any>;
6
+ type DeepPartialAny<T> = {
7
+ [P in keyof T]?: T[P] extends AnyObject ? DeepPartialAny<T[P]> : any;
8
+ };
9
+ export {};
@@ -0,0 +1,4 @@
1
+ export type SQLFunction = 'COUNT' | 'GROUP_CONCAT' | 'MAX' | 'MIN' | 'SUM' | 'DISTINCT';
2
+ export type SQLComparisonOperator = '=' | '!=' | '<' | '<=' | '>' | '>=' | 'IN' | 'NOT IN' | 'LIKE' | 'IS NULL' | 'IS NOT NULL' | 'BETWEEN' | 'LESS_THAN' | 'GREATER_THAN';
3
+ export type JoinType = 'INNER' | 'LEFT_OUTER' | 'RIGHT_OUTER';
4
+ export type OrderDirection = 'ASC' | 'DESC';
@@ -0,0 +1,223 @@
1
+ import { AxiosInstance, AxiosPromise, AxiosResponse } from "axios";
2
+ import { Pool } from "mysql2/promise";
3
+ import { eFetchDependencies } from "./dynamicFetching";
4
+ import { Modify } from "./modifyTypes";
5
+ import { JoinType, OrderDirection, SQLComparisonOperator, SQLFunction } from "./mysqlTypes";
6
+ export interface stringMap {
7
+ [key: string]: string;
8
+ }
9
+ export interface stringNumberMap {
10
+ [key: string]: string | number;
11
+ }
12
+ export interface RegExpMap {
13
+ [key: string]: RegExp | RegExpMap;
14
+ }
15
+ export interface complexMap {
16
+ [key: string]: stringMap | stringNumberMap | stringMap[] | RegExpMap;
17
+ }
18
+ export interface iTypeValidation {
19
+ MYSQL_TYPE: string;
20
+ MAX_LENGTH: string;
21
+ AUTO_INCREMENT: boolean;
22
+ SKIP_COLUMN_IN_POST: boolean;
23
+ }
24
+ export type iRestReactiveLifecycle<T extends RequestGetPutDeleteBody> = {
25
+ beforeProcessing?: (args: {
26
+ request: T[];
27
+ requestMeta?: any;
28
+ }) => void | Promise<void>;
29
+ beforeExecution?: (args: {
30
+ request: T[];
31
+ requestMeta?: any;
32
+ }) => void | Promise<void>;
33
+ afterExecution?: (args: {
34
+ response: T[];
35
+ request: T[];
36
+ responseMeta?: any;
37
+ }) => void | Promise<void>;
38
+ afterCommit?: (args: {
39
+ response: T[];
40
+ request: T[];
41
+ responseMeta?: any;
42
+ }) => void | Promise<void>;
43
+ };
44
+ export interface iConstraint {
45
+ TABLE: string;
46
+ COLUMN: string;
47
+ CONSTRAINT: string;
48
+ }
49
+ export interface iC6RestfulModel<RestShortTableNames extends string = string> {
50
+ TABLE_NAME: RestShortTableNames;
51
+ PRIMARY: string[];
52
+ PRIMARY_SHORT: string[];
53
+ COLUMNS: stringMap;
54
+ LIFECYCLE_HOOKS: iRestReactiveLifecycle<RequestGetPutDeleteBody>[];
55
+ REGEX_VALIDATION: RegExpMap;
56
+ TYPE_VALIDATION: {
57
+ [key: string]: iTypeValidation;
58
+ };
59
+ TABLE_REFERENCES: {
60
+ [columnName: string]: iConstraint[];
61
+ };
62
+ TABLE_REFERENCED_BY: {
63
+ [columnName: string]: iConstraint[];
64
+ };
65
+ }
66
+ export interface iRestApiFunctions<RestData = any> {
67
+ Delete: (request?: (iAPI<any> & any)) => apiReturn<iDeleteC6RestResponse<RestData>>;
68
+ Post: (request?: (iAPI<any> & any)) => apiReturn<iPostC6RestResponse<RestData>>;
69
+ Get: (request?: (iAPI<any> & any)) => apiReturn<iGetC6RestResponse<RestData>>;
70
+ Put: (request?: (iAPI<any> & any)) => apiReturn<iPutC6RestResponse<RestData>>;
71
+ }
72
+ export interface iDynamicApiImport<RestData = any> {
73
+ default: iRestApiFunctions<RestData>;
74
+ postState?: (response: AxiosResponse<iPostC6RestResponse<RestData>>, request: iAPI<any>, id: string | number | boolean) => void;
75
+ deleteState?: (response: AxiosResponse<iDeleteC6RestResponse<RestData>>, request: iAPI<any>) => void;
76
+ putState?: (response: AxiosResponse<iPutC6RestResponse<RestData>>, request: iAPI<any>) => void;
77
+ }
78
+ export interface tC6Tables {
79
+ [key: string]: (iC6RestfulModel & {
80
+ [key: string]: any;
81
+ });
82
+ }
83
+ export interface tC6RestApi {
84
+ [key: string]: {
85
+ REST: iRestApiFunctions;
86
+ PUT: Function;
87
+ POST: Function;
88
+ DELETE: Function;
89
+ };
90
+ }
91
+ export type iAPI<RestTableInterfaces extends {
92
+ [key: string]: any;
93
+ }> = RestTableInterfaces & {
94
+ dataInsertMultipleRows?: RestTableInterfaces[];
95
+ cacheResults?: boolean;
96
+ fetchDependencies?: number | eFetchDependencies | Awaited<apiReturn<iGetC6RestResponse<any>>>[];
97
+ debug?: boolean;
98
+ success?: string | ((r: AxiosResponse) => (string | void));
99
+ error?: string | ((r: AxiosResponse) => (string | void));
100
+ };
101
+ export interface iCacheAPI<ResponseDataType = any> {
102
+ requestArgumentsSerialized: string;
103
+ request: AxiosPromise<ResponseDataType>;
104
+ response?: AxiosResponse;
105
+ final?: boolean;
106
+ }
107
+ /**
108
+ * the first argument ....
109
+ *
110
+ * Our api returns a zero argument function iff the method is get and the previous request reached the predefined limit.
111
+ * This function can be aliased as GetNextPageOfResults(). If the end is reached undefined will be returned.
112
+ *
113
+ *
114
+ * For POST, PUT, and DELETE requests one can expect the primary key of the new or modified index, or a boolean success
115
+ * indication if no primary key exists.
116
+ **/
117
+ export declare const POST = "POST";
118
+ export declare const PUT = "PUT";
119
+ export declare const GET = "GET";
120
+ export declare const DELETE = "DELETE";
121
+ export type iRestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE';
122
+ export type SubSelect<T = any> = {
123
+ subSelect: true;
124
+ table: string;
125
+ args: RequestGetPutDeleteBody<T>;
126
+ alias: string;
127
+ };
128
+ export type SelectField<T = any> = keyof T | [keyof T, 'AS', string] | [SQLFunction, keyof T] | [SQLFunction, keyof T, string] | SubSelect<T>;
129
+ export type WhereClause<T = any> = Partial<T> | LogicalGroup<T> | ComparisonClause<T>;
130
+ export type LogicalGroup<T = any> = {
131
+ [logicalGroup: string]: Array<WhereClause<T>>;
132
+ };
133
+ export type ComparisonClause<T = any> = [keyof T, SQLComparisonOperator, any];
134
+ export type JoinTableCondition<T = any> = Partial<T> | WhereClause<T>[] | ComparisonClause<T>[];
135
+ export type JoinClause<T = any> = {
136
+ [table: string]: JoinTableCondition<T>;
137
+ };
138
+ export type Join<T = any> = {
139
+ [K in JoinType]?: JoinClause<T>;
140
+ };
141
+ export type Pagination<T = any> = {
142
+ PAGE?: number;
143
+ LIMIT?: number | null;
144
+ ORDER?: Partial<Record<keyof T, OrderDirection>>;
145
+ };
146
+ export type RequestGetPutDeleteBody<T = any> = {
147
+ SELECT?: SelectField<T>[];
148
+ UPDATE?: Partial<T>;
149
+ DELETE?: boolean;
150
+ WHERE?: WhereClause<T>;
151
+ JOIN?: Join<T>;
152
+ PAGINATION?: Pagination<T>;
153
+ };
154
+ export type RequestQueryBody<RestTableInterfaces extends {
155
+ [key: string]: any;
156
+ }> = iAPI<RestTableInterfaces> | RequestGetPutDeleteBody;
157
+ export declare function isPromise(x: any): boolean;
158
+ interface iC6RestResponse<RestData> {
159
+ rest: RestData;
160
+ session?: any;
161
+ sql?: any;
162
+ }
163
+ interface iChangeC6Data {
164
+ rowCount: number;
165
+ }
166
+ export interface iDeleteC6RestResponse<RestData = any, RequestData = any> extends iChangeC6Data, iC6RestResponse<RestData> {
167
+ deleted: boolean | number | string | RequestData;
168
+ }
169
+ export interface iPostC6RestResponse<RestData = any> extends iC6RestResponse<RestData> {
170
+ created: boolean | number | string;
171
+ }
172
+ export interface iPutC6RestResponse<RestData = any, RequestData = any> extends iChangeC6Data, iC6RestResponse<RestData> {
173
+ updated: boolean | number | string | RequestData;
174
+ }
175
+ export interface iC6Object {
176
+ C6VERSION: string;
177
+ TABLES: {
178
+ [key: string]: iC6RestfulModel & {
179
+ [key: string]: string | number;
180
+ };
181
+ };
182
+ PREFIX: string;
183
+ IMPORT: (tableName: string) => Promise<iDynamicApiImport>;
184
+ [key: string]: any;
185
+ }
186
+ export type iGetC6RestResponse<ResponseDataType, ResponseDataOverrides = {}> = iC6RestResponse<Modify<ResponseDataType, ResponseDataOverrides> | Modify<ResponseDataType, ResponseDataOverrides>[]>;
187
+ export type apiReturn<Response> = null | undefined | AxiosPromise<Response> | (Response extends iPutC6RestResponse | iDeleteC6RestResponse | iPostC6RestResponse ? null : (() => apiReturn<Response>));
188
+ export interface iRest<CustomAndRequiredFields extends {
189
+ [key: string]: any;
190
+ }, RestTableInterfaces extends {
191
+ [key: string]: any;
192
+ }, RequestTableOverrides = {
193
+ [key in keyof RestTableInterfaces]: any;
194
+ }, ResponseDataType = any, RestShortTableNames extends string = any> {
195
+ C6: iC6Object;
196
+ axios?: AxiosInstance;
197
+ restURL?: string;
198
+ mysqlPool?: Pool;
199
+ withCredentials?: boolean;
200
+ tableName: RestShortTableNames | RestShortTableNames[];
201
+ requestMethod: iRestMethods;
202
+ clearCache?: () => void;
203
+ skipPrimaryCheck?: boolean;
204
+ queryCallback: RequestQueryBody<Modify<RestTableInterfaces, RequestTableOverrides>> | ((request: iAPI<Modify<RestTableInterfaces, RequestTableOverrides>> & CustomAndRequiredFields) => (null | undefined | RequestQueryBody<Modify<RestTableInterfaces, RequestTableOverrides>>));
205
+ responseCallback?: (response: AxiosResponse<ResponseDataType>, request: iAPI<Modify<RestTableInterfaces, RequestTableOverrides>> & CustomAndRequiredFields, success: (ResponseDataType extends iPutC6RestResponse | iDeleteC6RestResponse ? RequestQueryBody<Modify<RestTableInterfaces, RequestTableOverrides>> : string) | string | number | boolean) => any;
206
+ }
207
+ export declare function extendedTypeHints<RestTableInterfaces extends {
208
+ [key: string]: any;
209
+ }, RestShortTableNames extends string>(): <CustomAndRequiredFields extends {
210
+ [key: string]: any;
211
+ } = any, RequestTableTypes extends RestTableInterfaces = any, RequestTableOverrides extends {
212
+ [key: string]: any;
213
+ } = any, ResponseDataType extends {
214
+ [key: string]: any;
215
+ } = any>(argv: any) => (request?: Omit<RequestTableTypes, keyof RequestTableOverrides> & RequestTableOverrides & {
216
+ dataInsertMultipleRows?: Modify<RequestTableTypes, RequestTableOverrides>[] | undefined;
217
+ cacheResults?: boolean;
218
+ fetchDependencies?: number | eFetchDependencies | Awaited<apiReturn<iGetC6RestResponse<any>>>[];
219
+ debug?: boolean;
220
+ success?: string | ((r: AxiosResponse) => (string | void));
221
+ error?: string | ((r: AxiosResponse) => (string | void));
222
+ } & CustomAndRequiredFields) => Promise<apiReturn<ResponseDataType>>;
223
+ export {};
@@ -0,0 +1,9 @@
1
+ import { AxiosResponse } from "axios";
2
+ import { iC6RestfulModel } from "../types/ormInterfaces";
3
+ export declare function TestRestfulResponse(response: AxiosResponse | any, success: ((r: AxiosResponse) => (string | void)) | string | undefined, error: ((r: AxiosResponse) => (string | void)) | string | undefined): string | boolean | number;
4
+ export declare function removePrefixIfExists(tableName: string, prefix: string): string;
5
+ export declare function removeInvalidKeys<iRestObject>(request: any, c6Tables: {
6
+ [key: string]: (iC6RestfulModel & {
7
+ [key: string]: any;
8
+ });
9
+ }): iRestObject;