@kl1/contracts 1.0.40 → 1.0.42

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
@@ -717,7 +717,7 @@ var channelContract = initContract5().router(
717
717
  path: "/",
718
718
  responses: {
719
719
  200: DefaultSuccessResponseSchema.extend({
720
- channels: ChannelSchema.array()
720
+ data: ChannelSchema.array()
721
721
  })
722
722
  },
723
723
  summary: "Get Channels"
@@ -974,7 +974,8 @@ var CxLogSchemaWithRelations = DefaultEntitySchema.extend({
974
974
  queueName: z26.string().nullable().optional()
975
975
  }).nullable(),
976
976
  contact: ContactSchema.nullable(),
977
- agent: UserSchema.nullable()
977
+ agent: UserSchema.nullable(),
978
+ contactLabel: z26.array(z26.string())
978
979
  });
979
980
 
980
981
  // src/chat/schema.ts
@@ -1075,13 +1076,13 @@ var CustomFieldSchema = DefaultEntitySchema.extend({
1075
1076
  var GetRoomsSchema = z29.object({
1076
1077
  page: z29.coerce.number().positive().default(1),
1077
1078
  pageSize: z29.coerce.number().positive().default(20),
1078
- contactTagIds: z29.string().array().optional(),
1079
- contactIds: z29.string().array().optional(),
1080
- agentIds: z29.string().array().optional(),
1081
- roomTagIds: z29.string().array().optional(),
1079
+ contactTags: z29.string().array().optional(),
1080
+ contacts: z29.string().array().optional(),
1081
+ agents: z29.string().array().optional(),
1082
+ roomTags: z29.string().array().optional(),
1082
1083
  keyword: z29.string().optional(),
1083
- company: z29.string().array().optional(),
1084
- channel: z29.string().array().optional(),
1084
+ companies: z29.string().array().optional(),
1085
+ channels: z29.string().array().optional(),
1085
1086
  name: z29.string().optional(),
1086
1087
  address: z29.string().optional(),
1087
1088
  contactGroups: z29.string().array().optional(),
@@ -1091,7 +1092,9 @@ var GetRoomsSchema = z29.object({
1091
1092
  phone: z29.string().optional(),
1092
1093
  email: z29.string().optional(),
1093
1094
  notes: z29.string().optional(),
1094
- tab: z29.string().optional()
1095
+ tab: z29.string().optional(),
1096
+ type: z29.string().optional(),
1097
+ sorting: z29.string().optional().default("desc")
1095
1098
  });
1096
1099
  var UpdateRoomTagsAndNotesSchema = z29.object({
1097
1100
  note: z29.string().optional(),
@@ -1106,24 +1109,28 @@ var MessageAttachmentSchema = z29.object({
1106
1109
  fileName: z29.string(),
1107
1110
  fileSize: z29.number(),
1108
1111
  url: z29.string(),
1109
- fileType: MessageTypeSchema,
1112
+ fileType: z29.string(),
1110
1113
  thumbnailUrl: z29.string().optional()
1111
1114
  });
1115
+ var StickerSchema = z29.object({
1116
+ packageId: z29.number().optional(),
1117
+ stickerId: z29.number().optional()
1118
+ });
1112
1119
  var SendMessageSchema = z29.object({
1113
1120
  roomId: z29.string().uuid(),
1114
1121
  messageType: MessageTypeSchema,
1115
1122
  message: z29.string().optional(),
1116
1123
  messageAttachments: MessageAttachmentSchema.optional(),
1117
1124
  user: UserSchema.optional(),
1118
- packageId: z29.number().optional(),
1119
- stickerId: z29.number().optional()
1125
+ sticker: StickerSchema
1120
1126
  });
1121
1127
  var SolveRoomSchema = z29.object({
1122
1128
  roomId: z29.string(),
1123
1129
  disposition: z29.string()
1124
1130
  });
1125
- var UpdateAssigneeSchema = SolveRoomSchema.extend({
1126
- assigneeId: z29.string().uuid()
1131
+ var UpdateAssigneeSchema = z29.object({
1132
+ assigneeId: z29.string().uuid(),
1133
+ roomId: z29.string()
1127
1134
  });
1128
1135
  var SearchRoomsSchema = DefaultQueryParamsSchema.extend({
1129
1136
  query: z29.string()
@@ -1310,9 +1317,6 @@ var mainChatContract = initContract6().router(
1310
1317
  path: "/message",
1311
1318
  body: SendMessageSchema,
1312
1319
  responses: {
1313
- 200: DefaultSuccessResponseSchema.extend({
1314
- data: MessageSchema
1315
- }),
1316
1320
  500: DefaultErrorResponseSchema
1317
1321
  },
1318
1322
  summary: "Send message to room"
@@ -3798,8 +3802,9 @@ var userContract = initContract24().router(
3798
3802
  path: "",
3799
3803
  headers: DefaultHeaderSchema,
3800
3804
  query: z64.object({
3801
- page: z64.coerce.number().default(1),
3802
- pageSize: z64.coerce.number().default(10),
3805
+ page: z64.coerce.number().optional(),
3806
+ pageSize: z64.coerce.number().optional(),
3807
+ // Don't add default 10. In some places, we need to fetch all users.
3803
3808
  keyword: z64.string().optional()
3804
3809
  }).optional(),
3805
3810
  responses: {