@lokalise/chatter-api-contracts 0.1.4 → 0.1.6

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.
@@ -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,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,CAAC;SACN,GAAG,CAAC,yBAAyB,CAAC;SAC9B,OAAO,CAAC,6BAA6B,CAAC;SACtC,QAAQ,CAAC,sCAAsC,CAAC;IACnD,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CACP,qFAAqF,CACtF;CACJ,CAAC,CACH,CAAA;AAGD,MAAM,wCAAwC,GAAG,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;AAG9F,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACzD,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,+BAA+B;IACxC,WAAW,EACT,gGAAgG;QAChG,mEAAmE;QACnE,sEAAsE;IACxE,IAAI,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,sCAAsC;IAC/D,kBAAkB,EAAE,gCAAgC;IACpD,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,UAAU;IAC5F,qBAAqB,EAAE;QACrB,GAAG,EAAE;YACH,OAAO,EAAE;gBACP,kBAAkB,EAAE,wCAAwC;gBAC5D,mBAAmB,EAAE,OAAO,CAAC;oBAC3B,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,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AAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,sCAAsC;IAC/D,kBAAkB,EAAE,gCAAgC;IACpD,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,aAAa,MAAM,aAAa,SAAS,UAAU;IAC5F,qBAAqB,EAAE;QACrB,GAAG,EAAE;YACH,OAAO,EAAE;gBACP,kBAAkB,EAAE,wCAAwC;gBAC5D,mBAAmB,EAAE,OAAO,CAAC;oBAC3B,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"}
@@ -12,7 +12,7 @@ declare const GET_COMMENT_RESPONSE_BODY_SCHEMA: z.ZodObject<{
12
12
  entityType: z.ZodEnum<{
13
13
  readonly SEGMENT: 'SEGMENT';
14
14
  }>;
15
- entityId: z.ZodUUID;
15
+ entityId: z.ZodGUID;
16
16
  status: z.ZodEnum<{
17
17
  readonly OPEN: 'OPEN';
18
18
  readonly RESOLVED: 'RESOLVED';
@@ -72,7 +72,7 @@ export declare const getCommentContract: Omit<{
72
72
  entityType: z.ZodEnum<{
73
73
  readonly SEGMENT: 'SEGMENT';
74
74
  }>;
75
- entityId: z.ZodUUID;
75
+ entityId: z.ZodGUID;
76
76
  status: z.ZodEnum<{
77
77
  readonly OPEN: 'OPEN';
78
78
  readonly RESOLVED: 'RESOLVED';
@@ -5,7 +5,7 @@ declare const POST_COMMENT_PATH_PARAMS_SCHEMA: z.ZodObject<{
5
5
  export type PostCommentPathParams = z.infer<typeof POST_COMMENT_PATH_PARAMS_SCHEMA>;
6
6
  declare const POST_COMMENT_REQUEST_BODY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
7
  entityType: z.ZodLiteral<"SEGMENT">;
8
- entityId: z.ZodUUID;
8
+ entityId: z.ZodGUID;
9
9
  projectId: z.ZodUUID;
10
10
  message: z.ZodObject<{
11
11
  version: z.ZodLiteral<1>;
@@ -46,7 +46,7 @@ export declare const postCommentContract: Omit<{
46
46
  }, z.core.$strip>;
47
47
  readonly requestBodySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
48
48
  entityType: z.ZodLiteral<"SEGMENT">;
49
- entityId: z.ZodUUID;
49
+ entityId: z.ZodGUID;
50
50
  projectId: z.ZodUUID;
51
51
  message: z.ZodObject<{
52
52
  version: z.ZodLiteral<1>;
@@ -18,7 +18,7 @@ const POST_COMMENT_REQUEST_BODY_SCHEMA = z.compile(z.discriminatedUnion('entityT
18
18
  entityType: z
19
19
  .literal(CommentEntityTypeEnum.SEGMENT)
20
20
  .describe('Type of the commented entity'),
21
- entityId: z.uuid().describe('Id of the commented entity'),
21
+ entityId: z.guid().describe('Id of the commented entity'),
22
22
  projectId: z.uuid().describe('Id of the project of the commented entity'),
23
23
  message: MESSAGE_SCHEMA,
24
24
  })
@@ -13,7 +13,7 @@ declare const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA: z.ZodObject<{
13
13
  entityTypes: z.ZodArray<z.ZodEnum<{
14
14
  readonly SEGMENT: 'SEGMENT';
15
15
  }>>;
16
- entityIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
16
+ entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
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<{
@@ -24,7 +24,7 @@ declare const POST_SEARCH_COMMENTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
24
24
  entityType: z.ZodEnum<{
25
25
  readonly SEGMENT: 'SEGMENT';
26
26
  }>;
27
- entityId: z.ZodUUID;
27
+ entityId: z.ZodGUID;
28
28
  status: z.ZodEnum<{
29
29
  readonly OPEN: 'OPEN';
30
30
  readonly RESOLVED: 'RESOLVED';
@@ -84,7 +84,7 @@ export declare const postSearchCommentsContract: Omit<{
84
84
  entityTypes: z.ZodArray<z.ZodEnum<{
85
85
  readonly SEGMENT: 'SEGMENT';
86
86
  }>>;
87
- entityIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
87
+ entityIds: z.ZodOptional<z.ZodArray<z.ZodGUID>>;
88
88
  }, z.core.$strip>;
89
89
  readonly pathResolver: ({ teamId }: {
90
90
  teamId: string;
@@ -98,7 +98,7 @@ export declare const postSearchCommentsContract: Omit<{
98
98
  entityType: z.ZodEnum<{
99
99
  readonly SEGMENT: 'SEGMENT';
100
100
  }>;
101
- entityId: z.ZodUUID;
101
+ entityId: z.ZodGUID;
102
102
  status: z.ZodEnum<{
103
103
  readonly OPEN: 'OPEN';
104
104
  readonly RESOLVED: 'RESOLVED';
@@ -34,7 +34,7 @@ const POST_SEARCH_COMMENTS_REQUEST_BODY_SCHEMA = z.compile(z.object({
34
34
  .min(1)
35
35
  .describe('Types of the commented entities'),
36
36
  entityIds: z
37
- .array(z.uuid())
37
+ .array(z.guid())
38
38
  .min(1)
39
39
  .max(COMMENTS_MAX_FILTER_IDS)
40
40
  .optional()
@@ -15,7 +15,7 @@ export declare const COMMENT_SCHEMA: z.ZodObject<{
15
15
  entityType: z.ZodEnum<{
16
16
  readonly SEGMENT: 'SEGMENT';
17
17
  }>;
18
- entityId: z.ZodUUID;
18
+ entityId: z.ZodGUID;
19
19
  status: z.ZodEnum<{
20
20
  readonly OPEN: 'OPEN';
21
21
  readonly RESOLVED: 'RESOLVED';
@@ -16,7 +16,7 @@ export const COMMENT_SCHEMA = z.compile(z
16
16
  .nullish()
17
17
  .describe('Id of the project of the commented entity. `null` for entities without a project'),
18
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'),
19
+ entityId: z.guid().describe('Id of the commented entity in the service that owns it'),
20
20
  status: z.enum(CommentStatusEnum).describe('Status of the thread'),
21
21
  message: MESSAGE_SCHEMA,
22
22
  messageUpdatedAt: z.iso
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/chatter-api-contracts",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "API contracts for chatter",
5
5
  "license": "MIT",
6
6
  "repository": {