@lokalise/chatter-api-contracts 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/contracts/comments/delete-comment-reply.d.ts +6 -6
- package/dist/api/contracts/comments/delete-comment-reply.js +3 -3
- package/dist/api/contracts/comments/delete-comment.d.ts +4 -4
- package/dist/api/contracts/comments/delete-comment.js +2 -2
- package/dist/api/contracts/comments/get-comment-replies.d.ts +65 -15
- package/dist/api/contracts/comments/get-comment-replies.js +6 -5
- package/dist/api/contracts/comments/get-comment-replies.js.map +1 -1
- package/dist/api/contracts/comments/get-comment.d.ts +18 -18
- package/dist/api/contracts/comments/get-comment.js +4 -4
- package/dist/api/contracts/comments/get-comment.js.map +1 -1
- package/dist/api/contracts/comments/get-comments.d.ts +81 -5
- package/dist/api/contracts/comments/get-comments.js +6 -5
- package/dist/api/contracts/comments/get-comments.js.map +1 -1
- package/dist/api/contracts/comments/patch-comment-reply.d.ts +9 -9
- package/dist/api/contracts/comments/patch-comment-reply.js +3 -3
- package/dist/api/contracts/comments/patch-comment.d.ts +7 -7
- package/dist/api/contracts/comments/patch-comment.js +2 -2
- package/dist/api/contracts/comments/post-comment-reply.d.ts +9 -9
- package/dist/api/contracts/comments/post-comment-reply.js +3 -3
- package/dist/api/contracts/comments/post-comment.d.ts +9 -9
- package/dist/api/contracts/comments/post-comment.js +3 -3
- package/dist/api/contracts/comments/post-comments-actions-search.d.ts +20 -20
- package/dist/api/contracts/comments/post-comments-actions-search.js +5 -5
- package/dist/api/contracts/comments/post-comments-actions-search.js.map +1 -1
- package/dist/api/contracts/comments/put-comment-read-state.d.ts +4 -4
- package/dist/api/contracts/comments/put-comment-read-state.js +2 -2
- package/dist/api/contracts/comments/put-comment-subscription.d.ts +4 -4
- package/dist/api/contracts/comments/put-comment-subscription.js +2 -2
- package/dist/api/errors/mentioned-user-access-denied.d.ts +2 -2
- package/dist/api/errors/mentioned-user-access-denied.js +1 -1
- package/dist/api/objects/comment-reply.d.ts +4 -4
- package/dist/api/objects/comment-reply.js +3 -3
- package/dist/api/objects/comment.d.ts +46 -8
- package/dist/api/objects/comment.js +12 -14
- package/dist/api/objects/comment.js.map +1 -1
- package/dist/api/objects/message.d.ts +3 -3
- package/dist/api/objects/message.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const PATCH_COMMENT_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
teamId: z.
|
|
4
|
-
commentId: z.
|
|
3
|
+
teamId: z.ZodGUID;
|
|
4
|
+
commentId: z.ZodGUID;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export type PatchCommentPathParams = z.infer<typeof PATCH_COMMENT_PATH_PARAMS_SCHEMA>;
|
|
7
7
|
declare const PATCH_COMMENT_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
@@ -14,7 +14,7 @@ declare const PATCH_COMMENT_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
|
14
14
|
text: z.ZodString;
|
|
15
15
|
}, z.core.$strip>, z.ZodObject<{
|
|
16
16
|
type: z.ZodLiteral<"userMention">;
|
|
17
|
-
userId: z.
|
|
17
|
+
userId: z.ZodGUID;
|
|
18
18
|
}, z.core.$strip>, z.ZodObject<{
|
|
19
19
|
type: z.ZodLiteral<"link">;
|
|
20
20
|
href: z.ZodURL;
|
|
@@ -38,8 +38,8 @@ export declare const patchCommentContract: Omit<{
|
|
|
38
38
|
authorization: z.ZodString;
|
|
39
39
|
}, z.core.$strip>;
|
|
40
40
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
41
|
-
teamId: z.
|
|
42
|
-
commentId: z.
|
|
41
|
+
teamId: z.ZodGUID;
|
|
42
|
+
commentId: z.ZodGUID;
|
|
43
43
|
}, z.core.$strip>;
|
|
44
44
|
readonly requestBodySchema: z.ZodObject<{
|
|
45
45
|
message: z.ZodOptional<z.ZodObject<{
|
|
@@ -51,7 +51,7 @@ export declare const patchCommentContract: Omit<{
|
|
|
51
51
|
text: z.ZodString;
|
|
52
52
|
}, z.core.$strip>, z.ZodObject<{
|
|
53
53
|
type: z.ZodLiteral<"userMention">;
|
|
54
|
-
userId: z.
|
|
54
|
+
userId: z.ZodGUID;
|
|
55
55
|
}, z.core.$strip>, z.ZodObject<{
|
|
56
56
|
type: z.ZodLiteral<"link">;
|
|
57
57
|
href: z.ZodURL;
|
|
@@ -102,7 +102,7 @@ export declare const patchCommentContract: Omit<{
|
|
|
102
102
|
errorCode: z.ZodLiteral<"MENTIONED_USER_ACCESS_DENIED">;
|
|
103
103
|
} & {
|
|
104
104
|
details: z.ZodObject<{
|
|
105
|
-
userIds: z.ZodArray<z.
|
|
105
|
+
userIds: z.ZodArray<z.ZodGUID>;
|
|
106
106
|
}, z.core.$strip>;
|
|
107
107
|
}, z.core.$strip>;
|
|
108
108
|
500: z.ZodObject<{
|
|
@@ -9,8 +9,8 @@ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
|
9
9
|
// PATCH /v1/teams/:teamId/comments/:commentId
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
const PATCH_COMMENT_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
12
|
-
teamId: z.
|
|
13
|
-
commentId: z.
|
|
12
|
+
teamId: z.guid().describe('Id of the team'),
|
|
13
|
+
commentId: z.guid().describe('Id of the comment'),
|
|
14
14
|
}));
|
|
15
15
|
const PATCH_COMMENT_REQUEST_BODY_SCHEMA = z.compile(z
|
|
16
16
|
.object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const POST_COMMENT_REPLY_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
teamId: z.
|
|
4
|
-
commentId: z.
|
|
3
|
+
teamId: z.ZodGUID;
|
|
4
|
+
commentId: z.ZodGUID;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export type PostCommentReplyPathParams = z.infer<typeof POST_COMMENT_REPLY_PATH_PARAMS_SCHEMA>;
|
|
7
7
|
declare const POST_COMMENT_REPLY_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
@@ -14,7 +14,7 @@ declare const POST_COMMENT_REPLY_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
|
14
14
|
text: z.ZodString;
|
|
15
15
|
}, z.core.$strip>, z.ZodObject<{
|
|
16
16
|
type: z.ZodLiteral<"userMention">;
|
|
17
|
-
userId: z.
|
|
17
|
+
userId: z.ZodGUID;
|
|
18
18
|
}, z.core.$strip>, z.ZodObject<{
|
|
19
19
|
type: z.ZodLiteral<"link">;
|
|
20
20
|
href: z.ZodURL;
|
|
@@ -26,7 +26,7 @@ declare const POST_COMMENT_REPLY_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
|
26
26
|
export type PostCommentReplyRequestBody = z.infer<typeof POST_COMMENT_REPLY_REQUEST_BODY_SCHEMA>;
|
|
27
27
|
declare const POST_COMMENT_REPLY_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
28
28
|
data: z.ZodObject<{
|
|
29
|
-
id: z.
|
|
29
|
+
id: z.ZodGUID;
|
|
30
30
|
}, z.core.$strip>;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
export type PostCommentReplyResponseBody = z.infer<typeof POST_COMMENT_REPLY_RESPONSE_BODY_SCHEMA>;
|
|
@@ -40,8 +40,8 @@ export declare const postCommentReplyContract: Omit<{
|
|
|
40
40
|
authorization: z.ZodString;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
43
|
-
teamId: z.
|
|
44
|
-
commentId: z.
|
|
43
|
+
teamId: z.ZodGUID;
|
|
44
|
+
commentId: z.ZodGUID;
|
|
45
45
|
}, z.core.$strip>;
|
|
46
46
|
readonly requestBodySchema: z.ZodObject<{
|
|
47
47
|
message: z.ZodObject<{
|
|
@@ -53,7 +53,7 @@ export declare const postCommentReplyContract: Omit<{
|
|
|
53
53
|
text: z.ZodString;
|
|
54
54
|
}, z.core.$strip>, z.ZodObject<{
|
|
55
55
|
type: z.ZodLiteral<"userMention">;
|
|
56
|
-
userId: z.
|
|
56
|
+
userId: z.ZodGUID;
|
|
57
57
|
}, z.core.$strip>, z.ZodObject<{
|
|
58
58
|
type: z.ZodLiteral<"link">;
|
|
59
59
|
href: z.ZodURL;
|
|
@@ -69,7 +69,7 @@ export declare const postCommentReplyContract: Omit<{
|
|
|
69
69
|
readonly responsesByStatusCode: {
|
|
70
70
|
201: z.ZodObject<{
|
|
71
71
|
data: z.ZodObject<{
|
|
72
|
-
id: z.
|
|
72
|
+
id: z.ZodGUID;
|
|
73
73
|
}, z.core.$strip>;
|
|
74
74
|
}, z.core.$strip>;
|
|
75
75
|
400: z.ZodObject<{
|
|
@@ -100,7 +100,7 @@ export declare const postCommentReplyContract: Omit<{
|
|
|
100
100
|
errorCode: z.ZodLiteral<"MENTIONED_USER_ACCESS_DENIED">;
|
|
101
101
|
} & {
|
|
102
102
|
details: z.ZodObject<{
|
|
103
|
-
userIds: z.ZodArray<z.
|
|
103
|
+
userIds: z.ZodArray<z.ZodGUID>;
|
|
104
104
|
}, z.core.$strip>;
|
|
105
105
|
}, z.core.$strip>;
|
|
106
106
|
500: z.ZodObject<{
|
|
@@ -8,14 +8,14 @@ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
|
8
8
|
// POST /v1/teams/:teamId/comments/:commentId/replies
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
const POST_COMMENT_REPLY_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
11
|
-
teamId: z.
|
|
12
|
-
commentId: z.
|
|
11
|
+
teamId: z.guid().describe('Id of the team'),
|
|
12
|
+
commentId: z.guid().describe('Id of the comment'),
|
|
13
13
|
}));
|
|
14
14
|
const POST_COMMENT_REPLY_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
15
15
|
message: MESSAGE_SCHEMA,
|
|
16
16
|
}));
|
|
17
17
|
const POST_COMMENT_REPLY_RESPONSE_BODY_SCHEMA = z.compile(z.object({
|
|
18
|
-
data: z.object({ id: z.
|
|
18
|
+
data: z.object({ id: z.guid().describe('Id of the new reply') }),
|
|
19
19
|
}));
|
|
20
20
|
export const postCommentReplyContract = defineApiContract({
|
|
21
21
|
method: 'post',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const POST_COMMENT_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
teamId: z.
|
|
3
|
+
teamId: z.ZodGUID;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
5
|
export type PostCommentPathParams = z.infer<typeof POST_COMMENT_PATH_PARAMS_SCHEMA>;
|
|
6
6
|
declare const POST_COMMENT_REQUEST_BODY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
7
|
entityType: z.ZodLiteral<"SEGMENT">;
|
|
8
8
|
entityId: z.ZodGUID;
|
|
9
|
-
projectId: z.
|
|
9
|
+
projectId: z.ZodGUID;
|
|
10
10
|
message: z.ZodObject<{
|
|
11
11
|
version: z.ZodLiteral<1>;
|
|
12
12
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -16,7 +16,7 @@ declare const POST_COMMENT_REQUEST_BODY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
16
16
|
text: z.ZodString;
|
|
17
17
|
}, z.core.$strip>, z.ZodObject<{
|
|
18
18
|
type: z.ZodLiteral<"userMention">;
|
|
19
|
-
userId: z.
|
|
19
|
+
userId: z.ZodGUID;
|
|
20
20
|
}, z.core.$strip>, z.ZodObject<{
|
|
21
21
|
type: z.ZodLiteral<"link">;
|
|
22
22
|
href: z.ZodURL;
|
|
@@ -28,7 +28,7 @@ declare const POST_COMMENT_REQUEST_BODY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
28
28
|
export type PostCommentRequestBody = z.infer<typeof POST_COMMENT_REQUEST_BODY_SCHEMA>;
|
|
29
29
|
declare const POST_COMMENT_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
30
30
|
data: z.ZodObject<{
|
|
31
|
-
id: z.
|
|
31
|
+
id: z.ZodGUID;
|
|
32
32
|
}, z.core.$strip>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
export type PostCommentResponseBody = z.infer<typeof POST_COMMENT_RESPONSE_BODY_SCHEMA>;
|
|
@@ -42,12 +42,12 @@ export declare const postCommentContract: Omit<{
|
|
|
42
42
|
authorization: z.ZodString;
|
|
43
43
|
}, z.core.$strip>;
|
|
44
44
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
45
|
-
teamId: z.
|
|
45
|
+
teamId: z.ZodGUID;
|
|
46
46
|
}, z.core.$strip>;
|
|
47
47
|
readonly requestBodySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48
48
|
entityType: z.ZodLiteral<"SEGMENT">;
|
|
49
49
|
entityId: z.ZodGUID;
|
|
50
|
-
projectId: z.
|
|
50
|
+
projectId: z.ZodGUID;
|
|
51
51
|
message: z.ZodObject<{
|
|
52
52
|
version: z.ZodLiteral<1>;
|
|
53
53
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -57,7 +57,7 @@ export declare const postCommentContract: Omit<{
|
|
|
57
57
|
text: z.ZodString;
|
|
58
58
|
}, z.core.$strip>, z.ZodObject<{
|
|
59
59
|
type: z.ZodLiteral<"userMention">;
|
|
60
|
-
userId: z.
|
|
60
|
+
userId: z.ZodGUID;
|
|
61
61
|
}, z.core.$strip>, z.ZodObject<{
|
|
62
62
|
type: z.ZodLiteral<"link">;
|
|
63
63
|
href: z.ZodURL;
|
|
@@ -72,7 +72,7 @@ export declare const postCommentContract: Omit<{
|
|
|
72
72
|
readonly responsesByStatusCode: {
|
|
73
73
|
201: z.ZodObject<{
|
|
74
74
|
data: z.ZodObject<{
|
|
75
|
-
id: z.
|
|
75
|
+
id: z.ZodGUID;
|
|
76
76
|
}, z.core.$strip>;
|
|
77
77
|
}, z.core.$strip>;
|
|
78
78
|
400: z.ZodObject<{
|
|
@@ -103,7 +103,7 @@ export declare const postCommentContract: Omit<{
|
|
|
103
103
|
errorCode: z.ZodLiteral<"MENTIONED_USER_ACCESS_DENIED">;
|
|
104
104
|
} & {
|
|
105
105
|
details: z.ZodObject<{
|
|
106
|
-
userIds: z.ZodArray<z.
|
|
106
|
+
userIds: z.ZodArray<z.ZodGUID>;
|
|
107
107
|
}, z.core.$strip>;
|
|
108
108
|
}, z.core.$strip>;
|
|
109
109
|
500: z.ZodObject<{
|
|
@@ -9,7 +9,7 @@ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
|
9
9
|
// POST /v1/teams/:teamId/comments
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
const POST_COMMENT_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
12
|
-
teamId: z.
|
|
12
|
+
teamId: z.guid().describe('Id of the team'),
|
|
13
13
|
}));
|
|
14
14
|
// One option per entity type, as each type decides which fields it requires
|
|
15
15
|
const POST_COMMENT_REQUEST_BODY_SCHEMA = z.compile(z.discriminatedUnion('entityType', [
|
|
@@ -19,13 +19,13 @@ const POST_COMMENT_REQUEST_BODY_SCHEMA = z.compile(z.discriminatedUnion('entityT
|
|
|
19
19
|
.literal(CommentEntityTypeEnum.SEGMENT)
|
|
20
20
|
.describe('Type of the commented entity'),
|
|
21
21
|
entityId: z.guid().describe('Id of the commented entity'),
|
|
22
|
-
projectId: z.
|
|
22
|
+
projectId: z.guid().describe('Id of the project of the commented entity'),
|
|
23
23
|
message: MESSAGE_SCHEMA,
|
|
24
24
|
})
|
|
25
25
|
.describe('Comment on an entity'),
|
|
26
26
|
]));
|
|
27
27
|
const POST_COMMENT_RESPONSE_BODY_SCHEMA = z.compile(z.object({
|
|
28
|
-
data: z.object({ id: z.
|
|
28
|
+
data: z.object({ id: z.guid().describe('Id of the new comment') }),
|
|
29
29
|
}));
|
|
30
30
|
export const postCommentContract = defineApiContract({
|
|
31
31
|
method: 'post',
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const POST_SEARCH_COMMENTS_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
teamId: z.
|
|
3
|
+
teamId: z.ZodGUID;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
5
|
export type PostSearchCommentsPathParams = z.infer<typeof POST_SEARCH_COMMENTS_PATH_PARAMS_SCHEMA>;
|
|
6
6
|
export declare const POST_SEARCH_COMMENTS_QUERY_SCHEMA: z.ZodObject<{
|
|
7
7
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
8
|
-
after: z.ZodOptional<z.
|
|
8
|
+
after: z.ZodOptional<z.ZodGUID>;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
export type PostSearchCommentsQuery = z.infer<typeof POST_SEARCH_COMMENTS_QUERY_SCHEMA>;
|
|
11
11
|
declare const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
12
|
-
projectId: z.
|
|
12
|
+
projectId: z.ZodGUID;
|
|
13
13
|
entityTypes: z.ZodArray<z.ZodEnum<{
|
|
14
14
|
readonly SEGMENT: 'SEGMENT';
|
|
15
15
|
}>>;
|
|
@@ -18,9 +18,9 @@ declare const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
|
18
18
|
export type PostSearchCommentsRequestBody = z.infer<typeof POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA>;
|
|
19
19
|
declare const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
20
20
|
data: z.ZodArray<z.ZodObject<{
|
|
21
|
-
id: z.
|
|
22
|
-
teamId: z.
|
|
23
|
-
projectId: z.ZodOptional<z.ZodNullable<z.
|
|
21
|
+
id: z.ZodGUID;
|
|
22
|
+
teamId: z.ZodGUID;
|
|
23
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
24
24
|
entityType: z.ZodEnum<{
|
|
25
25
|
readonly SEGMENT: 'SEGMENT';
|
|
26
26
|
}>;
|
|
@@ -38,7 +38,7 @@ declare const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
|
38
38
|
text: z.ZodString;
|
|
39
39
|
}, z.core.$strip>, z.ZodObject<{
|
|
40
40
|
type: z.ZodLiteral<"userMention">;
|
|
41
|
-
userId: z.
|
|
41
|
+
userId: z.ZodGUID;
|
|
42
42
|
}, z.core.$strip>, z.ZodObject<{
|
|
43
43
|
type: z.ZodLiteral<"link">;
|
|
44
44
|
href: z.ZodURL;
|
|
@@ -47,14 +47,14 @@ declare const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
|
47
47
|
}, z.core.$strip>], "type">>;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
49
|
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
50
|
-
resolvedBy: z.ZodOptional<z.ZodNullable<z.
|
|
50
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
51
51
|
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
52
52
|
replyCount: z.ZodInt;
|
|
53
53
|
lastActivityAt: z.ZodISODateTime;
|
|
54
|
+
createdBy: z.ZodGUID;
|
|
55
|
+
createdAt: z.ZodISODateTime;
|
|
54
56
|
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
55
57
|
subscribed: z.ZodBoolean;
|
|
56
|
-
createdBy: z.ZodUUID;
|
|
57
|
-
createdAt: z.ZodISODateTime;
|
|
58
58
|
}, z.core.$strip>>;
|
|
59
59
|
meta: z.ZodObject<{
|
|
60
60
|
count: z.ZodNumber;
|
|
@@ -73,14 +73,14 @@ export declare const postSearchCommentsContract: Omit<{
|
|
|
73
73
|
authorization: z.ZodString;
|
|
74
74
|
}, z.core.$strip>;
|
|
75
75
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
76
|
-
teamId: z.
|
|
76
|
+
teamId: z.ZodGUID;
|
|
77
77
|
}, z.core.$strip>;
|
|
78
78
|
readonly requestQuerySchema: z.ZodObject<{
|
|
79
79
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
80
|
-
after: z.ZodOptional<z.
|
|
80
|
+
after: z.ZodOptional<z.ZodGUID>;
|
|
81
81
|
}, z.core.$strip>;
|
|
82
82
|
readonly requestBodySchema: z.ZodObject<{
|
|
83
|
-
projectId: z.
|
|
83
|
+
projectId: z.ZodGUID;
|
|
84
84
|
entityTypes: z.ZodArray<z.ZodEnum<{
|
|
85
85
|
readonly SEGMENT: 'SEGMENT';
|
|
86
86
|
}>>;
|
|
@@ -92,9 +92,9 @@ export declare const postSearchCommentsContract: Omit<{
|
|
|
92
92
|
readonly responsesByStatusCode: {
|
|
93
93
|
200: z.ZodObject<{
|
|
94
94
|
data: z.ZodArray<z.ZodObject<{
|
|
95
|
-
id: z.
|
|
96
|
-
teamId: z.
|
|
97
|
-
projectId: z.ZodOptional<z.ZodNullable<z.
|
|
95
|
+
id: z.ZodGUID;
|
|
96
|
+
teamId: z.ZodGUID;
|
|
97
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
98
98
|
entityType: z.ZodEnum<{
|
|
99
99
|
readonly SEGMENT: 'SEGMENT';
|
|
100
100
|
}>;
|
|
@@ -112,7 +112,7 @@ export declare const postSearchCommentsContract: Omit<{
|
|
|
112
112
|
text: z.ZodString;
|
|
113
113
|
}, z.core.$strip>, z.ZodObject<{
|
|
114
114
|
type: z.ZodLiteral<"userMention">;
|
|
115
|
-
userId: z.
|
|
115
|
+
userId: z.ZodGUID;
|
|
116
116
|
}, z.core.$strip>, z.ZodObject<{
|
|
117
117
|
type: z.ZodLiteral<"link">;
|
|
118
118
|
href: z.ZodURL;
|
|
@@ -121,14 +121,14 @@ export declare const postSearchCommentsContract: Omit<{
|
|
|
121
121
|
}, z.core.$strip>], "type">>;
|
|
122
122
|
}, z.core.$strip>;
|
|
123
123
|
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
124
|
-
resolvedBy: z.ZodOptional<z.ZodNullable<z.
|
|
124
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
125
125
|
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
126
126
|
replyCount: z.ZodInt;
|
|
127
127
|
lastActivityAt: z.ZodISODateTime;
|
|
128
|
+
createdBy: z.ZodGUID;
|
|
129
|
+
createdAt: z.ZodISODateTime;
|
|
128
130
|
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
129
131
|
subscribed: z.ZodBoolean;
|
|
130
|
-
createdBy: z.ZodUUID;
|
|
131
|
-
createdAt: z.ZodISODateTime;
|
|
132
132
|
}, z.core.$strip>>;
|
|
133
133
|
meta: z.ZodObject<{
|
|
134
134
|
count: z.ZodNumber;
|
|
@@ -2,14 +2,14 @@ import { paginatedResponseSchema } from '@lokalise/api-common';
|
|
|
2
2
|
import { defineApiContract } from '@lokalise/api-contracts';
|
|
3
3
|
import z from 'zod/v4';
|
|
4
4
|
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { COMMENT_WITH_USER_STATE_SCHEMA, CommentEntityTypeEnum } from '../../objects/comment.js';
|
|
6
6
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
7
7
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
8
8
|
// ------------------------------------------------------------
|
|
9
9
|
// POST /v1/teams/:teamId/comments/actions/search
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
const POST_SEARCH_COMMENTS_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
12
|
-
teamId: z.
|
|
12
|
+
teamId: z.guid().describe('Id of the team'),
|
|
13
13
|
}));
|
|
14
14
|
const COMMENTS_DEFAULT_LIMIT = 100;
|
|
15
15
|
const COMMENTS_MAX_LIMIT = 100;
|
|
@@ -22,13 +22,13 @@ export const POST_SEARCH_COMMENTS_QUERY_SCHEMA = z.compile(z.object({
|
|
|
22
22
|
.default(COMMENTS_DEFAULT_LIMIT)
|
|
23
23
|
.describe('Number of comments to return per page'),
|
|
24
24
|
after: z
|
|
25
|
-
.
|
|
25
|
+
.guid()
|
|
26
26
|
.optional()
|
|
27
27
|
.describe('Cursor from the previous response `meta.cursor`. Omit to read the first page'),
|
|
28
28
|
}));
|
|
29
29
|
const COMMENTS_MAX_FILTER_IDS = 100;
|
|
30
30
|
const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
31
|
-
projectId: z.
|
|
31
|
+
projectId: z.guid().describe('Only comments for this project'),
|
|
32
32
|
entityTypes: z
|
|
33
33
|
.array(z.enum(CommentEntityTypeEnum))
|
|
34
34
|
.min(1)
|
|
@@ -40,7 +40,7 @@ const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
|
40
40
|
.optional()
|
|
41
41
|
.describe('Ids of the commented entities'),
|
|
42
42
|
}));
|
|
43
|
-
const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA = paginatedResponseSchema(
|
|
43
|
+
const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA = paginatedResponseSchema(COMMENT_WITH_USER_STATE_SCHEMA);
|
|
44
44
|
export const postSearchCommentsContract = defineApiContract({
|
|
45
45
|
method: 'post',
|
|
46
46
|
visibility: 'internal',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-comments-actions-search.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/post-comments-actions-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"post-comments-actions-search.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/post-comments-actions-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,iDAAiD;AACjD,+DAA+D;AAC/D,MAAM,uCAAuC,GAAG,CAAC,CAAC,OAAO,CACvD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC5C,CAAC,CACH,CAAA;AAGD,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAClC,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAC9B,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,OAAO,CACxD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM;SACZ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,kBAAkB,CAAC;SACvB,OAAO,CAAC,sBAAsB,CAAC;SAC/B,QAAQ,CAAC,uCAAuC,CAAC;IACpD,KAAK,EAAE,CAAC;SACL,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,8EAA8E,CAAC;CAC5F,CAAC,CACH,CAAA;AAGD,MAAM,uBAAuB,GAAG,GAAG,CAAA;AACnC,MAAM,wCAAwC,GAAG,CAAC,CAAC,OAAO,CACxD,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC9D,WAAW,EAAE,CAAC;SACX,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;SACpC,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,SAAS,EAAE,CAAC;SACT,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACf,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,uBAAuB,CAAC;SAC5B,QAAQ,EAAE;SACV,QAAQ,CAAC,+BAA+B,CAAC;CAC7C,CAAC,CACH,CAAA;AAGD,MAAM,yCAAyC,GAAG,uBAAuB,CACvE,8BAA8B,CAC/B,CAAA;AAKD,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IAC1D,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EACT,kGAAkG;QAClG,sEAAsE;IACxE,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,uCAAuC;IAChE,kBAAkB,EAAE,iCAAiC;IACrD,iBAAiB,EAAE,wCAAwC;IAC3D,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,0BAA0B;IAC3E,qBAAqB,EAAE;QACrB,GAAG,EAAE,yCAAyC;QAC9C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const PUT_COMMENT_READ_STATE_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
teamId: z.
|
|
4
|
-
commentId: z.
|
|
3
|
+
teamId: z.ZodGUID;
|
|
4
|
+
commentId: z.ZodGUID;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export type PutCommentReadStatePathParams = z.infer<typeof PUT_COMMENT_READ_STATE_PATH_PARAMS_SCHEMA>;
|
|
7
7
|
declare const PUT_COMMENT_READ_STATE_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
@@ -18,8 +18,8 @@ export declare const putCommentReadStateContract: Omit<{
|
|
|
18
18
|
authorization: z.ZodString;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
21
|
-
teamId: z.
|
|
22
|
-
commentId: z.
|
|
21
|
+
teamId: z.ZodGUID;
|
|
22
|
+
commentId: z.ZodGUID;
|
|
23
23
|
}, z.core.$strip>;
|
|
24
24
|
readonly requestBodySchema: z.ZodObject<{
|
|
25
25
|
lastReadAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -7,8 +7,8 @@ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
|
7
7
|
// PUT /v1/teams/:teamId/comments/:commentId/read-state
|
|
8
8
|
// ------------------------------------------------------------
|
|
9
9
|
const PUT_COMMENT_READ_STATE_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
10
|
-
teamId: z.
|
|
11
|
-
commentId: z.
|
|
10
|
+
teamId: z.guid().describe('Id of the team'),
|
|
11
|
+
commentId: z.guid().describe('Id of the comment'),
|
|
12
12
|
}));
|
|
13
13
|
const PUT_COMMENT_READ_STATE_REQUEST_BODY_SCHEMA = z.compile(z
|
|
14
14
|
.object({
|
|
@@ -5,8 +5,8 @@ export declare const CommentSubscriptionActionEnum: {
|
|
|
5
5
|
};
|
|
6
6
|
export type CommentSubscriptionAction = (typeof CommentSubscriptionActionEnum)[keyof typeof CommentSubscriptionActionEnum];
|
|
7
7
|
declare const PUT_COMMENT_SUBSCRIPTION_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
8
|
-
teamId: z.
|
|
9
|
-
commentId: z.
|
|
8
|
+
teamId: z.ZodGUID;
|
|
9
|
+
commentId: z.ZodGUID;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export type PutCommentSubscriptionPathParams = z.infer<typeof PUT_COMMENT_SUBSCRIPTION_PATH_PARAMS_SCHEMA>;
|
|
12
12
|
declare const PUT_COMMENT_SUBSCRIPTION_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
@@ -26,8 +26,8 @@ export declare const putCommentSubscriptionContract: Omit<{
|
|
|
26
26
|
authorization: z.ZodString;
|
|
27
27
|
}, z.core.$strip>;
|
|
28
28
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
29
|
-
teamId: z.
|
|
30
|
-
commentId: z.
|
|
29
|
+
teamId: z.ZodGUID;
|
|
30
|
+
commentId: z.ZodGUID;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
readonly requestBodySchema: z.ZodObject<{
|
|
33
33
|
action: z.ZodEnum<{
|
|
@@ -11,8 +11,8 @@ export const CommentSubscriptionActionEnum = {
|
|
|
11
11
|
UNSUBSCRIBE: 'UNSUBSCRIBE',
|
|
12
12
|
};
|
|
13
13
|
const PUT_COMMENT_SUBSCRIPTION_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
14
|
-
teamId: z.
|
|
15
|
-
commentId: z.
|
|
14
|
+
teamId: z.guid().describe('Id of the team'),
|
|
15
|
+
commentId: z.guid().describe('Id of the comment'),
|
|
16
16
|
}));
|
|
17
17
|
const PUT_COMMENT_SUBSCRIPTION_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
18
18
|
action: z
|
|
@@ -3,7 +3,7 @@ export declare const mentionedUserAccessDeniedErrorDefinition: {
|
|
|
3
3
|
readonly code: "MENTIONED_USER_ACCESS_DENIED";
|
|
4
4
|
readonly type: "unprocessable-entity";
|
|
5
5
|
readonly detailsSchema: z.ZodObject<{
|
|
6
|
-
userIds: z.ZodArray<z.
|
|
6
|
+
userIds: z.ZodArray<z.ZodGUID>;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
8
|
} & {
|
|
9
9
|
schema: z.ZodObject<{
|
|
@@ -12,7 +12,7 @@ export declare const mentionedUserAccessDeniedErrorDefinition: {
|
|
|
12
12
|
errorCode: z.ZodLiteral<"MENTIONED_USER_ACCESS_DENIED">;
|
|
13
13
|
} & {
|
|
14
14
|
details: z.ZodObject<{
|
|
15
|
-
userIds: z.ZodArray<z.
|
|
15
|
+
userIds: z.ZodArray<z.ZodGUID>;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
};
|
|
@@ -5,7 +5,7 @@ export const mentionedUserAccessDeniedErrorDefinition = definePublicError({
|
|
|
5
5
|
code: 'MENTIONED_USER_ACCESS_DENIED',
|
|
6
6
|
type: ErrorType.UNPROCESSABLE_ENTITY,
|
|
7
7
|
detailsSchema: z.object({
|
|
8
|
-
userIds: z.array(z.
|
|
8
|
+
userIds: z.array(z.guid()).describe('Ids of the mentioned users without access'),
|
|
9
9
|
}),
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=mentioned-user-access-denied.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
export declare const COMMENT_REPLY_SCHEMA: z.ZodObject<{
|
|
3
|
-
id: z.
|
|
4
|
-
commentId: z.
|
|
3
|
+
id: z.ZodGUID;
|
|
4
|
+
commentId: z.ZodGUID;
|
|
5
5
|
message: z.ZodObject<{
|
|
6
6
|
version: z.ZodLiteral<1>;
|
|
7
7
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -11,7 +11,7 @@ export declare const COMMENT_REPLY_SCHEMA: z.ZodObject<{
|
|
|
11
11
|
text: z.ZodString;
|
|
12
12
|
}, z.core.$strip>, z.ZodObject<{
|
|
13
13
|
type: z.ZodLiteral<"userMention">;
|
|
14
|
-
userId: z.
|
|
14
|
+
userId: z.ZodGUID;
|
|
15
15
|
}, z.core.$strip>, z.ZodObject<{
|
|
16
16
|
type: z.ZodLiteral<"link">;
|
|
17
17
|
href: z.ZodURL;
|
|
@@ -20,7 +20,7 @@ export declare const COMMENT_REPLY_SCHEMA: z.ZodObject<{
|
|
|
20
20
|
}, z.core.$strip>], "type">>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
23
|
-
createdBy: z.
|
|
23
|
+
createdBy: z.ZodGUID;
|
|
24
24
|
createdAt: z.ZodISODateTime;
|
|
25
25
|
}, z.core.$strip>;
|
|
26
26
|
export type CommentReply = z.infer<typeof COMMENT_REPLY_SCHEMA>;
|
|
@@ -2,14 +2,14 @@ import z from 'zod/v4';
|
|
|
2
2
|
import { MESSAGE_SCHEMA } from './message.js';
|
|
3
3
|
export const COMMENT_REPLY_SCHEMA = z.compile(z
|
|
4
4
|
.object({
|
|
5
|
-
id: z.
|
|
6
|
-
commentId: z.
|
|
5
|
+
id: z.guid().describe('Id of the reply'),
|
|
6
|
+
commentId: z.guid().describe('Id of the thread the reply belongs to'),
|
|
7
7
|
message: MESSAGE_SCHEMA,
|
|
8
8
|
messageUpdatedAt: z.iso
|
|
9
9
|
.datetime()
|
|
10
10
|
.nullish()
|
|
11
11
|
.describe('Last edit of the message. `null` if the message was never edited'),
|
|
12
|
-
createdBy: z.
|
|
12
|
+
createdBy: z.guid().describe('Id of the author'),
|
|
13
13
|
createdAt: z.iso.datetime().describe('Creation time'),
|
|
14
14
|
})
|
|
15
15
|
.describe('Reply in a thread'));
|
|
@@ -9,9 +9,9 @@ export declare const CommentStatusEnum: {
|
|
|
9
9
|
};
|
|
10
10
|
export type CommentStatus = (typeof CommentStatusEnum)[keyof typeof CommentStatusEnum];
|
|
11
11
|
export declare const COMMENT_SCHEMA: z.ZodObject<{
|
|
12
|
-
id: z.
|
|
13
|
-
teamId: z.
|
|
14
|
-
projectId: z.ZodOptional<z.ZodNullable<z.
|
|
12
|
+
id: z.ZodGUID;
|
|
13
|
+
teamId: z.ZodGUID;
|
|
14
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
15
15
|
entityType: z.ZodEnum<{
|
|
16
16
|
readonly SEGMENT: 'SEGMENT';
|
|
17
17
|
}>;
|
|
@@ -29,7 +29,7 @@ export declare const COMMENT_SCHEMA: z.ZodObject<{
|
|
|
29
29
|
text: z.ZodString;
|
|
30
30
|
}, z.core.$strip>, z.ZodObject<{
|
|
31
31
|
type: z.ZodLiteral<"userMention">;
|
|
32
|
-
userId: z.
|
|
32
|
+
userId: z.ZodGUID;
|
|
33
33
|
}, z.core.$strip>, z.ZodObject<{
|
|
34
34
|
type: z.ZodLiteral<"link">;
|
|
35
35
|
href: z.ZodURL;
|
|
@@ -38,13 +38,51 @@ export declare const COMMENT_SCHEMA: z.ZodObject<{
|
|
|
38
38
|
}, z.core.$strip>], "type">>;
|
|
39
39
|
}, z.core.$strip>;
|
|
40
40
|
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
41
|
-
resolvedBy: z.ZodOptional<z.ZodNullable<z.
|
|
41
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
42
42
|
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
43
43
|
replyCount: z.ZodInt;
|
|
44
44
|
lastActivityAt: z.ZodISODateTime;
|
|
45
|
-
|
|
46
|
-
subscribed: z.ZodBoolean;
|
|
47
|
-
createdBy: z.ZodUUID;
|
|
45
|
+
createdBy: z.ZodGUID;
|
|
48
46
|
createdAt: z.ZodISODateTime;
|
|
49
47
|
}, z.core.$strip>;
|
|
50
48
|
export type Comment = z.infer<typeof COMMENT_SCHEMA>;
|
|
49
|
+
export declare const COMMENT_WITH_USER_STATE_SCHEMA: z.ZodObject<{
|
|
50
|
+
id: z.ZodGUID;
|
|
51
|
+
teamId: z.ZodGUID;
|
|
52
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
53
|
+
entityType: z.ZodEnum<{
|
|
54
|
+
readonly SEGMENT: 'SEGMENT';
|
|
55
|
+
}>;
|
|
56
|
+
entityId: z.ZodGUID;
|
|
57
|
+
status: z.ZodEnum<{
|
|
58
|
+
readonly OPEN: 'OPEN';
|
|
59
|
+
readonly RESOLVED: 'RESOLVED';
|
|
60
|
+
}>;
|
|
61
|
+
message: z.ZodObject<{
|
|
62
|
+
version: z.ZodLiteral<1>;
|
|
63
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
64
|
+
type: z.ZodLiteral<"paragraph">;
|
|
65
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
66
|
+
type: z.ZodLiteral<"text">;
|
|
67
|
+
text: z.ZodString;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
type: z.ZodLiteral<"userMention">;
|
|
70
|
+
userId: z.ZodGUID;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
type: z.ZodLiteral<"link">;
|
|
73
|
+
href: z.ZodURL;
|
|
74
|
+
text: z.ZodString;
|
|
75
|
+
}, z.core.$strip>], "type">>;
|
|
76
|
+
}, z.core.$strip>], "type">>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
79
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
80
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
81
|
+
replyCount: z.ZodInt;
|
|
82
|
+
lastActivityAt: z.ZodISODateTime;
|
|
83
|
+
createdBy: z.ZodGUID;
|
|
84
|
+
createdAt: z.ZodISODateTime;
|
|
85
|
+
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
86
|
+
subscribed: z.ZodBoolean;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export type CommentWithUserState = z.infer<typeof COMMENT_WITH_USER_STATE_SCHEMA>;
|