@lokalise/chatter-api-contracts 0.1.3 → 0.1.5

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.
@@ -9,7 +9,7 @@ export declare const deleteCommentReplyContract: Omit<{
9
9
  readonly method: "delete";
10
10
  readonly visibility: "internal";
11
11
  readonly summary: "Delete a reply";
12
- readonly description: "Deletes a reply from the thread of a comment. The rest of the thread is kept.";
12
+ readonly description: string;
13
13
  readonly tags: readonly ["Comments"];
14
14
  readonly requestHeaderSchema: z.ZodObject<{
15
15
  authorization: z.ZodString;
@@ -38,11 +38,15 @@ export declare const deleteCommentReplyContract: Omit<{
38
38
  errorCode: z.ZodString;
39
39
  details: z.ZodOptional<z.ZodUnknown>;
40
40
  }, z.core.$strip>;
41
- 403: z.ZodObject<{
41
+ 403: z.ZodUnion<readonly [z.ZodObject<{
42
42
  message: z.ZodString;
43
43
  code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
44
44
  errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
45
- }, z.core.$strip>;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ message: z.ZodString;
47
+ code: z.ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
48
+ errorCode: z.ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
49
+ }, z.core.$strip>]>;
46
50
  404: z.ZodObject<{
47
51
  message: z.ZodString;
48
52
  code: z.ZodLiteral<"RESOURCE_NOT_FOUND">;
@@ -1,6 +1,6 @@
1
1
  import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
- import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
3
+ import { commentDeletePermissionRequiredErrorDefinition, resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
4
4
  import { OpenApiTags } from '../../open-api-tags.js';
5
5
  import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
6
6
  // ------------------------------------------------------------
@@ -15,7 +15,8 @@ export const deleteCommentReplyContract = defineApiContract({
15
15
  method: 'delete',
16
16
  visibility: 'internal',
17
17
  summary: 'Delete a reply',
18
- description: 'Deletes a reply from the thread of a comment. The rest of the thread is kept.',
18
+ description: 'Deletes a reply from the thread of a comment. The rest of the thread is kept. ' +
19
+ 'The author and team owners, admins and billers can delete it.',
19
20
  tags: [OpenApiTags.Comments.name],
20
21
  requestHeaderSchema: AUTH_HEADERS,
21
22
  requestPathParamsSchema: DELETE_COMMENT_REPLY_PATH_PARAMS_SCHEMA,
@@ -24,7 +25,10 @@ export const deleteCommentReplyContract = defineApiContract({
24
25
  204: noBodyResponse({ description: 'Reply deleted' }),
25
26
  400: ERROR_RESPONSE_SCHEMA,
26
27
  401: ERROR_RESPONSE_SCHEMA,
27
- 403: teamAccessDeniedErrorDefinition.schema,
28
+ 403: z.union([
29
+ teamAccessDeniedErrorDefinition.schema,
30
+ commentDeletePermissionRequiredErrorDefinition.schema,
31
+ ]),
28
32
  404: resourceNotFoundErrorDefinition.schema,
29
33
  500: ERROR_RESPONSE_SCHEMA,
30
34
  },
@@ -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,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,gEAAgE;AAChE,+DAA+D;AAC/D,MAAM,uCAAuC,GAAG,CAAC,CAAC,OAAO,CACvD,CAAC,CAAC,MAAM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8,7 @@ export declare const deleteCommentContract: Omit<{
8
8
  readonly method: "delete";
9
9
  readonly visibility: "internal";
10
10
  readonly summary: "Delete a comment";
11
- readonly description: "Deletes a comment and its whole thread, replies included.";
11
+ readonly description: string;
12
12
  readonly tags: readonly ["Comments"];
13
13
  readonly requestHeaderSchema: z.ZodObject<{
14
14
  authorization: z.ZodString;
@@ -35,11 +35,15 @@ export declare const deleteCommentContract: Omit<{
35
35
  errorCode: z.ZodString;
36
36
  details: z.ZodOptional<z.ZodUnknown>;
37
37
  }, z.core.$strip>;
38
- 403: z.ZodObject<{
38
+ 403: z.ZodUnion<readonly [z.ZodObject<{
39
39
  message: z.ZodString;
40
40
  code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
41
41
  errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
42
- }, z.core.$strip>;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ message: z.ZodString;
44
+ code: z.ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
45
+ errorCode: z.ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
46
+ }, z.core.$strip>]>;
43
47
  404: z.ZodObject<{
44
48
  message: z.ZodString;
45
49
  code: z.ZodLiteral<"RESOURCE_NOT_FOUND">;
@@ -1,6 +1,6 @@
1
1
  import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
- import { resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
3
+ import { commentDeletePermissionRequiredErrorDefinition, resourceNotFoundErrorDefinition, teamAccessDeniedErrorDefinition, } from '../../errors/index.js';
4
4
  import { OpenApiTags } from '../../open-api-tags.js';
5
5
  import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
6
6
  // ------------------------------------------------------------
@@ -14,7 +14,8 @@ export const deleteCommentContract = defineApiContract({
14
14
  method: 'delete',
15
15
  visibility: 'internal',
16
16
  summary: 'Delete a comment',
17
- description: 'Deletes a comment and its whole thread, replies included.',
17
+ description: 'Deletes a comment and its whole thread, replies included. ' +
18
+ 'The author and team owners, admins and billers can delete it. Subscriptions to the thread are kept.',
18
19
  tags: [OpenApiTags.Comments.name],
19
20
  requestHeaderSchema: AUTH_HEADERS,
20
21
  requestPathParamsSchema: DELETE_COMMENT_PATH_PARAMS_SCHEMA,
@@ -23,7 +24,10 @@ export const deleteCommentContract = defineApiContract({
23
24
  204: noBodyResponse({ description: 'Comment deleted' }),
24
25
  400: ERROR_RESPONSE_SCHEMA,
25
26
  401: ERROR_RESPONSE_SCHEMA,
26
- 403: teamAccessDeniedErrorDefinition.schema,
27
+ 403: z.union([
28
+ teamAccessDeniedErrorDefinition.schema,
29
+ commentDeletePermissionRequiredErrorDefinition.schema,
30
+ ]),
27
31
  404: resourceNotFoundErrorDefinition.schema,
28
32
  500: ERROR_RESPONSE_SCHEMA,
29
33
  },
@@ -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,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,+CAA+C;AAC/C,+DAA+D;AAC/D,MAAM,iCAAiC,GAAG,CAAC,CAAC,OAAO,CACjD,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,C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BAAgB,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAClD,CAAC,CACH,CAAA;AAGD,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;IACrD,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,kBAAkB;IAC3B,WAAW,EACT,4DAA4D;QAC5D,qGAAqG;IACvG,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,iCAAiC;IAC1D,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,EAAE;IACpF,qBAAqB,EAAE;QACrB,GAAG,EAAE,cAAc,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;QACvD,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC;YACX,+BAA+B,CAAC,MAAM;YACtC,8CAA8C,CAAC,MAAM;SACtD,CAAC;QACF,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -6,7 +6,7 @@ declare const GET_COMMENT_REPLIES_PATH_PARAMS_SCHEMA: z.ZodObject<{
6
6
  export type GetCommentRepliesPathParams = z.infer<typeof GET_COMMENT_REPLIES_PATH_PARAMS_SCHEMA>;
7
7
  declare const GET_COMMENT_REPLIES_QUERY_SCHEMA: z.ZodObject<{
8
8
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
9
- after: z.ZodOptional<z.ZodString>;
9
+ after: z.ZodOptional<z.ZodUUID>;
10
10
  }, z.core.$strip>;
11
11
  export type GetCommentRepliesQuery = z.infer<typeof GET_COMMENT_REPLIES_QUERY_SCHEMA>;
12
12
  declare const GET_COMMENT_REPLIES_RESPONSE_BODY_SCHEMA: z.ZodObject<{
@@ -56,7 +56,7 @@ export declare const getCommentRepliesContract: Omit<{
56
56
  }, z.core.$strip>;
57
57
  readonly requestQuerySchema: z.ZodObject<{
58
58
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
59
- after: z.ZodOptional<z.ZodString>;
59
+ after: z.ZodOptional<z.ZodUUID>;
60
60
  }, z.core.$strip>;
61
61
  readonly pathResolver: ({ teamId, commentId }: {
62
62
  teamId: string;
@@ -23,10 +23,9 @@ const GET_COMMENT_REPLIES_QUERY_SCHEMA = z.compile(z.object({
23
23
  .default(COMMENT_REPLIES_DEFAULT_LIMIT)
24
24
  .describe('Number of replies to return per page'),
25
25
  after: z
26
- .string()
27
- .min(1)
26
+ .uuid()
28
27
  .optional()
29
- .describe('Opaque cursor from the previous response `meta.cursor`. Omit to read the first page'),
28
+ .describe('Cursor from the previous response `meta.cursor`. Omit to read the first page'),
30
29
  }));
31
30
  const GET_COMMENT_REPLIES_RESPONSE_BODY_SCHEMA = paginatedResponseSchema(COMMENT_REPLY_SCHEMA);
32
31
  export const getCommentRepliesContract = defineApiContract({
@@ -1 +1 @@
1
- {"version":3,"file":"get-comment-replies.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/get-comment-replies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,C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E,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,sDAAsD;oBACtD,uBAAuB,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;iBACtC,CAAC;aACH;SACF;QACD,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"get-comment-replies.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/get-comment-replies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,oDAAoD;AACpD,+DAA+D;AAC/D,MAAM,sCAAsC,GAAG,CAAC,CAAC,OAAO,CACtD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAClD,CAAC,CACH,CAAA;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B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -0,0 +1,10 @@
1
+ export declare const commentDeletePermissionRequiredErrorDefinition: {
2
+ readonly code: "COMMENT_DELETE_PERMISSION_REQUIRED";
3
+ readonly type: "permission-denied";
4
+ } & {
5
+ schema: import("zod").ZodObject<{
6
+ message: import("zod").ZodString;
7
+ code: import("zod").ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
8
+ errorCode: import("zod").ZodLiteral<"COMMENT_DELETE_PERMISSION_REQUIRED">;
9
+ }, import("zod/v4/core").$strip>;
10
+ };
@@ -0,0 +1,7 @@
1
+ import { definePublicError, ErrorType } from '@lokalise/errors';
2
+ // The user is not allowed to delete a comment or reply
3
+ export const commentDeletePermissionRequiredErrorDefinition = definePublicError({
4
+ code: 'COMMENT_DELETE_PERMISSION_REQUIRED',
5
+ type: ErrorType.PERMISSION_DENIED,
6
+ });
7
+ //# sourceMappingURL=comment-delete-permission-required.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment-delete-permission-required.js","sourceRoot":"","sources":["../../../src/api/errors/comment-delete-permission-required.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE/D,uDAAuD;AACvD,MAAM,CAAC,MAAM,8CAA8C,GAAG,iBAAiB,CAAC;IAC9E,IAAI,EAAE,oCAAoC;IAC1C,IAAI,EAAE,SAAS,CAAC,iBAAiB;CAClC,CAAC,CAAA"}
@@ -1,3 +1,4 @@
1
1
  export * from './comment-author-required.ts';
2
+ export * from './comment-delete-permission-required.ts';
2
3
  export * from './resource-not-found.ts';
3
4
  export * from './team-access-denied.ts';
@@ -1,4 +1,5 @@
1
1
  export * from './comment-author-required.js';
2
+ export * from './comment-delete-permission-required.js';
2
3
  export * from './resource-not-found.js';
3
4
  export * from './team-access-denied.js';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yCAAyC,CAAA;AACvD,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/chatter-api-contracts",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "API contracts for chatter",
5
5
  "license": "MIT",
6
6
  "repository": {