@kl1/contracts 1.0.82 → 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.mjs CHANGED
@@ -1020,6 +1020,7 @@ var CxLogSchemaWithRelations = DefaultEntitySchema.extend({
1020
1020
  startedDate: z25.string().nullable(),
1021
1021
  handledTime: z25.string().nullable(),
1022
1022
  firstResponseTime: z25.string().nullable(),
1023
+ resolutionTime: z25.string().nullable(),
1023
1024
  slaMeet: z25.string().nullable(),
1024
1025
  evaluateForm: EvaluateFormSchema.nullable(),
1025
1026
  wrapUpForm: WrapUpFormSchema.nullable(),
@@ -1435,8 +1436,8 @@ var MessageAttachmentSchema = z29.object({
1435
1436
  thumbnailUrl: z29.string().optional()
1436
1437
  });
1437
1438
  var StickerSchema = z29.object({
1438
- packageId: z29.number().optional(),
1439
- stickerId: z29.number().optional()
1439
+ packageId: z29.number(),
1440
+ stickerId: z29.number()
1440
1441
  });
1441
1442
  var SendMessageSchema = z29.object({
1442
1443
  roomId: z29.string().uuid(),
@@ -1460,6 +1461,7 @@ var SearchRoomsSchema = DefaultQueryParamsSchema.extend({
1460
1461
  type: z29.enum(["contact", "message"]).default("contact")
1461
1462
  });
1462
1463
  var ChannelSchema2 = z29.object({
1464
+ id: z29.string(),
1463
1465
  name: z29.string(),
1464
1466
  type: ChannelTypeSchema,
1465
1467
  metadata: ChannelMetadataSchema,
@@ -1682,8 +1684,8 @@ var ReceiveMessageSchema = z29.object({
1682
1684
  var LineStickerSchema = z29.object({
1683
1685
  roomId: z29.string().uuid(),
1684
1686
  // These IDs are not UUIDs.
1685
- packageId: z29.string(),
1686
- stickerId: z29.string()
1687
+ packageId: z29.number(),
1688
+ stickerId: z29.number()
1687
1689
  });
1688
1690
 
1689
1691
  // src/channel/validation.ts
@@ -2012,16 +2014,6 @@ var mainChatContract = initContract7().router(
2012
2014
  },
2013
2015
  summary: "Send message to room"
2014
2016
  },
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
- },
2025
2017
  getRoomsByPlatformContactId: {
2026
2018
  method: "GET",
2027
2019
  path: "/rooms/:platformContactId",
@@ -3760,7 +3752,7 @@ var instagramContract = initContract15().router({
3760
3752
  connectToService: {
3761
3753
  method: "POST",
3762
3754
  path: "/connect",
3763
- body: ChannelSchema2,
3755
+ body: ChannelSchema2.partial(),
3764
3756
  responses: {
3765
3757
  200: ChannelServiceResponseSchema,
3766
3758
  500: DefaultErrorResponseSchema,
@@ -3843,8 +3835,8 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
3843
3835
  // src/line/validation.ts
3844
3836
  import z53 from "zod";
3845
3837
  var SendLineStickerSchema = z53.object({
3846
- packageId: z53.string(),
3847
- stickerId: z53.string(),
3838
+ packageId: z53.number(),
3839
+ stickerId: z53.number(),
3848
3840
  room: z53.object({
3849
3841
  id: z53.string().uuid(),
3850
3842
  lastMessage: z53.string().optional(),
@@ -3920,10 +3912,9 @@ var lineContract = initContract16().router({
3920
3912
  method: "POST",
3921
3913
  path: "/connect",
3922
3914
  responses: {
3923
- 200: DefaultSuccessResponseSchema.extend({
3924
- data: z54.any()
3925
- }),
3926
- 500: DefaultErrorResponseSchema
3915
+ 200: ChannelServiceResponseSchema,
3916
+ 500: DefaultErrorResponseSchema,
3917
+ 400: DefaultErrorResponseSchema
3927
3918
  },
3928
3919
  body: ConnectLineService,
3929
3920
  summary: "Connect to LINE channel"
@@ -6622,6 +6613,28 @@ var userNotificationContract = initContract37().router(
6622
6613
  },
6623
6614
  summary: "Get user's notification"
6624
6615
  },
6616
+ getNewNotificationsCount: {
6617
+ method: "GET",
6618
+ path: "/new_notifications_count",
6619
+ responses: {
6620
+ 200: DefaultSuccessResponseSchema.extend({
6621
+ total: z96.number()
6622
+ }),
6623
+ 400: z96.object({
6624
+ message: z96.string()
6625
+ }),
6626
+ 409: z96.object({
6627
+ message: z96.string()
6628
+ }),
6629
+ 500: z96.object({
6630
+ message: z96.string()
6631
+ }),
6632
+ 401: DefaultUnauthorizedSchema,
6633
+ 404: DefaultNotFoundSchema,
6634
+ 422: DefaultUnprocessibleSchema
6635
+ },
6636
+ summary: "Get user's unread notifications count"
6637
+ },
6625
6638
  resetNotifications: {
6626
6639
  method: "POST",
6627
6640
  path: "/reset",
@@ -6642,7 +6655,7 @@ var userNotificationContract = initContract37().router(
6642
6655
  404: DefaultNotFoundSchema,
6643
6656
  422: DefaultUnprocessibleSchema
6644
6657
  },
6645
- body: ResetNotificationRequestSchema,
6658
+ body: null,
6646
6659
  summary: "Reset notification count to zero"
6647
6660
  },
6648
6661
  readNotification: {