@kl1/contracts 1.0.83 → 1.0.85

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",
@@ -3025,6 +3016,7 @@ import z43 from "zod";
3025
3016
  import z42 from "zod";
3026
3017
  var sentimentScoreSchema = z42.union([
3027
3018
  z42.literal("positive"),
3019
+ z42.literal("neutral"),
3028
3020
  z42.literal("negative")
3029
3021
  ]);
3030
3022
  var CustomFieldQueryParamsSchema = z42.object({
@@ -3761,7 +3753,7 @@ var instagramContract = initContract15().router({
3761
3753
  connectToService: {
3762
3754
  method: "POST",
3763
3755
  path: "/connect",
3764
- body: ChannelSchema2,
3756
+ body: ChannelSchema2.partial(),
3765
3757
  responses: {
3766
3758
  200: ChannelServiceResponseSchema,
3767
3759
  500: DefaultErrorResponseSchema,
@@ -3844,8 +3836,8 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
3844
3836
  // src/line/validation.ts
3845
3837
  import z53 from "zod";
3846
3838
  var SendLineStickerSchema = z53.object({
3847
- packageId: z53.string(),
3848
- stickerId: z53.string(),
3839
+ packageId: z53.number(),
3840
+ stickerId: z53.number(),
3849
3841
  room: z53.object({
3850
3842
  id: z53.string().uuid(),
3851
3843
  lastMessage: z53.string().optional(),
@@ -3921,10 +3913,9 @@ var lineContract = initContract16().router({
3921
3913
  method: "POST",
3922
3914
  path: "/connect",
3923
3915
  responses: {
3924
- 200: DefaultSuccessResponseSchema.extend({
3925
- data: z54.any()
3926
- }),
3927
- 500: DefaultErrorResponseSchema
3916
+ 200: ChannelServiceResponseSchema,
3917
+ 500: DefaultErrorResponseSchema,
3918
+ 400: DefaultErrorResponseSchema
3928
3919
  },
3929
3920
  body: ConnectLineService,
3930
3921
  summary: "Connect to LINE channel"
@@ -6623,6 +6614,28 @@ var userNotificationContract = initContract37().router(
6623
6614
  },
6624
6615
  summary: "Get user's notification"
6625
6616
  },
6617
+ getNewNotificationsCount: {
6618
+ method: "GET",
6619
+ path: "/new_notifications_count",
6620
+ responses: {
6621
+ 200: DefaultSuccessResponseSchema.extend({
6622
+ total: z96.number()
6623
+ }),
6624
+ 400: z96.object({
6625
+ message: z96.string()
6626
+ }),
6627
+ 409: z96.object({
6628
+ message: z96.string()
6629
+ }),
6630
+ 500: z96.object({
6631
+ message: z96.string()
6632
+ }),
6633
+ 401: DefaultUnauthorizedSchema,
6634
+ 404: DefaultNotFoundSchema,
6635
+ 422: DefaultUnprocessibleSchema
6636
+ },
6637
+ summary: "Get user's unread notifications count"
6638
+ },
6626
6639
  resetNotifications: {
6627
6640
  method: "POST",
6628
6641
  path: "/reset",
@@ -6643,7 +6656,7 @@ var userNotificationContract = initContract37().router(
6643
6656
  404: DefaultNotFoundSchema,
6644
6657
  422: DefaultUnprocessibleSchema
6645
6658
  },
6646
- body: ResetNotificationRequestSchema,
6659
+ body: null,
6647
6660
  summary: "Reset notification count to zero"
6648
6661
  },
6649
6662
  readNotification: {