@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.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",
@@ -3088,6 +3079,7 @@ var import_zod43 = __toESM(require("zod"));
3088
3079
  var import_zod42 = __toESM(require("zod"));
3089
3080
  var sentimentScoreSchema = import_zod42.default.union([
3090
3081
  import_zod42.default.literal("positive"),
3082
+ import_zod42.default.literal("neutral"),
3091
3083
  import_zod42.default.literal("negative")
3092
3084
  ]);
3093
3085
  var CustomFieldQueryParamsSchema = import_zod42.default.object({
@@ -3824,7 +3816,7 @@ var instagramContract = (0, import_core15.initContract)().router({
3824
3816
  connectToService: {
3825
3817
  method: "POST",
3826
3818
  path: "/connect",
3827
- body: ChannelSchema2,
3819
+ body: ChannelSchema2.partial(),
3828
3820
  responses: {
3829
3821
  200: ChannelServiceResponseSchema,
3830
3822
  500: DefaultErrorResponseSchema,
@@ -3907,8 +3899,8 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
3907
3899
  // src/line/validation.ts
3908
3900
  var import_zod53 = __toESM(require("zod"));
3909
3901
  var SendLineStickerSchema = import_zod53.default.object({
3910
- packageId: import_zod53.default.string(),
3911
- stickerId: import_zod53.default.string(),
3902
+ packageId: import_zod53.default.number(),
3903
+ stickerId: import_zod53.default.number(),
3912
3904
  room: import_zod53.default.object({
3913
3905
  id: import_zod53.default.string().uuid(),
3914
3906
  lastMessage: import_zod53.default.string().optional(),
@@ -3984,10 +3976,9 @@ var lineContract = (0, import_core16.initContract)().router({
3984
3976
  method: "POST",
3985
3977
  path: "/connect",
3986
3978
  responses: {
3987
- 200: DefaultSuccessResponseSchema.extend({
3988
- data: import_zod54.default.any()
3989
- }),
3990
- 500: DefaultErrorResponseSchema
3979
+ 200: ChannelServiceResponseSchema,
3980
+ 500: DefaultErrorResponseSchema,
3981
+ 400: DefaultErrorResponseSchema
3991
3982
  },
3992
3983
  body: ConnectLineService,
3993
3984
  summary: "Connect to LINE channel"
@@ -6686,6 +6677,28 @@ var userNotificationContract = (0, import_core37.initContract)().router(
6686
6677
  },
6687
6678
  summary: "Get user's notification"
6688
6679
  },
6680
+ getNewNotificationsCount: {
6681
+ method: "GET",
6682
+ path: "/new_notifications_count",
6683
+ responses: {
6684
+ 200: DefaultSuccessResponseSchema.extend({
6685
+ total: import_zod96.default.number()
6686
+ }),
6687
+ 400: import_zod96.default.object({
6688
+ message: import_zod96.default.string()
6689
+ }),
6690
+ 409: import_zod96.default.object({
6691
+ message: import_zod96.default.string()
6692
+ }),
6693
+ 500: import_zod96.default.object({
6694
+ message: import_zod96.default.string()
6695
+ }),
6696
+ 401: DefaultUnauthorizedSchema,
6697
+ 404: DefaultNotFoundSchema,
6698
+ 422: DefaultUnprocessibleSchema
6699
+ },
6700
+ summary: "Get user's unread notifications count"
6701
+ },
6689
6702
  resetNotifications: {
6690
6703
  method: "POST",
6691
6704
  path: "/reset",
@@ -6706,7 +6719,7 @@ var userNotificationContract = (0, import_core37.initContract)().router(
6706
6719
  404: DefaultNotFoundSchema,
6707
6720
  422: DefaultUnprocessibleSchema
6708
6721
  },
6709
- body: ResetNotificationRequestSchema,
6722
+ body: null,
6710
6723
  summary: "Reset notification count to zero"
6711
6724
  },
6712
6725
  readNotification: {