@lokalise/chatter-api-contracts 0.1.10 → 0.1.11
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/comment-search-common.d.ts +27 -0
- package/dist/api/contracts/comments/comment-search-common.js +55 -0
- package/dist/api/contracts/comments/comment-search-common.js.map +1 -0
- package/dist/api/contracts/comments/post-comments-actions-count.d.ts +97 -0
- package/dist/api/contracts/comments/post-comments-actions-count.js +37 -0
- package/dist/api/contracts/comments/post-comments-actions-count.js.map +1 -0
- package/dist/api/contracts/comments/post-comments-actions-search-grouped.d.ts +295 -0
- package/dist/api/contracts/comments/post-comments-actions-search-grouped.js +78 -0
- package/dist/api/contracts/comments/post-comments-actions-search-grouped.js.map +1 -0
- package/dist/api/contracts/comments/post-comments-actions-search.d.ts +50 -12
- package/dist/api/contracts/comments/post-comments-actions-search.js +15 -42
- package/dist/api/contracts/comments/post-comments-actions-search.js.map +1 -1
- package/dist/api/contracts/index.d.ts +3 -0
- package/dist/api/contracts/index.js +3 -0
- package/dist/api/contracts/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { multiCursorOptionalPaginationSchema } from '@lokalise/api-common';
|
|
2
|
+
import z from 'zod/v4';
|
|
3
|
+
export declare const COMMENT_SEARCH_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
4
|
+
teamId: z.ZodGUID;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type CommentSearchPathParams = z.infer<typeof COMMENT_SEARCH_PATH_PARAMS_SCHEMA>;
|
|
7
|
+
export declare const buildCommentSearchPaginationSchema: <CursorType extends Parameters<typeof multiCursorOptionalPaginationSchema>[0]>(cursorSchema: CursorType) => z.ZodObject<{
|
|
8
|
+
before: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<CursorType>>>;
|
|
9
|
+
after: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<CursorType>>>;
|
|
10
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const COMMENT_SEARCH_FILTERS_SCHEMA: z.ZodObject<{
|
|
13
|
+
projectId: z.ZodGUID;
|
|
14
|
+
entityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
15
|
+
readonly SEGMENT: 'SEGMENT';
|
|
16
|
+
}>>>;
|
|
17
|
+
entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
18
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
mentionsMe: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
createdBy: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
21
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
readonly OPEN: 'OPEN';
|
|
24
|
+
readonly RESOLVED: 'RESOLVED';
|
|
25
|
+
}>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type CommentSearchFilters = z.infer<typeof COMMENT_SEARCH_FILTERS_SCHEMA>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { multiCursorOptionalPaginationSchema } from '@lokalise/api-common';
|
|
2
|
+
import z from 'zod/v4';
|
|
3
|
+
import { CommentEntityTypeEnum, CommentStatusEnum } from '../../objects/comment.js';
|
|
4
|
+
export const COMMENT_SEARCH_PATH_PARAMS_SCHEMA = z.compile(z.object({
|
|
5
|
+
teamId: z.guid().describe('Id of the team'),
|
|
6
|
+
}));
|
|
7
|
+
const COMMENT_SEARCH_MAX_LIMIT = 100;
|
|
8
|
+
export const buildCommentSearchPaginationSchema = (cursorSchema) => multiCursorOptionalPaginationSchema(cursorSchema)
|
|
9
|
+
.extend({
|
|
10
|
+
limit: z.coerce
|
|
11
|
+
.number()
|
|
12
|
+
.int()
|
|
13
|
+
.min(1)
|
|
14
|
+
.max(COMMENT_SEARCH_MAX_LIMIT)
|
|
15
|
+
.default(COMMENT_SEARCH_MAX_LIMIT)
|
|
16
|
+
.describe('Number of threads to return per page'),
|
|
17
|
+
})
|
|
18
|
+
.refine(({ after, before }) => !(after && before), {
|
|
19
|
+
message: 'Send either `after` or `before`, not both',
|
|
20
|
+
path: ['before'],
|
|
21
|
+
});
|
|
22
|
+
const COMMENT_SEARCH_MAX_FILTER_VALUES = 100;
|
|
23
|
+
export const COMMENT_SEARCH_FILTERS_SCHEMA = z.object({
|
|
24
|
+
projectId: z.guid().describe('Only threads of this project'),
|
|
25
|
+
entityTypes: z
|
|
26
|
+
.array(z.enum(CommentEntityTypeEnum))
|
|
27
|
+
.min(1)
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('Only threads on entities of these types'),
|
|
30
|
+
entityIds: z
|
|
31
|
+
.array(z.guid())
|
|
32
|
+
.min(1)
|
|
33
|
+
.max(COMMENT_SEARCH_MAX_FILTER_VALUES)
|
|
34
|
+
.optional()
|
|
35
|
+
.describe('Only threads on these entities'),
|
|
36
|
+
unreadOnly: z.boolean().optional().describe('Only open threads that are unread for the user'),
|
|
37
|
+
mentionsMe: z
|
|
38
|
+
.boolean()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('Only threads whose comment or replies currently mention the user'),
|
|
41
|
+
createdBy: z
|
|
42
|
+
.array(z.guid())
|
|
43
|
+
.min(1)
|
|
44
|
+
.max(COMMENT_SEARCH_MAX_FILTER_VALUES)
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('Only threads whose comment was written by any of these users'),
|
|
47
|
+
locales: z
|
|
48
|
+
.array(z.string().min(1))
|
|
49
|
+
.min(1)
|
|
50
|
+
.max(COMMENT_SEARCH_MAX_FILTER_VALUES)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('Only threads in any of these locales. Locales the user cannot access are ignored'),
|
|
53
|
+
status: z.enum(CommentStatusEnum).optional().describe('Only threads with this status'),
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=comment-search-common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-search-common.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/comment-search-common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAEnF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,OAAO,CACxD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC5C,CAAC,CACH,CAAA;AAGD,MAAM,wBAAwB,GAAG,GAAG,CAAA;AACpC,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAGhD,YAAwB,EACxB,EAAE,CACF,mCAAmC,CAAC,YAAY,CAAC;KAC9C,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM;SACZ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,wBAAwB,CAAC;SAC7B,OAAO,CAAC,wBAAwB,CAAC;SACjC,QAAQ,CAAC,sCAAsC,CAAC;CACpD,CAAC;KACD,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE;IACjD,OAAO,EAAE,2CAA2C;IACpD,IAAI,EAAE,CAAC,QAAQ,CAAC;CACjB,CAAC,CAAA;AAEN,MAAM,gCAAgC,GAAG,GAAG,CAAA;AAC5C,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAC5D,WAAW,EAAE,CAAC;SACX,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;SACpC,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,yCAAyC,CAAC;IACtD,SAAS,EAAE,CAAC;SACT,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACf,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,gCAAgC,CAAC;SACrC,QAAQ,EAAE;SACV,QAAQ,CAAC,gCAAgC,CAAC;IAC7C,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;IAC7F,UAAU,EAAE,CAAC;SACV,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,kEAAkE,CAAC;IAC/E,SAAS,EAAE,CAAC;SACT,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACf,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,gCAAgC,CAAC;SACrC,QAAQ,EAAE;SACV,QAAQ,CAAC,8DAA8D,CAAC;IAC3E,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACxB,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,gCAAgC,CAAC;SACrC,QAAQ,EAAE;SACV,QAAQ,CAAC,kFAAkF,CAAC;IAC/F,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;CACvF,CAAC,CAAA"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import z from 'zod/v4';
|
|
2
|
+
import { type CommentSearchPathParams } from './comment-search-common.ts';
|
|
3
|
+
export type PostCountCommentsPathParams = CommentSearchPathParams;
|
|
4
|
+
declare const POST_COUNT_COMMENTS_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
5
|
+
projectId: z.ZodGUID;
|
|
6
|
+
entityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
7
|
+
readonly SEGMENT: 'SEGMENT';
|
|
8
|
+
}>>>;
|
|
9
|
+
entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
10
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
mentionsMe: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
createdBy: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
13
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
readonly OPEN: 'OPEN';
|
|
16
|
+
readonly RESOLVED: 'RESOLVED';
|
|
17
|
+
}>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type PostCountCommentsRequestBody = z.input<typeof POST_COUNT_COMMENTS_REQUEST_BODY_SCHEMA>;
|
|
20
|
+
declare const POST_COUNT_COMMENTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
21
|
+
total: z.ZodInt;
|
|
22
|
+
unread: z.ZodInt;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type PostCountCommentsResponseBody = z.infer<typeof POST_COUNT_COMMENTS_RESPONSE_BODY_SCHEMA>;
|
|
25
|
+
export declare const postCountCommentsContract: Omit<{
|
|
26
|
+
readonly method: "post";
|
|
27
|
+
readonly visibility: "internal";
|
|
28
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
29
|
+
readonly summary: "Count comments";
|
|
30
|
+
readonly description: string;
|
|
31
|
+
readonly tags: readonly ["Comments"];
|
|
32
|
+
readonly requestHeaderSchema: z.ZodObject<{
|
|
33
|
+
authorization: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
readonly requestPathParamsSchema: z.ZodObject<{
|
|
36
|
+
teamId: z.ZodGUID;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
readonly requestBodySchema: z.ZodObject<{
|
|
39
|
+
projectId: z.ZodGUID;
|
|
40
|
+
entityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
41
|
+
readonly SEGMENT: 'SEGMENT';
|
|
42
|
+
}>>>;
|
|
43
|
+
entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
44
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
mentionsMe: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
createdBy: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
47
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
readonly OPEN: 'OPEN';
|
|
50
|
+
readonly RESOLVED: 'RESOLVED';
|
|
51
|
+
}>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
readonly pathResolver: ({ teamId }: {
|
|
54
|
+
teamId: string;
|
|
55
|
+
}) => `/v1/teams/${string}/comments/actions/count`;
|
|
56
|
+
readonly responsesByStatusCode: {
|
|
57
|
+
200: z.ZodObject<{
|
|
58
|
+
total: z.ZodInt;
|
|
59
|
+
unread: z.ZodInt;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
400: z.ZodObject<{
|
|
62
|
+
message: z.ZodString;
|
|
63
|
+
code: z.ZodString;
|
|
64
|
+
errorCode: z.ZodString;
|
|
65
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
401: z.ZodObject<{
|
|
68
|
+
message: z.ZodString;
|
|
69
|
+
code: z.ZodString;
|
|
70
|
+
errorCode: z.ZodString;
|
|
71
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
403: z.ZodUnion<readonly [z.ZodObject<{
|
|
74
|
+
message: z.ZodString;
|
|
75
|
+
code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
|
|
76
|
+
errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
|
|
77
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
+
message: z.ZodString;
|
|
79
|
+
code: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
80
|
+
errorCode: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
81
|
+
}, z.core.$strip>]>;
|
|
82
|
+
404: z.ZodObject<{
|
|
83
|
+
message: z.ZodString;
|
|
84
|
+
code: z.ZodLiteral<"RESOURCE_NOT_FOUND">;
|
|
85
|
+
errorCode: z.ZodLiteral<"RESOURCE_NOT_FOUND">;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
500: z.ZodObject<{
|
|
88
|
+
message: z.ZodString;
|
|
89
|
+
code: z.ZodString;
|
|
90
|
+
errorCode: z.ZodString;
|
|
91
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
};
|
|
94
|
+
}, "visibility"> & {
|
|
95
|
+
visibility: import("@lokalise/api-contracts").RouteVisibility;
|
|
96
|
+
};
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineApiContract } from '@lokalise/api-contracts';
|
|
2
|
+
import z from 'zod/v4';
|
|
3
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
4
|
+
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, userTokenRequiredErrorDefinition, } from '../../errors/index.js';
|
|
5
|
+
import { OpenApiTags } from '../../open-api-tags.js';
|
|
6
|
+
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
7
|
+
import { COMMENT_SEARCH_FILTERS_SCHEMA, COMMENT_SEARCH_PATH_PARAMS_SCHEMA, } from './comment-search-common.js';
|
|
8
|
+
const POST_COUNT_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(COMMENT_SEARCH_FILTERS_SCHEMA);
|
|
9
|
+
const POST_COUNT_COMMENTS_RESPONSE_BODY_SCHEMA = z.compile(z.object({
|
|
10
|
+
total: z.int().nonnegative().describe('Threads matching the filters'),
|
|
11
|
+
unread: z
|
|
12
|
+
.int()
|
|
13
|
+
.nonnegative()
|
|
14
|
+
.describe('Open threads matching the filters and unread for the user'),
|
|
15
|
+
}));
|
|
16
|
+
export const postCountCommentsContract = defineApiContract({
|
|
17
|
+
method: 'post',
|
|
18
|
+
visibility: 'internal',
|
|
19
|
+
metadata: acceptCallers(CallerEnum.USER),
|
|
20
|
+
summary: 'Count comments',
|
|
21
|
+
description: "Counts the project's threads matching the filters, and how many of them are " +
|
|
22
|
+
'open and unread for the user.',
|
|
23
|
+
tags: [OpenApiTags.Comments.name],
|
|
24
|
+
requestHeaderSchema: AUTH_HEADERS,
|
|
25
|
+
requestPathParamsSchema: COMMENT_SEARCH_PATH_PARAMS_SCHEMA,
|
|
26
|
+
requestBodySchema: POST_COUNT_COMMENTS_REQUEST_BODY_SCHEMA,
|
|
27
|
+
pathResolver: ({ teamId }) => `/v1/teams/${teamId}/comments/actions/count`,
|
|
28
|
+
responsesByStatusCode: {
|
|
29
|
+
200: POST_COUNT_COMMENTS_RESPONSE_BODY_SCHEMA,
|
|
30
|
+
400: ERROR_RESPONSE_SCHEMA,
|
|
31
|
+
401: ERROR_RESPONSE_SCHEMA,
|
|
32
|
+
403: z.union([teamAccessDeniedErrorDefinition.schema, userTokenRequiredErrorDefinition.schema]),
|
|
33
|
+
404: resourceNotFoundErrorDefinition.schema,
|
|
34
|
+
500: ERROR_RESPONSE_SCHEMA,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=post-comments-actions-count.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-comments-actions-count.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/post-comments-actions-count.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,EAC/B,gCAAgC,GACjC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,GAElC,MAAM,4BAA4B,CAAA;AAOnC,MAAM,uCAAuC,GAAG,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAA;AAGxF,MAAM,wCAAwC,GAAG,CAAC,CAAC,OAAO,CACxD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACrE,MAAM,EAAE,CAAC;SACN,GAAG,EAAE;SACL,WAAW,EAAE;SACb,QAAQ,CAAC,2DAA2D,CAAC;CACzE,CAAC,CACH,CAAA;AAGD,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACzD,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC;IACxC,OAAO,EAAE,gBAAgB;IACzB,WAAW,EACT,8EAA8E;QAC9E,+BAA+B;IACjC,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,iCAAiC;IAC1D,iBAAiB,EAAE,uCAAuC;IAC1D,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,yBAAyB;IAC1E,qBAAqB,EAAE;QACrB,GAAG,EAAE,wCAAwC;QAC7C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,+BAA+B,CAAC,MAAM,EAAE,gCAAgC,CAAC,MAAM,CAAC,CAAC;QAC/F,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import z from 'zod/v4';
|
|
2
|
+
import { type CommentSearchPathParams } from './comment-search-common.ts';
|
|
3
|
+
export type PostSearchGroupedCommentsPathParams = CommentSearchPathParams;
|
|
4
|
+
export declare const COMMENT_GROUPED_SEARCH_CURSOR_SCHEMA: z.ZodObject<{
|
|
5
|
+
lastActivityAt: z.ZodISODateTime;
|
|
6
|
+
id: z.ZodGUID;
|
|
7
|
+
groupActivityAt: z.ZodISODateTime;
|
|
8
|
+
groupKey: z.ZodGUID;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type CommentGroupedSearchCursor = z.infer<typeof COMMENT_GROUPED_SEARCH_CURSOR_SCHEMA>;
|
|
11
|
+
export declare const POST_SEARCH_GROUPED_COMMENTS_QUERY_SCHEMA: z.ZodObject<{
|
|
12
|
+
before: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<z.ZodObject<{
|
|
13
|
+
lastActivityAt: z.ZodISODateTime;
|
|
14
|
+
id: z.ZodGUID;
|
|
15
|
+
groupActivityAt: z.ZodISODateTime;
|
|
16
|
+
groupKey: z.ZodGUID;
|
|
17
|
+
}, z.core.$strip>>>>;
|
|
18
|
+
after: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<z.ZodObject<{
|
|
19
|
+
lastActivityAt: z.ZodISODateTime;
|
|
20
|
+
id: z.ZodGUID;
|
|
21
|
+
groupActivityAt: z.ZodISODateTime;
|
|
22
|
+
groupKey: z.ZodGUID;
|
|
23
|
+
}, z.core.$strip>>>>;
|
|
24
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type PostSearchGroupedCommentsQuery = z.infer<typeof POST_SEARCH_GROUPED_COMMENTS_QUERY_SCHEMA>;
|
|
27
|
+
export type PostSearchGroupedCommentsQueryInput = z.input<typeof POST_SEARCH_GROUPED_COMMENTS_QUERY_SCHEMA>;
|
|
28
|
+
export declare const CommentGroupByEnum: {
|
|
29
|
+
readonly ENTITY: 'ENTITY';
|
|
30
|
+
};
|
|
31
|
+
export type CommentGroupBy = (typeof CommentGroupByEnum)[keyof typeof CommentGroupByEnum];
|
|
32
|
+
declare const POST_SEARCH_GROUPED_COMMENTS_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
33
|
+
projectId: z.ZodGUID;
|
|
34
|
+
entityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
35
|
+
readonly SEGMENT: 'SEGMENT';
|
|
36
|
+
}>>>;
|
|
37
|
+
entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
38
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
mentionsMe: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
createdBy: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
41
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
readonly OPEN: 'OPEN';
|
|
44
|
+
readonly RESOLVED: 'RESOLVED';
|
|
45
|
+
}>>;
|
|
46
|
+
groupBy: z.ZodEnum<{
|
|
47
|
+
readonly ENTITY: 'ENTITY';
|
|
48
|
+
}>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type PostSearchGroupedCommentsRequestBody = z.input<typeof POST_SEARCH_GROUPED_COMMENTS_REQUEST_BODY_SCHEMA>;
|
|
51
|
+
export declare const COMMENT_GROUP_KEY_SCHEMA: z.ZodObject<{
|
|
52
|
+
entityId: z.ZodGUID;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type CommentGroupKey = z.infer<typeof COMMENT_GROUP_KEY_SCHEMA>;
|
|
55
|
+
export declare const COMMENTS_GROUP_SCHEMA: z.ZodObject<{
|
|
56
|
+
key: z.ZodObject<{
|
|
57
|
+
entityId: z.ZodGUID;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
total: z.ZodInt;
|
|
60
|
+
unread: z.ZodInt;
|
|
61
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
62
|
+
id: z.ZodGUID;
|
|
63
|
+
teamId: z.ZodGUID;
|
|
64
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
65
|
+
entityType: z.ZodEnum<{
|
|
66
|
+
readonly SEGMENT: 'SEGMENT';
|
|
67
|
+
}>;
|
|
68
|
+
entityId: z.ZodGUID;
|
|
69
|
+
status: z.ZodEnum<{
|
|
70
|
+
readonly OPEN: 'OPEN';
|
|
71
|
+
readonly RESOLVED: 'RESOLVED';
|
|
72
|
+
}>;
|
|
73
|
+
message: z.ZodObject<{
|
|
74
|
+
version: z.ZodLiteral<1>;
|
|
75
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
76
|
+
type: z.ZodLiteral<"paragraph">;
|
|
77
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
78
|
+
type: z.ZodLiteral<"text">;
|
|
79
|
+
text: z.ZodString;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<"userMention">;
|
|
82
|
+
userId: z.ZodGUID;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<"link">;
|
|
85
|
+
href: z.ZodURL;
|
|
86
|
+
text: z.ZodString;
|
|
87
|
+
}, z.core.$strip>], "type">>;
|
|
88
|
+
}, z.core.$strip>], "type">>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
91
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
92
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
93
|
+
replyCount: z.ZodInt;
|
|
94
|
+
lastActivityAt: z.ZodISODateTime;
|
|
95
|
+
createdBy: z.ZodGUID;
|
|
96
|
+
createdAt: z.ZodISODateTime;
|
|
97
|
+
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
98
|
+
subscribed: z.ZodBoolean;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
export type CommentsGroup = z.infer<typeof COMMENTS_GROUP_SCHEMA>;
|
|
102
|
+
declare const POST_SEARCH_GROUPED_COMMENTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
103
|
+
data: z.ZodArray<z.ZodObject<{
|
|
104
|
+
key: z.ZodObject<{
|
|
105
|
+
entityId: z.ZodGUID;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
total: z.ZodInt;
|
|
108
|
+
unread: z.ZodInt;
|
|
109
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
110
|
+
id: z.ZodGUID;
|
|
111
|
+
teamId: z.ZodGUID;
|
|
112
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
113
|
+
entityType: z.ZodEnum<{
|
|
114
|
+
readonly SEGMENT: 'SEGMENT';
|
|
115
|
+
}>;
|
|
116
|
+
entityId: z.ZodGUID;
|
|
117
|
+
status: z.ZodEnum<{
|
|
118
|
+
readonly OPEN: 'OPEN';
|
|
119
|
+
readonly RESOLVED: 'RESOLVED';
|
|
120
|
+
}>;
|
|
121
|
+
message: z.ZodObject<{
|
|
122
|
+
version: z.ZodLiteral<1>;
|
|
123
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
124
|
+
type: z.ZodLiteral<"paragraph">;
|
|
125
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
126
|
+
type: z.ZodLiteral<"text">;
|
|
127
|
+
text: z.ZodString;
|
|
128
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
+
type: z.ZodLiteral<"userMention">;
|
|
130
|
+
userId: z.ZodGUID;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
type: z.ZodLiteral<"link">;
|
|
133
|
+
href: z.ZodURL;
|
|
134
|
+
text: z.ZodString;
|
|
135
|
+
}, z.core.$strip>], "type">>;
|
|
136
|
+
}, z.core.$strip>], "type">>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
139
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
140
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
141
|
+
replyCount: z.ZodInt;
|
|
142
|
+
lastActivityAt: z.ZodISODateTime;
|
|
143
|
+
createdBy: z.ZodGUID;
|
|
144
|
+
createdAt: z.ZodISODateTime;
|
|
145
|
+
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
146
|
+
subscribed: z.ZodBoolean;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
meta: z.ZodObject<{
|
|
150
|
+
count: z.ZodInt;
|
|
151
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
152
|
+
hasMore: z.ZodBoolean;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
export type PostSearchGroupedCommentsResponseBody = z.infer<typeof POST_SEARCH_GROUPED_COMMENTS_RESPONSE_BODY_SCHEMA>;
|
|
156
|
+
export declare const postSearchGroupedCommentsContract: Omit<{
|
|
157
|
+
readonly method: "post";
|
|
158
|
+
readonly visibility: "internal";
|
|
159
|
+
readonly metadata: import("../../callers.ts").CallerMetadata;
|
|
160
|
+
readonly summary: "Search comments grouped";
|
|
161
|
+
readonly description: string;
|
|
162
|
+
readonly tags: readonly ["Comments"];
|
|
163
|
+
readonly requestHeaderSchema: z.ZodObject<{
|
|
164
|
+
authorization: z.ZodString;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
readonly requestPathParamsSchema: z.ZodObject<{
|
|
167
|
+
teamId: z.ZodGUID;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
readonly requestQuerySchema: z.ZodObject<{
|
|
170
|
+
before: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<z.ZodObject<{
|
|
171
|
+
lastActivityAt: z.ZodISODateTime;
|
|
172
|
+
id: z.ZodGUID;
|
|
173
|
+
groupActivityAt: z.ZodISODateTime;
|
|
174
|
+
groupKey: z.ZodGUID;
|
|
175
|
+
}, z.core.$strip>>>>;
|
|
176
|
+
after: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<z.ZodObject<{
|
|
177
|
+
lastActivityAt: z.ZodISODateTime;
|
|
178
|
+
id: z.ZodGUID;
|
|
179
|
+
groupActivityAt: z.ZodISODateTime;
|
|
180
|
+
groupKey: z.ZodGUID;
|
|
181
|
+
}, z.core.$strip>>>>;
|
|
182
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
readonly requestBodySchema: z.ZodObject<{
|
|
185
|
+
projectId: z.ZodGUID;
|
|
186
|
+
entityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
187
|
+
readonly SEGMENT: 'SEGMENT';
|
|
188
|
+
}>>>;
|
|
189
|
+
entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
190
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
+
mentionsMe: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
createdBy: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
193
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
194
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
195
|
+
readonly OPEN: 'OPEN';
|
|
196
|
+
readonly RESOLVED: 'RESOLVED';
|
|
197
|
+
}>>;
|
|
198
|
+
groupBy: z.ZodEnum<{
|
|
199
|
+
readonly ENTITY: 'ENTITY';
|
|
200
|
+
}>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
readonly pathResolver: ({ teamId }: {
|
|
203
|
+
teamId: string;
|
|
204
|
+
}) => `/v1/teams/${string}/comments/actions/search-grouped`;
|
|
205
|
+
readonly responsesByStatusCode: {
|
|
206
|
+
200: z.ZodObject<{
|
|
207
|
+
data: z.ZodArray<z.ZodObject<{
|
|
208
|
+
key: z.ZodObject<{
|
|
209
|
+
entityId: z.ZodGUID;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
total: z.ZodInt;
|
|
212
|
+
unread: z.ZodInt;
|
|
213
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
214
|
+
id: z.ZodGUID;
|
|
215
|
+
teamId: z.ZodGUID;
|
|
216
|
+
projectId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
217
|
+
entityType: z.ZodEnum<{
|
|
218
|
+
readonly SEGMENT: 'SEGMENT';
|
|
219
|
+
}>;
|
|
220
|
+
entityId: z.ZodGUID;
|
|
221
|
+
status: z.ZodEnum<{
|
|
222
|
+
readonly OPEN: 'OPEN';
|
|
223
|
+
readonly RESOLVED: 'RESOLVED';
|
|
224
|
+
}>;
|
|
225
|
+
message: z.ZodObject<{
|
|
226
|
+
version: z.ZodLiteral<1>;
|
|
227
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
228
|
+
type: z.ZodLiteral<"paragraph">;
|
|
229
|
+
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
230
|
+
type: z.ZodLiteral<"text">;
|
|
231
|
+
text: z.ZodString;
|
|
232
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
+
type: z.ZodLiteral<"userMention">;
|
|
234
|
+
userId: z.ZodGUID;
|
|
235
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
236
|
+
type: z.ZodLiteral<"link">;
|
|
237
|
+
href: z.ZodURL;
|
|
238
|
+
text: z.ZodString;
|
|
239
|
+
}, z.core.$strip>], "type">>;
|
|
240
|
+
}, z.core.$strip>], "type">>;
|
|
241
|
+
}, z.core.$strip>;
|
|
242
|
+
messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
243
|
+
resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
|
|
244
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
245
|
+
replyCount: z.ZodInt;
|
|
246
|
+
lastActivityAt: z.ZodISODateTime;
|
|
247
|
+
createdBy: z.ZodGUID;
|
|
248
|
+
createdAt: z.ZodISODateTime;
|
|
249
|
+
lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
250
|
+
subscribed: z.ZodBoolean;
|
|
251
|
+
}, z.core.$strip>>;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
meta: z.ZodObject<{
|
|
254
|
+
count: z.ZodInt;
|
|
255
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
256
|
+
hasMore: z.ZodBoolean;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
400: z.ZodObject<{
|
|
260
|
+
message: z.ZodString;
|
|
261
|
+
code: z.ZodString;
|
|
262
|
+
errorCode: z.ZodString;
|
|
263
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
401: z.ZodObject<{
|
|
266
|
+
message: z.ZodString;
|
|
267
|
+
code: z.ZodString;
|
|
268
|
+
errorCode: z.ZodString;
|
|
269
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
403: z.ZodUnion<readonly [z.ZodObject<{
|
|
272
|
+
message: z.ZodString;
|
|
273
|
+
code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
|
|
274
|
+
errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
message: z.ZodString;
|
|
277
|
+
code: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
278
|
+
errorCode: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
279
|
+
}, z.core.$strip>]>;
|
|
280
|
+
404: z.ZodObject<{
|
|
281
|
+
message: z.ZodString;
|
|
282
|
+
code: z.ZodLiteral<"RESOURCE_NOT_FOUND">;
|
|
283
|
+
errorCode: z.ZodLiteral<"RESOURCE_NOT_FOUND">;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
500: z.ZodObject<{
|
|
286
|
+
message: z.ZodString;
|
|
287
|
+
code: z.ZodString;
|
|
288
|
+
errorCode: z.ZodString;
|
|
289
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
};
|
|
292
|
+
}, "visibility"> & {
|
|
293
|
+
visibility: import("@lokalise/api-contracts").RouteVisibility;
|
|
294
|
+
};
|
|
295
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineApiContract } from '@lokalise/api-contracts';
|
|
2
|
+
import z from 'zod/v4';
|
|
3
|
+
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
4
|
+
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, userTokenRequiredErrorDefinition, } from '../../errors/index.js';
|
|
5
|
+
import { COMMENT_WITH_USER_STATE_SCHEMA } from '../../objects/comment.js';
|
|
6
|
+
import { OpenApiTags } from '../../open-api-tags.js';
|
|
7
|
+
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
8
|
+
import { buildCommentSearchPaginationSchema, COMMENT_SEARCH_FILTERS_SCHEMA, COMMENT_SEARCH_PATH_PARAMS_SCHEMA, } from './comment-search-common.js';
|
|
9
|
+
import { COMMENT_SEARCH_CURSOR_SCHEMA } from './post-comments-actions-search.js';
|
|
10
|
+
export const COMMENT_GROUPED_SEARCH_CURSOR_SCHEMA = COMMENT_SEARCH_CURSOR_SCHEMA.extend({
|
|
11
|
+
groupActivityAt: z.iso.datetime(),
|
|
12
|
+
groupKey: z.guid(),
|
|
13
|
+
});
|
|
14
|
+
export const POST_SEARCH_GROUPED_COMMENTS_QUERY_SCHEMA = z.compile(buildCommentSearchPaginationSchema(COMMENT_GROUPED_SEARCH_CURSOR_SCHEMA));
|
|
15
|
+
export const CommentGroupByEnum = {
|
|
16
|
+
ENTITY: 'ENTITY',
|
|
17
|
+
};
|
|
18
|
+
const POST_SEARCH_GROUPED_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(COMMENT_SEARCH_FILTERS_SCHEMA.extend({
|
|
19
|
+
groupBy: z
|
|
20
|
+
.enum(CommentGroupByEnum)
|
|
21
|
+
.describe('What the threads are grouped by. `ENTITY`: the commented entity'),
|
|
22
|
+
}));
|
|
23
|
+
export const COMMENT_GROUP_KEY_SCHEMA = z
|
|
24
|
+
.object({
|
|
25
|
+
entityId: z.guid().describe('Id of the commented entity'),
|
|
26
|
+
})
|
|
27
|
+
.describe('Fields that identify the group');
|
|
28
|
+
export const COMMENTS_GROUP_SCHEMA = z
|
|
29
|
+
.object({
|
|
30
|
+
key: COMMENT_GROUP_KEY_SCHEMA,
|
|
31
|
+
total: z.int().nonnegative().describe('Threads of the group matching the filters'),
|
|
32
|
+
unread: z
|
|
33
|
+
.int()
|
|
34
|
+
.nonnegative()
|
|
35
|
+
.describe('Open threads of the group matching the filters and unread for the user'),
|
|
36
|
+
comments: z
|
|
37
|
+
.array(COMMENT_WITH_USER_STATE_SCHEMA)
|
|
38
|
+
.describe('Threads of the group on this page, newest first. A group can continue on the next page'),
|
|
39
|
+
})
|
|
40
|
+
.describe('A group of threads');
|
|
41
|
+
const POST_SEARCH_GROUPED_COMMENTS_RESPONSE_BODY_SCHEMA = z.compile(z.object({
|
|
42
|
+
data: z.array(COMMENTS_GROUP_SCHEMA).describe('Groups in group order'),
|
|
43
|
+
meta: z.object({
|
|
44
|
+
count: z.int().nonnegative().describe('Threads on the page, across all groups'),
|
|
45
|
+
cursor: z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Opaque cursor for the next page in the direction of the request'),
|
|
49
|
+
hasMore: z
|
|
50
|
+
.boolean()
|
|
51
|
+
.describe('Whether there are more threads in the direction of the request'),
|
|
52
|
+
}),
|
|
53
|
+
}));
|
|
54
|
+
export const postSearchGroupedCommentsContract = defineApiContract({
|
|
55
|
+
method: 'post',
|
|
56
|
+
visibility: 'internal',
|
|
57
|
+
metadata: acceptCallers(CallerEnum.USER),
|
|
58
|
+
summary: 'Search comments grouped',
|
|
59
|
+
description: "Lists the project's threads matching the filters, grouped, one page at a time. " +
|
|
60
|
+
'Groups are ordered by their newest matching activity, threads in a group newest first. ' +
|
|
61
|
+
'`limit` counts threads, so a group can be cut at a page end and continue on the next page. ' +
|
|
62
|
+
"Each group's `total` and `unread` cover the whole group.",
|
|
63
|
+
tags: [OpenApiTags.Comments.name],
|
|
64
|
+
requestHeaderSchema: AUTH_HEADERS,
|
|
65
|
+
requestPathParamsSchema: COMMENT_SEARCH_PATH_PARAMS_SCHEMA,
|
|
66
|
+
requestQuerySchema: POST_SEARCH_GROUPED_COMMENTS_QUERY_SCHEMA,
|
|
67
|
+
requestBodySchema: POST_SEARCH_GROUPED_COMMENTS_REQUEST_BODY_SCHEMA,
|
|
68
|
+
pathResolver: ({ teamId }) => `/v1/teams/${teamId}/comments/actions/search-grouped`,
|
|
69
|
+
responsesByStatusCode: {
|
|
70
|
+
200: POST_SEARCH_GROUPED_COMMENTS_RESPONSE_BODY_SCHEMA,
|
|
71
|
+
400: ERROR_RESPONSE_SCHEMA,
|
|
72
|
+
401: ERROR_RESPONSE_SCHEMA,
|
|
73
|
+
403: z.union([teamAccessDeniedErrorDefinition.schema, userTokenRequiredErrorDefinition.schema]),
|
|
74
|
+
404: resourceNotFoundErrorDefinition.schema,
|
|
75
|
+
500: ERROR_RESPONSE_SCHEMA,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=post-comments-actions-search-grouped.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-comments-actions-search-grouped.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/post-comments-actions-search-grouped.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { type CommentSearchPathParams } from './comment-search-common.ts';
|
|
3
|
+
export type PostSearchCommentsPathParams = CommentSearchPathParams;
|
|
4
|
+
export declare const COMMENT_SEARCH_CURSOR_SCHEMA: z.ZodObject<{
|
|
5
|
+
lastActivityAt: z.ZodISODateTime;
|
|
6
|
+
id: z.ZodGUID;
|
|
4
7
|
}, z.core.$strip>;
|
|
5
|
-
export type
|
|
8
|
+
export type CommentSearchCursor = z.infer<typeof COMMENT_SEARCH_CURSOR_SCHEMA>;
|
|
6
9
|
export declare const POST_SEARCH_COMMENTS_QUERY_SCHEMA: z.ZodObject<{
|
|
10
|
+
before: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<z.ZodObject<{
|
|
11
|
+
lastActivityAt: z.ZodISODateTime;
|
|
12
|
+
id: z.ZodGUID;
|
|
13
|
+
}, z.core.$strip>>>>;
|
|
14
|
+
after: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<z.ZodObject<{
|
|
15
|
+
lastActivityAt: z.ZodISODateTime;
|
|
16
|
+
id: z.ZodGUID;
|
|
17
|
+
}, z.core.$strip>>>>;
|
|
7
18
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
8
|
-
after: z.ZodOptional<z.ZodGUID>;
|
|
9
19
|
}, z.core.$strip>;
|
|
10
20
|
export type PostSearchCommentsQuery = z.infer<typeof POST_SEARCH_COMMENTS_QUERY_SCHEMA>;
|
|
21
|
+
export type PostSearchCommentsQueryInput = z.input<typeof POST_SEARCH_COMMENTS_QUERY_SCHEMA>;
|
|
11
22
|
declare const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
12
23
|
projectId: z.ZodGUID;
|
|
13
|
-
entityTypes: z.ZodArray<z.ZodEnum<{
|
|
24
|
+
entityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
14
25
|
readonly SEGMENT: 'SEGMENT';
|
|
15
|
-
}
|
|
26
|
+
}>>>;
|
|
16
27
|
entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
28
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
mentionsMe: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
createdBy: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
31
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
readonly OPEN: 'OPEN';
|
|
34
|
+
readonly RESOLVED: 'RESOLVED';
|
|
35
|
+
}>>;
|
|
17
36
|
}, z.core.$strip>;
|
|
18
|
-
export type PostSearchCommentsRequestBody = z.
|
|
37
|
+
export type PostSearchCommentsRequestBody = z.input<typeof POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA>;
|
|
19
38
|
declare const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
20
39
|
data: z.ZodArray<z.ZodObject<{
|
|
21
40
|
id: z.ZodGUID;
|
|
@@ -77,15 +96,30 @@ export declare const postSearchCommentsContract: Omit<{
|
|
|
77
96
|
teamId: z.ZodGUID;
|
|
78
97
|
}, z.core.$strip>;
|
|
79
98
|
readonly requestQuerySchema: z.ZodObject<{
|
|
99
|
+
before: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<z.ZodObject<{
|
|
100
|
+
lastActivityAt: z.ZodISODateTime;
|
|
101
|
+
id: z.ZodGUID;
|
|
102
|
+
}, z.core.$strip>>>>;
|
|
103
|
+
after: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<Record<string, unknown> | undefined, string>>, z.ZodOptional<z.ZodObject<{
|
|
104
|
+
lastActivityAt: z.ZodISODateTime;
|
|
105
|
+
id: z.ZodGUID;
|
|
106
|
+
}, z.core.$strip>>>>;
|
|
80
107
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
81
|
-
after: z.ZodOptional<z.ZodGUID>;
|
|
82
108
|
}, z.core.$strip>;
|
|
83
109
|
readonly requestBodySchema: z.ZodObject<{
|
|
84
110
|
projectId: z.ZodGUID;
|
|
85
|
-
entityTypes: z.ZodArray<z.ZodEnum<{
|
|
111
|
+
entityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
86
112
|
readonly SEGMENT: 'SEGMENT';
|
|
87
|
-
}
|
|
113
|
+
}>>>;
|
|
88
114
|
entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
115
|
+
unreadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
+
mentionsMe: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
createdBy: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
|
|
118
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
119
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
readonly OPEN: 'OPEN';
|
|
121
|
+
readonly RESOLVED: 'RESOLVED';
|
|
122
|
+
}>>;
|
|
89
123
|
}, z.core.$strip>;
|
|
90
124
|
readonly pathResolver: ({ teamId }: {
|
|
91
125
|
teamId: string;
|
|
@@ -149,11 +183,15 @@ export declare const postSearchCommentsContract: Omit<{
|
|
|
149
183
|
errorCode: z.ZodString;
|
|
150
184
|
details: z.ZodOptional<z.ZodUnknown>;
|
|
151
185
|
}, z.core.$strip>;
|
|
152
|
-
403: z.ZodObject<{
|
|
186
|
+
403: z.ZodUnion<readonly [z.ZodObject<{
|
|
153
187
|
message: z.ZodString;
|
|
154
188
|
code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
|
|
155
189
|
errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
|
|
156
|
-
}, z.core.$strip
|
|
190
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
191
|
+
message: z.ZodString;
|
|
192
|
+
code: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
193
|
+
errorCode: z.ZodLiteral<"USER_TOKEN_REQUIRED">;
|
|
194
|
+
}, z.core.$strip>]>;
|
|
157
195
|
404: z.ZodObject<{
|
|
158
196
|
message: z.ZodString;
|
|
159
197
|
code: z.ZodLiteral<"RESOURCE_NOT_FOUND">;
|
|
@@ -2,56 +2,29 @@ import { paginatedResponseSchema } from '@lokalise/api-common';
|
|
|
2
2
|
import { defineApiContract } from '@lokalise/api-contracts';
|
|
3
3
|
import z from 'zod/v4';
|
|
4
4
|
import { acceptCallers, CallerEnum } from '../../callers.js';
|
|
5
|
-
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
|
|
6
|
-
import { COMMENT_WITH_USER_STATE_SCHEMA
|
|
5
|
+
import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, userTokenRequiredErrorDefinition, } from '../../errors/index.js';
|
|
6
|
+
import { COMMENT_WITH_USER_STATE_SCHEMA } from '../../objects/comment.js';
|
|
7
7
|
import { OpenApiTags } from '../../open-api-tags.js';
|
|
8
8
|
import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const COMMENTS_MAX_LIMIT = 100;
|
|
17
|
-
export const POST_SEARCH_COMMENTS_QUERY_SCHEMA = z.compile(z.object({
|
|
18
|
-
limit: z.coerce
|
|
19
|
-
.number()
|
|
20
|
-
.int()
|
|
21
|
-
.min(1)
|
|
22
|
-
.max(COMMENTS_MAX_LIMIT)
|
|
23
|
-
.default(COMMENTS_DEFAULT_LIMIT)
|
|
24
|
-
.describe('Number of comments to return per page'),
|
|
25
|
-
after: z
|
|
26
|
-
.guid()
|
|
27
|
-
.optional()
|
|
28
|
-
.describe('Cursor from the previous response `meta.cursor`. Omit to read the first page'),
|
|
29
|
-
}));
|
|
30
|
-
const COMMENTS_MAX_FILTER_IDS = 100;
|
|
31
|
-
const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
32
|
-
projectId: z.guid().describe('Only comments for this project'),
|
|
33
|
-
entityTypes: z
|
|
34
|
-
.array(z.enum(CommentEntityTypeEnum))
|
|
35
|
-
.min(1)
|
|
36
|
-
.describe('Types of the commented entities'),
|
|
37
|
-
entityIds: z
|
|
38
|
-
.array(z.guid())
|
|
39
|
-
.min(1)
|
|
40
|
-
.max(COMMENTS_MAX_FILTER_IDS)
|
|
41
|
-
.optional()
|
|
42
|
-
.describe('Ids of the commented entities'),
|
|
43
|
-
}));
|
|
9
|
+
import { buildCommentSearchPaginationSchema, COMMENT_SEARCH_FILTERS_SCHEMA, COMMENT_SEARCH_PATH_PARAMS_SCHEMA, } from './comment-search-common.js';
|
|
10
|
+
export const COMMENT_SEARCH_CURSOR_SCHEMA = z.object({
|
|
11
|
+
lastActivityAt: z.iso.datetime(),
|
|
12
|
+
id: z.guid(),
|
|
13
|
+
});
|
|
14
|
+
export const POST_SEARCH_COMMENTS_QUERY_SCHEMA = z.compile(buildCommentSearchPaginationSchema(COMMENT_SEARCH_CURSOR_SCHEMA));
|
|
15
|
+
const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(COMMENT_SEARCH_FILTERS_SCHEMA);
|
|
44
16
|
const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA = paginatedResponseSchema(COMMENT_WITH_USER_STATE_SCHEMA);
|
|
45
17
|
export const postSearchCommentsContract = defineApiContract({
|
|
46
18
|
method: 'post',
|
|
47
19
|
visibility: 'internal',
|
|
48
|
-
metadata: acceptCallers(CallerEnum.USER
|
|
20
|
+
metadata: acceptCallers(CallerEnum.USER),
|
|
49
21
|
summary: 'Search comments',
|
|
50
|
-
description:
|
|
51
|
-
'Pass `meta.cursor`
|
|
22
|
+
description: "Lists the project's threads (root comments) matching the filters one page at a time, newest " +
|
|
23
|
+
'activity first. Pass `meta.cursor` back as `after` after an `after` request (or a first ' +
|
|
24
|
+
'page), and as `before` after a `before` request.',
|
|
52
25
|
tags: [OpenApiTags.Comments.name],
|
|
53
26
|
requestHeaderSchema: AUTH_HEADERS,
|
|
54
|
-
requestPathParamsSchema:
|
|
27
|
+
requestPathParamsSchema: COMMENT_SEARCH_PATH_PARAMS_SCHEMA,
|
|
55
28
|
requestQuerySchema: POST_SEARCH_COMMENTS_QUERY_SCHEMA,
|
|
56
29
|
requestBodySchema: POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA,
|
|
57
30
|
pathResolver: ({ teamId }) => `/v1/teams/${teamId}/comments/actions/search`,
|
|
@@ -59,7 +32,7 @@ export const postSearchCommentsContract = defineApiContract({
|
|
|
59
32
|
200: POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA,
|
|
60
33
|
400: ERROR_RESPONSE_SCHEMA,
|
|
61
34
|
401: ERROR_RESPONSE_SCHEMA,
|
|
62
|
-
403: teamAccessDeniedErrorDefinition.schema,
|
|
35
|
+
403: z.union([teamAccessDeniedErrorDefinition.schema, userTokenRequiredErrorDefinition.schema]),
|
|
63
36
|
404: resourceNotFoundErrorDefinition.schema,
|
|
64
37
|
500: ERROR_RESPONSE_SCHEMA,
|
|
65
38
|
},
|
|
@@ -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,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,
|
|
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,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,GACjC,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;AAClE,OAAO,EACL,kCAAkC,EAClC,6BAA6B,EAC7B,iCAAiC,GAElC,MAAM,4BAA4B,CAAA;AAOnC,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,cAAc,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAChC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;CACb,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,OAAO,CACxD,kCAAkC,CAAC,4BAA4B,CAAC,CACjE,CAAA;AAID,MAAM,wCAAwC,GAAG,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAA;AAGzF,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,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC;IACxC,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EACT,8FAA8F;QAC9F,0FAA0F;QAC1F,kDAAkD;IACpD,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,iCAAiC;IAC1D,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,CAAC,CAAC,KAAK,CAAC,CAAC,+BAA+B,CAAC,MAAM,EAAE,gCAAgC,CAAC,MAAM,CAAC,CAAC;QAC/F,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './comments/comment-search-common.ts';
|
|
1
2
|
export * from './comments/delete-comment.ts';
|
|
2
3
|
export * from './comments/delete-comment-reply.ts';
|
|
3
4
|
export * from './comments/get-comment.ts';
|
|
@@ -7,6 +8,8 @@ export * from './comments/patch-comment.ts';
|
|
|
7
8
|
export * from './comments/patch-comment-reply.ts';
|
|
8
9
|
export * from './comments/post-comment.ts';
|
|
9
10
|
export * from './comments/post-comment-reply.ts';
|
|
11
|
+
export * from './comments/post-comments-actions-count.ts';
|
|
10
12
|
export * from './comments/post-comments-actions-search.ts';
|
|
13
|
+
export * from './comments/post-comments-actions-search-grouped.ts';
|
|
11
14
|
export * from './comments/put-comment-read-state.ts';
|
|
12
15
|
export * from './comments/put-comment-subscription.ts';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './comments/comment-search-common.js';
|
|
1
2
|
export * from './comments/delete-comment.js';
|
|
2
3
|
export * from './comments/delete-comment-reply.js';
|
|
3
4
|
export * from './comments/get-comment.js';
|
|
@@ -7,7 +8,9 @@ export * from './comments/patch-comment.js';
|
|
|
7
8
|
export * from './comments/patch-comment-reply.js';
|
|
8
9
|
export * from './comments/post-comment.js';
|
|
9
10
|
export * from './comments/post-comment-reply.js';
|
|
11
|
+
export * from './comments/post-comments-actions-count.js';
|
|
10
12
|
export * from './comments/post-comments-actions-search.js';
|
|
13
|
+
export * from './comments/post-comments-actions-search-grouped.js';
|
|
11
14
|
export * from './comments/put-comment-read-state.js';
|
|
12
15
|
export * from './comments/put-comment-subscription.js';
|
|
13
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mCAAmC,CAAA;AACjD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mCAAmC,CAAA;AACjD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,sCAAsC,CAAA;AACpD,cAAc,wCAAwC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mCAAmC,CAAA;AACjD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mCAAmC,CAAA;AACjD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,2CAA2C,CAAA;AACzD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,oDAAoD,CAAA;AAClE,cAAc,sCAAsC,CAAA;AACpD,cAAc,wCAAwC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/chatter-api-contracts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "API contracts for chatter",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@lokalise/errors": "^2.2.0",
|
|
34
34
|
"@lokalise/tsconfig": "^5.0.0",
|
|
35
35
|
"@lokalise/zod-extras": "^3.0.2",
|
|
36
|
-
"@types/node": "^26.6.
|
|
36
|
+
"@types/node": "^26.6.10",
|
|
37
37
|
"typescript": "7.0.2",
|
|
38
|
-
"vitest": "^5.1.
|
|
38
|
+
"vitest": "^5.1.2",
|
|
39
39
|
"zod": "^4.6.7"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|