@vitnode/blog 1.2.0-canary.75 → 1.2.0-canary.76

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 (153) hide show
  1. package/dist/src/api/modules/admin/admin.module.d.ts +180 -177
  2. package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
  3. package/dist/src/api/modules/admin/admin.module.js +2 -1
  4. package/dist/src/api/modules/admin/admin.module.js.map +1 -0
  5. package/dist/src/api/modules/admin/categories/categories.admin.module.d.ts +80 -77
  6. package/dist/src/api/modules/admin/categories/categories.admin.module.d.ts.map +1 -1
  7. package/dist/src/api/modules/admin/categories/categories.admin.module.js +2 -1
  8. package/dist/src/api/modules/admin/categories/categories.admin.module.js.map +1 -0
  9. package/dist/src/api/modules/admin/categories/routes/create.route.d.ts +34 -31
  10. package/dist/src/api/modules/admin/categories/routes/create.route.d.ts.map +1 -1
  11. package/dist/src/api/modules/admin/categories/routes/create.route.js +2 -1
  12. package/dist/src/api/modules/admin/categories/routes/create.route.js.map +1 -0
  13. package/dist/src/api/modules/admin/categories/routes/delete.route.d.ts +18 -15
  14. package/dist/src/api/modules/admin/categories/routes/delete.route.d.ts.map +1 -1
  15. package/dist/src/api/modules/admin/categories/routes/delete.route.js +2 -1
  16. package/dist/src/api/modules/admin/categories/routes/delete.route.js.map +1 -0
  17. package/dist/src/api/modules/admin/categories/routes/edit.route.d.ts +38 -35
  18. package/dist/src/api/modules/admin/categories/routes/edit.route.d.ts.map +1 -1
  19. package/dist/src/api/modules/admin/categories/routes/edit.route.js +2 -1
  20. package/dist/src/api/modules/admin/categories/routes/edit.route.js.map +1 -0
  21. package/dist/src/api/modules/admin/posts/posts.admin.module.d.ts +93 -90
  22. package/dist/src/api/modules/admin/posts/posts.admin.module.d.ts.map +1 -1
  23. package/dist/src/api/modules/admin/posts/posts.admin.module.js +2 -1
  24. package/dist/src/api/modules/admin/posts/posts.admin.module.js.map +1 -0
  25. package/dist/src/api/modules/admin/posts/routes/create.route.d.ts +44 -41
  26. package/dist/src/api/modules/admin/posts/routes/create.route.d.ts.map +1 -1
  27. package/dist/src/api/modules/admin/posts/routes/create.route.js +2 -1
  28. package/dist/src/api/modules/admin/posts/routes/create.route.js.map +1 -0
  29. package/dist/src/api/modules/admin/posts/routes/delete.route.d.ts +18 -15
  30. package/dist/src/api/modules/admin/posts/routes/delete.route.d.ts.map +1 -1
  31. package/dist/src/api/modules/admin/posts/routes/delete.route.js +2 -1
  32. package/dist/src/api/modules/admin/posts/routes/delete.route.js.map +1 -0
  33. package/dist/src/api/modules/admin/posts/routes/edit.route.d.ts +43 -40
  34. package/dist/src/api/modules/admin/posts/routes/edit.route.d.ts.map +1 -1
  35. package/dist/src/api/modules/admin/posts/routes/edit.route.js +2 -1
  36. package/dist/src/api/modules/admin/posts/routes/edit.route.js.map +1 -0
  37. package/dist/src/api/modules/categories/categories.module.d.ts +64 -61
  38. package/dist/src/api/modules/categories/categories.module.d.ts.map +1 -1
  39. package/dist/src/api/modules/categories/categories.module.js +2 -1
  40. package/dist/src/api/modules/categories/categories.module.js.map +1 -0
  41. package/dist/src/api/modules/categories/routes/get.route.d.ts +45 -42
  42. package/dist/src/api/modules/categories/routes/get.route.d.ts.map +1 -1
  43. package/dist/src/api/modules/categories/routes/get.route.js +2 -1
  44. package/dist/src/api/modules/categories/routes/get.route.js.map +1 -0
  45. package/dist/src/api/modules/categories/test.route.d.ts +23 -20
  46. package/dist/src/api/modules/categories/test.route.d.ts.map +1 -1
  47. package/dist/src/api/modules/categories/test.route.js +2 -1
  48. package/dist/src/api/modules/categories/test.route.js.map +1 -0
  49. package/dist/src/api/modules/posts/posts.module.d.ts +54 -51
  50. package/dist/src/api/modules/posts/posts.module.d.ts.map +1 -1
  51. package/dist/src/api/modules/posts/posts.module.js +2 -1
  52. package/dist/src/api/modules/posts/posts.module.js.map +1 -0
  53. package/dist/src/api/modules/posts/routes/get.route.d.ts +64 -61
  54. package/dist/src/api/modules/posts/routes/get.route.d.ts.map +1 -1
  55. package/dist/src/api/modules/posts/routes/get.route.js +2 -1
  56. package/dist/src/api/modules/posts/routes/get.route.js.map +1 -0
  57. package/dist/src/config.api.d.ts +4 -1
  58. package/dist/src/config.api.d.ts.map +1 -1
  59. package/dist/src/config.api.js +2 -1
  60. package/dist/src/config.api.js.map +1 -0
  61. package/dist/src/config.d.ts +4 -1
  62. package/dist/src/config.d.ts.map +1 -1
  63. package/dist/src/config.js +2 -1
  64. package/dist/src/config.js.map +1 -0
  65. package/dist/src/const.d.ts +5 -2
  66. package/dist/src/const.d.ts.map +1 -1
  67. package/dist/src/const.js +2 -1
  68. package/dist/src/const.js.map +1 -0
  69. package/dist/src/database/categories.d.ts +98 -95
  70. package/dist/src/database/categories.d.ts.map +1 -1
  71. package/dist/src/database/categories.js +2 -1
  72. package/dist/src/database/categories.js.map +1 -0
  73. package/dist/src/database/index.d.ts +4 -4
  74. package/dist/src/database/index.js +1 -1
  75. package/dist/src/database/posts.d.ts +132 -129
  76. package/dist/src/database/posts.d.ts.map +1 -1
  77. package/dist/src/database/posts.js +2 -1
  78. package/dist/src/database/posts.js.map +1 -0
  79. package/dist/src/database/relations.d.ts +7 -4
  80. package/dist/src/database/relations.d.ts.map +1 -1
  81. package/dist/src/database/relations.js +2 -1
  82. package/dist/src/database/relations.js.map +1 -0
  83. package/dist/src/emails/test-template.d.ts +20 -18
  84. package/dist/src/emails/test-template.d.ts.map +1 -1
  85. package/dist/src/emails/test-template.js +2 -1
  86. package/dist/src/emails/test-template.js.map +1 -0
  87. package/dist/src/routes/admin/blog/categories/page.d.ts +7 -5
  88. package/dist/src/routes/admin/blog/categories/page.d.ts.map +1 -1
  89. package/dist/src/routes/admin/blog/categories/page.js +2 -1
  90. package/dist/src/routes/admin/blog/categories/page.js.map +1 -0
  91. package/dist/src/routes/admin/blog/posts/page.d.ts +7 -5
  92. package/dist/src/routes/admin/blog/posts/page.d.ts.map +1 -1
  93. package/dist/src/routes/admin/blog/posts/page.js +2 -1
  94. package/dist/src/routes/admin/blog/posts/page.js.map +1 -0
  95. package/dist/src/views/admin/categories/actions/actions.d.ts +4 -1
  96. package/dist/src/views/admin/categories/actions/actions.d.ts.map +1 -1
  97. package/dist/src/views/admin/categories/actions/actions.js +2 -1
  98. package/dist/src/views/admin/categories/actions/actions.js.map +1 -0
  99. package/dist/src/views/admin/categories/actions/create-edit/create-edit.d.ts +8 -5
  100. package/dist/src/views/admin/categories/actions/create-edit/create-edit.d.ts.map +1 -1
  101. package/dist/src/views/admin/categories/actions/create-edit/create-edit.js +2 -1
  102. package/dist/src/views/admin/categories/actions/create-edit/create-edit.js.map +1 -0
  103. package/dist/src/views/admin/categories/actions/create-edit/mutation-api.d.ts +10 -7
  104. package/dist/src/views/admin/categories/actions/create-edit/mutation-api.d.ts.map +1 -1
  105. package/dist/src/views/admin/categories/actions/create-edit/mutation-api.js +2 -1
  106. package/dist/src/views/admin/categories/actions/create-edit/mutation-api.js.map +1 -0
  107. package/dist/src/views/admin/categories/table/actions/delete/delete-action.d.ts +6 -3
  108. package/dist/src/views/admin/categories/table/actions/delete/delete-action.d.ts.map +1 -1
  109. package/dist/src/views/admin/categories/table/actions/delete/delete-action.js +2 -1
  110. package/dist/src/views/admin/categories/table/actions/delete/delete-action.js.map +1 -0
  111. package/dist/src/views/admin/categories/table/actions/delete/mutation-api.d.ts +5 -2
  112. package/dist/src/views/admin/categories/table/actions/delete/mutation-api.d.ts.map +1 -1
  113. package/dist/src/views/admin/categories/table/actions/delete/mutation-api.js +2 -1
  114. package/dist/src/views/admin/categories/table/actions/delete/mutation-api.js.map +1 -0
  115. package/dist/src/views/admin/categories/table/actions/edit-action.d.ts +8 -5
  116. package/dist/src/views/admin/categories/table/actions/edit-action.d.ts.map +1 -1
  117. package/dist/src/views/admin/categories/table/actions/edit-action.js +2 -1
  118. package/dist/src/views/admin/categories/table/actions/edit-action.js.map +1 -0
  119. package/dist/src/views/admin/categories/table/categories-admin-view.d.ts +5 -2
  120. package/dist/src/views/admin/categories/table/categories-admin-view.d.ts.map +1 -1
  121. package/dist/src/views/admin/categories/table/categories-admin-view.js +2 -1
  122. package/dist/src/views/admin/categories/table/categories-admin-view.js.map +1 -0
  123. package/dist/src/views/admin/posts/actions/actions.d.ts +4 -1
  124. package/dist/src/views/admin/posts/actions/actions.d.ts.map +1 -1
  125. package/dist/src/views/admin/posts/actions/actions.js +2 -1
  126. package/dist/src/views/admin/posts/actions/actions.js.map +1 -0
  127. package/dist/src/views/admin/posts/actions/create-edit/create-edit.d.ts +8 -5
  128. package/dist/src/views/admin/posts/actions/create-edit/create-edit.d.ts.map +1 -1
  129. package/dist/src/views/admin/posts/actions/create-edit/create-edit.js +2 -1
  130. package/dist/src/views/admin/posts/actions/create-edit/create-edit.js.map +1 -0
  131. package/dist/src/views/admin/posts/actions/create-edit/mutation-api.d.ts +10 -7
  132. package/dist/src/views/admin/posts/actions/create-edit/mutation-api.d.ts.map +1 -1
  133. package/dist/src/views/admin/posts/actions/create-edit/mutation-api.js +2 -1
  134. package/dist/src/views/admin/posts/actions/create-edit/mutation-api.js.map +1 -0
  135. package/dist/src/views/admin/posts/table/actions/delete/delete-action.d.ts +6 -3
  136. package/dist/src/views/admin/posts/table/actions/delete/delete-action.d.ts.map +1 -1
  137. package/dist/src/views/admin/posts/table/actions/delete/delete-action.js +2 -1
  138. package/dist/src/views/admin/posts/table/actions/delete/delete-action.js.map +1 -0
  139. package/dist/src/views/admin/posts/table/actions/delete/mutation-api.d.ts +5 -2
  140. package/dist/src/views/admin/posts/table/actions/delete/mutation-api.d.ts.map +1 -1
  141. package/dist/src/views/admin/posts/table/actions/delete/mutation-api.js +2 -1
  142. package/dist/src/views/admin/posts/table/actions/delete/mutation-api.js.map +1 -0
  143. package/dist/src/views/admin/posts/table/actions/edit-action.d.ts +8 -5
  144. package/dist/src/views/admin/posts/table/actions/edit-action.d.ts.map +1 -1
  145. package/dist/src/views/admin/posts/table/actions/edit-action.js +2 -1
  146. package/dist/src/views/admin/posts/table/actions/edit-action.js.map +1 -0
  147. package/dist/src/views/admin/posts/table/posts-admin-view.d.ts +5 -2
  148. package/dist/src/views/admin/posts/table/posts-admin-view.d.ts.map +1 -1
  149. package/dist/src/views/admin/posts/table/posts-admin-view.js +2 -1
  150. package/dist/src/views/admin/posts/table/posts-admin-view.js.map +1 -0
  151. package/package.json +6 -8
  152. package/tsconfig.build.json +5 -0
  153. package/dist/src/database/index.d.ts.map +0 -1
