@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.js CHANGED
@@ -1499,8 +1499,8 @@ var MessageAttachmentSchema = import_zod29.default.object({
1499
1499
  thumbnailUrl: import_zod29.default.string().optional()
1500
1500
  });
1501
1501
  var StickerSchema = import_zod29.default.object({
1502
- packageId: import_zod29.default.number().optional(),
1503
- stickerId: import_zod29.default.number().optional()
1502
+ packageId: import_zod29.default.number(),
1503
+ stickerId: import_zod29.default.number()
1504
1504
  });
1505
1505
  var SendMessageSchema = import_zod29.default.object({
1506
1506
  roomId: import_zod29.default.string().uuid(),
@@ -1524,6 +1524,7 @@ var SearchRoomsSchema = DefaultQueryParamsSchema.extend({
1524
1524
  type: import_zod29.default.enum(["contact", "message"]).default("contact")
1525
1525
  });
1526
1526
  var ChannelSchema2 = import_zod29.default.object({
1527
+ id: import_zod29.default.string(),
1527
1528
  name: import_zod29.default.string(),
1528
1529
  type: ChannelTypeSchema,
1529
1530
  metadata: ChannelMetadataSchema,
@@ -1746,8 +1747,8 @@ var ReceiveMessageSchema = import_zod29.default.object({
1746
1747
  var LineStickerSchema = import_zod29.default.object({
1747
1748
  roomId: import_zod29.default.string().uuid(),
1748
1749
  // These IDs are not UUIDs.
1749
- packageId: import_zod29.default.string(),
1750
- stickerId: import_zod29.default.string()
1750
+ packageId: import_zod29.default.number(),
1751
+ stickerId: import_zod29.default.number()
1751
1752
  });
1752
1753
 
1753
1754
  // src/channel/validation.ts
@@ -2076,16 +2077,6 @@ var mainChatContract = (0, import_core7.initContract)().router(
2076
2077
  },
2077
2078
  summary: "Send message to room"
2078
2079
  },
2079
- sendLineSticker: {
2080
- method: "POST",
2081
- path: "/line/sticker",
2082
- body: LineStickerSchema,
2083
- responses: {
2084
- 200: import_zod33.default.object({ message: import_zod33.default.string().optional().nullable() }).optional(),
2085
- 422: DefaultErrorResponseSchema,
2086
- 500: DefaultErrorResponseSchema
2087
- }
2088
- },
2089
2080
  getRoomsByPlatformContactId: {
2090
2081
  method: "GET",
2091
2082
  path: "/rooms/:platformContactId",
@@ -3824,7 +3815,7 @@ var instagramContract = (0, import_core15.initContract)().router({
3824
3815
  connectToService: {
3825
3816
  method: "POST",
3826
3817
  path: "/connect",
3827
- body: ChannelSchema2,
3818
+ body: ChannelSchema2.partial(),
3828
3819
  responses: {
3829
3820
  200: ChannelServiceResponseSchema,
3830
3821
  500: DefaultErrorResponseSchema,
@@ -3907,8 +3898,8 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
3907
3898
  // src/line/validation.ts
3908
3899
  var import_zod53 = __toESM(require("zod"));
3909
3900
  var SendLineStickerSchema = import_zod53.default.object({
3910
- packageId: import_zod53.default.string(),
3911
- stickerId: import_zod53.default.string(),
3901
+ packageId: import_zod53.default.number(),
3902
+ stickerId: import_zod53.default.number(),
3912
3903
  room: import_zod53.default.object({
3913
3904
  id: import_zod53.default.string().uuid(),
3914
3905
  lastMessage: import_zod53.default.string().optional(),
@@ -3984,10 +3975,9 @@ var lineContract = (0, import_core16.initContract)().router({
3984
3975
  method: "POST",
3985
3976
  path: "/connect",
3986
3977
  responses: {
3987
- 200: DefaultSuccessResponseSchema.extend({
3988
- data: import_zod54.default.any()
3989
- }),
3990
- 500: DefaultErrorResponseSchema
3978
+ 200: ChannelServiceResponseSchema,
3979
+ 500: DefaultErrorResponseSchema,
3980
+ 400: DefaultErrorResponseSchema
3991
3981
  },
3992
3982
  body: ConnectLineService,
3993
3983
  summary: "Connect to LINE channel"
@@ -6686,6 +6676,28 @@ var userNotificationContract = (0, import_core37.initContract)().router(
6686
6676
  },
6687
6677
  summary: "Get user's notification"
6688
6678
  },
6679
+ getNewNotificationsCount: {
6680
+ method: "GET",
6681
+ path: "/new_notifications_count",
6682
+ responses: {
6683
+ 200: DefaultSuccessResponseSchema.extend({
6684
+ total: import_zod96.default.number()
6685
+ }),
6686
+ 400: import_zod96.default.object({
6687
+ message: import_zod96.default.string()
6688
+ }),
6689
+ 409: import_zod96.default.object({
6690
+ message: import_zod96.default.string()
6691
+ }),
6692
+ 500: import_zod96.default.object({
6693
+ message: import_zod96.default.string()
6694
+ }),
6695
+ 401: DefaultUnauthorizedSchema,
6696
+ 404: DefaultNotFoundSchema,
6697
+ 422: DefaultUnprocessibleSchema
6698
+ },
6699
+ summary: "Get user's unread notifications count"
6700
+ },
6689
6701
  resetNotifications: {
6690
6702
  method: "POST",
6691
6703
  path: "/reset",
@@ -6706,7 +6718,7 @@ var userNotificationContract = (0, import_core37.initContract)().router(
6706
6718
  404: DefaultNotFoundSchema,
6707
6719
  422: DefaultUnprocessibleSchema
6708
6720
  },
6709
- body: ResetNotificationRequestSchema,
6721
+ body: null,
6710
6722
  summary: "Reset notification count to zero"
6711
6723
  },
6712
6724
  readNotification: {