@carbonorm/carbonnode 2.0.33 → 3.0.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.
Files changed (84) hide show
  1. package/dist/api/carbonSqlExecutor.d.ts +17 -0
  2. package/dist/api/interfaces/ormInterfaces.d.ts +22 -1
  3. package/dist/api/rest/Blog_Categories.d.ts +37 -0
  4. package/dist/api/rest/Blog_Categories.test.d.ts +11 -0
  5. package/dist/api/rest/Blog_Images.d.ts +37 -0
  6. package/dist/api/rest/Blog_Images.test.d.ts +15 -0
  7. package/dist/api/rest/Blog_Post_Categories.d.ts +37 -0
  8. package/dist/api/rest/Blog_Post_Categories.test.d.ts +13 -0
  9. package/dist/api/rest/Blog_Post_Tags.d.ts +37 -0
  10. package/dist/api/rest/Blog_Post_Tags.test.d.ts +13 -0
  11. package/dist/api/rest/Blog_Posts.d.ts +37 -0
  12. package/dist/api/rest/Blog_Posts.test.d.ts +21 -0
  13. package/dist/api/rest/Blog_Tags.d.ts +37 -0
  14. package/dist/api/rest/Blog_Tags.test.d.ts +11 -0
  15. package/dist/api/rest/C6.d.ts +1000 -0
  16. package/dist/api/rest/Cache.d.ts +37 -0
  17. package/dist/api/rest/Cache.test.d.ts +12 -0
  18. package/dist/api/rest/Cities.d.ts +37 -0
  19. package/dist/api/rest/Cities.test.d.ts +17 -0
  20. package/dist/api/rest/Counties.d.ts +37 -0
  21. package/dist/api/rest/Counties.test.d.ts +18 -0
  22. package/dist/api/rest/Countries.d.ts +37 -0
  23. package/dist/api/rest/Countries.test.d.ts +24 -0
  24. package/dist/api/rest/Geometries.d.ts +37 -0
  25. package/dist/api/rest/Geometries.test.d.ts +16 -0
  26. package/dist/api/rest/Images.d.ts +37 -0
  27. package/dist/api/rest/Images.test.d.ts +16 -0
  28. package/dist/api/rest/Land_Section_Info.d.ts +37 -0
  29. package/dist/api/rest/Land_Section_Info.test.d.ts +15 -0
  30. package/dist/api/rest/Neighborhoods.d.ts +37 -0
  31. package/dist/api/rest/Neighborhoods.test.d.ts +12 -0
  32. package/dist/api/rest/Parcel_Building_Details.d.ts +37 -0
  33. package/dist/api/rest/Parcel_Building_Details.test.d.ts +40 -0
  34. package/dist/api/rest/Parcel_Neighborhoods.d.ts +37 -0
  35. package/dist/api/rest/Parcel_Neighborhoods.test.d.ts +15 -0
  36. package/dist/api/rest/Parcel_Owners.d.ts +37 -0
  37. package/dist/api/rest/Parcel_Owners.test.d.ts +23 -0
  38. package/dist/api/rest/Parcel_Sales.d.ts +37 -0
  39. package/dist/api/rest/Parcel_Sales.test.d.ts +19 -0
  40. package/dist/api/rest/Parcel_Tax_History.d.ts +37 -0
  41. package/dist/api/rest/Parcel_Tax_History.test.d.ts +24 -0
  42. package/dist/api/rest/Parcels.d.ts +37 -0
  43. package/dist/api/rest/Parcels.test.d.ts +42 -0
  44. package/dist/api/rest/Payment_Charge_Logs.d.ts +37 -0
  45. package/dist/api/rest/Payment_Charge_Logs.test.d.ts +17 -0
  46. package/dist/api/rest/Payment_Subscriptions.d.ts +37 -0
  47. package/dist/api/rest/Payment_Subscriptions.test.d.ts +20 -0
  48. package/dist/api/rest/Property_Units.d.ts +37 -0
  49. package/dist/api/rest/Property_Units.test.d.ts +55 -0
  50. package/dist/api/rest/Sources.d.ts +37 -0
  51. package/dist/api/rest/Sources.test.d.ts +17 -0
  52. package/dist/api/rest/States.d.ts +37 -0
  53. package/dist/api/rest/States.test.d.ts +20 -0
  54. package/dist/api/rest/Tax_Districts.d.ts +37 -0
  55. package/dist/api/rest/Tax_Districts.test.d.ts +12 -0
  56. package/dist/api/rest/Users.d.ts +37 -0
  57. package/dist/api/rest/Users.test.d.ts +14 -0
  58. package/dist/api/rest/Valuation_Reports.d.ts +37 -0
  59. package/dist/api/rest/Valuation_Reports.test.d.ts +36 -0
  60. package/dist/api/rest/Zip_Codes.d.ts +37 -0
  61. package/dist/api/rest/Zip_Codes.test.d.ts +15 -0
  62. package/dist/api/restRequest.d.ts +44 -21
  63. package/dist/index.cjs.js +903 -558
  64. package/dist/index.cjs.js.map +1 -1
  65. package/dist/index.d.ts +4 -0
  66. package/dist/index.esm.js +899 -557
  67. package/dist/index.esm.js.map +1 -1
  68. package/dist/variables/getEnvVar.d.ts +1 -0
  69. package/dist/variables/isNode.d.ts +2 -0
  70. package/dist/variables/isTest.d.ts +1 -1
  71. package/dist/variables/toastOptions.d.ts +2 -2
  72. package/package.json +23 -12
  73. package/scripts/assets/handlebars/C6.ts.handlebars +5 -1
  74. package/scripts/generateRestBindings.cjs +89 -23
  75. package/scripts/generateRestBindings.ts +100 -27
  76. package/src/api/carbonSqlExecutor.ts +279 -0
  77. package/src/api/interfaces/ormInterfaces.ts +9 -1
  78. package/src/api/restRequest.ts +164 -19
  79. package/src/index.ts +4 -0
  80. package/src/variables/getEnvVar.ts +15 -0
  81. package/src/variables/isLocal.ts +3 -6
  82. package/src/variables/isNode.ts +3 -0
  83. package/src/variables/isTest.ts +4 -16
  84. package/src/variables/isVerbose.ts +2 -6