@@ -1,56 +1,59 @@
1
- export declare const postsModule: import("@vitnode/core/api/lib/module").BuildModuleReturn<"@vitnode/blog", "posts", [import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
2
- method: "get";
3
- path: "/";
4
- request: {
5
- query: import("zod").ZodObject<{
6
- cursor: import("zod").ZodOptional<import("zod").ZodString>;
7
- first: import("zod").ZodOptional<import("zod").ZodString>;
8
- last: import("zod").ZodOptional<import("zod").ZodString>;
9
- order: import("zod").ZodOptional<import("zod").ZodEnum<{
10
- asc: "asc";
11
- desc: "desc";
12
- }>>;
13
- orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
14
- createdAt: "createdAt";
15
- updatedAt: "updatedAt";
16
- }>>;
17
- categoryId: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<number, string>>>;
18
- }, import("zod/v4/core").$strip>;
19
- };
20
- responses: {
21
- 200: {
22
- content: {
23
- "application/json": {
24
- schema: import("zod").ZodObject<{
25
- edges: import("zod").ZodArray<import("zod").ZodObject<{
26
- id: import("zod").ZodNumber;
27
- title: import("zod").ZodString;
28
- titleSeo: import("zod").ZodString;
29
- content: import("zod").ZodString;
30
- categoryId: import("zod").ZodNumber;
31
- createdAt: import("zod").ZodDate;
32
- updatedAt: import("zod").ZodDate;
33
- category: import("zod").ZodObject<{
34
- id: import("zod").ZodNumber;
35
- title: import("zod").ZodString;
36
- titleSeo: import("zod").ZodString;
37
- }, import("zod/v4/core").$strip>;
38
- }, import("zod/v4/core").$strip>>;
39
- pageInfo: import("zod").ZodObject<{
40
- totalCount: import("zod").ZodNumber;
41
- count: import("zod").ZodNumber;
42
- hasNextPage: import("zod").ZodBoolean;
43
- hasPreviousPage: import("zod").ZodBoolean;
44
- startCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
45
- endCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
46
- }, import("zod/v4/core").$strip>;
47
- }, import("zod/v4/core").$strip>;
48
- };
49
- };
50
- description: string;
1
+ //#region src/api/modules/posts/posts.module.d.ts
2
+ declare const postsModule: import("@vitnode/core/api/lib/module").BuildModuleReturn<"@vitnode/blog", "posts", [import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
3
+ method: "get";
4
+ path: "/";
5
+ request: {
6
+ query: import("zod").ZodObject<{
7
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
8
+ first: import("zod").ZodOptional<import("zod").ZodString>;
9
+ last: import("zod").ZodOptional<import("zod").ZodString>;
10
+ order: import("zod").ZodOptional<import("zod").ZodEnum<{
11
+ asc: "asc";
12
+ desc: "desc";
13
+ }>>;
14
+ orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
15
+ createdAt: "createdAt";
16
+ updatedAt: "updatedAt";
17
+ }>>;
18
+ categoryId: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<number, string>>>;
19
+ }, import("zod/v4/core").$strip>;
20
+ };
21
+ responses: {
22
+ 200: {
23
+ content: {
24
+ "application/json": {
25
+ schema: import("zod").ZodObject<{
26
+ edges: import("zod").ZodArray<import("zod").ZodObject<{
27
+ id: import("zod").ZodNumber;
28
+ title: import("zod").ZodString;
29
+ titleSeo: import("zod").ZodString;
30
+ content: import("zod").ZodString;
31
+ categoryId: import("zod").ZodNumber;
32
+ createdAt: import("zod").ZodDate;
33
+ updatedAt: import("zod").ZodDate;
34
+ category: import("zod").ZodObject<{
35
+ id: import("zod").ZodNumber;
36
+ title: import("zod").ZodString;
37
+ titleSeo: import("zod").ZodString;
38
+ }, import("zod/v4/core").$strip>;
39
+ }, import("zod/v4/core").$strip>>;
40
+ pageInfo: import("zod").ZodObject<{
41
+ totalCount: import("zod").ZodNumber;
42
+ count: import("zod").ZodNumber;
43
+ hasNextPage: import("zod").ZodBoolean;
44
+ hasPreviousPage: import("zod").ZodBoolean;
45
+ startCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
46
+ endCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
47
+ }, import("zod/v4/core").$strip>;
48
+ }, import("zod/v4/core").$strip>;
51
49
  };
50
+ };
51
+ description: string;
52
52
  };
53
+ };
53
54
  } & {
54
- path: string;
55
+ path: string;
55
56
  }>], import("@vitnode/core/api/lib/module").BaseBuildModuleReturn<"@vitnode/blog", string, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", import("@hono/zod-openapi").RouteConfig>[]>[]>;
