@lokalise/chatter-api-contracts 0.0.0-stage → 0.0.0

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.
Files changed (59) hide show
  1. package/README.md +18 -2
  2. package/dist/api/contracts/comments/delete-comment-reply.d.ts +63 -0
  3. package/dist/api/contracts/comments/delete-comment-reply.js +31 -0
  4. package/dist/api/contracts/comments/delete-comment-reply.js.map +1 -0
  5. package/dist/api/contracts/comments/delete-comment.d.ts +60 -0
  6. package/dist/api/contracts/comments/delete-comment.js +30 -0
  7. package/dist/api/contracts/comments/delete-comment.js.map +1 -0
  8. package/dist/api/contracts/comments/get-comment-replies.d.ts +138 -0
  9. package/dist/api/contracts/comments/get-comment-replies.js +60 -0
  10. package/dist/api/contracts/comments/get-comment-replies.js.map +1 -0
  11. package/dist/api/contracts/comments/get-comments.d.ts +71 -0
  12. package/dist/api/contracts/comments/get-comments.js +39 -0
  13. package/dist/api/contracts/comments/get-comments.js.map +1 -0
  14. package/dist/api/contracts/comments/patch-comment-reply.d.ts +154 -0
  15. package/dist/api/contracts/comments/patch-comment-reply.js +40 -0
  16. package/dist/api/contracts/comments/patch-comment-reply.js.map +1 -0
  17. package/dist/api/contracts/comments/patch-comment.d.ts +189 -0
  18. package/dist/api/contracts/comments/patch-comment.js +48 -0
  19. package/dist/api/contracts/comments/patch-comment.js.map +1 -0
  20. package/dist/api/contracts/comments/post-comment-reply.d.ts +151 -0
  21. package/dist/api/contracts/comments/post-comment-reply.js +39 -0
  22. package/dist/api/contracts/comments/post-comment-reply.js.map +1 -0
  23. package/dist/api/contracts/comments/post-comment.d.ts +178 -0
  24. package/dist/api/contracts/comments/post-comment.js +47 -0
  25. package/dist/api/contracts/comments/post-comment.js.map +1 -0
  26. package/dist/api/contracts/comments/post-comments-actions-search.d.ts +167 -0
  27. package/dist/api/contracts/comments/post-comments-actions-search.js +69 -0
  28. package/dist/api/contracts/comments/post-comments-actions-search.js.map +1 -0
  29. package/dist/api/contracts/common.d.ts +10 -0
  30. package/dist/api/contracts/common.js +11 -0
  31. package/dist/api/contracts/common.js.map +1 -0
  32. package/dist/api/contracts/hello/get-hello.d.ts +30 -0
  33. package/dist/api/contracts/hello/get-hello.js +22 -0
  34. package/dist/api/contracts/hello/get-hello.js.map +1 -0
  35. package/dist/api/contracts/index.d.ts +10 -0
  36. package/dist/api/contracts/index.js +11 -0
  37. package/dist/api/contracts/index.js.map +1 -0
  38. package/dist/api/errors/index.d.ts +1 -0
  39. package/dist/api/errors/index.js +2 -0
  40. package/dist/api/errors/index.js.map +1 -0
  41. package/dist/api/objects/comment-reply.d.ts +26 -0
  42. package/dist/api/objects/comment-reply.js +16 -0
  43. package/dist/api/objects/comment-reply.js.map +1 -0
  44. package/dist/api/objects/comment.d.ts +50 -0
  45. package/dist/api/objects/comment.js +47 -0
  46. package/dist/api/objects/comment.js.map +1 -0
  47. package/dist/api/objects/index.d.ts +3 -0
  48. package/dist/api/objects/index.js +4 -0
  49. package/dist/api/objects/index.js.map +1 -0
  50. package/dist/api/objects/message.d.ts +47 -0
  51. package/dist/api/objects/message.js +57 -0
  52. package/dist/api/objects/message.js.map +1 -0
  53. package/dist/api/open-api-tags.d.ts +21 -0
  54. package/dist/api/open-api-tags.js +22 -0
  55. package/dist/api/open-api-tags.js.map +1 -0
  56. package/dist/index.d.ts +4 -0
  57. package/dist/index.js +5 -0
  58. package/dist/index.js.map +1 -0
  59. package/package.json +47 -4
