@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,8 +1,8 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const DELETE_COMMENT_REPLY_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
teamId: z.
|
|
4
|
-
commentId: z.
|
|
5
|
-
replyId: z.
|
|
3
|
+
teamId: z.ZodGUID;
|
|
4
|
+
commentId: z.ZodGUID;
|
|
5
|
+
replyId: z.ZodGUID;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
export type DeleteCommentReplyPathParams = z.infer<typeof DELETE_COMMENT_REPLY_PATH_PARAMS_SCHEMA>;
|
|
8
8
|
export declare const deleteCommentReplyContract: Omit<{
|
|
@@ -15,9 +15,9 @@ export declare const deleteCommentReplyContract: Omit<{
|
|
|
15
15
|
authorization: z.ZodString;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
18
|
-
teamId: z.
|
|
19
|
-
commentId: z.
|
|
20
|
-
replyId: z.
|
|
18
|
+
teamId: z.ZodGUID;
|
|
19
|
+
commentId: z.ZodGUID;
|
|
20
|
+
replyId: z.ZodGUID;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
readonly pathResolver: ({ teamId, commentId, replyId }: {
|
|
23
23
|
teamId: string;
|
|
@@ -7,9 +7,9 @@ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
|
7
7
|
// DELETE /v1/teams/:teamId/comments/:commentId/replies/:replyId
|
|
8
8
|
// ------------------------------------------------------------
|
|
9
9
|
const DELETE_COMMENT_REPLY_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
10
|
-
teamId: z.
|
|
11
|
-
commentId: z.
|
|
12
|
-
replyId: z.
|
|
10
|
+
teamId: z.guid().describe('Id of the team'),
|
|
11
|
+
commentId: z.guid().describe('Id of the comment'),
|
|
12
|
+
replyId: z.guid().describe('Id of the reply'),
|
|
13
13
|
}));
|
|
14
14
|
export const deleteCommentReplyContract = defineApiContract({
|
|
15
15
|
method: 'delete',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const DELETE_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 DeleteCommentPathParams = z.infer<typeof DELETE_COMMENT_PATH_PARAMS_SCHEMA>;
|
|
7
7
|
export declare const deleteCommentContract: Omit<{
|
|
@@ -14,8 +14,8 @@ export declare const deleteCommentContract: Omit<{
|
|
|
14
14
|
authorization: z.ZodString;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
17
|
-
teamId: z.
|
|
18
|
-
commentId: z.
|
|
17
|
+
teamId: z.ZodGUID;
|
|
18
|
+
commentId: z.ZodGUID;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
readonly pathResolver: ({ teamId, commentId }: {
|
|
21
21
|
teamId: string;
|
|
@@ -7,8 +7,8 @@ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
|
7
7
|
// DELETE /v1/teams/:teamId/comments/:commentId
|
|
8
8
|
// ------------------------------------------------------------
|
|
9
9
|
const DELETE_COMMENT_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
|
export const deleteCommentContract = defineApiContract({
|
|
14
14
|
method: 'delete',
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const GET_COMMENT_REPLIES_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 GetCommentRepliesPathParams = z.infer<typeof GET_COMMENT_REPLIES_PATH_PARAMS_SCHEMA>;
|
|
7
7
|
declare const GET_COMMENT_REPLIES_QUERY_SCHEMA: z.ZodObject<{
|
|
8
8
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
9
|
-
after: z.ZodOptional<z.
|
|
9
|
+
after: z.ZodOptional<z.ZodGUID>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export type GetCommentRepliesQuery = z.infer<typeof GET_COMMENT_REPLIES_QUERY_SCHEMA>;
|
|
12
12
|
declare const GET_COMMENT_REPLIES_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
13
13
|
data: z.ZodArray<z.ZodObject<{
|
|
14
|
-
id: z.
|
|
15
|
-
commentId: z.
|
|
14
|
+
id: z.ZodGUID;
|
|
15
|
+
commentId: z.ZodGUID;
|
|
16
16
|
message: z.ZodObject<{
|
|
17
17
|
version: z.ZodLiteral<1>;
|
|
18
18
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -22,7 +22,7 @@ declare const GET_COMMENT_REPLIES_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
|
22
22
|
text: z.ZodString;
|
|
23
23
|
}, z.core.$strip>, z.ZodObject<{
|
|
24
24
|
type: z.ZodLiteral<"userMention">;
|
|
25
|
-
userId: z.
|
|
25
|
+
userId: z.ZodGUID;
|
|
26
26
|
}, z.core.$strip>, z.ZodObject<{
|
|
27
27
|
type: z.ZodLiteral<"link">;
|
|
28
28
|
href: z.ZodURL;
|
|
@@ -31,7 +31,7 @@ declare const GET_COMMENT_REPLIES_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
|
31
31
|
}, z.core.$strip>], "type">>;
|
|
32
32
|
}, z.core.$strip>;
|
|
33
33
|
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
34
|
-
createdBy: z.
|
|
34
|
+
createdBy: z.ZodGUID;
|
|
35
35
|
createdAt: z.ZodISODateTime;
|
|
36
36
|
}, z.core.$strip>>;
|
|
37
37
|
meta: z.ZodObject<{
|
|
@@ -51,12 +51,12 @@ export declare const getCommentRepliesContract: Omit<{
|
|
|
51
51
|
authorization: z.ZodString;
|
|
52
52
|
}, z.core.$strip>;
|
|
53
53
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
54
|
-
teamId: z.
|
|
55
|
-
commentId: z.
|
|
54
|
+
teamId: z.ZodGUID;
|
|
55
|
+
commentId: z.ZodGUID;
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
readonly requestQuerySchema: z.ZodObject<{
|
|
58
58
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
59
|
-
after: z.ZodOptional<z.
|
|
59
|
+
after: z.ZodOptional<z.ZodGUID>;
|
|
60
60
|
}, z.core.$strip>;
|
|
61
61
|
readonly pathResolver: ({ teamId, commentId }: {
|
|
62
62
|
teamId: string;
|
|
@@ -67,8 +67,8 @@ export declare const getCommentRepliesContract: Omit<{
|
|
|
67
67
|
content: {
|
|
68
68
|
'application/json': z.ZodObject<{
|
|
69
69
|
data: z.ZodArray<z.ZodObject<{
|
|
70
|
-
id: z.
|
|
71
|
-
commentId: z.
|
|
70
|
+
id: z.ZodGUID;
|
|
71
|
+
commentId: z.ZodGUID;
|
|
72
72
|
message: z.ZodObject<{
|
|
73
73
|
version: z.ZodLiteral<1>;
|
|
74
74
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -78,7 +78,7 @@ export declare const getCommentRepliesContract: Omit<{
|
|
|
78
78
|
text: z.ZodString;
|
|
79
79
|
}, z.core.$strip>, z.ZodObject<{
|
|
80
80
|
type: z.ZodLiteral<"userMention">;
|
|
81
|
-
userId: z.
|
|
81
|
+
userId: z.ZodGUID;
|
|
82
82
|
}, z.core.$strip>, z.ZodObject<{
|
|
83
83
|
type: z.ZodLiteral<"link">;
|
|
84
84
|
href: z.ZodURL;
|
|
@@ -87,7 +87,7 @@ export declare const getCommentRepliesContract: Omit<{
|
|
|
87
87
|
}, z.core.$strip>], "type">>;
|
|
88
88
|
}, z.core.$strip>;
|
|
89
89
|
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
90
|
-
createdBy: z.
|
|
90
|
+
createdBy: z.ZodGUID;
|
|
91
91
|
createdAt: z.ZodISODateTime;
|
|
92
92
|
}, z.core.$strip>>;
|
|
93
93
|
meta: z.ZodObject<{
|
|
@@ -97,7 +97,57 @@ export declare const getCommentRepliesContract: Omit<{
|
|
|
97
97
|
}, z.core.$strip>;
|
|
98
98
|
}, z.core.$strip>;
|
|
99
99
|
'text/event-stream': import("@lokalise/api-contracts").SseBody<{
|
|
100
|
-
'comment_reply.created': z.ZodObject<{
|
|
100
|
+
'comment_reply.created': z.ZodObject<{
|
|
101
|
+
id: z.ZodGUID;
|
|
102
|
+
commentId: z.ZodGUID;
|
|
103
|
+
message: z.ZodObject<{
|
|
104
|
+
version: z.ZodLiteral<1>;
|
|
105
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
106
|
+
type: z.ZodLiteral<"paragraph">;
|
|
107
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
108
|
+
type: z.ZodLiteral<"text">;
|
|
109
|
+
text: z.ZodString;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
type: z.ZodLiteral<"userMention">;
|
|
112
|
+
userId: z.ZodGUID;
|
|
113
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"link">;
|
|
115
|
+
href: z.ZodURL;
|
|
116
|
+
text: z.ZodString;
|
|
117
|
+
}, z.core.$strip>], "type">>;
|
|
118
|
+
}, z.core.$strip>], "type">>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
121
|
+
createdBy: z.ZodGUID;
|
|
122
|
+
createdAt: z.ZodISODateTime;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
'comment_reply.updated': z.ZodObject<{
|
|
125
|
+
id: z.ZodGUID;
|
|
126
|
+
commentId: z.ZodGUID;
|
|
127
|
+
message: z.ZodObject<{
|
|
128
|
+
version: z.ZodLiteral<1>;
|
|
129
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
130
|
+
type: z.ZodLiteral<"paragraph">;
|
|
131
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
132
|
+
type: z.ZodLiteral<"text">;
|
|
133
|
+
text: z.ZodString;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"userMention">;
|
|
136
|
+
userId: z.ZodGUID;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
type: z.ZodLiteral<"link">;
|
|
139
|
+
href: z.ZodURL;
|
|
140
|
+
text: z.ZodString;
|
|
141
|
+
}, z.core.$strip>], "type">>;
|
|
142
|
+
}, z.core.$strip>], "type">>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
145
|
+
createdBy: z.ZodGUID;
|
|
146
|
+
createdAt: z.ZodISODateTime;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
'comment_reply.deleted': z.ZodObject<{
|
|
149
|
+
id: z.ZodGUID;
|
|
150
|
+
}, z.core.$strip>;
|
|
101
151
|
}>;
|
|
102
152
|
};
|
|
103
153
|
};
|
|
@@ -9,8 +9,8 @@ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
|
9
9
|
// GET /v1/teams/:teamId/comments/:commentId/replies
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
const GET_COMMENT_REPLIES_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 COMMENT_REPLIES_DEFAULT_LIMIT = 100;
|
|
16
16
|
const COMMENT_REPLIES_MAX_LIMIT = 100;
|
|
@@ -23,7 +23,7 @@ const GET_COMMENT_REPLIES_QUERY_SCHEMA = z.compile(z.object({
|
|
|
23
23
|
.default(COMMENT_REPLIES_DEFAULT_LIMIT)
|
|
24
24
|
.describe('Number of replies to return per page'),
|
|
25
25
|
after: z
|
|
26
|
-
.
|
|
26
|
+
.guid()
|
|
27
27
|
.optional()
|
|
28
28
|
.describe('Cursor from the previous response `meta.cursor`. Omit to read the first page'),
|
|
29
29
|
}));
|
|
@@ -45,8 +45,9 @@ export const getCommentRepliesContract = defineApiContract({
|
|
|
45
45
|
content: {
|
|
46
46
|
'application/json': GET_COMMENT_REPLIES_RESPONSE_BODY_SCHEMA,
|
|
47
47
|
'text/event-stream': sseBody({
|
|
48
|
-
|
|
49
|
-
'comment_reply.
|
|
48
|
+
'comment_reply.created': COMMENT_REPLY_SCHEMA.describe('A reply was added to the thread'),
|
|
49
|
+
'comment_reply.updated': COMMENT_REPLY_SCHEMA.describe('The message of a reply was edited'),
|
|
50
|
+
'comment_reply.deleted': COMMENT_REPLY_SCHEMA.pick({ id: true }).describe('A reply was deleted'),
|
|
50
51
|
}),
|
|
51
52
|
},
|
|
52
53
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-comment-replies.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/get-comment-replies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,oDAAoD;AACpD,+DAA+D;AAC/D,MAAM,sCAAsC,GAAG,CAAC,CAAC,OAAO,CACtD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAClD,CAAC,CACH,CAAA;AAGD,MAAM,6BAA6B,GAAG,GAAG,CAAA;AACzC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AACrC,MAAM,gCAAgC,GAAG,CAAC,CAAC,OAAO,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM;SACZ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,yBAAyB,CAAC;SAC9B,OAAO,CAAC,6BAA6B,CAAC;SACtC,QAAQ,CAAC,sCAAsC,CAAC;IACnD,KAAK,EAAE,CAAC;SACL,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,8EAA8E,CAAC;CAC5F,CAAC,CACH,CAAA;AAGD,MAAM,wCAAwC,GAAG,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;AAG9F,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACzD,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,+BAA+B;IACxC,WAAW,EACT,gGAAgG;QAChG,mEAAmE;QACnE,sEAAsE;IACxE,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,sCAAsC;IAC/D,kBAAkB,EAAE,gCAAgC;IACpD,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,UAAU;IAC5F,qBAAqB,EAAE;QACrB,GAAG,EAAE;YACH,OAAO,EAAE;gBACP,kBAAkB,EAAE,wCAAwC;gBAC5D,mBAAmB,EAAE,OAAO,CAAC;oBAC3B,
|
|
1
|
+
{"version":3,"file":"get-comment-replies.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/get-comment-replies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,oDAAoD;AACpD,+DAA+D;AAC/D,MAAM,sCAAsC,GAAG,CAAC,CAAC,OAAO,CACtD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAClD,CAAC,CACH,CAAA;AAGD,MAAM,6BAA6B,GAAG,GAAG,CAAA;AACzC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AACrC,MAAM,gCAAgC,GAAG,CAAC,CAAC,OAAO,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM;SACZ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,yBAAyB,CAAC;SAC9B,OAAO,CAAC,6BAA6B,CAAC;SACtC,QAAQ,CAAC,sCAAsC,CAAC;IACnD,KAAK,EAAE,CAAC;SACL,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,8EAA8E,CAAC;CAC5F,CAAC,CACH,CAAA;AAGD,MAAM,wCAAwC,GAAG,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;AAG9F,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACzD,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,+BAA+B;IACxC,WAAW,EACT,gGAAgG;QAChG,mEAAmE;QACnE,sEAAsE;IACxE,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,sCAAsC;IAC/D,kBAAkB,EAAE,gCAAgC;IACpD,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,UAAU;IAC5F,qBAAqB,EAAE;QACrB,GAAG,EAAE;YACH,OAAO,EAAE;gBACP,kBAAkB,EAAE,wCAAwC;gBAC5D,mBAAmB,EAAE,OAAO,CAAC;oBAC3B,uBAAuB,EAAE,oBAAoB,CAAC,QAAQ,CAAC,iCAAiC,CAAC;oBACzF,uBAAuB,EAAE,oBAAoB,CAAC,QAAQ,CACpD,mCAAmC,CACpC;oBACD,uBAAuB,EAAE,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CACvE,qBAAqB,CACtB;iBACF,CAAC;aACH;SACF;QACD,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,14 +1,14 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const GET_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 GetCommentPathParams = z.infer<typeof GET_COMMENT_PATH_PARAMS_SCHEMA>;
|
|
7
7
|
declare const GET_COMMENT_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
8
8
|
data: z.ZodObject<{
|
|
9
|
-
id: z.
|
|
10
|
-
teamId: z.
|
|
11
|
-
projectId: z.ZodOptional<z.ZodNullable<z.
|
|
9
|
+
id: z.ZodGUID;
|
|
10
|
+
teamId: z.ZodGUID;
|
|
11
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
12
12
|
entityType: z.ZodEnum<{
|
|
13
13
|
readonly SEGMENT: 'SEGMENT';
|
|
14
14
|
}>;
|
|
@@ -26,7 +26,7 @@ declare const GET_COMMENT_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
|
26
26
|
text: z.ZodString;
|
|
27
27
|
}, z.core.$strip>, z.ZodObject<{
|
|
28
28
|
type: z.ZodLiteral<"userMention">;
|
|
29
|
-
userId: z.
|
|
29
|
+
userId: z.ZodGUID;
|
|
30
30
|
}, z.core.$strip>, z.ZodObject<{
|
|
31
31
|
type: z.ZodLiteral<"link">;
|
|
32
32
|
href: z.ZodURL;
|
|
@@ -35,14 +35,14 @@ declare const GET_COMMENT_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
|
35
35
|
}, z.core.$strip>], "type">>;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
37
|
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
38
|
-
resolvedBy: z.ZodOptional<z.ZodNullable<z.
|
|
38
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
39
39
|
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
40
40
|
replyCount: z.ZodInt;
|
|
41
41
|
lastActivityAt: z.ZodISODateTime;
|
|
42
|
+
createdBy: z.ZodGUID;
|
|
43
|
+
createdAt: z.ZodISODateTime;
|
|
42
44
|
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
43
45
|
subscribed: z.ZodBoolean;
|
|
44
|
-
createdBy: z.ZodUUID;
|
|
45
|
-
createdAt: z.ZodISODateTime;
|
|
46
46
|
}, z.core.$strip>;
|
|
47
47
|
}, z.core.$strip>;
|
|
48
48
|
export type GetCommentResponseBody = z.infer<typeof GET_COMMENT_RESPONSE_BODY_SCHEMA>;
|
|
@@ -56,8 +56,8 @@ export declare const getCommentContract: Omit<{
|
|
|
56
56
|
authorization: z.ZodString;
|
|
57
57
|
}, z.core.$strip>;
|
|
58
58
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
59
|
-
teamId: z.
|
|
60
|
-
commentId: z.
|
|
59
|
+
teamId: z.ZodGUID;
|
|
60
|
+
commentId: z.ZodGUID;
|
|
61
61
|
}, z.core.$strip>;
|
|
62
62
|
readonly pathResolver: ({ teamId, commentId }: {
|
|
63
63
|
teamId: string;
|
|
@@ -66,9 +66,9 @@ export declare const getCommentContract: Omit<{
|
|
|
66
66
|
readonly responsesByStatusCode: {
|
|
67
67
|
200: z.ZodObject<{
|
|
68
68
|
data: z.ZodObject<{
|
|
69
|
-
id: z.
|
|
70
|
-
teamId: z.
|
|
71
|
-
projectId: z.ZodOptional<z.ZodNullable<z.
|
|
69
|
+
id: z.ZodGUID;
|
|
70
|
+
teamId: z.ZodGUID;
|
|
71
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
72
72
|
entityType: z.ZodEnum<{
|
|
73
73
|
readonly SEGMENT: 'SEGMENT';
|
|
74
74
|
}>;
|
|
@@ -86,7 +86,7 @@ export declare const getCommentContract: Omit<{
|
|
|
86
86
|
text: z.ZodString;
|
|
87
87
|
}, z.core.$strip>, z.ZodObject<{
|
|
88
88
|
type: z.ZodLiteral<"userMention">;
|
|
89
|
-
userId: z.
|
|
89
|
+
userId: z.ZodGUID;
|
|
90
90
|
}, z.core.$strip>, z.ZodObject<{
|
|
91
91
|
type: z.ZodLiteral<"link">;
|
|
92
92
|
href: z.ZodURL;
|
|
@@ -95,14 +95,14 @@ export declare const getCommentContract: Omit<{
|
|
|
95
95
|
}, z.core.$strip>], "type">>;
|
|
96
96
|
}, z.core.$strip>;
|
|
97
97
|
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
98
|
-
resolvedBy: z.ZodOptional<z.ZodNullable<z.
|
|
98
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
99
99
|
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
100
100
|
replyCount: z.ZodInt;
|
|
101
101
|
lastActivityAt: z.ZodISODateTime;
|
|
102
|
+
createdBy: z.ZodGUID;
|
|
103
|
+
createdAt: z.ZodISODateTime;
|
|
102
104
|
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
103
105
|
subscribed: z.ZodBoolean;
|
|
104
|
-
createdBy: z.ZodUUID;
|
|
105
|
-
createdAt: z.ZodISODateTime;
|
|
106
106
|
}, z.core.$strip>;
|
|
107
107
|
}, z.core.$strip>;
|
|
108
108
|
400: z.ZodObject<{
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { defineApiContract } from '@lokalise/api-contracts';
|
|
2
2
|
import z from 'zod/v4';
|
|
3
3
|
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { COMMENT_WITH_USER_STATE_SCHEMA } from '../../objects/comment.js';
|
|
5
5
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
6
6
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
7
7
|
// ------------------------------------------------------------
|
|
8
8
|
// GET /v1/teams/:teamId/comments/:commentId
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
const GET_COMMENT_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 GET_COMMENT_RESPONSE_BODY_SCHEMA = z.compile(z.object({
|
|
15
|
-
data:
|
|
15
|
+
data: COMMENT_WITH_USER_STATE_SCHEMA,
|
|
16
16
|
}));
|
|
17
17
|
export const getCommentContract = defineApiContract({
|
|
18
18
|
method: 'get',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-comment.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/get-comment.ts"],"names":[],"mappings":"AAAA,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":"get-comment.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/get-comment.ts"],"names":[],"mappings":"AAAA,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,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,4CAA4C;AAC5C,+DAA+D;AAC/D,MAAM,8BAA8B,GAAG,CAAC,CAAC,OAAO,CAC9C,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAClD,CAAC,CACH,CAAA;AAGD,MAAM,gCAAgC,GAAG,CAAC,CAAC,OAAO,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,8BAA8B;CACrC,CAAC,CACH,CAAA;AAGD,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;IAClD,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,eAAe;IACxB,WAAW,EACT,oFAAoF;QACpF,oFAAoF;QACpF,qDAAqD;IACvD,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,8BAA8B;IACvD,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,EAAE;IACpF,qBAAqB,EAAE;QACrB,GAAG,EAAE,gCAAgC;QACrC,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,10 +1,10 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const GET_COMMENTS_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
teamId: z.
|
|
3
|
+
teamId: z.ZodGUID;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
5
|
export type GetCommentsPathParams = z.infer<typeof GET_COMMENTS_PATH_PARAMS_SCHEMA>;
|
|
6
6
|
declare const GET_COMMENTS_QUERY_SCHEMA: z.ZodObject<{
|
|
7
|
-
'filter-projectId': z.
|
|
7
|
+
'filter-projectId': z.ZodGUID;
|
|
8
8
|
'filter-entityType': z.ZodEnum<{
|
|
9
9
|
readonly SEGMENT: 'SEGMENT';
|
|
10
10
|
}>;
|
|
@@ -20,10 +20,10 @@ export declare const getCommentsContract: Omit<{
|
|
|
20
20
|
authorization: z.ZodString;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
23
|
-
teamId: z.
|
|
23
|
+
teamId: z.ZodGUID;
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
readonly requestQuerySchema: z.ZodObject<{
|
|
26
|
-
'filter-projectId': z.
|
|
26
|
+
'filter-projectId': z.ZodGUID;
|
|
27
27
|
'filter-entityType': z.ZodEnum<{
|
|
28
28
|
readonly SEGMENT: 'SEGMENT';
|
|
29
29
|
}>;
|
|
@@ -35,7 +35,83 @@ export declare const getCommentsContract: Omit<{
|
|
|
35
35
|
200: {
|
|
36
36
|
readonly content: {
|
|
37
37
|
readonly 'text/event-stream': import("@lokalise/api-contracts").SseBody<{
|
|
38
|
-
'comment.created': z.ZodObject<{
|
|
38
|
+
'comment.created': z.ZodObject<{
|
|
39
|
+
id: z.ZodGUID;
|
|
40
|
+
teamId: z.ZodGUID;
|
|
41
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
42
|
+
entityType: z.ZodEnum<{
|
|
43
|
+
readonly SEGMENT: 'SEGMENT';
|
|
44
|
+
}>;
|
|
45
|
+
entityId: z.ZodGUID;
|
|
46
|
+
status: z.ZodEnum<{
|
|
47
|
+
readonly OPEN: 'OPEN';
|
|
48
|
+
readonly RESOLVED: 'RESOLVED';
|
|
49
|
+
}>;
|
|
50
|
+
message: z.ZodObject<{
|
|
51
|
+
version: z.ZodLiteral<1>;
|
|
52
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"paragraph">;
|
|
54
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
55
|
+
type: z.ZodLiteral<"text">;
|
|
56
|
+
text: z.ZodString;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"userMention">;
|
|
59
|
+
userId: z.ZodGUID;
|
|
60
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
61
|
+
type: z.ZodLiteral<"link">;
|
|
62
|
+
href: z.ZodURL;
|
|
63
|
+
text: z.ZodString;
|
|
64
|
+
}, z.core.$strip>], "type">>;
|
|
65
|
+
}, z.core.$strip>], "type">>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
68
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
69
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
70
|
+
replyCount: z.ZodInt;
|
|
71
|
+
lastActivityAt: z.ZodISODateTime;
|
|
72
|
+
createdBy: z.ZodGUID;
|
|
73
|
+
createdAt: z.ZodISODateTime;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
'comment.updated': z.ZodObject<{
|
|
76
|
+
id: z.ZodGUID;
|
|
77
|
+
teamId: z.ZodGUID;
|
|
78
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
79
|
+
entityType: z.ZodEnum<{
|
|
80
|
+
readonly SEGMENT: 'SEGMENT';
|
|
81
|
+
}>;
|
|
82
|
+
entityId: z.ZodGUID;
|
|
83
|
+
status: z.ZodEnum<{
|
|
84
|
+
readonly OPEN: 'OPEN';
|
|
85
|
+
readonly RESOLVED: 'RESOLVED';
|
|
86
|
+
}>;
|
|
87
|
+
message: z.ZodObject<{
|
|
88
|
+
version: z.ZodLiteral<1>;
|
|
89
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
90
|
+
type: z.ZodLiteral<"paragraph">;
|
|
91
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<"text">;
|
|
93
|
+
text: z.ZodString;
|
|
94
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"userMention">;
|
|
96
|
+
userId: z.ZodGUID;
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
+
type: z.ZodLiteral<"link">;
|
|
99
|
+
href: z.ZodURL;
|
|
100
|
+
text: z.ZodString;
|
|
101
|
+
}, z.core.$strip>], "type">>;
|
|
102
|
+
}, z.core.$strip>], "type">>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
105
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
106
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
107
|
+
replyCount: z.ZodInt;
|
|
108
|
+
lastActivityAt: z.ZodISODateTime;
|
|
109
|
+
createdBy: z.ZodGUID;
|
|
110
|
+
createdAt: z.ZodISODateTime;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
'comment.deleted': z.ZodObject<{
|
|
113
|
+
id: z.ZodGUID;
|
|
114
|
+
}, z.core.$strip>;
|
|
39
115
|
}>;
|
|
40
116
|
};
|
|
41
117
|
readonly description?: string | undefined;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineApiContract, sseResponse } from '@lokalise/api-contracts';
|
|
2
2
|
import z from 'zod/v4';
|
|
3
3
|
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
|
|
4
|
-
import { CommentEntityTypeEnum } from '../../objects/comment.js';
|
|
4
|
+
import { COMMENT_SCHEMA, CommentEntityTypeEnum } from '../../objects/comment.js';
|
|
5
5
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
6
6
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
7
7
|
// ------------------------------------------------------------
|
|
8
8
|
// GET /v1/teams/:teamId/comments
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
const GET_COMMENTS_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
11
|
-
teamId: z.
|
|
11
|
+
teamId: z.guid().describe('Id of the team'),
|
|
12
12
|
}));
|
|
13
13
|
const GET_COMMENTS_QUERY_SCHEMA = z.compile(z.object({
|
|
14
|
-
'filter-projectId': z.
|
|
14
|
+
'filter-projectId': z.guid().describe('Only comments of this project'),
|
|
15
15
|
'filter-entityType': z
|
|
16
16
|
.enum(CommentEntityTypeEnum)
|
|
17
17
|
.describe('Only comments on this type of entity'),
|
|
@@ -28,8 +28,9 @@ export const getCommentsContract = defineApiContract({
|
|
|
28
28
|
pathResolver: ({ teamId }) => `/v1/teams/${teamId}/comments`,
|
|
29
29
|
responsesByStatusCode: {
|
|
30
30
|
200: sseResponse({
|
|
31
|
-
|
|
32
|
-
'comment.
|
|
31
|
+
'comment.created': COMMENT_SCHEMA.describe('A comment was created'),
|
|
32
|
+
'comment.updated': COMMENT_SCHEMA.describe('A comment changed: its message was edited, its thread was resolved or reopened, or a reply was added to or removed from its thread'),
|
|
33
|
+
'comment.deleted': COMMENT_SCHEMA.pick({ id: true }).describe('A comment was deleted, together with its thread'),
|
|
33
34
|
}),
|
|
34
35
|
400: ERROR_RESPONSE_SCHEMA,
|
|
35
36
|
401: ERROR_RESPONSE_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-comments.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/get-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"get-comments.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/get-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,iCAAiC;AACjC,+DAA+D;AAC/D,MAAM,+BAA+B,GAAG,CAAC,CAAC,OAAO,CAC/C,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC5C,CAAC,CACH,CAAA;AAGD,MAAM,yBAAyB,GAAG,CAAC,CAAC,OAAO,CACzC,CAAC,CAAC,MAAM,CAAC;IACP,kBAAkB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IACtE,mBAAmB,EAAE,CAAC;SACnB,IAAI,CAAC,qBAAqB,CAAC;SAC3B,QAAQ,CAAC,sCAAsC,CAAC;CACpD,CAAC,CACH,CAAA;AAGD,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IACnD,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,uBAAuB;IAChC,WAAW,EAAE,kEAAkE;IAC/E,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,+BAA+B;IACxD,kBAAkB,EAAE,yBAAyB;IAC7C,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,WAAW;IAC5D,qBAAqB,EAAE;QACrB,GAAG,EAAE,WAAW,CAAC;YACf,iBAAiB,EAAE,cAAc,CAAC,QAAQ,CAAC,uBAAuB,CAAC;YACnE,iBAAiB,EAAE,cAAc,CAAC,QAAQ,CACxC,oIAAoI,CACrI;YACD,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAC3D,iDAAiD,CAClD;SACF,CAAC;QACF,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,8 +1,8 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
2
|
declare const PATCH_COMMENT_REPLY_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
teamId: z.
|
|
4
|
-
commentId: z.
|
|
5
|
-
replyId: z.
|
|
3
|
+
teamId: z.ZodGUID;
|
|
4
|
+
commentId: z.ZodGUID;
|
|
5
|
+
replyId: z.ZodGUID;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
export type PatchCommentReplyPathParams = z.infer<typeof PATCH_COMMENT_REPLY_PATH_PARAMS_SCHEMA>;
|
|
8
8
|
declare const PATCH_COMMENT_REPLY_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
@@ -15,7 +15,7 @@ declare const PATCH_COMMENT_REPLY_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
|
15
15
|
text: z.ZodString;
|
|
16
16
|
}, z.core.$strip>, z.ZodObject<{
|
|
17
17
|
type: z.ZodLiteral<"userMention">;
|
|
18
|
-
userId: z.
|
|
18
|
+
userId: z.ZodGUID;
|
|
19
19
|
}, z.core.$strip>, z.ZodObject<{
|
|
20
20
|
type: z.ZodLiteral<"link">;
|
|
21
21
|
href: z.ZodURL;
|
|
@@ -35,9 +35,9 @@ export declare const patchCommentReplyContract: Omit<{
|
|
|
35
35
|
authorization: z.ZodString;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
37
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
38
|
-
teamId: z.
|
|
39
|
-
commentId: z.
|
|
40
|
-
replyId: z.
|
|
38
|
+
teamId: z.ZodGUID;
|
|
39
|
+
commentId: z.ZodGUID;
|
|
40
|
+
replyId: z.ZodGUID;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
readonly requestBodySchema: z.ZodObject<{
|
|
43
43
|
message: z.ZodObject<{
|
|
@@ -49,7 +49,7 @@ export declare const patchCommentReplyContract: Omit<{
|
|
|
49
49
|
text: z.ZodString;
|
|
50
50
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
51
|
type: z.ZodLiteral<"userMention">;
|
|
52
|
-
userId: z.
|
|
52
|
+
userId: z.ZodGUID;
|
|
53
53
|
}, z.core.$strip>, z.ZodObject<{
|
|
54
54
|
type: z.ZodLiteral<"link">;
|
|
55
55
|
href: z.ZodURL;
|
|
@@ -97,7 +97,7 @@ export declare const patchCommentReplyContract: Omit<{
|
|
|
97
97
|
errorCode: z.ZodLiteral<"MENTIONED_USER_ACCESS_DENIED">;
|
|
98
98
|
} & {
|
|
99
99
|
details: z.ZodObject<{
|
|
100
|
-
userIds: z.ZodArray<z.
|
|
100
|
+
userIds: z.ZodArray<z.ZodGUID>;
|
|
101
101
|
}, z.core.$strip>;
|
|
102
102
|
}, z.core.$strip>;
|
|
103
103
|
500: z.ZodObject<{
|
|
@@ -8,9 +8,9 @@ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
|
8
8
|
// PATCH /v1/teams/:teamId/comments/:commentId/replies/:replyId
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
const PATCH_COMMENT_REPLY_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
11
|
-
teamId: z.
|
|
12
|
-
commentId: z.
|
|
13
|
-
replyId: z.
|
|
11
|
+
teamId: z.guid().describe('Id of the team'),
|
|
12
|
+
commentId: z.guid().describe('Id of the comment'),
|
|
13
|
+
replyId: z.guid().describe('Id of the reply'),
|
|
14
14
|
}));
|
|
15
15
|
const PATCH_COMMENT_REPLY_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
16
16
|
message: MESSAGE_SCHEMA,
|