@appconda/nextjs 1.0.207 → 1.0.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/scheduled-job/action2.d.ts +5 -0
- package/dist/modules/scheduled-job/action2.js +17 -0
- package/dist/modules/task/action.d.ts +33 -1
- package/dist/modules/task/action.js +386 -1
- package/dist/modules/task/schema.d.ts +552 -0
- package/dist/modules/task/schema.js +236 -1
- package/dist/modules/task/service.d.ts +34 -2
- package/dist/modules/task/service.js +97 -2
- package/dist/modules/task/types.d.ts +165 -0
- package/dist/modules/task/types.js +17 -2
- package/dist/services/tenant.d.ts +32 -0
- package/dist/services/tenant.js +124 -0
- package/package.json +1 -1
- package/src/modules/task/action.ts +385 -1
- package/src/modules/task/schema.ts +290 -0
- package/src/modules/task/service.ts +142 -15
- package/src/modules/task/types.ts +188 -1
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
2
|
import z from "zod";
|
3
3
|
import { ServiceClient } from "../../service-client";
|
4
|
-
import { CreateListSchema, CreateProjectSchema, CreateSprintSchema, CreateTaskListSchema,
|
5
|
-
import { Project, Sprint, Task, TaskList, View } from "./types";
|
4
|
+
import { ChangePostCategorySchema, ChangePostStatusSchema, CreateBoardSchema, CreateChangelogSchema, CreateCommentSchema, CreateListSchema, CreatePostCategorySchema, CreatePostSchema, CreateProjectSchema, CreateRoadmapSchema, CreateSprintSchema, CreateStatusChangeSchema, CreateTagSchema, CreateTaskListSchema, CreateTaskSchema, CreateViewSchema, CreateVoteSchema, DeleteBoardSchema, DeleteCommentSchema, DeletePostCategorySchema, DeleteSprintSchema, DeleteTaskListSchema, DeleteVoteSchema, GetBoardSchema, GetChangeLogSchema, GetCommentSchema, GetPostCategorySchema, GetPostSchema, GetProjectSchema, GetRoadmapSchema, GetSprintSchema, GetTagSchema, GetTaskListSchema, GetVoteSchema, ListBoardsSchema, ListChangeLogsSchema, ListCommentsSchema, ListPostCategoriesSchema, ListPostsSchema, ListProjectsSchema, ListTagsSchema, ListTaskListsSchema, ListTasksInListSchema, ListTasksSchema, ListViewsSchema, ListVotesSchema, MoveTaskSchema, UpdateSprintSchema, UpdateTaskListSchema } from "./schema";
|
5
|
+
import { Board, Changelog, Post, PostCategory, Project, Roadmap, Sprint, StatusChange, Tag, Task, TaskList, View, Vote } from "./types";
|
6
6
|
|
7
7
|
|
8
8
|
export class TaskService extends ServiceClient {
|
@@ -11,11 +11,11 @@ export class TaskService extends ServiceClient {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
public async CreateProject(payload: z.infer<typeof CreateProjectSchema>): Promise<Project> {
|
14
|
-
return await this.actionCall('projects','CreateProject', payload);
|
14
|
+
return await this.actionCall('projects', 'CreateProject', payload);
|
15
15
|
}
|
16
16
|
|
17
17
|
public async CreateTask(payload: z.infer<typeof CreateTaskSchema>): Promise<Task> {
|
18
|
-
return await this.actionCall('task','CreateTask', payload);
|
18
|
+
return await this.actionCall('task', 'CreateTask', payload);
|
19
19
|
}
|
20
20
|
|
21
21
|
public async GetProject(payload: z.infer<typeof GetProjectSchema>): Promise<Project> {
|
@@ -39,7 +39,7 @@ export class TaskService extends ServiceClient {
|
|
39
39
|
}
|
40
40
|
|
41
41
|
public async GetTaskList(payload: z.infer<typeof GetTaskListSchema>): Promise<TaskList> {
|
42
|
-
return await this.actionCall('projects','GetTaskList', payload);
|
42
|
+
return await this.actionCall('projects', 'GetTaskList', payload);
|
43
43
|
}
|
44
44
|
|
45
45
|
public async GetSprint(payload: z.infer<typeof GetSprintSchema>): Promise<Sprint> {
|
@@ -63,31 +63,158 @@ export class TaskService extends ServiceClient {
|
|
63
63
|
}
|
64
64
|
|
65
65
|
public async CreateList(payload: z.infer<typeof CreateListSchema>): Promise<TaskList> {
|
66
|
-
return await this.actionCall('project','CreateList', payload);
|
66
|
+
return await this.actionCall('project', 'CreateList', payload);
|
67
67
|
}
|
68
68
|
|
69
69
|
public async ListTaskLists(payload: z.infer<typeof ListTaskListsSchema>): Promise<TaskList[]> {
|
70
|
-
|
71
|
-
return await this.actionCall('projects','ListTaskLists', payload);
|
70
|
+
return await this.actionCall('projects', 'ListTaskLists', payload);
|
72
71
|
}
|
73
|
-
|
72
|
+
|
74
73
|
public async ListTasksInList(payload: z.infer<typeof ListTasksInListSchema>): Promise<Task[]> {
|
75
|
-
return await this.actionCall('task','ListTasksInList', payload);
|
74
|
+
return await this.actionCall('task', 'ListTasksInList', payload);
|
76
75
|
}
|
77
76
|
|
78
77
|
public async MoveTask(payload: z.infer<typeof MoveTaskSchema>): Promise<void> {
|
79
|
-
return await this.actionCall('task','MoveTask', payload);
|
78
|
+
return await this.actionCall('task', 'MoveTask', payload);
|
80
79
|
}
|
81
80
|
|
82
81
|
public async CreateView(payload: z.infer<typeof CreateViewSchema>): Promise<View> {
|
83
|
-
return await this.actionCall('project','CreateView', payload);
|
82
|
+
return await this.actionCall('project', 'CreateView', payload);
|
84
83
|
}
|
85
|
-
|
84
|
+
|
86
85
|
public async ListViews(payload: z.infer<typeof ListViewsSchema>): Promise<View[]> {
|
87
|
-
return await this.actionCall('project','ListViews', payload);
|
86
|
+
return await this.actionCall('project', 'ListViews', payload);
|
88
87
|
}
|
89
88
|
|
90
89
|
public async ListTasks(payload: z.infer<typeof ListTasksSchema>): Promise<Task[]> {
|
91
|
-
return await this.actionCall('project','ListTasks', payload);
|
90
|
+
return await this.actionCall('project', 'ListTasks', payload);
|
91
|
+
}
|
92
|
+
|
93
|
+
public async ChangePostCategory(payload: z.infer<typeof ChangePostCategorySchema>): Promise<void> {
|
94
|
+
return await this.actionCall('feedback', 'ChangePostCategory', payload);
|
95
|
+
}
|
96
|
+
|
97
|
+
public async ChangePostStatus(payload: z.infer<typeof ChangePostStatusSchema>): Promise<void> {
|
98
|
+
return await this.actionCall('feedback', 'ChangePostStatus', payload);
|
99
|
+
}
|
100
|
+
|
101
|
+
public async CreateBoard(payload: z.infer<typeof CreateBoardSchema>): Promise<Board> {
|
102
|
+
return await this.actionCall('feedback', 'CreateBoard', payload);
|
103
|
+
}
|
104
|
+
|
105
|
+
public async GetBoard(payload: z.infer<typeof GetBoardSchema>): Promise<Board> {
|
106
|
+
return await this.actionCall('feedback', 'GetBoard', payload);
|
107
|
+
}
|
108
|
+
|
109
|
+
public async ListBoards(payload: z.infer<typeof ListBoardsSchema>): Promise<Board[]> {
|
110
|
+
return await this.actionCall('feedback', 'ListBoards', payload);
|
111
|
+
}
|
112
|
+
|
113
|
+
public async DeleteBoard(payload: z.infer<typeof DeleteBoardSchema>): Promise<void> {
|
114
|
+
return await this.actionCall('feedback', 'DeleteBoard', payload);
|
115
|
+
}
|
116
|
+
|
117
|
+
public async CreateChangelog(payload: z.infer<typeof CreateChangelogSchema>): Promise<Changelog> {
|
118
|
+
return await this.actionCall('feedback', 'CreateChangelog', payload);
|
119
|
+
}
|
120
|
+
|
121
|
+
public async CreateComment(payload: z.infer<typeof CreateCommentSchema>): Promise<Comment> {
|
122
|
+
return await this.actionCall('feedback', 'CreateComment', payload);
|
123
|
+
}
|
124
|
+
|
125
|
+
public async CreatePost(payload: z.infer<typeof CreatePostSchema>): Promise<Post> {
|
126
|
+
return await this.actionCall('feedback', 'CreatePost', payload);
|
127
|
+
}
|
128
|
+
|
129
|
+
public async CreatePostCategory(payload: z.infer<typeof CreatePostCategorySchema>): Promise<PostCategory> {
|
130
|
+
return await this.actionCall('feedback', 'CreatePostCategory', payload);
|
131
|
+
}
|
132
|
+
|
133
|
+
public async CreateRoadmap(payload: z.infer<typeof CreateRoadmapSchema>): Promise<Roadmap> {
|
134
|
+
return await this.actionCall('feedback', 'CreateRoadmap', payload);
|
135
|
+
}
|
136
|
+
|
137
|
+
public async CreateStatusChange(payload: z.infer<typeof CreateStatusChangeSchema>): Promise<void> {
|
138
|
+
return await this.actionCall('feedback', 'CreateStatusChange', payload);
|
139
|
+
}
|
140
|
+
|
141
|
+
public async CreateTag(payload: z.infer<typeof CreateTagSchema>): Promise<Tag> {
|
142
|
+
return await this.actionCall('feedback', 'CreateTag', payload);
|
143
|
+
}
|
144
|
+
|
145
|
+
public async CreateVote(payload: z.infer<typeof CreateVoteSchema>): Promise<Vote> {
|
146
|
+
return await this.actionCall('feedback', 'CreateVote', payload);
|
147
|
+
}
|
148
|
+
|
149
|
+
public async DeleteComment(payload: z.infer<typeof DeleteCommentSchema>): Promise<void> {
|
150
|
+
return await this.actionCall('feedback', 'DeleteComment', payload);
|
151
|
+
}
|
152
|
+
|
153
|
+
public async DeletePostCategory(payload: z.infer<typeof DeletePostCategorySchema>): Promise<void> {
|
154
|
+
return await this.actionCall('feedback', 'DeletePostCategory', payload);
|
155
|
+
}
|
156
|
+
|
157
|
+
public async DeleteVote(payload: z.infer<typeof DeleteVoteSchema>): Promise<void> {
|
158
|
+
return await this.actionCall('feedback', 'DeleteVote', payload);
|
159
|
+
}
|
160
|
+
|
161
|
+
public async GetChangeLog(payload: z.infer<typeof GetChangeLogSchema>): Promise<Changelog> {
|
162
|
+
return await this.actionCall('feedback', 'GetChangeLog', payload);
|
163
|
+
}
|
164
|
+
|
165
|
+
public async GetComment(payload: z.infer<typeof GetCommentSchema>): Promise<Comment> {
|
166
|
+
return await this.actionCall('feedback', 'GetComment', payload);
|
167
|
+
}
|
168
|
+
|
169
|
+
public async GetPost(payload: z.infer<typeof GetPostSchema>): Promise<Post> {
|
170
|
+
return await this.actionCall('feedback', 'GetPost', payload);
|
171
|
+
}
|
172
|
+
|
173
|
+
public async GetPostCategory(payload: z.infer<typeof GetPostCategorySchema>): Promise<PostCategory> {
|
174
|
+
return await this.actionCall('feedback', 'GetPostCategory', payload);
|
175
|
+
}
|
176
|
+
|
177
|
+
public async GetRoadmap(payload: z.infer<typeof GetRoadmapSchema>): Promise<Roadmap> {
|
178
|
+
return await this.actionCall('feedback', 'GetRoadmap', payload);
|
179
|
+
}
|
180
|
+
|
181
|
+
public async GetTag(payload: z.infer<typeof GetTagSchema>): Promise<Tag> {
|
182
|
+
return await this.actionCall('feedback', 'GetTag', payload);
|
183
|
+
}
|
184
|
+
|
185
|
+
public async GetVote(payload: z.infer<typeof GetVoteSchema>): Promise<Vote> {
|
186
|
+
return await this.actionCall('feedback', 'GetVote', payload);
|
187
|
+
}
|
188
|
+
|
189
|
+
public async ListChangeLogs(payload: z.infer<typeof ListChangeLogsSchema>): Promise<Changelog[]> {
|
190
|
+
return await this.actionCall('feedback', 'ListChangeLogs', payload);
|
191
|
+
}
|
192
|
+
|
193
|
+
public async ListComments(payload: z.infer<typeof ListCommentsSchema>): Promise<Comment[]> {
|
194
|
+
return await this.actionCall('feedback', 'ListComments', payload);
|
195
|
+
}
|
196
|
+
|
197
|
+
public async ListPostCategories(payload: z.infer<typeof ListPostCategoriesSchema>): Promise<PostCategory[]> {
|
198
|
+
return await this.actionCall('feedback', 'ListPostCategories', payload);
|
199
|
+
}
|
200
|
+
|
201
|
+
public async ListPosts(payload: z.infer<typeof ListPostsSchema>): Promise<Post[]> {
|
202
|
+
return await this.actionCall('feedback', 'ListPosts', payload);
|
203
|
+
}
|
204
|
+
|
205
|
+
public async ListRoadmaps(): Promise<Roadmap[]> {
|
206
|
+
return await this.actionCall('feedback', 'ListRoadmaps', {});
|
207
|
+
}
|
208
|
+
|
209
|
+
public async ListStatusChanges(): Promise<StatusChange[]> {
|
210
|
+
return await this.actionCall('feedback', 'ListStatusChanges', {});
|
211
|
+
}
|
212
|
+
|
213
|
+
public async ListTags(payload: z.infer<typeof ListTagsSchema>): Promise<Tag[]> {
|
214
|
+
return await this.actionCall('feedback', 'ListTags', {});
|
215
|
+
}
|
216
|
+
|
217
|
+
public async ListVotes(payload: z.infer<typeof ListVotesSchema>): Promise<Vote[]> {
|
218
|
+
return await this.actionCall('feedback', 'ListVotes', {});
|
92
219
|
}
|
93
220
|
}
|
@@ -107,4 +107,191 @@ export type View = {
|
|
107
107
|
updatedAt: Date;
|
108
108
|
active: boolean;
|
109
109
|
position: number;
|
110
|
-
}
|
110
|
+
}
|
111
|
+
|
112
|
+
// Prisma Modelleri için TypeScript Tipleri
|
113
|
+
|
114
|
+
// Enum Tipleri
|
115
|
+
export enum Roles {
|
116
|
+
USER = 'USER',
|
117
|
+
ADMIN = 'ADMIN'
|
118
|
+
}
|
119
|
+
|
120
|
+
export enum PostStatus {
|
121
|
+
OPEN = 'OPEN',
|
122
|
+
UNDER_REVIEW = 'UNDER_REVIEW',
|
123
|
+
PLANNED = 'PLANNED',
|
124
|
+
IN_PROGRESS = 'IN_PROGRESS',
|
125
|
+
COMPLETE = 'COMPLETE',
|
126
|
+
CLOSED = 'CLOSED'
|
127
|
+
}
|
128
|
+
|
129
|
+
// Model Tipleri
|
130
|
+
export type Roadmap = {
|
131
|
+
id: string;
|
132
|
+
title: string;
|
133
|
+
createdAt: Date;
|
134
|
+
updatedAt: Date;
|
135
|
+
posts: RoadmapPost[];
|
136
|
+
}
|
137
|
+
|
138
|
+
export type RoadmapPost = {
|
139
|
+
id: string;
|
140
|
+
roadmapId: string;
|
141
|
+
roadmap: Roadmap;
|
142
|
+
postId: string;
|
143
|
+
post: Post;
|
144
|
+
createdAt: Date;
|
145
|
+
updatedAt: Date;
|
146
|
+
}
|
147
|
+
|
148
|
+
export type Post = {
|
149
|
+
id: string;
|
150
|
+
authorId: string;
|
151
|
+
by?: string;
|
152
|
+
boardId: string;
|
153
|
+
board: Board;
|
154
|
+
postCategoryId?: string;
|
155
|
+
postCategory?: PostCategory;
|
156
|
+
comments: Comment[];
|
157
|
+
votes: Vote[];
|
158
|
+
ChangeLogPost: ChangeLogPost[];
|
159
|
+
StatusHistory: StatusChange[];
|
160
|
+
createdAt: Date;
|
161
|
+
updatedAt: Date;
|
162
|
+
details?: string;
|
163
|
+
eta?: string;
|
164
|
+
postImages: PostImages[];
|
165
|
+
owner?: string;
|
166
|
+
roadmapPosts: RoadmapPost[];
|
167
|
+
score: number;
|
168
|
+
status: PostStatus;
|
169
|
+
statusChangedAt: Date;
|
170
|
+
title: string;
|
171
|
+
url?: string;
|
172
|
+
PostTag: PostTag[];
|
173
|
+
}
|
174
|
+
|
175
|
+
export type PostImages = {
|
176
|
+
id: string;
|
177
|
+
postId: string;
|
178
|
+
post: Post;
|
179
|
+
url: string;
|
180
|
+
}
|
181
|
+
|
182
|
+
export type Board = {
|
183
|
+
id: string;
|
184
|
+
name: string;
|
185
|
+
posts: Post[];
|
186
|
+
createdAt: Date;
|
187
|
+
PostCategory: PostCategory[];
|
188
|
+
Comment: Comment[];
|
189
|
+
Tag: Tag[];
|
190
|
+
Vote: Vote[];
|
191
|
+
}
|
192
|
+
|
193
|
+
export type PostCategory = {
|
194
|
+
id: string;
|
195
|
+
name: string;
|
196
|
+
board: Board;
|
197
|
+
boardId: string;
|
198
|
+
posts: Post[];
|
199
|
+
parentID?: string;
|
200
|
+
parent?: PostCategory;
|
201
|
+
children: PostCategory[];
|
202
|
+
subscribeAdmins: boolean;
|
203
|
+
}
|
204
|
+
|
205
|
+
export type Comment = {
|
206
|
+
id: string;
|
207
|
+
author: string;
|
208
|
+
boardId: string;
|
209
|
+
board: Board;
|
210
|
+
postId?: string;
|
211
|
+
post?: Post;
|
212
|
+
createdAt: Date;
|
213
|
+
updatedAt: Date;
|
214
|
+
images: CommentImage[];
|
215
|
+
internal: boolean;
|
216
|
+
likeCount: number;
|
217
|
+
mentions: CommentMention[];
|
218
|
+
parentID?: string;
|
219
|
+
parent?: Comment;
|
220
|
+
children: Comment[];
|
221
|
+
private: boolean;
|
222
|
+
value: string;
|
223
|
+
}
|
224
|
+
|
225
|
+
export type CommentImage = {
|
226
|
+
id: string;
|
227
|
+
commentId: string;
|
228
|
+
comment: Comment;
|
229
|
+
url: string;
|
230
|
+
}
|
231
|
+
|
232
|
+
export type CommentMention = {
|
233
|
+
id: string;
|
234
|
+
commentId: string;
|
235
|
+
comment: Comment;
|
236
|
+
userId: string;
|
237
|
+
}
|
238
|
+
|
239
|
+
export type Vote = {
|
240
|
+
id: string;
|
241
|
+
voterId: string;
|
242
|
+
by?: string;
|
243
|
+
boardId: string;
|
244
|
+
board: Board;
|
245
|
+
postId: string;
|
246
|
+
post: Post;
|
247
|
+
createdAt: Date;
|
248
|
+
}
|
249
|
+
|
250
|
+
export type Tag = {
|
251
|
+
id: string;
|
252
|
+
boardId: string;
|
253
|
+
board: Board;
|
254
|
+
name: string;
|
255
|
+
posts: PostTag[];
|
256
|
+
}
|
257
|
+
|
258
|
+
export type PostTag = {
|
259
|
+
id: string;
|
260
|
+
postId: string;
|
261
|
+
post: Post;
|
262
|
+
tagId: string;
|
263
|
+
tag: Tag;
|
264
|
+
}
|
265
|
+
|
266
|
+
export type Changelog = {
|
267
|
+
id: string;
|
268
|
+
title: string;
|
269
|
+
details?: string;
|
270
|
+
created: Date;
|
271
|
+
lastSaved?: Date;
|
272
|
+
publishedAt?: Date;
|
273
|
+
scheduledFor?: Date;
|
274
|
+
status: string;
|
275
|
+
url?: string;
|
276
|
+
type: string;
|
277
|
+
ChangeLogPost: ChangeLogPost[];
|
278
|
+
}
|
279
|
+
|
280
|
+
export type ChangeLogPost = {
|
281
|
+
id: string;
|
282
|
+
postId: string;
|
283
|
+
changelogId: string;
|
284
|
+
post: Post;
|
285
|
+
changelog: Changelog;
|
286
|
+
}
|
287
|
+
|
288
|
+
export type StatusChange = {
|
289
|
+
id: string;
|
290
|
+
changerId: string;
|
291
|
+
changeComment?: string;
|
292
|
+
postId: string;
|
293
|
+
post: Post;
|
294
|
+
status: PostStatus;
|
295
|
+
changedAt: Date;
|
296
|
+
}
|
297
|
+
|