@@ -0,0 +1,50 @@
1
+ import z from 'zod/v4';
2
+ export declare const CommentEntityTypeEnum: {
3
+ readonly SEGMENT: 'SEGMENT';
4
+ };
5
+ export type CommentEntityType = (typeof CommentEntityTypeEnum)[keyof typeof CommentEntityTypeEnum];
6
+ export declare const CommentStatusEnum: {
7
+ readonly OPEN: 'OPEN';
8
+ readonly RESOLVED: 'RESOLVED';
9
+ };
10
+ export type CommentStatus = (typeof CommentStatusEnum)[keyof typeof CommentStatusEnum];
11
+ export declare const COMMENT_SCHEMA: z.ZodObject<{
12
+ id: z.ZodUUID;
13
+ teamId: z.ZodUUID;
14
+ projectId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
15
+ entityType: z.ZodEnum<{
16
+ readonly SEGMENT: 'SEGMENT';
17
+ }>;
18
+ entityId: z.ZodUUID;
19
+ status: z.ZodEnum<{
20
+ readonly OPEN: 'OPEN';
21
+ readonly RESOLVED: 'RESOLVED';
22
+ }>;
23
+ message: z.ZodObject<{
24
+ version: z.ZodLiteral<1>;
25
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
26
+ type: z.ZodLiteral<"paragraph">;
27
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
28
+ type: z.ZodLiteral<"text">;
29
+ text: z.ZodString;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ type: z.ZodLiteral<"userMention">;
32
+ userId: z.ZodUUID;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ type: z.ZodLiteral<"link">;
35
+ href: z.ZodURL;
36
+ text: z.ZodString;
37
+ }, z.core.$strip>], "type">>;
38
+ }, z.core.$strip>], "type">>;
39
+ }, z.core.$strip>;
40
+ messageUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
41
+ resolvedBy: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
42
+ resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
43
+ replyCount: z.ZodInt;
44
+ lastActivityAt: z.ZodISODateTime;
45
+ lastReadAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
46
+ subscribed: z.ZodBoolean;
47
+ createdBy: z.ZodUUID;
48
+ createdAt: z.ZodISODateTime;
49
+ }, z.core.$strip>;
50
+ export type Comment = z.infer<typeof COMMENT_SCHEMA>;
@@ -0,0 +1,47 @@
1
+ import z from 'zod/v4';
2
+ import { MESSAGE_SCHEMA } from './message.js';
3
+ export const CommentEntityTypeEnum = {
4
+ SEGMENT: 'SEGMENT',
5
+ };
6
+ export const CommentStatusEnum = {
7
+ OPEN: 'OPEN',
8
+ RESOLVED: 'RESOLVED',
9
+ };
10
+ export const COMMENT_SCHEMA = z.compile(z
11
+ .object({
12
+ id: z.uuid().describe('Id of the comment. It is also the id of the thread'),
13
+ teamId: z.uuid().describe('Id of the team that owns the comment'),
14
+ projectId: z
15
+ .uuid()
16
+ .nullish()
17
+ .describe('Id of the project of the commented entity. `null` for entities without a project'),
18
+ entityType: z.enum(CommentEntityTypeEnum).describe('Type of the commented entity'),
19
+ entityId: z.uuid().describe('Id of the commented entity in the service that owns it'),
20
+ status: z.enum(CommentStatusEnum).describe('Status of the thread'),
21
+ message: MESSAGE_SCHEMA,
22
+ messageUpdatedAt: z.iso
23
+ .datetime()
24
+ .nullish()
25
+ .describe('Last edit of the message. `null` if the message was never edited'),
26
+ resolvedBy: z
27
+ .uuid()
28
+ .nullish()
29
+ .describe('Id of the user who resolved the thread. `null` when open'),
30
+ resolvedAt: z.iso
31
+ .datetime()
32
+ .nullish()
33
+ .describe('Time the thread was resolved. `null` when open'),
34
+ replyCount: z.int().nonnegative().describe('Number of replies in the thread'),
35
+ lastActivityAt: z.iso
36
+ .datetime()
37
+ .describe('Creation time of the newest message in the thread: the newest reply, or the comment when it has no replies'),
38
+ lastReadAt: z.iso
39
+ .datetime()
40
+ .nullish()
41
+ .describe('Read watermark of the requesting user: thread activity after this time is unread. `null` if never read'),
42
+ subscribed: z.boolean().describe('Whether the requesting user is subscribed to the thread'),
43
+ createdBy: z.uuid().describe('Id of the author'),
44
+ createdAt: z.iso.datetime().describe('Creation time'),
45
+ })
46
+ .describe('Root comment of a thread'));
47
+ //# sourceMappingURL=comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/api/objects/comment.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,MAAM,CAAC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4GAA4G,CAC7G;IACH,UAAU,EAAE,CAAC,CAAC,GAAG;SACd,QAAQ,EAAE;SACV,OAAO,EAAE;SACT,QAAQ,CACP,wGAAwG,CACzG;IACH,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;IAC3F,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAChD,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;CACtD,CAAC;KACD,QAAQ,CAAC,0BAA0B,CAAC,CACxC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './comment.ts';
2
+ export * from './comment-reply.ts';
3
+ export * from './message.ts';
@@ -0,0 +1,4 @@
1
+ export * from './comment.js';
2
+ export * from './comment-reply.js';
3
+ export * from './message.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/objects/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
@@ -0,0 +1,47 @@
1
+ import z from 'zod/v4';
2
+ declare const MESSAGE_CONTENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
+ type: z.ZodLiteral<"text">;
4
+ text: z.ZodString;
5
+ }, z.core.$strip>, z.ZodObject<{
6
+ type: z.ZodLiteral<"userMention">;
7
+ userId: z.ZodUUID;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ type: z.ZodLiteral<"link">;
10
+ href: z.ZodURL;
11
+ text: z.ZodString;
12
+ }, z.core.$strip>], "type">;
13
+ export type MessageContent = z.infer<typeof MESSAGE_CONTENT_SCHEMA>;
14
+ declare const MESSAGE_BLOCK_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
15
+ type: z.ZodLiteral<"paragraph">;
16
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
17
+ type: z.ZodLiteral<"text">;
18
+ text: z.ZodString;
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ type: z.ZodLiteral<"userMention">;
21
+ userId: z.ZodUUID;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ type: z.ZodLiteral<"link">;
24
+ href: z.ZodURL;
25
+ text: z.ZodString;
26
+ }, z.core.$strip>], "type">>;
27
+ }, z.core.$strip>], "type">;
28
+ export type MessageBlock = z.infer<typeof MESSAGE_BLOCK_SCHEMA>;
29
+ export declare const MESSAGE_SCHEMA: z.ZodObject<{
30
+ version: z.ZodLiteral<1>;
31
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
32
+ type: z.ZodLiteral<"paragraph">;
33
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
34
+ type: z.ZodLiteral<"text">;
35
+ text: z.ZodString;
36
+ }, z.core.$strip>, z.ZodObject<{
37
+ type: z.ZodLiteral<"userMention">;
38
+ userId: z.ZodUUID;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ type: z.ZodLiteral<"link">;
41
+ href: z.ZodURL;
42
+ text: z.ZodString;
43
+ }, z.core.$strip>], "type">>;
44
+ }, z.core.$strip>], "type">>;
45
+ }, z.core.$strip>;
46
+ export type Message = z.infer<typeof MESSAGE_SCHEMA>;
47
+ export {};
@@ -0,0 +1,57 @@
1
+ import z from 'zod/v4';
2
+ const createBaseTypedSchema = (type) => z.object({
3
+ type: z
4
+ .literal(type)
5
+ .describe(`Element type, always \`${type}\`. It selects the shape of the element`),
6
+ });
7
+ const MESSAGE_CONTENT_SCHEMA = z
8
+ .discriminatedUnion('type', [
9
+ createBaseTypedSchema('text').extend({
10
+ text: z.string().min(1).describe('Plain text, without formatting'),
11
+ }),
12
+ createBaseTypedSchema('userMention').extend({
13
+ userId: z.uuid().describe('Id of the mentioned user. Names are never stored in the message'),
14
+ }),
15
+ createBaseTypedSchema('link').extend({
16
+ href: z
17
+ .url({ protocol: /^https?$/ })
18
+ .describe('Link target. Only `http` and `https` URLs are accepted'),
19
+ text: z.string().min(1).describe('Text displayed for the link'),
20
+ }),
21
+ ])
22
+ .describe('Content element of a block');
23
+ const MESSAGE_BLOCK_SCHEMA = z
24
+ .discriminatedUnion('type', [
25
+ createBaseTypedSchema('paragraph').extend({
26
+ content: z.array(MESSAGE_CONTENT_SCHEMA).describe('Content elements of the paragraph'),
27
+ }),
28
+ ])
29
+ .describe('Block of the message');
30
+ const MESSAGE_MAX_LENGTH = 1000;
31
+ const getContentText = (contents) => contents.map((content) => (content.type === 'userMention' ? '' : content.text)).join('');
32
+ export const MESSAGE_SCHEMA = z.compile(z
33
+ .object({
34
+ version: z.literal(1).describe('Format version. It only changes on a breaking change'),
35
+ blocks: z.array(MESSAGE_BLOCK_SCHEMA).min(1).describe('Blocks of the message, in order'),
36
+ })
37
+ .superRefine((message, ctx) => {
38
+ const contents = message.blocks.flatMap((block) => block.content);
39
+ const text = getContentText(contents);
40
+ const containsUserMention = contents.some((content) => content.type === 'userMention');
41
+ if (text.trim().length === 0 && !containsUserMention) {
42
+ ctx.addIssue({ code: 'custom', message: 'Message must not be empty', path: ['blocks'] });
43
+ }
44
+ else if (text.length > MESSAGE_MAX_LENGTH) {
45
+ ctx.addIssue({
46
+ code: 'too_big',
47
+ origin: 'string',
48
+ maximum: MESSAGE_MAX_LENGTH,
49
+ inclusive: true,
50
+ input: message,
51
+ message: `Message must not exceed ${MESSAGE_MAX_LENGTH} characters`,
52
+ path: ['blocks'],
53
+ });
54
+ }
55
+ })
56
+ .describe('Message of a comment or reply, in the Chatter rich message format'));
57
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../../src/api/objects/message.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAA;AAEtB,MAAM,qBAAqB,GAAG,CAAmB,IA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M,EAAE,QAAQ;YAChB,OAAO,EAAE,kBAAkB;YAC3B,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,2BAA2B,kBAAkB,aAAa;YACnE,IAAI,EAAE,CAAC,QAAQ,CAAC;SACjB,CAAC,CAAA;IACJ,CAAC;AACH,CAAC,CAAC;KACD,QAAQ,CAAC,mEAAmE,CAAC,CACjF,CAAA"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Canonical OpenAPI tag catalog for this service's public API.
3
+ *
4
+ * Each tag's `name` and `description` are defined together, exactly ONCE, so a
5
+ * tag name never ends up carrying different descriptions across contracts.
6
+ *
7
+ * Usage:
8
+ * - a contract tags itself with `OpenApiTags.<Tag>.name`;
9
+ * - the app registers the `{ name, description }` objects under `openapi.tags`
10
+ * (see `src/app.ts`) so the descriptions reach the generated OpenAPI document.
11
+ */
12
+ export declare const OpenApiTags: {
13
+ readonly Comments: {
14
+ readonly name: 'Comments';
15
+ readonly description: 'Comment threads on Lokalise entities, such as segments.';
16
+ };
17
+ readonly Hello: {
18
+ readonly name: 'Hello';
19
+ readonly description: 'Placeholder greeting endpoint.';
20
+ };
21
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Canonical OpenAPI tag catalog for this service's public API.
3
+ *
4
+ * Each tag's `name` and `description` are defined together, exactly ONCE, so a
5
+ * tag name never ends up carrying different descriptions across contracts.
6
+ *
7
+ * Usage:
8
+ * - a contract tags itself with `OpenApiTags.<Tag>.name`;
9
+ * - the app registers the `{ name, description }` objects under `openapi.tags`
10
+ * (see `src/app.ts`) so the descriptions reach the generated OpenAPI document.
11
+ */
12
+ export const OpenApiTags = {
13
+ Comments: {
14
+ name: 'Comments',
15
+ description: 'Comment threads on Lokalise entities, such as segments.',
16
+ },
17
+ Hello: {
18
+ name: 'Hello',
19
+ description: 'Placeholder greeting endpoint.',
20
+ },
21
+ };
22
+ //# sourceMappingURL=open-api-tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-api-tags.js","sourceRoot":"","sources":["../../src/api/open-api-tags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,yDAAyD;KACvE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,gCAAgC;KAC9C;CACuE,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './api/contracts/index.ts';
2
+ export * from './api/errors/index.ts';
3
+ export * from './api/objects/index.ts';
4
+ export * from './api/open-api-tags.ts';
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './api/contracts/index.js';
2
+ export * from './api/errors/index.js';
3
+ export * from './api/objects/index.js';
4
+ export * from './api/open-api-tags.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "@lokalise/chatter-api-contracts",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.0",
4
+ "description": "API contracts for chatter",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/lokalise/chatter.git",
9
+ "directory": "packages/api-contracts"
10
+ },
11
+ "type": "module",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "exports": {
19
+ ".": "./dist/index.js",
20
+ "./package.json": "./package.json"
21
+ },
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.build.json",
24
+ "clean": "rm -rf dist",
25
+ "lint": "biome check && tsc",
26
+ "lint:fix": "biome check --write",
27
+ "test": "vitest run",
28
+ "test:ci": "vitest run",
29
+ "prepublishOnly": "pnpm run clean && pnpm run build"
30
+ },
31
+ "peerDependencies": {
32
+ "@lokalise/api-common": "^7.1.1",
33
+ "@lokalise/api-contracts": ">=9.0.0",
34
+ "@lokalise/errors": "^2.1.0",
35
+ "@lokalise/zod-extras": "^3.0.2",
36
+ "zod": "^4.5.4"
37
+ },
38
+ "devDependencies": {
39
+ "@lokalise/api-common": "^7.1.1",
40
+ "@lokalise/api-contracts": "^9.0.1",
41
+ "@lokalise/errors": "^2.1.0",
42
+ "@lokalise/tsconfig": "^5.0.0",
43
+ "@lokalise/zod-extras": "^3.0.2",
44
+ "@types/node": "^26.6.5",
45
+ "typescript": "7.0.2",
46
+ "vitest": "^5.0.4",
47
+ "zod": "^4.6.7"
48
+ }
49
+ }