@@ -0,0 +1,17 @@
1
+ import { iC6Object } from "@carbonorm/carbonnode";
2
+ import { Pool, RowDataPacket } from 'mysql2/promise';
3
+ import { Request, Response, NextFunction } from 'express';
4
+ export declare class CarbonSqlExecutor {
5
+ private pool;
6
+ private C6;
7
+ constructor(pool: Pool, C6: iC6Object);
8
+ private withConnection;
9
+ handle(req: Request, res: Response, next: NextFunction): Promise<void>;
10
+ private buildBooleanJoinedConditions;
11
+ private buildAggregateField;
12
+ private buildSelectQuery;
13
+ select<RestShortTableNames>(table: RestShortTableNames, primary: string | undefined, args: any): Promise<RowDataPacket[]>;
14
+ insert<RestShortTableNames>(table: RestShortTableNames, data: any): Promise<import("mysql2/promise").QueryResult>;
15
+ update<RestShortTableNames>(table: RestShortTableNames, primary: string | undefined, data: any): Promise<import("mysql2/promise").QueryResult>;
16
+ delete<RestShortTableNames>(table: RestShortTableNames, primary: string | undefined, args: any): Promise<import("mysql2/promise").QueryResult>;
17
+ }
@@ -1,4 +1,4 @@
1
- import { apiReturn, iAPI, iDeleteC6RestResponse, iPostC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "api/restRequest";
1
+ import { apiReturn, iAPI, iDeleteC6RestResponse, iPostC6RestResponse, iGetC6RestResponse, iPutC6RestResponse, RequestGetPutDeleteBody } from "api/restRequest";
2
2
  import { AxiosResponse } from "axios";
3
3
  export interface stringMap {
4
4
  [key: string]: string;
@@ -18,6 +18,26 @@ export interface iTypeValidation {
18
18
  AUTO_INCREMENT: boolean;
19
19
  SKIP_COLUMN_IN_POST: boolean;
20
20
  }
21
+ export type iRestReactiveLifecycle<T extends RequestGetPutDeleteBody> = {
22
+ beforeProcessing?: (args: {
23
+ request: T[];
24
+ requestMeta?: any;
25
+ }) => void | Promise<void>;
26
+ beforeExecution?: (args: {
27
+ request: T[];
28
+ requestMeta?: any;
29
+ }) => void | Promise<void>;
30
+ afterExecution?: (args: {
31
+ response: T[];
32
+ request: T[];
33
+ responseMeta?: any;
34
+ }) => void | Promise<void>;
35
+ afterCommit?: (args: {
36
+ response: T[];
37
+ request: T[];
38
+ responseMeta?: any;
39
+ }) => void | Promise<void>;
40
+ };
21
41
  export interface iConstraint {
22
42
  TABLE: string;
23
43
  COLUMN: string;
@@ -28,6 +48,7 @@ export interface iC6RestfulModel<RestShortTableNames extends string = string> {
28
48
  PRIMARY: string[];
29
49
  PRIMARY_SHORT: string[];
30
50
  COLUMNS: stringMap;
51
+ LIFECYCLE_HOOKS: iRestReactiveLifecycle<RequestGetPutDeleteBody>[];
31
52
  REGEX_VALIDATION: RegExpMap;
32
53
  TYPE_VALIDATION: {
33
54
  [key: string]: iTypeValidation;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iBlog_Categories } from "./C6";
3
+ declare const Blog_Categories: {
4
+ Get: (request?: Omit<iBlog_Categories, never> & {
5
+ dataInsertMultipleRows?: Omit<iBlog_Categories, 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<iBlog_Categories>>) | import("axios").AxiosResponse<iGetC6RestResponse<iBlog_Categories>, any> | null | undefined>;
12
+ Post: (request?: Omit<iBlog_Categories, never> & {
13
+ dataInsertMultipleRows?: Omit<iBlog_Categories, 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<iBlog_Categories>, any> | null | undefined>;
20
+ Put: (request?: Omit<iBlog_Categories, never> & {
21
+ dataInsertMultipleRows?: Omit<iBlog_Categories, 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<iBlog_Categories, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iBlog_Categories, never> & {
29
+ dataInsertMultipleRows?: Omit<iBlog_Categories, 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<iBlog_Categories, any>, any> | null | undefined>;
36
+ };
37
+ export default Blog_Categories;
@@ -0,0 +1,11 @@
1
+ import { iBlog_Categories } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `blog_categories` (
4
+ `category_id` binary(16) NOT NULL DEFAULT (uuid_to_bin(uuid(),1)),
5
+ `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
6
+ PRIMARY KEY (`category_id`),
7
+ UNIQUE KEY `name` (`name`)
8
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
9
+ **/
10
+ declare const Test_Data: iBlog_Categories;
11
+ export default Test_Data;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iBlog_Images } from "./C6";
3
+ declare const Blog_Images: {
4
+ Get: (request?: Omit<iBlog_Images, never> & {
5
+ dataInsertMultipleRows?: Omit<iBlog_Images, 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<iBlog_Images>>) | import("axios").AxiosResponse<iGetC6RestResponse<iBlog_Images>, any> | null | undefined>;
12
+ Post: (request?: Omit<iBlog_Images, never> & {
13
+ dataInsertMultipleRows?: Omit<iBlog_Images, 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<iBlog_Images>, any> | null | undefined>;
20
+ Put: (request?: Omit<iBlog_Images, never> & {
21
+ dataInsertMultipleRows?: Omit<iBlog_Images, 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<iBlog_Images, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iBlog_Images, never> & {
29
+ dataInsertMultipleRows?: Omit<iBlog_Images, 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<iBlog_Images, any>, any> | null | undefined>;
36
+ };
37
+ export default Blog_Images;
@@ -0,0 +1,15 @@
1
+ import { iBlog_Images } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `blog_images` (
4
+ `image_id` binary(16) NOT NULL DEFAULT (uuid_to_bin(uuid(),1)),
5
+ `post_id` binary(16) NOT NULL,
6
+ `label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
7
+ `data_uri` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
8
+ `uploaded_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
9
+ PRIMARY KEY (`image_id`),
10
+ KEY `post_id` (`post_id`),
11
+ CONSTRAINT `blog_images_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `blog_posts` (`post_id`) ON DELETE CASCADE
12
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
13
+ **/
14
+ declare const Test_Data: iBlog_Images;
15
+ export default Test_Data;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iBlog_Post_Categories } from "./C6";
3
+ declare const Blog_Post_Categories: {
4
+ Get: (request?: Omit<iBlog_Post_Categories, never> & {
5
+ dataInsertMultipleRows?: Omit<iBlog_Post_Categories, 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<iBlog_Post_Categories>>) | import("axios").AxiosResponse<iGetC6RestResponse<iBlog_Post_Categories>, any> | null | undefined>;
12
+ Post: (request?: Omit<iBlog_Post_Categories, never> & {
13
+ dataInsertMultipleRows?: Omit<iBlog_Post_Categories, 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<iBlog_Post_Categories>, any> | null | undefined>;
20
+ Put: (request?: Omit<iBlog_Post_Categories, never> & {
21
+ dataInsertMultipleRows?: Omit<iBlog_Post_Categories, 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<iBlog_Post_Categories, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iBlog_Post_Categories, never> & {
29
+ dataInsertMultipleRows?: Omit<iBlog_Post_Categories, 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<iBlog_Post_Categories, any>, any> | null | undefined>;
36
+ };
37
+ export default Blog_Post_Categories;
@@ -0,0 +1,13 @@
1
+ import { iBlog_Post_Categories } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `blog_post_categories` (
4
+ `post_id` binary(16) NOT NULL,
5
+ `category_id` binary(16) NOT NULL,
6
+ PRIMARY KEY (`post_id`,`category_id`),
7
+ KEY `category_id` (`category_id`),
8
+ CONSTRAINT `blog_post_categories_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `blog_posts` (`post_id`) ON DELETE CASCADE,
9
+ CONSTRAINT `blog_post_categories_ibfk_2` FOREIGN KEY (`category_id`) REFERENCES `blog_categories` (`category_id`) ON DELETE CASCADE
10
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
11
+ **/
12
+ declare const Test_Data: iBlog_Post_Categories;
13
+ export default Test_Data;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iBlog_Post_Tags } from "./C6";
3
+ declare const Blog_Post_Tags: {
4
+ Get: (request?: Omit<iBlog_Post_Tags, never> & {
5
+ dataInsertMultipleRows?: Omit<iBlog_Post_Tags, 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<iBlog_Post_Tags>>) | import("axios").AxiosResponse<iGetC6RestResponse<iBlog_Post_Tags>, any> | null | undefined>;
12
+ Post: (request?: Omit<iBlog_Post_Tags, never> & {
13
+ dataInsertMultipleRows?: Omit<iBlog_Post_Tags, 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<iBlog_Post_Tags>, any> | null | undefined>;
20
+ Put: (request?: Omit<iBlog_Post_Tags, never> & {
21
+ dataInsertMultipleRows?: Omit<iBlog_Post_Tags, 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<iBlog_Post_Tags, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iBlog_Post_Tags, never> & {
29
+ dataInsertMultipleRows?: Omit<iBlog_Post_Tags, 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<iBlog_Post_Tags, any>, any> | null | undefined>;
36
+ };
37
+ export default Blog_Post_Tags;
@@ -0,0 +1,13 @@
1
+ import { iBlog_Post_Tags } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `blog_post_tags` (
4
+ `post_id` binary(16) NOT NULL,
5
+ `tag_id` binary(16) NOT NULL,
6
+ PRIMARY KEY (`post_id`,`tag_id`),
7
+ KEY `tag_id` (`tag_id`),
8
+ CONSTRAINT `blog_post_tags_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `blog_posts` (`post_id`) ON DELETE CASCADE,
9
+ CONSTRAINT `blog_post_tags_ibfk_2` FOREIGN KEY (`tag_id`) REFERENCES `blog_tags` (`tag_id`) ON DELETE CASCADE
10
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
11
+ **/
12
+ declare const Test_Data: iBlog_Post_Tags;
13
+ export default Test_Data;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iBlog_Posts } from "./C6";
3
+ declare const Blog_Posts: {
4
+ Get: (request?: Omit<iBlog_Posts, never> & {
5
+ dataInsertMultipleRows?: Omit<iBlog_Posts, 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<iBlog_Posts>>) | import("axios").AxiosResponse<iGetC6RestResponse<iBlog_Posts>, any> | null | undefined>;
12
+ Post: (request?: Omit<iBlog_Posts, never> & {
13
+ dataInsertMultipleRows?: Omit<iBlog_Posts, 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<iBlog_Posts>, any> | null | undefined>;
20
+ Put: (request?: Omit<iBlog_Posts, never> & {
21
+ dataInsertMultipleRows?: Omit<iBlog_Posts, 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<iBlog_Posts, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iBlog_Posts, never> & {
29
+ dataInsertMultipleRows?: Omit<iBlog_Posts, 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<iBlog_Posts, any>, any> | null | undefined>;
36
+ };
37
+ export default Blog_Posts;
@@ -0,0 +1,21 @@
1
+ import { iBlog_Posts } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `blog_posts` (
4
+ `post_id` binary(16) NOT NULL DEFAULT (uuid_to_bin(uuid(),1)),
5
+ `author_id` binary(16) NOT NULL,
6
+ `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
7
+ `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (lower(replace(`title`,_utf8mb4' ',_utf8mb4'-'))) STORED,
8
+ `excerpt` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
9
+ `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
10
+ `image_uri` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
11
+ `status` enum('draft','published','archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'draft',
12
+ `published_at` timestamp NULL DEFAULT NULL,
13
+ `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
14
+ `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
15
+ PRIMARY KEY (`post_id`),
16
+ KEY `author_id` (`author_id`),
17
+ CONSTRAINT `blog_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
18
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
19
+ **/
20
+ declare const Test_Data: iBlog_Posts;
21
+ export default Test_Data;
@@ -0,0 +1,37 @@
1
+ import { iPostC6RestResponse, iDeleteC6RestResponse, iGetC6RestResponse, iPutC6RestResponse } from "@carbonorm/carbonnode";
2
+ import { iBlog_Tags } from "./C6";
3
+ declare const Blog_Tags: {
4
+ Get: (request?: Omit<iBlog_Tags, never> & {
5
+ dataInsertMultipleRows?: Omit<iBlog_Tags, 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<iBlog_Tags>>) | import("axios").AxiosResponse<iGetC6RestResponse<iBlog_Tags>, any> | null | undefined>;
12
+ Post: (request?: Omit<iBlog_Tags, never> & {
13
+ dataInsertMultipleRows?: Omit<iBlog_Tags, 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<iBlog_Tags>, any> | null | undefined>;
20
+ Put: (request?: Omit<iBlog_Tags, never> & {
21
+ dataInsertMultipleRows?: Omit<iBlog_Tags, 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<iBlog_Tags, any>, any> | null | undefined>;
28
+ Delete: (request?: Omit<iBlog_Tags, never> & {
29
+ dataInsertMultipleRows?: Omit<iBlog_Tags, 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<iBlog_Tags, any>, any> | null | undefined>;
36
+ };
37
+ export default Blog_Tags;
@@ -0,0 +1,11 @@
1
+ import { iBlog_Tags } from "api/rest/C6";
2
+ /**
3
+ CREATE TABLE `blog_tags` (
4
+ `tag_id` binary(16) NOT NULL DEFAULT (uuid_to_bin(uuid(),1)),
5
+ `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
6
+ PRIMARY KEY (`tag_id`),
7
+ UNIQUE KEY `name` (`name`)
8
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
9
+ **/
10
+ declare const Test_Data: iBlog_Tags;
11
+ export default Test_Data;