@kl1/contracts 1.0.81 → 1.0.82

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
@@ -1679,6 +1679,12 @@ var ReceiveMessageSchema = z29.object({
1679
1679
  sender: UserSchema.optional().nullable()
1680
1680
  })
1681
1681
  });
1682
+ var LineStickerSchema = z29.object({
1683
+ roomId: z29.string().uuid(),
1684
+ // These IDs are not UUIDs.
1685
+ packageId: z29.string(),
1686
+ stickerId: z29.string()
1687
+ });
1682
1688
 
1683
1689
  // src/channel/validation.ts
1684
1690
  import z30 from "zod";
@@ -2006,6 +2012,16 @@ var mainChatContract = initContract7().router(
2006
2012
  },
2007
2013
  summary: "Send message to room"
2008
2014
  },
2015
+ sendLineSticker: {
2016
+ method: "POST",
2017
+ path: "/line/sticker",
2018
+ body: LineStickerSchema,
2019
+ responses: {
2020
+ 200: z33.object({ message: z33.string().optional().nullable() }).optional(),
2021
+ 422: DefaultErrorResponseSchema,
2022
+ 500: DefaultErrorResponseSchema
2023
+ }
2024
+ },
2009
2025
  getRoomsByPlatformContactId: {
2010
2026
  method: "GET",
2011
2027
  path: "/rooms/:platformContactId",
@@ -3761,10 +3777,13 @@ var instagramContract = initContract15().router({
3761
3777
  400: DefaultErrorResponseSchema
3762
3778
  }
3763
3779
  },
3764
- relogin: {
3780
+ reconnect: {
3765
3781
  method: "POST",
3766
- path: "/relogin",
3767
- body: ChannelSchema2.partial(),
3782
+ path: "/reconnect/:channelId",
3783
+ pathParams: z51.object({
3784
+ channelId: z51.string().uuid()
3785
+ }),
3786
+ body: null,
3768
3787
  responses: {
3769
3788
  200: ChannelServiceResponseSchema,
3770
3789
  500: DefaultErrorResponseSchema,
@@ -3784,6 +3803,16 @@ var instagramContract = initContract15().router({
3784
3803
  400: DefaultErrorResponseSchema
3785
3804
  }
3786
3805
  },
3806
+ relogin: {
3807
+ method: "POST",
3808
+ path: "/relogin",
3809
+ body: ChannelSchema2.partial(),
3810
+ responses: {
3811
+ 200: ChannelServiceResponseSchema,
3812
+ 500: DefaultErrorResponseSchema,
3813
+ 400: DefaultErrorResponseSchema
3814
+ }
3815
+ },
3787
3816
  getInstagramPages: {
3788
3817
  method: "GET",
3789
3818
  path: "/pages",
@@ -3814,10 +3843,63 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
3814
3843
  // src/line/validation.ts
3815
3844
  import z53 from "zod";
3816
3845
  var SendLineStickerSchema = z53.object({
3817
- userId: z53.string().uuid(),
3818
3846
  packageId: z53.string(),
3819
3847
  stickerId: z53.string(),
3820
- accessToken: z53.string()
3848
+ room: z53.object({
3849
+ id: z53.string().uuid(),
3850
+ lastMessage: z53.string().optional(),
3851
+ handleTime: z53.number().optional(),
3852
+ isLatest: z53.boolean(),
3853
+ direction: MessageDirectionTypeSchema,
3854
+ platformContact: z53.object({
3855
+ channelId: z53.string().uuid(),
3856
+ socialPlatformId: z53.string().nullable(),
3857
+ type: ChannelTypeSchema,
3858
+ metadata: PlatformContactMetadataSchema,
3859
+ contact: z53.object({
3860
+ name: z53.string(),
3861
+ address: z53.string().nullable(),
3862
+ channel: z53.string().nullable(),
3863
+ notes: z53.string().nullable(),
3864
+ contactProfile: z53.string().nullable(),
3865
+ socialProfileUrl: z53.string().nullable()
3866
+ })
3867
+ }),
3868
+ actor: z53.object({
3869
+ name: z53.string(),
3870
+ email: z53.string().email(),
3871
+ address: z53.string().nullable(),
3872
+ phone: z53.string().nullable()
3873
+ }).nullable(),
3874
+ channel: ChannelSchema2
3875
+ }),
3876
+ message: z53.object({
3877
+ message: z53.string().optional(),
3878
+ direction: MessageDirectionTypeSchema,
3879
+ type: MessageTypeSchema,
3880
+ readAt: z53.date().optional(),
3881
+ metadata: z53.any().optional(),
3882
+ platformId: z53.string().optional(),
3883
+ platformMessageId: z53.string().optional(),
3884
+ replyPlatformMessageId: z53.string().optional(),
3885
+ template: z53.any().optional(),
3886
+ locale: MessageLocaleTypeSchema.optional(),
3887
+ url: z53.string().optional(),
3888
+ previewUrl: z53.string().optional(),
3889
+ imageSetId: z53.string().optional(),
3890
+ upload: z53.object({
3891
+ bucketName: z53.string(),
3892
+ fileName: z53.string(),
3893
+ fileSize: z53.number(),
3894
+ fileKey: z53.string()
3895
+ }).optional(),
3896
+ sender: z53.object({
3897
+ name: z53.string(),
3898
+ email: z53.string().email(),
3899
+ address: z53.string().nullable(),
3900
+ phone: z53.string().nullable()
3901
+ })
3902
+ })
3821
3903
  });
3822
3904
 
3823
3905
  // src/line/index.ts
@@ -3854,6 +3936,42 @@ var lineContract = initContract16().router({
3854
3936
  200: SendMessageResponseSchema,
3855
3937
  500: DefaultErrorResponseSchema
3856
3938
  }
3939
+ },
3940
+ disconnect: {
3941
+ method: "POST",
3942
+ path: "/disconnect",
3943
+ body: ChannelSchema2.partial(),
3944
+ responses: {
3945
+ 200: ChannelServiceResponseSchema,
3946
+ 500: DefaultErrorResponseSchema,
3947
+ 400: DefaultErrorResponseSchema
3948
+ }
3949
+ },
3950
+ reconnect: {
3951
+ method: "POST",
3952
+ path: "/reconnect/:channelId",
3953
+ pathParams: z54.object({
3954
+ channelId: z54.string().uuid()
3955
+ }),
3956
+ body: null,
3957
+ responses: {
3958
+ 200: ChannelServiceResponseSchema,
3959
+ 500: DefaultErrorResponseSchema,
3960
+ 400: DefaultErrorResponseSchema
3961
+ }
3962
+ },
3963
+ delete: {
3964
+ method: "DELETE",
3965
+ path: "/delete/:channelId",
3966
+ pathParams: z54.object({
3967
+ channelId: z54.string().uuid()
3968
+ }),
3969
+ body: null,
3970
+ responses: {
3971
+ 200: ChannelServiceResponseSchema,
3972
+ 500: DefaultErrorResponseSchema,
3973
+ 400: DefaultErrorResponseSchema
3974
+ }
3857
3975
  }
3858
3976
  });
3859
3977
 
@@ -6467,21 +6585,12 @@ var GetNotificationsRequestSchema = z95.object({
6467
6585
  });
6468
6586
  var GetNotificationsResponseSchema = z95.object({
6469
6587
  notificationCount: z95.number(),
6470
- notifications: z95.object({
6471
- data: z95.array(NotificationSchema),
6472
- total: z95.number(),
6473
- page: z95.number(),
6474
- pageSize: z95.number(),
6475
- lastPage: z95.number(),
6476
- totalUnreadCount: z95.number().optional(),
6477
- unreadRoomCount: z95.number().optional(),
6478
- unreadCountsByAssigneeList: z95.array(
6479
- z95.object({
6480
- assigneeId: z95.string().optional(),
6481
- totalUnreadCount: z95.string().optional()
6482
- })
6483
- )
6484
- })
6588
+ notifications: z95.array(NotificationSchema),
6589
+ total: z95.number(),
6590
+ page: z95.number(),
6591
+ pageSize: z95.number(),
6592
+ lastPage: z95.number(),
6593
+ totalUnreadCount: z95.number().optional()
6485
6594
  });
6486
6595
  var ResetNotificationRequestSchema = z95.object({
6487
6596
  userId: z95.string()
@@ -6495,7 +6604,7 @@ var userNotificationContract = initContract37().router(
6495
6604
  path: "",
6496
6605
  query: GetNotificationsRequestSchema,
6497
6606
  responses: {
6498
- 201: DefaultSuccessResponseSchema.extend({
6607
+ 200: DefaultSuccessResponseSchema.extend({
6499
6608
  data: GetNotificationsResponseSchema
6500
6609
  }),
6501
6610
  400: z96.object({