@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.js CHANGED
@@ -1742,6 +1742,12 @@ var ReceiveMessageSchema = import_zod29.default.object({
1742
1742
  sender: UserSchema.optional().nullable()
1743
1743
  })
1744
1744
  });
1745
+ var LineStickerSchema = import_zod29.default.object({
1746
+ roomId: import_zod29.default.string().uuid(),
1747
+ // These IDs are not UUIDs.
1748
+ packageId: import_zod29.default.string(),
1749
+ stickerId: import_zod29.default.string()
1750
+ });
1745
1751
 
1746
1752
  // src/channel/validation.ts
1747
1753
  var import_zod30 = __toESM(require("zod"));
@@ -2069,6 +2075,16 @@ var mainChatContract = (0, import_core7.initContract)().router(
2069
2075
  },
2070
2076
  summary: "Send message to room"
2071
2077
  },
2078
+ sendLineSticker: {
2079
+ method: "POST",
2080
+ path: "/line/sticker",
2081
+ body: LineStickerSchema,
2082
+ responses: {
2083
+ 200: import_zod33.default.object({ message: import_zod33.default.string().optional().nullable() }).optional(),
2084
+ 422: DefaultErrorResponseSchema,
2085
+ 500: DefaultErrorResponseSchema
2086
+ }
2087
+ },
2072
2088
  getRoomsByPlatformContactId: {
2073
2089
  method: "GET",
2074
2090
  path: "/rooms/:platformContactId",
@@ -3824,10 +3840,13 @@ var instagramContract = (0, import_core15.initContract)().router({
3824
3840
  400: DefaultErrorResponseSchema
3825
3841
  }
3826
3842
  },
3827
- relogin: {
3843
+ reconnect: {
3828
3844
  method: "POST",
3829
- path: "/relogin",
3830
- body: ChannelSchema2.partial(),
3845
+ path: "/reconnect/:channelId",
3846
+ pathParams: import_zod51.default.object({
3847
+ channelId: import_zod51.default.string().uuid()
3848
+ }),
3849
+ body: null,
3831
3850
  responses: {
3832
3851
  200: ChannelServiceResponseSchema,
3833
3852
  500: DefaultErrorResponseSchema,
@@ -3847,6 +3866,16 @@ var instagramContract = (0, import_core15.initContract)().router({
3847
3866
  400: DefaultErrorResponseSchema
3848
3867
  }
3849
3868
  },
3869
+ relogin: {
3870
+ method: "POST",
3871
+ path: "/relogin",
3872
+ body: ChannelSchema2.partial(),
3873
+ responses: {
3874
+ 200: ChannelServiceResponseSchema,
3875
+ 500: DefaultErrorResponseSchema,
3876
+ 400: DefaultErrorResponseSchema
3877
+ }
3878
+ },
3850
3879
  getInstagramPages: {
3851
3880
  method: "GET",
3852
3881
  path: "/pages",
@@ -3877,10 +3906,63 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
3877
3906
  // src/line/validation.ts
3878
3907
  var import_zod53 = __toESM(require("zod"));
3879
3908
  var SendLineStickerSchema = import_zod53.default.object({
3880
- userId: import_zod53.default.string().uuid(),
3881
3909
  packageId: import_zod53.default.string(),
3882
3910
  stickerId: import_zod53.default.string(),
3883
- accessToken: import_zod53.default.string()
3911
+ room: import_zod53.default.object({
3912
+ id: import_zod53.default.string().uuid(),
3913
+ lastMessage: import_zod53.default.string().optional(),
3914
+ handleTime: import_zod53.default.number().optional(),
3915
+ isLatest: import_zod53.default.boolean(),
3916
+ direction: MessageDirectionTypeSchema,
3917
+ platformContact: import_zod53.default.object({
3918
+ channelId: import_zod53.default.string().uuid(),
3919
+ socialPlatformId: import_zod53.default.string().nullable(),
3920
+ type: ChannelTypeSchema,
3921
+ metadata: PlatformContactMetadataSchema,
3922
+ contact: import_zod53.default.object({
3923
+ name: import_zod53.default.string(),
3924
+ address: import_zod53.default.string().nullable(),
3925
+ channel: import_zod53.default.string().nullable(),
3926
+ notes: import_zod53.default.string().nullable(),
3927
+ contactProfile: import_zod53.default.string().nullable(),
3928
+ socialProfileUrl: import_zod53.default.string().nullable()
3929
+ })
3930
+ }),
3931
+ actor: import_zod53.default.object({
3932
+ name: import_zod53.default.string(),
3933
+ email: import_zod53.default.string().email(),
3934
+ address: import_zod53.default.string().nullable(),
3935
+ phone: import_zod53.default.string().nullable()
3936
+ }).nullable(),
3937
+ channel: ChannelSchema2
3938
+ }),
3939
+ message: import_zod53.default.object({
3940
+ message: import_zod53.default.string().optional(),
3941
+ direction: MessageDirectionTypeSchema,
3942
+ type: MessageTypeSchema,
3943
+ readAt: import_zod53.default.date().optional(),
3944
+ metadata: import_zod53.default.any().optional(),
3945
+ platformId: import_zod53.default.string().optional(),
3946
+ platformMessageId: import_zod53.default.string().optional(),
3947
+ replyPlatformMessageId: import_zod53.default.string().optional(),
3948
+ template: import_zod53.default.any().optional(),
3949
+ locale: MessageLocaleTypeSchema.optional(),
3950
+ url: import_zod53.default.string().optional(),
3951
+ previewUrl: import_zod53.default.string().optional(),
3952
+ imageSetId: import_zod53.default.string().optional(),
3953
+ upload: import_zod53.default.object({
3954
+ bucketName: import_zod53.default.string(),
3955
+ fileName: import_zod53.default.string(),
3956
+ fileSize: import_zod53.default.number(),
3957
+ fileKey: import_zod53.default.string()
3958
+ }).optional(),
3959
+ sender: import_zod53.default.object({
3960
+ name: import_zod53.default.string(),
3961
+ email: import_zod53.default.string().email(),
3962
+ address: import_zod53.default.string().nullable(),
3963
+ phone: import_zod53.default.string().nullable()
3964
+ })
3965
+ })
3884
3966
  });
3885
3967
 
3886
3968
  // src/line/index.ts
@@ -3917,6 +3999,42 @@ var lineContract = (0, import_core16.initContract)().router({
3917
3999
  200: SendMessageResponseSchema,
3918
4000
  500: DefaultErrorResponseSchema
3919
4001
  }
4002
+ },
4003
+ disconnect: {
4004
+ method: "POST",
4005
+ path: "/disconnect",
4006
+ body: ChannelSchema2.partial(),
4007
+ responses: {
4008
+ 200: ChannelServiceResponseSchema,
4009
+ 500: DefaultErrorResponseSchema,
4010
+ 400: DefaultErrorResponseSchema
4011
+ }
4012
+ },
4013
+ reconnect: {
4014
+ method: "POST",
4015
+ path: "/reconnect/:channelId",
4016
+ pathParams: import_zod54.default.object({
4017
+ channelId: import_zod54.default.string().uuid()
4018
+ }),
4019
+ body: null,
4020
+ responses: {
4021
+ 200: ChannelServiceResponseSchema,
4022
+ 500: DefaultErrorResponseSchema,
4023
+ 400: DefaultErrorResponseSchema
4024
+ }
4025
+ },
4026
+ delete: {
4027
+ method: "DELETE",
4028
+ path: "/delete/:channelId",
4029
+ pathParams: import_zod54.default.object({
4030
+ channelId: import_zod54.default.string().uuid()
4031
+ }),
4032
+ body: null,
4033
+ responses: {
4034
+ 200: ChannelServiceResponseSchema,
4035
+ 500: DefaultErrorResponseSchema,
4036
+ 400: DefaultErrorResponseSchema
4037
+ }
3920
4038
  }
3921
4039
  });
3922
4040
 
@@ -6530,21 +6648,12 @@ var GetNotificationsRequestSchema = import_zod95.default.object({
6530
6648
  });
6531
6649
  var GetNotificationsResponseSchema = import_zod95.default.object({
6532
6650
  notificationCount: import_zod95.default.number(),
6533
- notifications: import_zod95.default.object({
6534
- data: import_zod95.default.array(NotificationSchema),
6535
- total: import_zod95.default.number(),
6536
- page: import_zod95.default.number(),
6537
- pageSize: import_zod95.default.number(),
6538
- lastPage: import_zod95.default.number(),
6539
- totalUnreadCount: import_zod95.default.number().optional(),
6540
- unreadRoomCount: import_zod95.default.number().optional(),
6541
- unreadCountsByAssigneeList: import_zod95.default.array(
6542
- import_zod95.default.object({
6543
- assigneeId: import_zod95.default.string().optional(),
6544
- totalUnreadCount: import_zod95.default.string().optional()
6545
- })
6546
- )
6547
- })
6651
+ notifications: import_zod95.default.array(NotificationSchema),
6652
+ total: import_zod95.default.number(),
6653
+ page: import_zod95.default.number(),
6654
+ pageSize: import_zod95.default.number(),
6655
+ lastPage: import_zod95.default.number(),
6656
+ totalUnreadCount: import_zod95.default.number().optional()
6548
6657
  });
6549
6658
  var ResetNotificationRequestSchema = import_zod95.default.object({
6550
6659
  userId: import_zod95.default.string()
@@ -6558,7 +6667,7 @@ var userNotificationContract = (0, import_core37.initContract)().router(
6558
6667
  path: "",
6559
6668
  query: GetNotificationsRequestSchema,
6560
6669
  responses: {
6561
- 201: DefaultSuccessResponseSchema.extend({
6670
+ 200: DefaultSuccessResponseSchema.extend({
6562
6671
  data: GetNotificationsResponseSchema
6563
6672
  }),
6564
6673
  400: import_zod96.default.object({