@lokalise/chatter-api-contracts 0.1.8 → 0.1.10
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/callers.d.ts +48 -0
- package/dist/api/callers.js +28 -0
- package/dist/api/callers.js.map +1 -0
- package/dist/api/contracts/comments/delete-comment-reply.d.ts +5 -0
- package/dist/api/contracts/comments/delete-comment-reply.js +4 -1
- package/dist/api/contracts/comments/delete-comment-reply.js.map +1 -1
- package/dist/api/contracts/comments/delete-comment.d.ts +5 -0
- package/dist/api/contracts/comments/delete-comment.js +4 -1
- package/dist/api/contracts/comments/delete-comment.js.map +1 -1
- package/dist/api/contracts/comments/get-comment-replies.d.ts +52 -1
- package/dist/api/contracts/comments/get-comment-replies.js +5 -2
- package/dist/api/contracts/comments/get-comment-replies.js.map +1 -1
- package/dist/api/contracts/comments/get-comment.d.ts +5 -4
- package/dist/api/contracts/comments/get-comment.js +4 -2
- package/dist/api/contracts/comments/get-comment.js.map +1 -1
- package/dist/api/contracts/comments/get-comments.d.ts +78 -1
- package/dist/api/contracts/comments/get-comments.js +6 -3
- package/dist/api/contracts/comments/get-comments.js.map +1 -1
- package/dist/api/contracts/comments/patch-comment-reply.d.ts +5 -0
- package/dist/api/contracts/comments/patch-comment-reply.js +4 -1
- package/dist/api/contracts/comments/patch-comment-reply.js.map +1 -1
- package/dist/api/contracts/comments/patch-comment.d.ts +5 -0
- package/dist/api/contracts/comments/patch-comment.js +4 -1
- package/dist/api/contracts/comments/patch-comment.js.map +1 -1
- package/dist/api/contracts/comments/post-comment-reply.d.ts +7 -2
- package/dist/api/contracts/comments/post-comment-reply.js +4 -2
- package/dist/api/contracts/comments/post-comment-reply.js.map +1 -1
- package/dist/api/contracts/comments/post-comment.d.ts +7 -2
- package/dist/api/contracts/comments/post-comment.js +4 -2
- package/dist/api/contracts/comments/post-comment.js.map +1 -1
- package/dist/api/contracts/comments/post-comments-actions-search.d.ts +5 -4
- package/dist/api/contracts/comments/post-comments-actions-search.js +4 -2
- package/dist/api/contracts/comments/post-comments-actions-search.js.map +1 -1
- package/dist/api/contracts/comments/put-comment-read-state.d.ts +7 -2
- package/dist/api/contracts/comments/put-comment-read-state.js +4 -2
- package/dist/api/contracts/comments/put-comment-read-state.js.map +1 -1
- package/dist/api/contracts/comments/put-comment-subscription.d.ts +7 -2
- package/dist/api/contracts/comments/put-comment-subscription.js +4 -2
- package/dist/api/contracts/comments/put-comment-subscription.js.map +1 -1
- package/dist/api/contracts/common.js +3 -1
- package/dist/api/contracts/common.js.map +1 -1
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/errors/index.js.map +1 -1
- package/dist/api/errors/user-token-required.d.ts +10 -0
- package/dist/api/errors/user-token-required.js +7 -0
- package/dist/api/errors/user-token-required.js.map +1 -0
- package/dist/api/objects/comment.d.ts +40 -2
- package/dist/api/objects/comment.js +14 -12
- package/dist/api/objects/comment.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ApiContract } from '@lokalise/api-contracts';
|
|
2
|
+
/**
|
|
3
|
+
* The kinds of caller a route accepts. Declared on every contract as `metadata: acceptCallers(...)`, so
|
|
4
|
+
* who may call an endpoint is part of its published definition rather than a list kept somewhere
|
|
5
|
+
* in the service.
|
|
6
|
+
*
|
|
7
|
+
* Chatter has no service-only endpoint, so `USER` is on every contract and only the `SERVICE` side
|
|
8
|
+
* varies - and only that side is checked against the token on each request. A contract that left
|
|
9
|
+
* `USER` out would not be refused to people at runtime; the contracts test refuses it at build time
|
|
10
|
+
* instead.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CallerEnum: {
|
|
13
|
+
/** A person, through an Expert user token. */
|
|
14
|
+
readonly USER: 'user';
|
|
15
|
+
/** Another service, through an Expert service-to-service token. */
|
|
16
|
+
readonly SERVICE: 'service';
|
|
17
|
+
};
|
|
18
|
+
export type Caller = (typeof CallerEnum)[keyof typeof CallerEnum];
|
|
19
|
+
/**
|
|
20
|
+
* `metadata` of a Chatter route.
|
|
21
|
+
*
|
|
22
|
+
* `CommonRouteDefinitionMetadata` is a `Record<string, unknown>` shared by every Lokalise contract,
|
|
23
|
+
* and other services already put their own shape under `accepts`. Declaring `accepts` on that interface would make
|
|
24
|
+
* their contracts stop being `ApiContract`s wherever both packages are installed, so Chatter narrows
|
|
25
|
+
* its own contract type instead and leaves the shared one alone.
|
|
26
|
+
*/
|
|
27
|
+
export type CallerMetadata = {
|
|
28
|
+
accepts?: readonly Caller[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* A contract of this service: an `ApiContract` whose metadata names the callers its route takes, so
|
|
32
|
+
* reading `metadata.accepts` is typed rather than `unknown`.
|
|
33
|
+
*
|
|
34
|
+
* It intersects `metadata` rather than replacing it, which keeps a Chatter contract usable wherever
|
|
35
|
+
* an `ApiContract` is wanted - replacing it collapses the method union and the entity-scope resolver
|
|
36
|
+
* stops accepting it.
|
|
37
|
+
*/
|
|
38
|
+
export type ChatterApiContract = ApiContract & {
|
|
39
|
+
metadata?: CallerMetadata;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* `metadata` for a contract, naming the callers it accepts
|
|
43
|
+
*/
|
|
44
|
+
export declare const acceptCallers: (...accepts: Caller[]) => CallerMetadata;
|
|
45
|
+
/**
|
|
46
|
+
* Whether `metadata.accepts` of a contract lists this kind of caller.
|
|
47
|
+
*/
|
|
48
|
+
export declare const acceptsCaller: (metadata: CallerMetadata | undefined, caller: Caller) => boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The kinds of caller a route accepts. Declared on every contract as `metadata: acceptCallers(...)`, so
|
|
3
|
+
* who may call an endpoint is part of its published definition rather than a list kept somewhere
|
|
4
|
+
* in the service.
|
|
5
|
+
*
|
|
6
|
+
* Chatter has no service-only endpoint, so `USER` is on every contract and only the `SERVICE` side
|
|
7
|
+
* varies - and only that side is checked against the token on each request. A contract that left
|
|
8
|
+
* `USER` out would not be refused to people at runtime; the contracts test refuses it at build time
|
|
9
|
+
* instead.
|
|
10
|
+
*/
|
|
11
|
+
export const CallerEnum = {
|
|
12
|
+
/** A person, through an Expert user token. */
|
|
13
|
+
USER: 'user',
|
|
14
|
+
/** Another service, through an Expert service-to-service token. */
|
|
15
|
+
SERVICE: 'service',
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* `metadata` for a contract, naming the callers it accepts
|
|
19
|
+
*/
|
|
20
|
+
export const acceptCallers = (...accepts) => ({ accepts });
|
|
21
|
+
/**
|
|
22
|
+
* Whether `metadata.accepts` of a contract lists this kind of caller.
|
|
23
|
+
*/
|
|
24
|
+
export const acceptsCaller = (metadata, caller) => {
|
|
25
|
+
const accepts = metadata?.accepts;
|
|
26
|
+
return Array.isArray(accepts) && accepts.includes(caller);
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=callers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callers.js","sourceRoot":"","sources":["../../src/api/callers.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,8CAA8C;IAC9C,IAAI,EAAE,MAAM;IACZ,mEAAmE;IACnE,OAAO,EAAE,SAAS;CACV,CAAA;AAwBV;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAG,OAAiB,EAAkB,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AAEpF;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAoC,EAAE,MAAc,EAAW,EAAE;IAC7F,MAAM,OAAO,GAAG,QAAQ,EAAE,OAAO,CAAA;IACjC,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AAC3D,CAAC,CAAA"}
|
|
@@ -8,6 +8,7 @@ export type DeleteCommentReplyPathParams = z.infer<typeof DELETE_COMMENT_REPLY_P
|
|
|
8
8
|
export declare const deleteCommentReplyContract: Omit<{
|
|
9
9
|
readonly method: "delete";
|
|
10
10
|
readonly visibility: "internal";
|
|
11
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
11
12
|
readonly summary: "Delete a reply";
|
|
12
13
|
readonly description: string;
|
|
13
14
|
readonly tags: readonly ["Comments"];
|
|
@@ -46,6 +47,10 @@ export declare const deleteCommentReplyContract: Omit<{
|
|
|
46
47
|
message: z.ZodString;
|
|
47
48
|
code: z.ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
|
|
48
49
|
errorCode: z.ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
message: z.ZodString;
|
|
52
|
+
code: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
53
|
+
errorCode: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
49
54
|
}, z.core.$strip>]>;
|
|
50
55
|
404: z.ZodObject<{
|
|
51
56
|
message: z.ZodString;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
|
|
2
2
|
import z from 'zod/v4';
|
|
3
|
-
import {
|
|
3
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
4
|
+
import { commentDeletePermissionRequiredErrorDefinition, resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, userTokenRequiredErrorDefinition, } from '../../errors/index.js';
|
|
4
5
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
5
6
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
6
7
|
// ------------------------------------------------------------
|
|
@@ -14,6 +15,7 @@ const DELETE_COMMENT_REPLY_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
|
14
15
|
export const deleteCommentReplyContract = defineApiContract({
|
|
15
16
|
method: 'delete',
|
|
16
17
|
visibility: 'internal',
|
|
18
|
+
metadata: acceptCallers(CallerEnum.USER),
|
|
17
19
|
summary: 'Delete a reply',
|
|
18
20
|
description: 'Deletes a reply from the thread of a comment. The rest of the thread is kept. ' +
|
|
19
21
|
'The author and team owners, admins and billers can delete it.',
|
|
@@ -28,6 +30,7 @@ export const deleteCommentReplyContract = defineApiContract({
|
|
|
28
30
|
403: z.union([
|
|
29
31
|
teamAccessDeniedErrorDefinition.schema,
|
|
30
32
|
commentDeletePermissionRequiredErrorDefinition.schema,
|
|
33
|
+
userTokenRequiredErrorDefinition.schema,
|
|
31
34
|
]),
|
|
32
35
|
404: resourceNotFoundErrorDefinition.schema,
|
|
33
36
|
500: ERROR_RESPONSE_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-comment-reply.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/delete-comment-reply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,8CAA8C,EAC9C,+BAA+B,EAC/B,+BAA+B,
|
|
1
|
+
{"version":3,"file":"delete-comment-reply.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/delete-comment-reply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EACL,8CAA8C,EAC9C,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAA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MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
|
|
@@ -7,6 +7,7 @@ export type DeleteCommentPathParams = z.infer<typeof DELETE_COMMENT_PATH_PARAMS_
|
|
|
7
7
|
export declare const deleteCommentContract: Omit<{
|
|
8
8
|
readonly method: "delete";
|
|
9
9
|
readonly visibility: "internal";
|
|
10
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
10
11
|
readonly summary: "Delete a comment";
|
|
11
12
|
readonly description: string;
|
|
12
13
|
readonly tags: readonly ["Comments"];
|
|
@@ -43,6 +44,10 @@ export declare const deleteCommentContract: Omit<{
|
|
|
43
44
|
message: z.ZodString;
|
|
44
45
|
code: z.ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
|
|
45
46
|
errorCode: z.ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
+
message: z.ZodString;
|
|
49
|
+
code: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
50
|
+
errorCode: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
46
51
|
}, z.core.$strip>]>;
|
|
47
52
|
404: z.ZodObject<{
|
|
48
53
|
message: z.ZodString;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
|
|
2
2
|
import z from 'zod/v4';
|
|
3
|
-
import {
|
|
3
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
4
|
+
import { commentDeletePermissionRequiredErrorDefinition, resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, userTokenRequiredErrorDefinition, } from '../../errors/index.js';
|
|
4
5
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
5
6
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
6
7
|
// ------------------------------------------------------------
|
|
@@ -13,6 +14,7 @@ const DELETE_COMMENT_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
|
13
14
|
export const deleteCommentContract = defineApiContract({
|
|
14
15
|
method: 'delete',
|
|
15
16
|
visibility: 'internal',
|
|
17
|
+
metadata: acceptCallers(CallerEnum.USER),
|
|
16
18
|
summary: 'Delete a comment',
|
|
17
19
|
description: 'Deletes a comment and its whole thread, replies included. ' +
|
|
18
20
|
'The author and team owners, admins and billers can delete it. Subscriptions to the thread are kept.',
|
|
@@ -27,6 +29,7 @@ export const deleteCommentContract = defineApiContract({
|
|
|
27
29
|
403: z.union([
|
|
28
30
|
teamAccessDeniedErrorDefinition.schema,
|
|
29
31
|
commentDeletePermissionRequiredErrorDefinition.schema,
|
|
32
|
+
userTokenRequiredErrorDefinition.schema,
|
|
30
33
|
]),
|
|
31
34
|
404: resourceNotFoundErrorDefinition.schema,
|
|
32
35
|
500: ERROR_RESPONSE_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-comment.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/delete-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,8CAA8C,EAC9C,+BAA+B,EAC/B,+BAA+B,
|
|
1
|
+
{"version":3,"file":"delete-comment.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/delete-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EACL,8CAA8C,EAC9C,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,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z.infer<typeof GET_COMMENT_REPLIES_R
|
|
|
44
44
|
export declare const getCommentRepliesContract: Omit<{
|
|
45
45
|
readonly method: "get";
|
|
46
46
|
readonly visibility: "internal";
|
|
47
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
47
48
|
readonly summary: "List the replies of a comment";
|
|
48
49
|
readonly description: string;
|
|
49
50
|
readonly tags: readonly ["Comments"];
|
|
@@ -97,7 +98,57 @@ export declare const getCommentRepliesContract: Omit<{
|
|
|
97
98
|
}, z.core.$strip>;
|
|
98
99
|
}, z.core.$strip>;
|
|
99
100
|
'text/event-stream': import("@lokalise/api-contracts").SseBody<{
|
|
100
|
-
'comment_reply.created': z.ZodObject<{
|
|
101
|
+
'comment_reply.created': z.ZodObject<{
|
|
102
|
+
id: z.ZodGUID;
|
|
103
|
+
commentId: z.ZodGUID;
|
|
104
|
+
message: z.ZodObject<{
|
|
105
|
+
version: z.ZodLiteral<1>;
|
|
106
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"paragraph">;
|
|
108
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
|
+
type: z.ZodLiteral<"text">;
|
|
110
|
+
text: z.ZodString;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
type: z.ZodLiteral<"userMention">;
|
|
113
|
+
userId: z.ZodGUID;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
type: z.ZodLiteral<"link">;
|
|
116
|
+
href: z.ZodURL;
|
|
117
|
+
text: z.ZodString;
|
|
118
|
+
}, z.core.$strip>], "type">>;
|
|
119
|
+
}, z.core.$strip>], "type">>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
122
|
+
createdBy: z.ZodGUID;
|
|
123
|
+
createdAt: z.ZodISODateTime;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
'comment_reply.updated': z.ZodObject<{
|
|
126
|
+
id: z.ZodGUID;
|
|
127
|
+
commentId: z.ZodGUID;
|
|
128
|
+
message: z.ZodObject<{
|
|
129
|
+
version: z.ZodLiteral<1>;
|
|
130
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
131
|
+
type: z.ZodLiteral<"paragraph">;
|
|
132
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"text">;
|
|
134
|
+
text: z.ZodString;
|
|
135
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
136
|
+
type: z.ZodLiteral<"userMention">;
|
|
137
|
+
userId: z.ZodGUID;
|
|
138
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
139
|
+
type: z.ZodLiteral<"link">;
|
|
140
|
+
href: z.ZodURL;
|
|
141
|
+
text: z.ZodString;
|
|
142
|
+
}, z.core.$strip>], "type">>;
|
|
143
|
+
}, z.core.$strip>], "type">>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
146
|
+
createdBy: z.ZodGUID;
|
|
147
|
+
createdAt: z.ZodISODateTime;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
'comment_reply.deleted': z.ZodObject<{
|
|
150
|
+
id: z.ZodGUID;
|
|
151
|
+
}, z.core.$strip>;
|
|
101
152
|
}>;
|
|
102
153
|
};
|
|
103
154
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { paginatedResponseSchema } from '@lokalise/api-common';
|
|
2
2
|
import { defineApiContract, sseBody } from '@lokalise/api-contracts';
|
|
3
3
|
import z from 'zod/v4';
|
|
4
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
4
5
|
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
|
|
5
6
|
import { COMMENT_REPLY_SCHEMA } from '../../objects/index.js';
|
|
6
7
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
@@ -31,6 +32,7 @@ const GET_COMMENT_REPLIES_RESPONSE_BODY_SCHEMA = paginatedResponseSchema(COMMENT
|
|
|
31
32
|
export const getCommentRepliesContract = defineApiContract({
|
|
32
33
|
method: 'get',
|
|
33
34
|
visibility: 'internal',
|
|
35
|
+
metadata: acceptCallers(CallerEnum.USER, CallerEnum.SERVICE),
|
|
34
36
|
summary: 'List the replies of a comment',
|
|
35
37
|
description: 'Lists the replies of a comment, oldest first, one page at a time, or streams their changes as ' +
|
|
36
38
|
'Server-Sent Events when the request accepts `text/event-stream`. ' +
|
|
@@ -45,8 +47,9 @@ export const getCommentRepliesContract = defineApiContract({
|
|
|
45
47
|
content: {
|
|
46
48
|
'application/json': GET_COMMENT_REPLIES_RESPONSE_BODY_SCHEMA,
|
|
47
49
|
'text/event-stream': sseBody({
|
|
48
|
-
|
|
49
|
-
'comment_reply.
|
|
50
|
+
'comment_reply.created': COMMENT_REPLY_SCHEMA.describe('A reply was added to the thread'),
|
|
51
|
+
'comment_reply.updated': COMMENT_REPLY_SCHEMA.describe('The message of a reply was edited'),
|
|
52
|
+
'comment_reply.deleted': COMMENT_REPLY_SCHEMA.pick({ id: true }).describe('A reply was deleted'),
|
|
50
53
|
}),
|
|
51
54
|
},
|
|
52
55
|
},
|
|
@@ -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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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,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,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,C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E,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"}
|
|
@@ -39,16 +39,17 @@ declare const GET_COMMENT_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
|
39
39
|
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
40
40
|
replyCount: z.ZodInt;
|
|
41
41
|
lastActivityAt: z.ZodISODateTime;
|
|
42
|
-
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
43
|
-
subscribed: z.ZodBoolean;
|
|
44
42
|
createdBy: z.ZodGUID;
|
|
45
43
|
createdAt: z.ZodISODateTime;
|
|
44
|
+
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
45
|
+
subscribed: z.ZodBoolean;
|
|
46
46
|
}, z.core.$strip>;
|
|
47
47
|
}, z.core.$strip>;
|
|
48
48
|
export type GetCommentResponseBody = z.infer<typeof GET_COMMENT_RESPONSE_BODY_SCHEMA>;
|
|
49
49
|
export declare const getCommentContract: Omit<{
|
|
50
50
|
readonly method: "get";
|
|
51
51
|
readonly visibility: "internal";
|
|
52
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
52
53
|
readonly summary: "Get a comment";
|
|
53
54
|
readonly description: string;
|
|
54
55
|
readonly tags: readonly ["Comments"];
|
|
@@ -99,10 +100,10 @@ export declare const getCommentContract: Omit<{
|
|
|
99
100
|
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
100
101
|
replyCount: z.ZodInt;
|
|
101
102
|
lastActivityAt: z.ZodISODateTime;
|
|
102
|
-
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
103
|
-
subscribed: z.ZodBoolean;
|
|
104
103
|
createdBy: z.ZodGUID;
|
|
105
104
|
createdAt: z.ZodISODateTime;
|
|
105
|
+
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
106
|
+
subscribed: z.ZodBoolean;
|
|
106
107
|
}, z.core.$strip>;
|
|
107
108
|
}, z.core.$strip>;
|
|
108
109
|
400: z.ZodObject<{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineApiContract } from '@lokalise/api-contracts';
|
|
2
2
|
import z from 'zod/v4';
|
|
3
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
3
4
|
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
|
|
4
|
-
import {
|
|
5
|
+
import { COMMENT_WITH_USER_STATE_SCHEMA } from '../../objects/comment.js';
|
|
5
6
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
6
7
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
7
8
|
// ------------------------------------------------------------
|
|
@@ -12,11 +13,12 @@ const GET_COMMENT_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
|
12
13
|
commentId: z.guid().describe('Id of the comment'),
|
|
13
14
|
}));
|
|
14
15
|
const GET_COMMENT_RESPONSE_BODY_SCHEMA = z.compile(z.object({
|
|
15
|
-
data:
|
|
16
|
+
data: COMMENT_WITH_USER_STATE_SCHEMA,
|
|
16
17
|
}));
|
|
17
18
|
export const getCommentContract = defineApiContract({
|
|
18
19
|
method: 'get',
|
|
19
20
|
visibility: 'internal',
|
|
21
|
+
metadata: acceptCallers(CallerEnum.USER, CallerEnum.SERVICE),
|
|
20
22
|
summary: 'Get a comment',
|
|
21
23
|
description: 'Returns the root comment of a thread, with its reply count and the read state and ' +
|
|
22
24
|
'subscription of the requesting user. Deleted and orphaned comments are not found. ' +
|
|
@@ -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,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,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,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;IAC5D,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"}
|
|
@@ -13,6 +13,7 @@ export type GetCommentsQuery = z.infer<typeof GET_COMMENTS_QUERY_SCHEMA>;
|
|
|
13
13
|
export declare const getCommentsContract: Omit<{
|
|
14
14
|
readonly method: "get";
|
|
15
15
|
readonly visibility: "internal";
|
|
16
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
16
17
|
readonly summary: "Subscribe to comments";
|
|
17
18
|
readonly description: "Streams live comment changes of a project as Server-Sent Events.";
|
|
18
19
|
readonly tags: readonly ["Comments"];
|
|
@@ -35,7 +36,83 @@ export declare const getCommentsContract: Omit<{
|
|
|
35
36
|
200: {
|
|
36
37
|
readonly content: {
|
|
37
38
|
readonly 'text/event-stream': import("@lokalise/api-contracts").SseBody<{
|
|
38
|
-
'comment.created': z.ZodObject<{
|
|
39
|
+
'comment.created': z.ZodObject<{
|
|
40
|
+
id: z.ZodGUID;
|
|
41
|
+
teamId: z.ZodGUID;
|
|
42
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
43
|
+
entityType: z.ZodEnum<{
|
|
44
|
+
readonly SEGMENT: 'SEGMENT';
|
|
45
|
+
}>;
|
|
46
|
+
entityId: z.ZodGUID;
|
|
47
|
+
status: z.ZodEnum<{
|
|
48
|
+
readonly OPEN: 'OPEN';
|
|
49
|
+
readonly RESOLVED: 'RESOLVED';
|
|
50
|
+
}>;
|
|
51
|
+
message: z.ZodObject<{
|
|
52
|
+
version: z.ZodLiteral<1>;
|
|
53
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"paragraph">;
|
|
55
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"text">;
|
|
57
|
+
text: z.ZodString;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"userMention">;
|
|
60
|
+
userId: z.ZodGUID;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
type: z.ZodLiteral<"link">;
|
|
63
|
+
href: z.ZodURL;
|
|
64
|
+
text: z.ZodString;
|
|
65
|
+
}, z.core.$strip>], "type">>;
|
|
66
|
+
}, z.core.$strip>], "type">>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
69
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
70
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
71
|
+
replyCount: z.ZodInt;
|
|
72
|
+
lastActivityAt: z.ZodISODateTime;
|
|
73
|
+
createdBy: z.ZodGUID;
|
|
74
|
+
createdAt: z.ZodISODateTime;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
'comment.updated': z.ZodObject<{
|
|
77
|
+
id: z.ZodGUID;
|
|
78
|
+
teamId: z.ZodGUID;
|
|
79
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
80
|
+
entityType: z.ZodEnum<{
|
|
81
|
+
readonly SEGMENT: 'SEGMENT';
|
|
82
|
+
}>;
|
|
83
|
+
entityId: z.ZodGUID;
|
|
84
|
+
status: z.ZodEnum<{
|
|
85
|
+
readonly OPEN: 'OPEN';
|
|
86
|
+
readonly RESOLVED: 'RESOLVED';
|
|
87
|
+
}>;
|
|
88
|
+
message: z.ZodObject<{
|
|
89
|
+
version: z.ZodLiteral<1>;
|
|
90
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"paragraph">;
|
|
92
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"text">;
|
|
94
|
+
text: z.ZodString;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
type: z.ZodLiteral<"userMention">;
|
|
97
|
+
userId: z.ZodGUID;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
type: z.ZodLiteral<"link">;
|
|
100
|
+
href: z.ZodURL;
|
|
101
|
+
text: z.ZodString;
|
|
102
|
+
}, z.core.$strip>], "type">>;
|
|
103
|
+
}, z.core.$strip>], "type">>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
106
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
107
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
108
|
+
replyCount: z.ZodInt;
|
|
109
|
+
lastActivityAt: z.ZodISODateTime;
|
|
110
|
+
createdBy: z.ZodGUID;
|
|
111
|
+
createdAt: z.ZodISODateTime;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
'comment.deleted': z.ZodObject<{
|
|
114
|
+
id: z.ZodGUID;
|
|
115
|
+
}, z.core.$strip>;
|
|
39
116
|
}>;
|
|
40
117
|
};
|
|
41
118
|
readonly description?: string | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineApiContract, sseResponse } from '@lokalise/api-contracts';
|
|
2
2
|
import z from 'zod/v4';
|
|
3
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
3
4
|
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
|
|
4
|
-
import { CommentEntityTypeEnum } from '../../objects/comment.js';
|
|
5
|
+
import { COMMENT_SCHEMA, CommentEntityTypeEnum } from '../../objects/comment.js';
|
|
5
6
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
6
7
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
7
8
|
// ------------------------------------------------------------
|
|
@@ -19,6 +20,7 @@ const GET_COMMENTS_QUERY_SCHEMA = z.compile(z.object({
|
|
|
19
20
|
export const getCommentsContract = defineApiContract({
|
|
20
21
|
method: 'get',
|
|
21
22
|
visibility: 'internal',
|
|
23
|
+
metadata: acceptCallers(CallerEnum.USER, CallerEnum.SERVICE),
|
|
22
24
|
summary: 'Subscribe to comments',
|
|
23
25
|
description: 'Streams live comment changes of a project as Server-Sent Events.',
|
|
24
26
|
tags: [OpenApiTags.Comments.name],
|
|
@@ -28,8 +30,9 @@ export const getCommentsContract = defineApiContract({
|
|
|
28
30
|
pathResolver: ({ teamId }) => `/v1/teams/${teamId}/comments`,
|
|
29
31
|
responsesByStatusCode: {
|
|
30
32
|
200: sseResponse({
|
|
31
|
-
|
|
32
|
-
'comment.
|
|
33
|
+
'comment.created': COMMENT_SCHEMA.describe('A comment was created'),
|
|
34
|
+
'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'),
|
|
35
|
+
'comment.deleted': COMMENT_SCHEMA.pick({ id: true }).describe('A comment was deleted, together with its thread'),
|
|
33
36
|
}),
|
|
34
37
|
400: ERROR_RESPONSE_SCHEMA,
|
|
35
38
|
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,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,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;CAC5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|
@@ -28,6 +28,7 @@ export type PatchCommentReplyRequestBody = z.infer<typeof PATCH_COMMENT_REPLY_RE
|
|
|
28
28
|
export declare const patchCommentReplyContract: Omit<{
|
|
29
29
|
readonly method: "patch";
|
|
30
30
|
readonly visibility: "internal";
|
|
31
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
31
32
|
readonly summary: "Update a reply";
|
|
32
33
|
readonly description: "Edits the message of a reply. Only the author can edit it.";
|
|
33
34
|
readonly tags: readonly ["Comments"];
|
|
@@ -85,6 +86,10 @@ export declare const patchCommentReplyContract: Omit<{
|
|
|
85
86
|
message: z.ZodString;
|
|
86
87
|
code: z.ZodLiteral<"COMMENT_AUTHOR_REQUIRED">;
|
|
87
88
|
errorCode: z.ZodLiteral<"COMMENT_AUTHOR_REQUIRED">;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
message: z.ZodString;
|
|
91
|
+
code: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
92
|
+
errorCode: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
88
93
|
}, z.core.$strip>]>;
|
|
89
94
|
404: z.ZodObject<{
|
|
90
95
|
message: z.ZodString;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
|
|
2
2
|
import z from 'zod/v4';
|
|
3
|
-
import {
|
|
3
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
4
|
+
import { commentAuthorRequiredErrorDefinition, mentionedUserAccessDeniedErrorDefinition, resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, userTokenRequiredErrorDefinition, } from '../../errors/index.js';
|
|
4
5
|
import { MESSAGE_SCHEMA } from '../../objects/message.js';
|
|
5
6
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
6
7
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
@@ -18,6 +19,7 @@ const PATCH_COMMENT_REPLY_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
|
18
19
|
export const patchCommentReplyContract = defineApiContract({
|
|
19
20
|
method: 'patch',
|
|
20
21
|
visibility: 'internal',
|
|
22
|
+
metadata: acceptCallers(CallerEnum.USER),
|
|
21
23
|
summary: 'Update a reply',
|
|
22
24
|
description: 'Edits the message of a reply. Only the author can edit it.',
|
|
23
25
|
tags: [OpenApiTags.Comments.name],
|
|
@@ -32,6 +34,7 @@ export const patchCommentReplyContract = defineApiContract({
|
|
|
32
34
|
403: z.union([
|
|
33
35
|
teamAccessDeniedErrorDefinition.schema,
|
|
34
36
|
commentAuthorRequiredErrorDefinition.schema,
|
|
37
|
+
userTokenRequiredErrorDefinition.schema,
|
|
35
38
|
]),
|
|
36
39
|
404: resourceNotFoundErrorDefinition.schema,
|
|
37
40
|
422: mentionedUserAccessDeniedErrorDefinition.schema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-comment-reply.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/patch-comment-reply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,oCAAoC,EACpC,wCAAwC,EACxC,+BAA+B,EAC/B,+BAA+B,
|
|
1
|
+
{"version":3,"file":"patch-comment-reply.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/patch-comment-reply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EACL,oCAAoC,EACpC,wCAAwC,EACxC,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,uBAAuB,CAAA;AAC9B,OAAO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E,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC;YACX,+BAA+B,CAAC,MAAM;YACtC,oCAAoC,CAAC,MAAM;YAC3C,gCAAgC,CAAC,MAAM;SACxC,CAAC;QACF,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,wCAAwC,CAAC,MAAM;QACpD,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
|
|
@@ -31,6 +31,7 @@ export type PatchCommentRequestBody = z.infer<typeof PATCH_COMMENT_REQUEST_BODY_
|
|
|
31
31
|
export declare const patchCommentContract: Omit<{
|
|
32
32
|
readonly method: "patch";
|
|
33
33
|
readonly visibility: "internal";
|
|
34
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
34
35
|
readonly summary: "Update a comment";
|
|
35
36
|
readonly description: string;
|
|
36
37
|
readonly tags: readonly ["Comments"];
|
|
@@ -90,6 +91,10 @@ export declare const patchCommentContract: Omit<{
|
|
|
90
91
|
message: z.ZodString;
|
|
91
92
|
code: z.ZodLiteral<"COMMENT_AUTHOR_REQUIRED">;
|
|
92
93
|
errorCode: z.ZodLiteral<"COMMENT_AUTHOR_REQUIRED">;
|
|
94
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
+
message: z.ZodString;
|
|
96
|
+
code: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
97
|
+
errorCode: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
93
98
|
}, z.core.$strip>]>;
|
|
94
99
|
404: z.ZodObject<{
|
|
95
100
|
message: z.ZodString;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
|
|
2
2
|
import z from 'zod/v4';
|
|
3
|
-
import {
|
|
3
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
4
|
+
import { commentAuthorRequiredErrorDefinition, mentionedUserAccessDeniedErrorDefinition, resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, userTokenRequiredErrorDefinition, } from '../../errors/index.js';
|
|
4
5
|
import { CommentStatusEnum } from '../../objects/comment.js';
|
|
5
6
|
import { MESSAGE_SCHEMA } from '../../objects/message.js';
|
|
6
7
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
@@ -26,6 +27,7 @@ const PATCH_COMMENT_REQUEST_BODY_SCHEMA = z.compile(z
|
|
|
26
27
|
export const patchCommentContract = defineApiContract({
|
|
27
28
|
method: 'patch',
|
|
28
29
|
visibility: 'internal',
|
|
30
|
+
metadata: acceptCallers(CallerEnum.USER),
|
|
29
31
|
summary: 'Update a comment',
|
|
30
32
|
description: 'Edits the message of a comment, or resolves or reopens its thread. Send at least one of `message` or `status`. ' +
|
|
31
33
|
'Only the author can change the message; anyone with access to the comment can change the status.',
|
|
@@ -41,6 +43,7 @@ export const patchCommentContract = defineApiContract({
|
|
|
41
43
|
403: z.union([
|
|
42
44
|
teamAccessDeniedErrorDefinition.schema,
|
|
43
45
|
commentAuthorRequiredErrorDefinition.schema,
|
|
46
|
+
userTokenRequiredErrorDefinition.schema,
|
|
44
47
|
]),
|
|
45
48
|
404: resourceNotFoundErrorDefinition.schema,
|
|
46
49
|
422: mentionedUserAccessDeniedErrorDefinition.schema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-comment.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/patch-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,oCAAoC,EACpC,wCAAwC,EACxC,+BAA+B,EAC/B,+BAA+B,
|
|
1
|
+
{"version":3,"file":"patch-comment.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/patch-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,c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