57
+ //#endregion
58
+ export { postsModule };
56
59
  //# sourceMappingURL=posts.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"posts.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/posts/posts.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sMAItB,CAAC"}
1
+ {"version":3,"file":"posts.module.d.ts","names":[],"sources":["../../../../../src/api/modules/posts/posts.module.ts"],"mappings":";cAMa,oDAAW,mFAAA"}
@@ -1 +1,2 @@
1
- import{buildModule}from"@vitnode/core/api/lib/module";import{CONFIG_PLUGIN}from"../../../const.js";import{postsRoute}from"./routes/get.route.js";export const postsModule=buildModule({pluginId:CONFIG_PLUGIN.pluginId,name:"posts",routes:[postsRoute]});
1
+ import{CONFIG_PLUGIN as e}from"../../../const.js";import{postsRoute as t}from"./routes/get.route.js";import{buildModule as n}from"@vitnode/core/api/lib/module";const r=n({pluginId:e.pluginId,name:`posts`,routes:[t]});export{r as postsModule};
2
+ //# sourceMappingURL=posts.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posts.module.js","names":[],"sources":["../../../../../src/api/modules/posts/posts.module.ts"],"sourcesContent":["import { buildModule } from \"@vitnode/core/api/lib/module\";\n\nimport { CONFIG_PLUGIN } from \"@/const\";\n\nimport { postsRoute } from \"./routes/get.route\";\n\nexport const postsModule = buildModule({\n pluginId: CONFIG_PLUGIN.pluginId,\n name: \"posts\",\n routes: [postsRoute],\n});\n"],"mappings":"gKAMA,MAAa,EAAc,EAAY,CACrC,SAAU,EAAc,SACxB,KAAM,QACN,OAAQ,CAAC,CAAU,CACrB,CAAC"}
@@ -1,71 +1,74 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- export declare const zodPostSchema: z.ZodObject<{
2
+ //#region src/api/modules/posts/routes/get.route.d.ts
3
+ declare const zodPostSchema: z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ title: z.ZodString;
6
+ titleSeo: z.ZodString;
7
+ content: z.ZodString;
8
+ categoryId: z.ZodNumber;
9
+ createdAt: z.ZodDate;
10
+ updatedAt: z.ZodDate;
11
+ category: z.ZodObject<{
3
12
  id: z.ZodNumber;
4
13
  title: z.ZodString;
5
14
  titleSeo: z.ZodString;
6
- content: z.ZodString;
7
- categoryId: z.ZodNumber;
8
- createdAt: z.ZodDate;
9
- updatedAt: z.ZodDate;
10
- category: z.ZodObject<{
11
- id: z.ZodNumber;
12
- title: z.ZodString;
13
- titleSeo: z.ZodString;
14
- }, z.core.$strip>;
15
+ }, z.core.$strip>;
15
16
  }, z.core.$strip>;
