@lokalise/chatter-api-contracts 0.0.0 → 0.1.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 (51) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +12 -2
  3. package/dist/api/contracts/comments/delete-comment-reply.d.ts +2 -3
  4. package/dist/api/contracts/comments/delete-comment-reply.js +2 -1
  5. package/dist/api/contracts/comments/delete-comment-reply.js.map +1 -1
  6. package/dist/api/contracts/comments/delete-comment.d.ts +2 -3
  7. package/dist/api/contracts/comments/delete-comment.js +2 -1
  8. package/dist/api/contracts/comments/delete-comment.js.map +1 -1
  9. package/dist/api/contracts/comments/get-comment-replies.d.ts +2 -3
  10. package/dist/api/contracts/comments/get-comment-replies.js +2 -1
  11. package/dist/api/contracts/comments/get-comment-replies.js.map +1 -1
  12. package/dist/api/contracts/comments/get-comments.d.ts +2 -3
  13. package/dist/api/contracts/comments/get-comments.js +2 -1
  14. package/dist/api/contracts/comments/get-comments.js.map +1 -1
  15. package/dist/api/contracts/comments/patch-comment-reply.d.ts +2 -3
  16. package/dist/api/contracts/comments/patch-comment-reply.js +2 -1
  17. package/dist/api/contracts/comments/patch-comment-reply.js.map +1 -1
  18. package/dist/api/contracts/comments/patch-comment.d.ts +2 -3
  19. package/dist/api/contracts/comments/patch-comment.js +2 -1
  20. package/dist/api/contracts/comments/patch-comment.js.map +1 -1
  21. package/dist/api/contracts/comments/post-comment-reply.d.ts +2 -3
  22. package/dist/api/contracts/comments/post-comment-reply.js +2 -1
  23. package/dist/api/contracts/comments/post-comment-reply.js.map +1 -1
  24. package/dist/api/contracts/comments/post-comment.d.ts +2 -3
  25. package/dist/api/contracts/comments/post-comment.js +2 -1
  26. package/dist/api/contracts/comments/post-comment.js.map +1 -1
  27. package/dist/api/contracts/comments/post-comments-actions-search.d.ts +4 -5
  28. package/dist/api/contracts/comments/post-comments-actions-search.js +3 -7
  29. package/dist/api/contracts/comments/post-comments-actions-search.js.map +1 -1
  30. package/dist/api/contracts/comments/put-comment-read-state.d.ts +66 -0
  31. package/dist/api/contracts/comments/put-comment-read-state.js +45 -0
  32. package/dist/api/contracts/comments/put-comment-read-state.js.map +1 -0
  33. package/dist/api/contracts/comments/put-comment-subscription.d.ts +77 -0
  34. package/dist/api/contracts/comments/put-comment-subscription.js +43 -0
  35. package/dist/api/contracts/comments/put-comment-subscription.js.map +1 -0
  36. package/dist/api/contracts/index.d.ts +2 -1
  37. package/dist/api/contracts/index.js +2 -1
  38. package/dist/api/contracts/index.js.map +1 -1
  39. package/dist/api/errors/index.d.ts +1 -1
  40. package/dist/api/errors/index.js +1 -1
  41. package/dist/api/errors/index.js.map +1 -1
  42. package/dist/api/errors/team-access-denied.d.ts +10 -0
  43. package/dist/api/errors/team-access-denied.js +7 -0
  44. package/dist/api/errors/team-access-denied.js.map +1 -0
  45. package/dist/api/open-api-tags.d.ts +0 -4
  46. package/dist/api/open-api-tags.js +0 -4
  47. package/dist/api/open-api-tags.js.map +1 -1
  48. package/package.json +10 -11
  49. package/dist/api/contracts/hello/get-hello.d.ts +0 -30
  50. package/dist/api/contracts/hello/get-hello.js +0 -22
  51. package/dist/api/contracts/hello/get-hello.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2023 Lokalise
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md CHANGED
@@ -4,16 +4,26 @@ API contracts for `chatter`. Contains the Zod schemas and
4
4
  [`@lokalise/api-contracts`](https://www.npmjs.com/package/@lokalise/api-contracts)
5
5
  REST contracts that describe the service's public HTTP API.
6
6
 
7
- Publish this package independently so that client applications can consume the
7
+ It is published independently so that client applications can consume the
8
8
  contracts without pulling in the service itself.
9
9
 
10
10
  ## Usage
11
11
 
12
12
  ```ts
13
- import { getHelloContract, type GetHelloResponseBody } from '@lokalise/chatter-api-contracts'
13
+ import { getCommentsContract, type GetCommentsQuery } from '@lokalise/chatter-api-contracts'
14
14
  ```
15
15
 
16
16
  ## Scripts
17
17
 
18
18
  - `pnpm run build` — type-check and emit `dist/` (used when publishing)
19
19
  - `pnpm run clean` — remove the `dist/` directory
20
+ - `pnpm run lint` — check formatting and lint rules with biome, then type-check with `tsc`
21
+ - `pnpm run lint:fix` — apply biome's formatting and lint fixes
22
+ - `pnpm run test` — run the vitest suite (`test:ci` runs the same on CI)
23
+
24
+ ## Releasing
25
+
26
+ Releases go through [changesets](https://github.com/changesets/changesets). Add one to every PR that
27
+ changes this package (`pnpm changeset` at the repository root) with a `patch`, `minor` or `major`
28
+ bump and a summary of what changed for consumers. The `Release` workflow keeps a "Release Packages"
29
+ PR open with the pending version bumps and changelog; merging it publishes the new version to npm.
@@ -40,9 +40,8 @@ export declare const deleteCommentReplyContract: Omit<{
40
40
  }, z.core.$strip>;
41
41
  403: z.ZodObject<{
42
42
  message: z.ZodString;
43
- code: z.ZodString;
44
- errorCode: z.ZodString;
45
- details: z.ZodOptional<z.ZodUnknown>;
43
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
44
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
46
45
  }, z.core.$strip>;
47
46
  404: z.ZodObject<{
48
47
  message: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
3
4
  import { OpenApiTags } from '../../open-api-tags.js';
4
5
  import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
5
6
  // ------------------------------------------------------------
@@ -23,7 +24,7 @@ export const deleteCommentReplyContract = defineApiContract({
23
24
  204: noBodyResponse({ description: 'Reply deleted' }),
24
25
  400: ERROR_RESPONSE_SCHEMA,
25
26
  401: ERROR_RESPONSE_SCHEMA,
26
- 403: ERROR_RESPONSE_SCHEMA,
27
+ 403: teamAccessDeniedErrorDefinition.schema,
27
28
  404: ERROR_RESPONSE_SCHEMA,
28
29
  500: ERROR_RESPONSE_SCHEMA,
29
30
  },
@@ -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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AE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -37,9 +37,8 @@ export declare const deleteCommentContract: Omit<{
37
37
  }, z.core.$strip>;
38
38
  403: z.ZodObject<{
39
39
  message: z.ZodString;
40
- code: z.ZodString;
41
- errorCode: z.ZodString;
42
- details: z.ZodOptional<z.ZodUnknown>;
40
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
41
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
43
42
  }, z.core.$strip>;
44
43
  404: z.ZodObject<{
45
44
  message: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
3
4
  import { OpenApiTags } from '../../open-api-tags.js';
4
5
  import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
5
6
  // ------------------------------------------------------------
@@ -22,7 +23,7 @@ export const deleteCommentContract = defineApiContract({
22
23
  204: noBodyResponse({ description: 'Comment deleted' }),
23
24
  400: ERROR_RESPONSE_SCHEMA,
24
25
  401: ERROR_RESPONSE_SCHEMA,
25
- 403: ERROR_RESPONSE_SCHEMA,
26
+ 403: teamAccessDeniedErrorDefinition.schema,
26
27
  404: ERROR_RESPONSE_SCHEMA,
27
28
  500: ERROR_RESPONSE_SCHEMA,
28
29
  },
@@ -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,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC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AAqB,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,CACH,CAAA;AAGD,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;IACrD,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,kBAAkB;IAC3B,WAAW,EAAE,2DAA2D;IACxE,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,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -115,9 +115,8 @@ export declare const getCommentRepliesContract: Omit<{
115
115
  }, z.core.$strip>;
116
116
  403: z.ZodObject<{
117
117
  message: z.ZodString;
118
- code: z.ZodString;
119
- errorCode: z.ZodString;
120
- details: z.ZodOptional<z.ZodUnknown>;
118
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
119
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
121
120
  }, z.core.$strip>;
122
121
  404: z.ZodObject<{
123
122
  message: z.ZodString;
@@ -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 { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
4
5
  import { COMMENT_REPLY_SCHEMA } from '../../objects/index.js';
5
6
  import { OpenApiTags } from '../../open-api-tags.js';
6
7
  import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
@@ -52,7 +53,7 @@ export const getCommentRepliesContract = defineApiContract({
52
53
  },
53
54
  400: ERROR_RESPONSE_SCHEMA,
54
55
  401: ERROR_RESPONSE_SCHEMA,
55
- 403: ERROR_RESPONSE_SCHEMA,
56
+ 403: teamAccessDeniedErrorDefinition.schema,
56
57
  404: ERROR_RESPONSE_SCHEMA,
57
58
  500: ERROR_RESPONSE_SCHEMA,
58
59
  },
@@ -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,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,S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,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;iBACtC,CAAC;aACH;SACF;QACD,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,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,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,oDAAoD;AACpD,+DAA+D;AAC/D,MAAM,sCAAsC,GAAG,CAAC,CAAC,OAAO,CACtD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAClD,CAAC,CACH,CAAA;AAGD,MAAM,6BAA6B,GAAG,GAAG,CAAA;AACzC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AACrC,MAAM,gCAAgC,GAAG,CAAC,CAAC,OAAO,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM;SACZ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAA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: z.ZodString;
58
- errorCode: z.ZodString;
59
- details: z.ZodOptional<z.ZodUnknown>;
57
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
58
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
60
59
  }, z.core.$strip>;
61
60
  500: z.ZodObject<{
62
61
  message: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { defineApiContract, sseResponse } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
3
4
  import { CommentEntityTypeEnum } from '../../objects/comment.js';
4
5
  import { OpenApiTags } from '../../open-api-tags.js';
5
6
  import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
@@ -32,7 +33,7 @@ export const getCommentsContract = defineApiContract({
32
33
  }),
33
34
  400: ERROR_RESPONSE_SCHEMA,
34
35
  401: ERROR_RESPONSE_SCHEMA,
35
- 403: ERROR_RESPONSE_SCHEMA,
36
+ 403: teamAccessDeniedErrorDefinition.schema,
36
37
  500: ERROR_RESPONSE_SCHEMA,
37
38
  },
38
39
  });
@@ -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,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChE,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,C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GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -131,9 +131,8 @@ export declare const patchCommentReplyContract: Omit<{
131
131
  }, z.core.$strip>;
132
132
  403: z.ZodObject<{
133
133
  message: z.ZodString;
134
- code: z.ZodString;
135
- errorCode: z.ZodString;
136
- details: z.ZodOptional<z.ZodUnknown>;
134
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
135
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
137
136
  }, z.core.$strip>;
138
137
  404: z.ZodObject<{
139
138
  message: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { defineApiContract } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
3
4
  import { COMMENT_REPLY_SCHEMA } from '../../objects/comment-reply.js';
4
5
  import { MESSAGE_SCHEMA } from '../../objects/message.js';
5
6
  import { OpenApiTags } from '../../open-api-tags.js';
@@ -32,7 +33,7 @@ export const patchCommentReplyContract = defineApiContract({
32
33
  200: PATCH_COMMENT_REPLY_RESPONSE_BODY_SCHEMA,
33
34
  400: ERROR_RESPONSE_SCHEMA,
34
35
  401: ERROR_RESPONSE_SCHEMA,
35
- 403: ERROR_RESPONSE_SCHEMA,
36
+ 403: teamAccessDeniedErrorDefinition.schema,
36
37
  404: ERROR_RESPONSE_SCHEMA,
37
38
  500: ERROR_RESPONSE_SCHEMA,
38
39
  },
@@ -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,MAAM,yBAAyB,CAAA;AAC3D,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE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;IACzD,MAAM,EAAE,OAAO;IACf,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,gBAAgB;IACzB,WAAW,EAAE,4DAA4D;IACzE,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,sCAAsC;IAC/D,iBAAiB,EAAE,uCAAuC;IAC1D,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAC/C,aAAa,MAAM,aAAa,SAAS,YAAY,OAAO,EAAE;IAChE,qBAAqB,EAAE;QACrB,GAAG,EAAE,wCAAwC;QAC7C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -166,9 +166,8 @@ export declare const patchCommentContract: Omit<{
166
166
  }, z.core.$strip>;
167
167
  403: z.ZodObject<{
168
168
  message: z.ZodString;
169
- code: z.ZodString;
170
- errorCode: z.ZodString;
171
- details: z.ZodOptional<z.ZodUnknown>;
169
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
170
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
172
171
  }, z.core.$strip>;
173
172
  404: z.ZodObject<{
174
173
  message: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { defineApiContract } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
3
4
  import { COMMENT_SCHEMA, CommentStatusEnum } from '../../objects/comment.js';
4
5
  import { MESSAGE_SCHEMA } from '../../objects/message.js';
5
6
  import { OpenApiTags } from '../../open-api-tags.js';
@@ -40,7 +41,7 @@ export const patchCommentContract = defineApiContract({
40
41
  200: PATCH_COMMENT_RESPONSE_BODY_SCHEMA,
41
42
  400: ERROR_RESPONSE_SCHEMA,
42
43
  401: ERROR_RESPONSE_SCHEMA,
43
- 403: ERROR_RESPONSE_SCHEMA,
44
+ 403: teamAccessDeniedErrorDefinition.schema,
44
45
  404: ERROR_RESPONSE_SCHEMA,
45
46
  500: ERROR_RESPONSE_SCHEMA,
46
47
  },
@@ -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,MAAM,yBAAyB,CAAA;AAC3D,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,8CAA8C;AAC9C,+DAA+D;AAC/D,MAAM,gCAAgC,GAAG,CAAC,CAAC,OAAO,CAChD,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,iCAAiC,GAAG,CAAC,CAAC,OAAO,CACjD,CAAC;KACE,MAAM,CAAC;IACN,OAAO,EAAE,cAAc,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,iBAAiB,CAAC;SACvB,QAAQ,EAAE;SACV,QAAQ,CAAC,qEAAqE,CAAC;CACnF,CAAC;KACD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,KAA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EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,EAAE;IACpF,qBAAqB,EAAE;QACrB,GAAG,EAAE,kCAAkC;QACvC,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -128,9 +128,8 @@ export declare const postCommentReplyContract: Omit<{
128
128
  }, z.core.$strip>;
129
129
  403: z.ZodObject<{
130
130
  message: z.ZodString;
131
- code: z.ZodString;
132
- errorCode: z.ZodString;
133
- details: z.ZodOptional<z.ZodUnknown>;
131
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
132
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
134
133
  }, z.core.$strip>;
135
134
  404: z.ZodObject<{
136
135
  message: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { defineApiContract } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
3
4
  import { COMMENT_REPLY_SCHEMA } from '../../objects/comment-reply.js';
4
5
  import { MESSAGE_SCHEMA } from '../../objects/message.js';
5
6
  import { OpenApiTags } from '../../open-api-tags.js';
@@ -31,7 +32,7 @@ export const postCommentReplyContract = defineApiContract({
31
32
  201: POST_COMMENT_REPLY_RESPONSE_BODY_SCHEMA,
32
33
  400: ERROR_RESPONSE_SCHEMA,
33
34
  401: ERROR_RESPONSE_SCHEMA,
34
- 403: ERROR_RESPONSE_SCHEMA,
35
+ 403: teamAccessDeniedErrorDefinition.schema,
35
36
  404: ERROR_RESPONSE_SCHEMA,
36
37
  500: ERROR_RESPONSE_SCHEMA,
37
38
  },
@@ -1 +1 @@
1
- {"version":3,"file":"post-comment-reply.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/post-comment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EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,UAAU;IAC5F,qBAAqB,EAAE;QACrB,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"post-comment-reply.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/post-comment-reply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,qDAAqD;AACrD,+DAA+D;AAC/D,MAAM,qCAAqC,GAAG,CAAC,CAAC,OAAO,CACrD,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,sCAAsC,GAAG,CAAC,CAAC,OAAO,CACtD,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,cAAc;CACxB,CAAC,CACH,CAAA;AAGD,MAAM,uCAAuC,GAAG,CAAC,CAAC,OAAO,CACvD,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,oBAAoB;CAC3B,CAAC,CACH,CAAA;AAGD,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,oBAAoB;IAC7B,WAAW,EAAE,6EAA6E;IAC1F,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,qCAAqC;IAC9D,iBAAiB,EAAE,sCAAsC;IACzD,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,UAAU;IAC5F,qBAAqB,EAAE;QACrB,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -161,9 +161,8 @@ export declare const postCommentContract: Omit<{
161
161
  }, z.core.$strip>;
162
162
  403: z.ZodObject<{
163
163
  message: z.ZodString;
164
- code: z.ZodString;
165
- errorCode: z.ZodString;
166
- details: z.ZodOptional<z.ZodUnknown>;
164
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
165
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
167
166
  }, z.core.$strip>;
168
167
  500: z.ZodObject<{
169
168
  message: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { defineApiContract } from '@lokalise/api-contracts';
2
2
  import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
3
4
  import { COMMENT_SCHEMA, CommentEntityTypeEnum } from '../../objects/comment.js';
4
5
  import { MESSAGE_SCHEMA } from '../../objects/message.js';
5
6
  import { OpenApiTags } from '../../open-api-tags.js';
@@ -40,7 +41,7 @@ export const postCommentContract = defineApiContract({
40
41
  201: POST_COMMENT_RESPONSE_BODY_SCHEMA,
41
42
  400: ERROR_RESPONSE_SCHEMA,
42
43
  401: ERROR_RESPONSE_SCHEMA,
43
- 403: ERROR_RESPONSE_SCHEMA,
44
+ 403: teamAccessDeniedErrorDefinition.schema,
44
45
  500: ERROR_RESPONSE_SCHEMA,
45
46
  },
46
47
  });
@@ -1 +1 @@
1
- {"version":3,"file":"post-comment.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/post-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,kCAAkC;AAClC,+DAA+D;AAC/D,MAAM,+BAA+B,GAAG,CAAC,CAAC,OAAO,CAC/C,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC5C,CAAC,CACH,CAAA;AAGD,4EAA4E;AAC5E,MAAM,gCAAgC,GAAG,CAAC,CAAC,OAAO,CAChD,CAAC,CAAC,kBAAkB,CAAC,YAAY,EAAE;IACjC,CAAC;SACE,MAAM,CAAC;QACN,UAAU,EAAE,CAAC;aACV,OAAO,CAAC,qBAAqB,CAAC,OAAO,CAAC;aACtC,QAAQ,CAAC,8BAA8B,CAAC;QAC3C,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;QACzD,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;QACzE,OAAO,EAAE,cAAc;KACxB,CAAC;SACD,QAAQ,CAAC,sBAAsB,CAAC;CACpC,CAAC,CACH,CAAA;AAGD,MAAM,iCAAiC,GAAG,CAAC,CAAC,OAAO,CACjD,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,cAAc;CACrB,CAAC,CACH,CAAA;AAGD,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IACnD,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,kBAAkB;IAC3B,WAAW,EACT,2FAA2F;IAC7F,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,+BAA+B;IACxD,iBAAiB,EAAE,gCAAgC;IACnD,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,WAAW;IAC5D,qBAAqB,EAAE;QACrB,GAAG,EAAE,iCAAiC;QACtC,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"post-comment.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/post-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE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EAAE;QACrB,GAAG,EAAE,iCAAiC;QACtC,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -9,11 +9,11 @@ export declare const POST_SEARCH_COMMENTS_QUERY_SCHEMA: z.ZodObject<{
9
9
  }, z.core.$strip>;
10
10
  export type PostSearchCommentsQuery = z.infer<typeof POST_SEARCH_COMMENTS_QUERY_SCHEMA>;
11
11
  declare const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA: z.ZodObject<{
12
+ projectId: z.ZodUUID;
12
13
  entityTypes: z.ZodArray<z.ZodEnum<{
13
14
  readonly SEGMENT: 'SEGMENT';
14
15
  }>>;
15
16
  entityIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
16
- projectIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
17
17
  }, z.core.$strip>;
18
18
  export type PostSearchCommentsRequestBody = z.infer<typeof POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA>;
19
19
  declare const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
@@ -80,11 +80,11 @@ export declare const postSearchCommentsContract: Omit<{
80
80
  after: z.ZodOptional<z.ZodString>;
81
81
  }, z.core.$strip>;
82
82
  readonly requestBodySchema: z.ZodObject<{
83
+ projectId: z.ZodUUID;
83
84
  entityTypes: z.ZodArray<z.ZodEnum<{
84
85
  readonly SEGMENT: 'SEGMENT';
85
86
  }>>;
86
87
  entityIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
87
- projectIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
88
88
  }, z.core.$strip>;
89
89
  readonly pathResolver: ({ teamId }: {
90
90
  teamId: string;
@@ -150,9 +150,8 @@ export declare const postSearchCommentsContract: Omit<{
150
150
  }, z.core.$strip>;
151
151
  403: z.ZodObject<{
152
152
  message: z.ZodString;
153
- code: z.ZodString;
154
- errorCode: z.ZodString;
155
- details: z.ZodOptional<z.ZodUnknown>;
153
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
154
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
156
155
  }, z.core.$strip>;
157
156
  500: z.ZodObject<{
158
157
  message: z.ZodString;
@@ -1,6 +1,7 @@
1
1
  import { paginatedResponseSchema } from '@lokalise/api-common';
2
2
  import { defineApiContract } from '@lokalise/api-contracts';
3
3
  import z from 'zod/v4';
4
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
4
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';
@@ -28,6 +29,7 @@ export const POST_SEARCH_COMMENTS_QUERY_SCHEMA = z.compile(z.object({
28
29
  }));
29
30
  const COMMENTS_MAX_FILTER_IDS = 100;
30
31
  const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(z.object({
32
+ projectId: z.uuid().describe('Only comments for this project'),
31
33
  entityTypes: z
32
34
  .array(z.enum(CommentEntityTypeEnum))
33
35
  .min(1)
@@ -38,12 +40,6 @@ const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(z.object({
38
40
  .max(COMMENTS_MAX_FILTER_IDS)
39
41
  .optional()
40
42
  .describe('Ids of the commented entities'),
41
- projectIds: z
42
- .array(z.uuid())
43
- .min(1)
44
- .max(COMMENTS_MAX_FILTER_IDS)
45
- .optional()
46
- .describe('Only comments of these projects'),
47
43
  }));
48
44
  const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA = paginatedResponseSchema(COMMENT_SCHEMA);
49
45
  export const postSearchCommentsContract = defineApiContract({
@@ -62,7 +58,7 @@ export const postSearchCommentsContract = defineApiContract({
62
58
  200: POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA,
63
59
  400: ERROR_RESPONSE_SCHEMA,
64
60
  401: ERROR_RESPONSE_SCHEMA,
65
- 403: ERROR_RESPONSE_SCHEMA,
61
+ 403: teamAccessDeniedErrorDefinition.schema,
66
62
  500: ERROR_RESPONSE_SCHEMA,
67
63
  },
68
64
  });
@@ -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,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,iDAAiD;AACjD,+DAA+D;AAC/D,MAAM,uCAAuC,GAAG,CAAC,CAAC,OAAO,CACvD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC5C,CAAC,CACH,CAAA;AAGD,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAClC,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAC9B,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,OAAO,CACxD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM;SACZ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,kBAAkB,CAAC;SACvB,OAAO,CAAC,sBAAsB,CAAC;SAC/B,QAAQ,CAAC,uCAAuC,CAAC;IACpD,KAAK,EAAE,CAAC;SAC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C,aAAa,MAAM,0BAA0B;IAC3E,qBAAqB,EAAE;QACrB,GAAG,EAAE,yCAAyC;QAC9C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
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,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AACvE,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,iDAAiD;AACjD,+DAA+D;AAC/D,MAAM,uCAAuC,GAAG,CAAC,CAAC,OAAO,CACvD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC5C,CAAC,CACH,CAAA;AAGD,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAClC,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAC9B,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,OAAO,CACxD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM;SACZ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,kBAAkB,CAAC;SACvB,OAAO,CAAC,sBAAsB,CAAC;SAC/B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AG,EAAE,yCAAyC;QAC9C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -0,0 +1,66 @@
1
+ import z from 'zod/v4';
2
+ declare const PUT_COMMENT_READ_STATE_PATH_PARAMS_SCHEMA: z.ZodObject<{
3
+ teamId: z.ZodUUID;
4
+ commentId: z.ZodUUID;
5
+ }, z.core.$strip>;
6
+ export type PutCommentReadStatePathParams = z.infer<typeof PUT_COMMENT_READ_STATE_PATH_PARAMS_SCHEMA>;
7
+ declare const PUT_COMMENT_READ_STATE_REQUEST_BODY_SCHEMA: z.ZodObject<{
8
+ lastReadAt: z.ZodOptional<z.ZodISODateTime>;
9
+ }, z.core.$strip>;
10
+ export type PutCommentReadStateRequestBody = z.infer<typeof PUT_COMMENT_READ_STATE_REQUEST_BODY_SCHEMA>;
11
+ export declare const putCommentReadStateContract: Omit<{
12
+ readonly method: "put";
13
+ readonly visibility: "internal";
14
+ readonly summary: "Mark a comment thread as read or unread";
15
+ readonly description: string;
16
+ readonly tags: readonly ["Comments"];
17
+ readonly requestHeaderSchema: z.ZodObject<{
18
+ authorization: z.ZodString;
19
+ }, z.core.$strip>;
20
+ readonly requestPathParamsSchema: z.ZodObject<{
21
+ teamId: z.ZodUUID;
22
+ commentId: z.ZodUUID;
23
+ }, z.core.$strip>;
24
+ readonly requestBodySchema: z.ZodObject<{
25
+ lastReadAt: z.ZodOptional<z.ZodISODateTime>;
26
+ }, z.core.$strip>;
27
+ readonly pathResolver: ({ teamId, commentId }: {
28
+ teamId: string;
29
+ commentId: string;
30
+ }) => `/v1/teams/${string}/comments/${string}/read-state`;
31
+ readonly responsesByStatusCode: {
32
+ 204: import("@lokalise/api-contracts").NoBodyContentResponseEntry;
33
+ 400: z.ZodObject<{
34
+ message: z.ZodString;
35
+ code: z.ZodString;
36
+ errorCode: z.ZodString;
37
+ details: z.ZodOptional<z.ZodUnknown>;
38
+ }, z.core.$strip>;
39
+ 401: z.ZodObject<{
40
+ message: z.ZodString;
41
+ code: z.ZodString;
42
+ errorCode: z.ZodString;
43
+ details: z.ZodOptional<z.ZodUnknown>;
44
+ }, z.core.$strip>;
45
+ 403: z.ZodObject<{
46
+ message: z.ZodString;
47
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
48
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
49
+ }, z.core.$strip>;
50
+ 404: z.ZodObject<{
51
+ message: z.ZodString;
52
+ code: z.ZodString;
53
+ errorCode: z.ZodString;
54
+ details: z.ZodOptional<z.ZodUnknown>;
55
+ }, z.core.$strip>;
56
+ 500: z.ZodObject<{
57
+ message: z.ZodString;
58
+ code: z.ZodString;
59
+ errorCode: z.ZodString;
60
+ details: z.ZodOptional<z.ZodUnknown>;
61
+ }, z.core.$strip>;
62
+ };
63
+ }, "visibility"> & {
64
+ visibility: import("@lokalise/api-contracts").RouteVisibility;
65
+ };
66
+ export {};
@@ -0,0 +1,45 @@
1
+ import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
2
+ import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
4
+ import { OpenApiTags } from '../../open-api-tags.js';
5
+ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
6
+ // ------------------------------------------------------------
7
+ // PUT /v1/teams/:teamId/comments/:commentId/read-state
8
+ // ------------------------------------------------------------
9
+ const PUT_COMMENT_READ_STATE_PATH_PARAMS_SCHEMA = z.compile(z.object({
10
+ teamId: z.uuid().describe('Id of the team'),
11
+ commentId: z.uuid().describe('Id of the comment'),
12
+ }));
13
+ const PUT_COMMENT_READ_STATE_REQUEST_BODY_SCHEMA = z.compile(z
14
+ .object({
15
+ lastReadAt: z.iso
16
+ .datetime()
17
+ .optional()
18
+ .describe('Thread activity up to this time is read, and later activity is unread. ' +
19
+ 'Defaults to the current time. It cannot be in the future'),
20
+ })
21
+ .refine((body) => !body.lastReadAt || new Date(body.lastReadAt) <= new Date(), {
22
+ message: '`lastReadAt` cannot be in the future',
23
+ path: ['lastReadAt'],
24
+ }));
25
+ export const putCommentReadStateContract = defineApiContract({
26
+ method: 'put',
27
+ visibility: 'internal',
28
+ summary: 'Mark a comment thread as read or unread',
29
+ description: 'Sets until when the requesting user has read the thread of a comment. ' +
30
+ 'Moving `lastReadAt` forward marks newer activity as read; moving it back marks it as unread.',
31
+ tags: [OpenApiTags.Comments.name],
32
+ requestHeaderSchema: AUTH_HEADERS,
33
+ requestPathParamsSchema: PUT_COMMENT_READ_STATE_PATH_PARAMS_SCHEMA,
34
+ requestBodySchema: PUT_COMMENT_READ_STATE_REQUEST_BODY_SCHEMA,
35
+ pathResolver: ({ teamId, commentId }) => `/v1/teams/${teamId}/comments/${commentId}/read-state`,
36
+ responsesByStatusCode: {
37
+ 204: noBodyResponse({ description: 'Read state updated' }),
38
+ 400: ERROR_RESPONSE_SCHEMA,
39
+ 401: ERROR_RESPONSE_SCHEMA,
40
+ 403: teamAccessDeniedErrorDefinition.schema,
41
+ 404: ERROR_RESPONSE_SCHEMA,
42
+ 500: ERROR_RESPONSE_SCHEMA,
43
+ },
44
+ });
45
+ //# sourceMappingURL=put-comment-read-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"put-comment-read-state.js","sourceRoot":"","sources":["../../../../src/api/contracts/comments/put-comment-read-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,+DAA+D;AAC/D,uDAAuD;AACv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AqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -0,0 +1,77 @@
1
+ import z from 'zod/v4';
2
+ export declare const CommentSubscriptionActionEnum: {
3
+ readonly SUBSCRIBE: 'SUBSCRIBE';
4
+ readonly UNSUBSCRIBE: 'UNSUBSCRIBE';
5
+ };
6
+ export type CommentSubscriptionAction = (typeof CommentSubscriptionActionEnum)[keyof typeof CommentSubscriptionActionEnum];
7
+ declare const PUT_COMMENT_SUBSCRIPTION_PATH_PARAMS_SCHEMA: z.ZodObject<{
8
+ teamId: z.ZodUUID;
9
+ commentId: z.ZodUUID;
10
+ }, z.core.$strip>;
11
+ export type PutCommentSubscriptionPathParams = z.infer<typeof PUT_COMMENT_SUBSCRIPTION_PATH_PARAMS_SCHEMA>;
12
+ declare const PUT_COMMENT_SUBSCRIPTION_REQUEST_BODY_SCHEMA: z.ZodObject<{
13
+ action: z.ZodEnum<{
14
+ readonly SUBSCRIBE: 'SUBSCRIBE';
15
+ readonly UNSUBSCRIBE: 'UNSUBSCRIBE';
16
+ }>;
17
+ }, z.core.$strip>;
18
+ export type PutCommentSubscriptionRequestBody = z.infer<typeof PUT_COMMENT_SUBSCRIPTION_REQUEST_BODY_SCHEMA>;
19
+ export declare const putCommentSubscriptionContract: Omit<{
20
+ readonly method: "put";
21
+ readonly visibility: "internal";
22
+ readonly summary: "Subscribe to or unsubscribe from a comment thread";
23
+ readonly description: string;
24
+ readonly tags: readonly ["Comments"];
25
+ readonly requestHeaderSchema: z.ZodObject<{
26
+ authorization: z.ZodString;
27
+ }, z.core.$strip>;
28
+ readonly requestPathParamsSchema: z.ZodObject<{
29
+ teamId: z.ZodUUID;
30
+ commentId: z.ZodUUID;
31
+ }, z.core.$strip>;
32
+ readonly requestBodySchema: z.ZodObject<{
33
+ action: z.ZodEnum<{
34
+ readonly SUBSCRIBE: 'SUBSCRIBE';
35
+ readonly UNSUBSCRIBE: 'UNSUBSCRIBE';
36
+ }>;
37
+ }, z.core.$strip>;
38
+ readonly pathResolver: ({ teamId, commentId }: {
39
+ teamId: string;
40
+ commentId: string;
41
+ }) => `/v1/teams/${string}/comments/${string}/subscription`;
42
+ readonly responsesByStatusCode: {
43
+ 204: import("@lokalise/api-contracts").NoBodyContentResponseEntry;
44
+ 400: z.ZodObject<{
45
+ message: z.ZodString;
46
+ code: z.ZodString;
47
+ errorCode: z.ZodString;
48
+ details: z.ZodOptional<z.ZodUnknown>;
49
+ }, z.core.$strip>;
50
+ 401: z.ZodObject<{
51
+ message: z.ZodString;
52
+ code: z.ZodString;
53
+ errorCode: z.ZodString;
54
+ details: z.ZodOptional<z.ZodUnknown>;
55
+ }, z.core.$strip>;
56
+ 403: z.ZodObject<{
57
+ message: z.ZodString;
58
+ code: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
59
+ errorCode: z.ZodLiteral<"TEAM_ACCESS_DENIED">;
60
+ }, z.core.$strip>;
61
+ 404: 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
+ 500: 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
+ };
74
+ }, "visibility"> & {
75
+ visibility: import("@lokalise/api-contracts").RouteVisibility;
76
+ };
77
+ export {};
@@ -0,0 +1,43 @@
1
+ import { defineApiContract, noBodyResponse } from '@lokalise/api-contracts';
2
+ import z from 'zod/v4';
3
+ import { teamAccessDeniedErrorDefinition } from '../../errors/index.js';
4
+ import { OpenApiTags } from '../../open-api-tags.js';
5
+ import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
6
+ // ------------------------------------------------------------
7
+ // PUT /v1/teams/:teamId/comments/:commentId/subscription
8
+ // ------------------------------------------------------------
9
+ export const CommentSubscriptionActionEnum = {
10
+ SUBSCRIBE: 'SUBSCRIBE',
11
+ UNSUBSCRIBE: 'UNSUBSCRIBE',
12
+ };
13
+ const PUT_COMMENT_SUBSCRIPTION_PATH_PARAMS_SCHEMA = z.compile(z.object({
14
+ teamId: z.uuid().describe('Id of the team'),
15
+ commentId: z.uuid().describe('Id of the comment'),
16
+ }));
17
+ const PUT_COMMENT_SUBSCRIPTION_REQUEST_BODY_SCHEMA = z.compile(z.object({
18
+ action: z
19
+ .enum(CommentSubscriptionActionEnum)
20
+ .describe('Whether to subscribe to or unsubscribe from the thread'),
21
+ }));
22
+ export const putCommentSubscriptionContract = defineApiContract({
23
+ method: 'put',
24
+ visibility: 'internal',
25
+ summary: 'Subscribe to or unsubscribe from a comment thread',
26
+ description: 'Subscribes the requesting user to the thread of a comment, so they are notified of its changes, ' +
27
+ 'or unsubscribes them so they are no longer notified. ' +
28
+ 'Subscribing when already subscribed, or unsubscribing when not subscribed, has no effect.',
29
+ tags: [OpenApiTags.Comments.name],
30
+ requestHeaderSchema: AUTH_HEADERS,
31
+ requestPathParamsSchema: PUT_COMMENT_SUBSCRIPTION_PATH_PARAMS_SCHEMA,
32
+ requestBodySchema: PUT_COMMENT_SUBSCRIPTION_REQUEST_BODY_SCHEMA,
33
+ pathResolver: ({ teamId, commentId }) => `/v1/teams/${teamId}/comments/${commentId}/subscription`,
34
+ responsesByStatusCode: {
35
+ 204: noBodyResponse({ description: 'Subscription updated' }),
36
+ 400: ERROR_RESPONSE_SCHEMA,
37
+ 401: ERROR_RESPONSE_SCHEMA,
38
+ 403: teamAccessDeniedErrorDefinition.schema,
39
+ 404: ERROR_RESPONSE_SCHEMA,
40
+ 500: ERROR_RESPONSE_SCHEMA,
41
+ },
42
+ });
43
+ //# sourceMappingURL=put-comment-subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"put-comment-subscription.js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AAE,4CAA4C;IAC/D,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,eAAe;IACjG,qBAAqB,EAAE;QACrB,GAAG,EAAE,cAAc,CAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;QAC5D,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,+BAA+B,CAAC,MAAM;QAC3C,GAAG,EAAE,qBAAqB;QAC1B,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}
@@ -7,4 +7,5 @@ export * from './comments/patch-comment-reply.ts';
7
7
  export * from './comments/post-comment.ts';
8
8
  export * from './comments/post-comment-reply.ts';
9
9
  export * from './comments/post-comments-actions-search.ts';
10
- export * from './hello/get-hello.ts';
10
+ export * from './comments/put-comment-read-state.ts';
11
+ export * from './comments/put-comment-subscription.ts';
@@ -7,5 +7,6 @@ export * from './comments/patch-comment-reply.js';
7
7
  export * from './comments/post-comment.js';
8
8
  export * from './comments/post-comment-reply.js';
9
9
  export * from './comments/post-comments-actions-search.js';
10
- export * from './hello/get-hello.js';
10
+ export * from './comments/put-comment-read-state.js';
11
+ export * from './comments/put-comment-subscription.js';
11
12
  //# 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,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,sBAAsB,CAAA"}
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,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 +1 @@
1
- export {};
1
+ export * from './team-access-denied.ts';
@@ -1,2 +1,2 @@
1
- export {};
1
+ export * from './team-access-denied.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1,10 @@
1
+ export declare const teamAccessDeniedErrorDefinition: {
2
+ readonly code: "TEAM_ACCESS_DENIED";
3
+ readonly type: "permission-denied";
4
+ } & {
5
+ schema: import("zod").ZodObject<{
6
+ message: import("zod").ZodString;
7
+ code: import("zod").ZodLiteral<"TEAM_ACCESS_DENIED">;
8
+ errorCode: import("zod").ZodLiteral<"TEAM_ACCESS_DENIED">;
9
+ }, import("zod/v4/core").$strip>;
10
+ };
@@ -0,0 +1,7 @@
1
+ import { definePublicError, ErrorType } from '@lokalise/errors';
2
+ // The token is valid but does not belong to the team in the path
3
+ export const teamAccessDeniedErrorDefinition = definePublicError({
4
+ code: 'TEAM_ACCESS_DENIED',
5
+ type: ErrorType.PERMISSION_DENIED,
6
+ });
7
+ //# sourceMappingURL=team-access-denied.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-access-denied.js","sourceRoot":"","sources":["../../../src/api/errors/team-access-denied.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE/D,iEAAiE;AACjE,MAAM,CAAC,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;IAC/D,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,SAAS,CAAC,iBAAiB;CAClC,CAAC,CAAA"}
@@ -14,8 +14,4 @@ export declare const OpenApiTags: {
14
14
  readonly name: 'Comments';
15
15
  readonly description: 'Comment threads on Lokalise entities, such as segments.';
16
16
  };
17
- readonly Hello: {
18
- readonly name: 'Hello';
19
- readonly description: 'Placeholder greeting endpoint.';
20
- };
21
17
  };
@@ -14,9 +14,5 @@ export const OpenApiTags = {
14
14
  name: 'Comments',
15
15
  description: 'Comment threads on Lokalise entities, such as segments.',
16
16
  },
17
- Hello: {
18
- name: 'Hello',
19
- description: 'Placeholder greeting endpoint.',
20
- },
21
17
  };
22
18
  //# sourceMappingURL=open-api-tags.js.map
@@ -1 +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"}
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;CACuE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/chatter-api-contracts",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "API contracts for chatter",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,15 +19,6 @@
19
19
  ".": "./dist/index.js",
20
20
  "./package.json": "./package.json"
21
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
22
  "peerDependencies": {
32
23
  "@lokalise/api-common": "^7.1.1",
33
24
  "@lokalise/api-contracts": ">=9.0.0",
@@ -45,5 +36,13 @@
45
36
  "typescript": "7.0.2",
46
37
  "vitest": "^5.0.4",
47
38
  "zod": "^4.6.7"
39
+ },
40
+ "scripts": {
41
+ "build": "tsc -p tsconfig.build.json",
42
+ "clean": "rm -rf dist",
43
+ "lint": "biome check && tsc",
44
+ "lint:fix": "biome check --write",
45
+ "test": "vitest run",
46
+ "test:ci": "vitest run"
48
47
  }
49
- }
48
+ }
@@ -1,30 +0,0 @@
1
- import z from 'zod/v4';
2
- declare const GET_HELLO_RESPONSE_BODY_SCHEMA: z.ZodObject<{
3
- message: z.ZodString;
4
- }, z.core.$strip>;
5
- export type GetHelloResponseBody = z.infer<typeof GET_HELLO_RESPONSE_BODY_SCHEMA>;
6
- export declare const getHelloContract: Omit<{
7
- readonly method: "get";
8
- readonly summary: "Say hello";
9
- readonly description: "Returns a greeting. Placeholder endpoint until the first real chatter module lands.";
10
- readonly tags: readonly ["Hello"];
11
- readonly visibility: "public";
12
- readonly requestHeaderSchema: z.ZodObject<{
13
- authorization: z.ZodString;
14
- }, z.core.$strip>;
15
- readonly pathResolver: () => "/hello";
16
- readonly responsesByStatusCode: {
17
- 200: z.ZodObject<{
18
- message: z.ZodString;
19
- }, z.core.$strip>;
20
- 500: z.ZodObject<{
21
- message: z.ZodString;
22
- code: z.ZodString;
23
- errorCode: z.ZodString;
24
- details: z.ZodOptional<z.ZodUnknown>;
25
- }, z.core.$strip>;
26
- };
27
- }, "visibility"> & {
28
- visibility: import("@lokalise/api-contracts").RouteVisibility;
29
- };
30
- export {};
@@ -1,22 +0,0 @@
1
- import { defineApiContract } from '@lokalise/api-contracts';
2
- import z from 'zod/v4';
3
- import { OpenApiTags } from '../../open-api-tags.js';
4
- import { AUTH_HEADERS, ERROR_RESPONSE_SCHEMA } from '../common.js';
5
- // GET /hello
6
- const GET_HELLO_RESPONSE_BODY_SCHEMA = z.compile(z.object({
7
- message: z.string().describe('Greeting message'),
8
- }));
9
- export const getHelloContract = defineApiContract({
10
- method: 'get',
11
- summary: 'Say hello',
12
- description: 'Returns a greeting. Placeholder endpoint until the first real chatter module lands.',
13
- tags: [OpenApiTags.Hello.name],
14
- visibility: 'public',
15
- requestHeaderSchema: AUTH_HEADERS,
16
- pathResolver: () => '/hello',
17
- responsesByStatusCode: {
18
- 200: GET_HELLO_RESPONSE_BODY_SCHEMA,
19
- 500: ERROR_RESPONSE_SCHEMA,
20
- },
21
- });
22
- //# sourceMappingURL=get-hello.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-hello.js","sourceRoot":"","sources":["../../../../src/api/contracts/hello/get-hello.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,aAAa;AACb,MAAM,8BAA8B,GAAG,CAAC,CAAC,OAAO,CAC9C,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;CACjD,CAAC,CACH,CAAA;AAGD,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;IAChD,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,WAAW;IACpB,WAAW,EACT,qFAAqF;IACvF,IAAI,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC;IAC9B,UAAU,EAAE,QAAQ;IACpB,mBAAmB,EAAE,YAAY;IACjC,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ;IAC5B,qBAAqB,EAAE;QACrB,GAAG,EAAE,8BAA8B;QACnC,GAAG,EAAE,qBAAqB;KAC3B;CACF,CAAC,CAAA"}