@kl1/contracts 1.0.83 → 1.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1436,8 +1436,8 @@ var MessageAttachmentSchema = z29.object({
1436
1436
  thumbnailUrl: z29.string().optional()
1437
1437
  });
1438
1438
  var StickerSchema = z29.object({
1439
- packageId: z29.number().optional(),
1440
- stickerId: z29.number().optional()
1439
+ packageId: z29.number(),
1440
+ stickerId: z29.number()
1441
1441
  });
1442
1442
  var SendMessageSchema = z29.object({
1443
1443
  roomId: z29.string().uuid(),
@@ -1461,6 +1461,7 @@ var SearchRoomsSchema = DefaultQueryParamsSchema.extend({
1461
1461
  type: z29.enum(["contact", "message"]).default("contact")
1462
1462
  });
1463
1463
  var ChannelSchema2 = z29.object({
1464
+ id: z29.string(),
1464
1465
  name: z29.string(),
1465
1466
  type: ChannelTypeSchema,
1466
1467
  metadata: ChannelMetadataSchema,
@@ -1683,8 +1684,8 @@ var ReceiveMessageSchema = z29.object({
1683
1684
  var LineStickerSchema = z29.object({
1684
1685
  roomId: z29.string().uuid(),
1685
1686
  // These IDs are not UUIDs.
1686
- packageId: z29.string(),
1687
- stickerId: z29.string()
1687
+ packageId: z29.number(),
1688
+ stickerId: z29.number()
1688
1689
  });
1689
1690
 
1690
1691
  // src/channel/validation.ts
@@ -2013,16 +2014,6 @@ var mainChatContract = initContract7().router(
2013
2014
  },
2014
2015
  summary: "Send message to room"
2015
2016
  },
2016
- sendLineSticker: {
2017
- method: "POST",
2018
- path: "/line/sticker",
2019
- body: LineStickerSchema,
2020
- responses: {
2021
- 200: z33.object({ message: z33.string().optional().nullable() }).optional(),
2022
- 422: DefaultErrorResponseSchema,
2023
- 500: DefaultErrorResponseSchema
2024
- }
2025
- },
2026
2017
  getRoomsByPlatformContactId: {
2027
2018
  method: "GET",
2028
2019
  path: "/rooms/:platformContactId",
@@ -3761,7 +3752,7 @@ var instagramContract = initContract15().router({
3761
3752
  connectToService: {
3762
3753
  method: "POST",
3763
3754
  path: "/connect",
3764
- body: ChannelSchema2,
3755
+ body: ChannelSchema2.partial(),
3765
3756
  responses: {
3766
3757
  200: ChannelServiceResponseSchema,
3767
3758
  500: DefaultErrorResponseSchema,
@@ -3844,8 +3835,8 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
3844
3835
  // src/line/validation.ts
3845
3836
  import z53 from "zod";
3846
3837
  var SendLineStickerSchema = z53.object({
3847
- packageId: z53.string(),
3848
- stickerId: z53.string(),
3838
+ packageId: z53.number(),
3839
+ stickerId: z53.number(),
3849
3840
  room: z53.object({
3850
3841
  id: z53.string().uuid(),
3851
3842
  lastMessage: z53.string().optional(),
@@ -3921,10 +3912,9 @@ var lineContract = initContract16().router({
3921
3912
  method: "POST",
3922
3913
  path: "/connect",
3923
3914
  responses: {
3924
- 200: DefaultSuccessResponseSchema.extend({
3925
- data: z54.any()
3926
- }),
3927
- 500: DefaultErrorResponseSchema
3915
+ 200: ChannelServiceResponseSchema,
3916
+ 500: DefaultErrorResponseSchema,
3917
+ 400: DefaultErrorResponseSchema
3928
3918
  },
3929
3919
  body: ConnectLineService,
3930
3920
  summary: "Connect to LINE channel"
@@ -6623,6 +6613,28 @@ var userNotificationContract = initContract37().router(
6623
6613
  },
6624
6614
  summary: "Get user's notification"
6625
6615
  },
6616
+ getNewNotificationsCount: {
6617
+ method: "GET",
6618
+ path: "/new_notifications_count",
6619
+ responses: {
6620
+ 200: DefaultSuccessResponseSchema.extend({
6621
+ total: z96.number()
6622
+ }),
6623
+ 400: z96.object({
6624
+ message: z96.string()
6625
+ }),
6626
+ 409: z96.object({
6627
+ message: z96.string()
6628
+ }),
6629
+ 500: z96.object({
6630
+ message: z96.string()
6631
+ }),
6632
+ 401: DefaultUnauthorizedSchema,
6633
+ 404: DefaultNotFoundSchema,
6634
+ 422: DefaultUnprocessibleSchema
6635
+ },
6636
+ summary: "Get user's unread notifications count"
6637
+ },
6626
6638
  resetNotifications: {
6627
6639
  method: "POST",
6628
6640
  path: "/reset",
@@ -6643,7 +6655,7 @@ var userNotificationContract = initContract37().router(
6643
6655
  404: DefaultNotFoundSchema,
6644
6656
  422: DefaultUnprocessibleSchema
6645
6657
  },
6646
- body: ResetNotificationRequestSchema,
6658
+ body: null,
6647
6659
  summary: "Reset notification count to zero"
6648
6660
  },
6649
6661
  readNotification: {