16
- export declare const postsRoute: import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
17
- method: "get";
18
- path: "/";
19
- request: {
20
- query: z.ZodObject<{
21
- cursor: z.ZodOptional<z.ZodString>;
22
- first: z.ZodOptional<z.ZodString>;
23
- last: z.ZodOptional<z.ZodString>;
24
- order: z.ZodOptional<z.ZodEnum<{
25
- asc: "asc";
26
- desc: "desc";
27
- }>>;
28
- orderBy: z.ZodOptional<z.ZodEnum<{
29
- createdAt: "createdAt";
30
- updatedAt: "updatedAt";
31
- }>>;
32
- categoryId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
33
- }, z.core.$strip>;
34
- };
35
- responses: {
36
- 200: {
37
- content: {
38
- "application/json": {
39
- schema: z.ZodObject<{
40
- edges: z.ZodArray<z.ZodObject<{
41
- id: z.ZodNumber;
42
- title: z.ZodString;
43
- titleSeo: z.ZodString;
44
- content: z.ZodString;
45
- categoryId: z.ZodNumber;
46
- createdAt: z.ZodDate;
47
- updatedAt: z.ZodDate;
48
- category: z.ZodObject<{
49
- id: z.ZodNumber;
50
- title: z.ZodString;
51
- titleSeo: z.ZodString;
52
- }, z.core.$strip>;
53
- }, z.core.$strip>>;
54
- pageInfo: z.ZodObject<{
55
- totalCount: z.ZodNumber;
56
- count: z.ZodNumber;
57
- hasNextPage: z.ZodBoolean;
58
- hasPreviousPage: z.ZodBoolean;
59
- startCursor: z.ZodNullable<z.ZodNumber>;
60
- endCursor: z.ZodNullable<z.ZodNumber>;
61
- }, z.core.$strip>;
62
- }, z.core.$strip>;
63
- };
64
- };
65
- description: string;
17
+ declare const postsRoute: import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
18
+ method: "get";
19
+ path: "/";
20
+ request: {
21
+ query: z.ZodObject<{
22
+ cursor: z.ZodOptional<z.ZodString>;
23
+ first: z.ZodOptional<z.ZodString>;
24
+ last: z.ZodOptional<z.ZodString>;
25
+ order: z.ZodOptional<z.ZodEnum<{
26
+ asc: "asc";
27
+ desc: "desc";
28
+ }>>;
29
+ orderBy: z.ZodOptional<z.ZodEnum<{
30
+ createdAt: "createdAt";
31
+ updatedAt: "updatedAt";
32
+ }>>;
33
+ categoryId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
34
+ }, z.core.$strip>;
35
+ };
36
+ responses: {
37
+ 200: {
38
+ content: {
39
+ "application/json": {
40
+ schema: z.ZodObject<{
41
+ edges: z.ZodArray<z.ZodObject<{
42
+ id: z.ZodNumber;
43
+ title: z.ZodString;
44
+ titleSeo: z.ZodString;
45
+ content: z.ZodString;
46
+ categoryId: z.ZodNumber;
47
+ createdAt: z.ZodDate;
48
+ updatedAt: z.ZodDate;
49
+ category: z.ZodObject<{
50
+ id: z.ZodNumber;
51
+ title: z.ZodString;
52
+ titleSeo: z.ZodString;
53
+ }, z.core.$strip>;
54
+ }, z.core.$strip>>;
55
+ pageInfo: z.ZodObject<{
56
+ totalCount: z.ZodNumber;
57
+ count: z.ZodNumber;
58
+ hasNextPage: z.ZodBoolean;
59
+ hasPreviousPage: z.ZodBoolean;
60
+ startCursor: z.ZodNullable<z.ZodNumber>;
61
+ endCursor: z.ZodNullable<z.ZodNumber>;
62
+ }, z.core.$strip>;
63
+ }, z.core.$strip>;
66
64
  };
65
+ };
66
+ description: string;
67
67
  };
68
+ };
68
69
  } & {
69
- path: string;
70
+ path: string;
70
71
  }>;
72
+ //#endregion
73
+ export { postsRoute, zodPostSchema };
71
74
  //# sourceMappingURL=get.route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get.route.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/posts/routes/get.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAatC,eAAO,MAAM,aAAa;;;;;;;;;;;;;iBAaxB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2ErB,CAAC"}
1
+ {"version":3,"file":"get.route.d.ts","names":[],"sources":["../../../../../../src/api/modules/posts/routes/get.route.ts"],"mappings":";;cAaa,eAAa,EAAA;;;;;;;;;;;;;;cAeb,kDAAU"}
@@ -1 +1,2 @@
1
- import{z}from"@hono/zod-openapi";import{buildRoute}from"@vitnode/core/api/lib/route";import{withPagination,zodPaginationPageInfo,zodPaginationQuery}from"@vitnode/core/api/lib/with-pagination";import{eq}from"drizzle-orm";import{CONFIG_PLUGIN}from"../../../../const.js";import{blog_categories}from"../../../../database/categories.js";import{blog_posts}from"../../../../database/posts.js";export const zodPostSchema=z.object({id:z.number(),title:z.string(),titleSeo:z.string(),content:z.string(),categoryId:z.number(),createdAt:z.date(),updatedAt:z.date(),category:z.object({id:z.number(),title:z.string(),titleSeo:z.string()})});export const postsRoute=buildRoute({pluginId:CONFIG_PLUGIN.pluginId,route:{method:"get",path:"/",request:{query:zodPaginationQuery.extend({order:z.enum(["asc","desc"]).optional(),orderBy:z.enum(["updatedAt","createdAt"]).optional(),categoryId:z.string().transform(Number).optional()})},responses:{200:{content:{"application/json":{schema:z.object({edges:z.array(zodPostSchema),pageInfo:zodPaginationPageInfo})}},description:"Posts retrieved successfully"}}},handler:async c=>{const query=c.req.valid("query");const data=await withPagination({c,params:{query},primaryCursor:blog_posts.id,query:async({limit,where,orderBy})=>await c.get("db").select({id:blog_posts.id,title:blog_posts.title,titleSeo:blog_posts.titleSeo,content:blog_posts.content,categoryId:blog_posts.categoryId,createdAt:blog_posts.createdAt,updatedAt:blog_posts.updatedAt,category:{id:blog_categories.id,title:blog_categories.title,titleSeo:blog_categories.titleSeo}}).from(blog_posts).innerJoin(blog_categories,eq(blog_posts.categoryId,blog_categories.id)).where(query.categoryId?eq(blog_posts.categoryId,query.categoryId):where).orderBy(orderBy).limit(limit),table:blog_posts,orderBy:{column:query.orderBy?blog_posts[query.orderBy]:blog_posts.updatedAt,order:query.order??"desc"}});return c.json(data)}});
1
+ import{CONFIG_PLUGIN as e}from"../../../../const.js";import{blog_categories as t}from"../../../../database/categories.js";import{blog_posts as n}from"../../../../database/posts.js";import{z as r}from"@hono/zod-openapi";import{buildRoute as i}from"@vitnode/core/api/lib/route";import{eq as a}from"drizzle-orm";import{withPagination as o,zodPaginationPageInfo as s,zodPaginationQuery as c}from"@vitnode/core/api/lib/with-pagination";const l=r.object({id:r.number(),title:r.string(),titleSeo:r.string(),content:r.string(),categoryId:r.number(),createdAt:r.date(),updatedAt:r.date(),category:r.object({id:r.number(),title:r.string(),titleSeo:r.string()})}),u=i({pluginId:e.pluginId,route:{method:`get`,path:`/`,request:{query:c.extend({order:r.enum([`asc`,`desc`]).optional(),orderBy:r.enum([`updatedAt`,`createdAt`]).optional(),categoryId:r.string().transform(Number).optional()})},responses:{200:{content:{"application/json":{schema:r.object({edges:r.array(l),pageInfo:s})}},description:`Posts retrieved successfully`}}},handler:async e=>{let r=e.req.valid(`query`),i=await o({c:e,params:{query:r},primaryCursor:n.id,query:async({limit:i,where:o,orderBy:s})=>await e.get(`db`).select({id:n.id,title:n.title,titleSeo:n.titleSeo,content:n.content,categoryId:n.categoryId,createdAt:n.createdAt,updatedAt:n.updatedAt,category:{id:t.id,title:t.title,titleSeo:t.titleSeo}}).from(n).innerJoin(t,a(n.categoryId,t.id)).where(r.categoryId?a(n.categoryId,r.categoryId):o).orderBy(s).limit(i),table:n,orderBy:{column:r.orderBy?n[r.orderBy]:n.updatedAt,order:r.order??`desc`}});return e.json(i)}});export{u as postsRoute,l as zodPostSchema};
2
+ //# sourceMappingURL=get.route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.route.js","names":[],"sources":["../../../../../../src/api/modules/posts/routes/get.route.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\nimport { buildRoute } from \"@vitnode/core/api/lib/route\";\nimport {\n withPagination,\n zodPaginationPageInfo,\n zodPaginationQuery,\n} from \"@vitnode/core/api/lib/with-pagination\";\nimport { eq } from \"drizzle-orm\";\n\nimport { CONFIG_PLUGIN } from \"@/const\";\nimport { blog_categories } from \"@/database/categories\";\nimport { blog_posts } from \"@/database/posts\";\n\nexport const zodPostSchema = z.object({\n id: z.number(),\n title: z.string(),\n titleSeo: z.string(),\n content: z.string(),\n categoryId: z.number(),\n createdAt: z.date(),\n updatedAt: z.date(),\n category: z.object({\n id: z.number(),\n title: z.string(),\n titleSeo: z.string(),\n }),\n});\n\nexport const postsRoute = buildRoute({\n pluginId: CONFIG_PLUGIN.pluginId,\n route: {\n method: \"get\",\n path: \"/\",\n request: {\n query: zodPaginationQuery.extend({\n order: z.enum([\"asc\", \"desc\"]).optional(),\n orderBy: z.enum([\"updatedAt\", \"createdAt\"]).optional(),\n categoryId: z.string().transform(Number).optional(),\n }),\n },\n responses: {\n 200: {\n content: {\n \"application/json\": {\n schema: z.object({\n edges: z.array(zodPostSchema),\n pageInfo: zodPaginationPageInfo,\n }),\n },\n },\n description: \"Posts retrieved successfully\",\n },\n },\n },\n handler: async c => {\n const query = c.req.valid(\"query\");\n\n const data = await withPagination({\n c,\n params: {\n query,\n },\n primaryCursor: blog_posts.id,\n query: async ({ limit, where, orderBy }) =>\n await c\n .get(\"db\")\n .select({\n id: blog_posts.id,\n title: blog_posts.title,\n titleSeo: blog_posts.titleSeo,\n content: blog_posts.content,\n categoryId: blog_posts.categoryId,\n createdAt: blog_posts.createdAt,\n updatedAt: blog_posts.updatedAt,\n category: {\n id: blog_categories.id,\n title: blog_categories.title,\n titleSeo: blog_categories.titleSeo,\n },\n })\n .from(blog_posts)\n .innerJoin(\n blog_categories,\n eq(blog_posts.categoryId, blog_categories.id),\n )\n .where(\n query.categoryId\n ? eq(blog_posts.categoryId, query.categoryId)\n : where,\n )\n .orderBy(orderBy)\n .limit(limit),\n table: blog_posts,\n orderBy: {\n column: query.orderBy\n ? blog_posts[query.orderBy]\n : blog_posts.updatedAt,\n order: query.order ?? \"desc\",\n },\n });\n\n return c.json(data);\n },\n});\n"],"mappings":"+aAaA,MAAa,EAAgB,EAAE,OAAO,CACpC,GAAI,EAAE,OAAO,EACb,MAAO,EAAE,OAAO,EAChB,SAAU,EAAE,OAAO,EACnB,QAAS,EAAE,OAAO,EAClB,WAAY,EAAE,OAAO,EACrB,UAAW,EAAE,KAAK,EAClB,UAAW,EAAE,KAAK,EAClB,SAAU,EAAE,OAAO,CACjB,GAAI,EAAE,OAAO,EACb,MAAO,EAAE,OAAO,EAChB,SAAU,EAAE,OAAO,CACrB,CAAC,CACH,CAAC,EAEY,EAAa,EAAW,CACnC,SAAU,EAAc,SACxB,MAAO,CACL,OAAQ,MACR,KAAM,IACN,QAAS,CACP,MAAO,EAAmB,OAAO,CAC/B,MAAO,EAAE,KAAK,CAAC,MAAO,MAAM,CAAC,CAAC,CAAC,SAAS,EACxC,QAAS,EAAE,KAAK,CAAC,YAAa,WAAW,CAAC,CAAC,CAAC,SAAS,EACrD,WAAY,EAAE,OAAO,CAAC,CAAC,UAAU,MAAM,CAAC,CAAC,SAAS,CACpD,CAAC,CACH,EACA,UAAW,CACT,IAAK,CACH,QAAS,CACP,mBAAoB,CAClB,OAAQ,EAAE,OAAO,CACf,MAAO,EAAE,MAAM,CAAa,EAC5B,SAAU,CACZ,CAAC,CACH,CACF,EACA,YAAa,8BACf,CACF,CACF,EACA,QAAS,KAAM,IAAK,CAClB,IAAM,EAAQ,EAAE,IAAI,MAAM,OAAO,EAE3B,EAAO,MAAM,EAAe,CAChC,IACA,OAAQ,CACN,OACF,EACA,cAAe,EAAW,GAC1B,MAAO,MAAO,CAAE,QAAO,QAAO,aAC5B,MAAM,EACH,IAAI,IAAI,CAAC,CACT,OAAO,CACN,GAAI,EAAW,GACf,MAAO,EAAW,MAClB,SAAU,EAAW,SACrB,QAAS,EAAW,QACpB,WAAY,EAAW,WACvB,UAAW,EAAW,UACtB,UAAW,EAAW,UACtB,SAAU,CACR,GAAI,EAAgB,GACpB,MAAO,EAAgB,MACvB,SAAU,EAAgB,QAC5B,CACF,CAAC,CAAC,CACD,KAAK,CAAU,CAAC,CAChB,UACC,EACA,EAAG,EAAW,WAAY,EAAgB,EAAE,CAC9C,CAAC,CACA,MACC,EAAM,WACF,EAAG,EAAW,WAAY,EAAM,UAAU,EAC1C,CACN,CAAC,CACA,QAAQ,CAAO,CAAC,CAChB,MAAM,CAAK,EAChB,MAAO,EACP,QAAS,CACP,OAAQ,EAAM,QACV,EAAW,EAAM,SACjB,EAAW,UACf,MAAO,EAAM,OAAS,MACxB,CACF,CAAC,EAED,OAAO,EAAE,KAAK,CAAI,CACpB,CACF,CAAC"}
@@ -1,2 +1,5 @@
1
- export declare const blogApiPlugin: () => import("@vitnode/core/api/lib/plugin").BuildPluginApiReturn;
1
+ //#region src/config.api.d.ts
2
+ declare const blogApiPlugin: () => import("@vitnode/core/api/lib/plugin").BuildPluginApiReturn;
3
+ //#endregion
4
+ export { blogApiPlugin };
2
5
  //# sourceMappingURL=config.api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.api.d.ts","sourceRoot":"","sources":["../../src/config.api.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa,mEAsBzB,CAAC"}
1
+ {"version":3,"file":"config.api.d.ts","names":[],"sources":["../../src/config.api.ts"],"mappings":";cAQa,4DAAa"}
@@ -1 +1,2 @@
1
- import{buildApiPlugin}from"@vitnode/core/api/lib/plugin";import{CONFIG_PLUGIN}from"./const.js";import{adminModule}from"./api/modules/admin/admin.module.js";import{categoriesModule}from"./api/modules/categories/categories.module.js";import{postsModule}from"./api/modules/posts/posts.module.js";export const blogApiPlugin=()=>{return buildApiPlugin({pluginId:CONFIG_PLUGIN.pluginId,modules:[adminModule,categoriesModule,postsModule],permissionStaff:{moderator:{posts:["can_edit","can_delete"]},admin:{posts:["can_view",{permission:"can_create",dependsOn:["can_view"]},"can_edit","can_delete"],categories:["can_view","can_create","can_edit","can_delete"]}}})};
1
+ import{CONFIG_PLUGIN as e}from"./const.js";import{adminModule as t}from"./api/modules/admin/admin.module.js";import{categoriesModule as n}from"./api/modules/categories/categories.module.js";import{postsModule as r}from"./api/modules/posts/posts.module.js";import{buildApiPlugin as i}from"@vitnode/core/api/lib/plugin";const a=()=>i({pluginId:e.pluginId,modules:[t,n,r],permissionStaff:{moderator:{posts:[`can_edit`,`can_delete`]},admin:{posts:[`can_view`,{permission:`can_create`,dependsOn:[`can_view`]},`can_edit`,`can_delete`],categories:[`can_view`,`can_create`,`can_edit`,`can_delete`]}}});export{a as blogApiPlugin};
2
+ //# sourceMappingURL=config.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.api.js","names":[],"sources":["../../src/config.api.ts"],"sourcesContent":["import { buildApiPlugin } from \"@vitnode/core/api/lib/plugin\";\n\nimport { CONFIG_PLUGIN } from \"@/const\";\n\nimport { adminModule } from \"./api/modules/admin/admin.module\";\nimport { categoriesModule } from \"./api/modules/categories/categories.module\";\nimport { postsModule } from \"./api/modules/posts/posts.module\";\n\nexport const blogApiPlugin = () => {\n return buildApiPlugin({\n pluginId: CONFIG_PLUGIN.pluginId,\n modules: [adminModule, categoriesModule, postsModule],\n permissionStaff: {\n moderator: {\n posts: [\"can_edit\", \"can_delete\"],\n },\n admin: {\n posts: [\n \"can_view\",\n {\n permission: \"can_create\",\n dependsOn: [\"can_view\"],\n },\n \"can_edit\",\n \"can_delete\",\n ],\n categories: [\"can_view\", \"can_create\", \"can_edit\", \"can_delete\"],\n },\n },\n });\n};\n"],"mappings":"8TAQA,MAAa,MACJ,EAAe,CACpB,SAAU,EAAc,SACxB,QAAS,CAAC,EAAa,EAAkB,CAAW,EACpD,gBAAiB,CACf,UAAW,CACT,MAAO,CAAC,WAAY,YAAY,CAClC,EACA,MAAO,CACL,MAAO,CACL,WACA,CACE,WAAY,aACZ,UAAW,CAAC,UAAU,CACxB,EACA,WACA,YACF,EACA,WAAY,CAAC,WAAY,aAAc,WAAY,YAAY,CACjE,CACF,CACF,CAAC"}
@@ -1,2 +1,5 @@
1
- export declare const blogPlugin: () => import("@vitnode/core/lib/plugin").BuildPluginReturn<"@vitnode/blog">;
1
+ //#region src/config.d.ts
2
+ declare const blogPlugin: () => import("@vitnode/core/lib/plugin").BuildPluginReturn<"@vitnode/blog">;
3
+ //#endregion
4
+ export { blogPlugin };
2
5
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,6EAoBtB,CAAC"}
1
+ {"version":3,"file":"config.d.ts","names":[],"sources":["../../src/config.tsx"],"mappings":";cAKa,qDAAU"}
@@ -1 +1,2 @@
1
- import{jsx as _jsx}from"react/jsx-runtime";import{buildPlugin}from"@vitnode/core/lib/plugin";import{ListIcon,NotebookPenIcon}from"lucide-react";import{CONFIG_PLUGIN}from"./const.js";export const blogPlugin=()=>{return buildPlugin({pluginId:CONFIG_PLUGIN.pluginId,admin:{nav:[{id:"posts",href:"/admin/blog/posts",icon:_jsx(NotebookPenIcon,{}),permission:{module:"posts",permission:"can_view"}},{id:"categories",href:"/admin/blog/categories",icon:_jsx(ListIcon,{}),permission:{module:"categories",permission:"can_view"}}]}})};
1
+ import{CONFIG_PLUGIN as e}from"./const.js";import{jsx as t}from"react/jsx-runtime";import{buildPlugin as n}from"@vitnode/core/lib/plugin";import{ListIcon as r,NotebookPenIcon as i}from"lucide-react";const a=()=>n({pluginId:e.pluginId,admin:{nav:[{id:`posts`,href:`/admin/blog/posts`,icon:t(i,{}),permission:{module:`posts`,permission:`can_view`}},{id:`categories`,href:`/admin/blog/categories`,icon:t(r,{}),permission:{module:`categories`,permission:`can_view`}}]}});export{a as blogPlugin};
2
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","names":[],"sources":["../../src/config.tsx"],"sourcesContent":["import { buildPlugin } from \"@vitnode/core/lib/plugin\";\nimport { ListIcon, NotebookPenIcon } from \"lucide-react\";\n\nimport { CONFIG_PLUGIN } from \"@/const\";\n\nexport const blogPlugin = () => {\n return buildPlugin({\n pluginId: CONFIG_PLUGIN.pluginId,\n admin: {\n nav: [\n {\n id: \"posts\",\n href: \"/admin/blog/posts\",\n icon: <NotebookPenIcon />,\n permission: { module: \"posts\", permission: \"can_view\" },\n },\n {\n id: \"categories\",\n href: \"/admin/blog/categories\",\n icon: <ListIcon />,\n permission: { module: \"categories\", permission: \"can_view\" },\n },\n ],\n },\n });\n};\n"],"mappings":"uMAKA,MAAa,MACJ,EAAY,CACjB,SAAU,EAAc,SACxB,MAAO,CACL,IAAK,CACH,CACE,GAAI,QACJ,KAAM,oBACN,KAAM,EAAC,EAAD,CAAkB,CAAA,EACxB,WAAY,CAAE,OAAQ,QAAS,WAAY,UAAW,CACxD,EACA,CACE,GAAI,aACJ,KAAM,yBACN,KAAM,EAAC,EAAD,CAAW,CAAA,EACjB,WAAY,CAAE,OAAQ,aAAc,WAAY,UAAW,CAC7D,CACF,CACF,CACF,CAAC"}
@@ -1,4 +1,7 @@
1
- export declare const CONFIG_PLUGIN: {
2
- pluginId: "@vitnode/blog";
1
+ //#region src/const.d.ts
2
+ declare const CONFIG_PLUGIN: {
3
+ pluginId: "@vitnode/blog";
3
4
  };
5
+ //#endregion
6
+ export { CONFIG_PLUGIN };
4
7
  //# sourceMappingURL=const.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../src/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;CAEzB,CAAC"}
1
+ {"version":3,"file":"const.d.ts","names":[],"sources":["../../src/const.ts"],"mappings":";cAAa;EAAA"}
package/dist/src/const.js CHANGED
@@ -1 +1,2 @@
1
- export const CONFIG_PLUGIN={pluginId:"@vitnode/blog"};
1
+ const e={pluginId:`@vitnode/blog`};export{e as CONFIG_PLUGIN};
2
+ //# sourceMappingURL=const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.js","names":[],"sources":["../../src/const.ts"],"sourcesContent":["export const CONFIG_PLUGIN = {\n pluginId: \"@vitnode/blog\" as const,\n};\n"],"mappings":"AAAA,MAAa,EAAgB,CAC3B,SAAU,eACZ"}
@@ -1,97 +1,100 @@
1
- export declare const blog_categories: Omit<import("drizzle-orm/pg-core").PgTableWithColumns<{
2
- name: "blog_categories";
3
- schema: undefined;
4
- columns: {
5
- id: import("drizzle-orm/pg-core").PgColumn<{
6
- name: "id";
7
- tableName: "blog_categories";
8
- dataType: "number";
9
- columnType: "PgSerial";
10
- data: number;
11
- driverParam: number;
12
- notNull: true;
13
- hasDefault: true;
14
- isPrimaryKey: true;
15
- isAutoincrement: false;
16
- hasRuntimeDefault: false;
17
- enumValues: undefined;
18
- baseColumn: never;
19
- identity: undefined;
20
- generated: undefined;
21
- }, {}, {}>;
22
- title: import("drizzle-orm/pg-core").PgColumn<{
23
- name: "title";
24
- tableName: "blog_categories";
25
- dataType: "string";
26
- columnType: "PgVarchar";
27
- data: string;
28
- driverParam: string;
29
- notNull: true;
30
- hasDefault: false;
31
- isPrimaryKey: false;
32
- isAutoincrement: false;
33
- hasRuntimeDefault: false;
34
- enumValues: [string, ...string[]];
35
- baseColumn: never;
36
- identity: undefined;
37
- generated: undefined;
38
- }, {}, {
39
- length: 100;
40
- }>;
41
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
42
- name: "createdAt";
43
- tableName: "blog_categories";
44
- dataType: "date";
45
- columnType: "PgTimestamp";
46
- data: Date;
47
- driverParam: string;
48
- notNull: true;
49
- hasDefault: true;
50
- isPrimaryKey: false;
51
- isAutoincrement: false;
52
- hasRuntimeDefault: false;
53
- enumValues: undefined;
54
- baseColumn: never;
55
- identity: undefined;
56
- generated: undefined;
57
- }, {}, {}>;
58
- updatedAt: import("drizzle-orm/pg-core").PgColumn<{
59
- name: "updatedAt";
60
- tableName: "blog_categories";
61
- dataType: "date";
62
- columnType: "PgTimestamp";
63
- data: Date;
64
- driverParam: string;
65
- notNull: true;
66
- hasDefault: true;
67
- isPrimaryKey: false;
68
- isAutoincrement: false;
69
- hasRuntimeDefault: false;
70
- enumValues: undefined;
71
- baseColumn: never;
72
- identity: undefined;
73
- generated: undefined;
74
- }, {}, {}>;
75
- titleSeo: import("drizzle-orm/pg-core").PgColumn<{
76
- name: "titleSeo";
77
- tableName: "blog_categories";
78
- dataType: "string";
79
- columnType: "PgVarchar";
80
- data: string;
81
- driverParam: string;
82
- notNull: true;
83
- hasDefault: true;
84
- isPrimaryKey: false;
85
- isAutoincrement: false;
86
- hasRuntimeDefault: false;
87
- enumValues: [string, ...string[]];
88
- baseColumn: never;
89
- identity: undefined;
90
- generated: undefined;
91
- }, {}, {
92
- length: 100;
93
- }>;
94
- };
95
- dialect: "pg";
1
+ //#region src/database/categories.d.ts
2
+ declare const blog_categories: Omit<import("drizzle-orm/pg-core").PgTableWithColumns<{
3
+ name: "blog_categories";
4
+ schema: undefined;
5
+ columns: {
6
+ id: import("drizzle-orm/pg-core").PgColumn<{
7
+ name: "id";
8
+ tableName: "blog_categories";
9
+ dataType: "number";
10
+ columnType: "PgSerial";
11
+ data: number;
12
+ driverParam: number;
13
+ notNull: true;
14
+ hasDefault: true;
15
+ isPrimaryKey: true;
16
+ isAutoincrement: false;
17
+ hasRuntimeDefault: false;
18
+ enumValues: undefined;
19
+ baseColumn: never;
20
+ identity: undefined;
21
+ generated: undefined;
22
+ }, {}, {}>;
23
+ title: import("drizzle-orm/pg-core").PgColumn<{
24
+ name: "title";
25
+ tableName: "blog_categories";
26
+ dataType: "string";
27
+ columnType: "PgVarchar";
28
+ data: string;
29
+ driverParam: string;
30
+ notNull: true;
31
+ hasDefault: false;
32
+ isPrimaryKey: false;
33
+ isAutoincrement: false;
34
+ hasRuntimeDefault: false;
35
+ enumValues: [string, ...string[]];
36
+ baseColumn: never;
37
+ identity: undefined;
38
+ generated: undefined;
39
+ }, {}, {
40
+ length: 100;
41
+ }>;
42
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
43
+ name: "createdAt";
44
+ tableName: "blog_categories";
45
+ dataType: "date";
46
+ columnType: "PgTimestamp";
47
+ data: Date;
48
+ driverParam: string;
49
+ notNull: true;
50
+ hasDefault: true;
51
+ isPrimaryKey: false;
52
+ isAutoincrement: false;
53
+ hasRuntimeDefault: false;
54
+ enumValues: undefined;
55
+ baseColumn: never;
56
+ identity: undefined;
57
+ generated: undefined;
58
+ }, {}, {}>;
59
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
60
+ name: "updatedAt";
61
+ tableName: "blog_categories";
62
+ dataType: "date";
63
+ columnType: "PgTimestamp";
64
+ data: Date;
65
+ driverParam: string;
66
+ notNull: true;
67
+ hasDefault: true;
68
+ isPrimaryKey: false;
69
+ isAutoincrement: false;
70
+ hasRuntimeDefault: false;
71
+ enumValues: undefined;
72
+ baseColumn: never;
73
+ identity: undefined;
74
+ generated: undefined;
75
+ }, {}, {}>;
76
+ titleSeo: import("drizzle-orm/pg-core").PgColumn<{
77
+ name: "titleSeo";
78
+ tableName: "blog_categories";
79
+ dataType: "string";
80
+ columnType: "PgVarchar";
81
+ data: string;
82
+ driverParam: string;
83
+ notNull: true;
84
+ hasDefault: true;
85
+ isPrimaryKey: false;
86
+ isAutoincrement: false;
87
+ hasRuntimeDefault: false;
88
+ enumValues: [string, ...string[]];
89
+ baseColumn: never;
90
+ identity: undefined;
91
+ generated: undefined;
92
+ }, {}, {
93
+ length: 100;
94
+ }>;
95
+ };
96
+ dialect: "pg";
96
97
  }>, "enableRLS">;
98
+ //#endregion
99
+ export { blog_categories };
97
100
  //# sourceMappingURL=categories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../../src/database/categories.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBASb,CAAC"}
1
+ {"version":3,"file":"categories.d.ts","names":[],"sources":["../../../src/database/categories.ts"],"mappings":";cAEa,iBAAe,mCAAA"}
@@ -1 +1,2 @@
1
- import{pgTable}from"drizzle-orm/pg-core";export const blog_categories=pgTable("blog_categories",t=>({id:t.serial().primaryKey(),title:t.varchar({length:100}).notNull(),createdAt:t.timestamp().notNull().defaultNow(),updatedAt:t.timestamp().notNull().$onUpdate(()=>new Date),titleSeo:t.varchar({length:100}).notNull().unique().default("")})).enableRLS();
1
+ import{pgTable as e}from"drizzle-orm/pg-core";const t=e(`blog_categories`,e=>({id:e.serial().primaryKey(),title:e.varchar({length:100}).notNull(),createdAt:e.timestamp().notNull().defaultNow(),updatedAt:e.timestamp().notNull().$onUpdate(()=>new Date),titleSeo:e.varchar({length:100}).notNull().unique().default(``)})).enableRLS();export{t as blog_categories};
2
+ //# sourceMappingURL=categories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.js","names":[],"sources":["../../../src/database/categories.ts"],"sourcesContent":["import { pgTable } from \"drizzle-orm/pg-core\";\n\nexport const blog_categories = pgTable(\"blog_categories\", t => ({\n id: t.serial().primaryKey(),\n title: t.varchar({ length: 100 }).notNull(),\n createdAt: t.timestamp().notNull().defaultNow(),\n updatedAt: t\n .timestamp()\n .notNull()\n .$onUpdate(() => new Date()),\n titleSeo: t.varchar({ length: 100 }).notNull().unique().default(\"\"),\n})).enableRLS();\n"],"mappings":"8CAEA,MAAa,EAAkB,EAAQ,kBAAmB,IAAM,CAC9D,GAAI,EAAE,OAAO,CAAC,CAAC,WAAW,EAC1B,MAAO,EAAE,QAAQ,CAAE,OAAQ,GAAI,CAAC,CAAC,CAAC,QAAQ,EAC1C,UAAW,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,EAC9C,UAAW,EACR,UAAU,CAAC,CACX,QAAQ,CAAC,CACT,cAAgB,IAAI,IAAM,EAC7B,SAAU,EAAE,QAAQ,CAAE,OAAQ,GAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CACpE,EAAE,CAAC,CAAC,UAAU"}
@@ -1,4 +1,4 @@
1
- export * from "./categories";
2
- export * from "./posts";
3
- export * from "./relations";
4
- //# sourceMappingURL=index.d.ts.map
1
+ import { blog_categories } from "./categories.js";
2
+ import { blog_posts } from "./posts.js";
3
+ import { blog_categories_relations, blog_posts_relations } from "./relations.js";
4
+ export { blog_categories, blog_categories_relations, blog_posts, blog_posts_relations };
@@ -1 +1 @@
1
- export*from"./categories.js";export*from"./posts.js";export*from"./relations.js";
1
+ import{blog_categories as e}from"./categories.js";import{blog_posts as t}from"./posts.js";import{blog_categories_relations as n,blog_posts_relations as r}from"./relations.js";export{e as blog_categories,n as blog_categories_relations,t as blog_posts,r as blog_posts_relations};