@kl1/contracts 1.0.99 → 1.1.1-uat

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
@@ -1101,7 +1101,9 @@ var PlatformContactSchema = z26.object({
1101
1101
  var RoomSchema = DefaultEntitySchema.extend({
1102
1102
  lastMessage: z26.string(),
1103
1103
  handleTime: z26.number(),
1104
- closeAt: z26.date(),
1104
+ closedAt: z26.date(),
1105
+ lastMessageAt: z26.date().nullable(),
1106
+ status: z26.number(),
1105
1107
  unreadCount: z26.number(),
1106
1108
  firstResponseAt: z26.date(),
1107
1109
  firstResponseTime: z26.number(),
@@ -1278,61 +1280,8 @@ var RepliedMessageSchema = DefaultEntitySchema.extend({
1278
1280
  url: z26.string(),
1279
1281
  previewUrl: z26.string(),
1280
1282
  imageSetId: z26.string(),
1281
- // room: RoomSchema,
1282
1283
  upload: UploadSchema,
1283
- // id: z.string().uuid(),
1284
- // createdAt: z.date(),
1285
- // updatedAt: z.date(),
1286
- // deletedAt: z.date().nullable(),
1287
- // name: z.string(),
1288
- // email: z.string().email(),
1289
- // emailVerifiedAt: z.date().nullable(),
1290
- // password: z.string(),
1291
- // address: z.string().nullable(),
1292
- // phone: z.string().nullable(),
1293
- // notificationCount: z.number().nullable(),
1294
- // roles: z.array(RoleSchema),
1295
- // extension: z.object({
1296
- // id: z.string().uuid(),
1297
- // createdAt: z.date(),
1298
- // updatedAt: z.date(),
1299
- // deletedAt: z.date().nullable(),
1300
- // userId: z.string().nullable(),
1301
- // sipServerUrl: z.string(),
1302
- // sipUserName: z.string(),
1303
- // webphoneLoginUser: z.string(),
1304
- // extensionId: z.string().nullable(),
1305
- // extensionName: z.string(),
1306
- // telephonySignature: z.string().nullable(),
1307
- // }),
1308
- // }),
1309
1284
  actor: UserSchema,
1310
- // id: z.string().uuid(),
1311
- // createdAt: z.date(),
1312
- // updatedAt: z.date(),
1313
- // deletedAt: z.date().nullable(),
1314
- // name: z.string(),
1315
- // email: z.string().email(),
1316
- // emailVerifiedAt: z.date().nullable(),
1317
- // password: z.string(),
1318
- // address: z.string().nullable(),
1319
- // phone: z.string().nullable(),
1320
- // notificationCount: z.number().nullable(),
1321
- // roles: z.array(RoleSchema),
1322
- // extension: z.object({
1323
- // id: z.string().uuid(),
1324
- // createdAt: z.date(),
1325
- // updatedAt: z.date(),
1326
- // deletedAt: z.date().nullable(),
1327
- // userId: z.string().nullable(),
1328
- // sipServerUrl: z.string(),
1329
- // sipUserName: z.string(),
1330
- // webphoneLoginUser: z.string(),
1331
- // extensionId: z.string().nullable(),
1332
- // extensionName: z.string(),
1333
- // telephonySignature: z.string().nullable(),
1334
- // }),
1335
- // }),
1336
1285
  assignee: UserSchema,
1337
1286
  sender: UserSchema
1338
1287
  });
@@ -1448,7 +1397,12 @@ var SendMessageSchema = z29.object({
1448
1397
  messageAttachments: MessageAttachmentSchema.optional(),
1449
1398
  user: UserSchema.optional(),
1450
1399
  sticker: StickerSchema.optional(),
1451
- file: z29.custom().optional()
1400
+ file: z29.custom().optional(),
1401
+ messengerTags: z29.union([
1402
+ z29.literal("post_purchase_update"),
1403
+ z29.literal("account_update"),
1404
+ z29.literal("confirmed_event_update")
1405
+ ]).optional()
1452
1406
  });
1453
1407
  var SolveRoomSchema = z29.object({
1454
1408
  roomId: z29.string(),
@@ -1497,6 +1451,7 @@ var SendMessageToPlatformSchema = z29.object({
1497
1451
  createdAt: z29.string(),
1498
1452
  updatedAt: z29.string(),
1499
1453
  platformContact: z29.object({
1454
+ id: z29.string().uuid(),
1500
1455
  channelId: z29.string().uuid(),
1501
1456
  socialPlatformId: z29.string().nullable(),
1502
1457
  type: ChannelTypeSchema,
@@ -1511,12 +1466,23 @@ var SendMessageToPlatformSchema = z29.object({
1511
1466
  })
1512
1467
  }),
1513
1468
  actor: z29.object({
1469
+ id: z29.string().uuid(),
1514
1470
  name: z29.string(),
1515
1471
  email: z29.string().email(),
1516
1472
  address: z29.string().nullable(),
1517
1473
  phone: z29.string().nullable()
1518
1474
  }).nullable(),
1519
- channel: ChannelSchema2
1475
+ assignee: z29.object({
1476
+ id: z29.string().uuid(),
1477
+ name: z29.string(),
1478
+ email: z29.string().email()
1479
+ }).nullable(),
1480
+ channel: ChannelSchema2,
1481
+ messengerTags: z29.union([
1482
+ z29.literal("post_purchase_update"),
1483
+ z29.literal("account_update"),
1484
+ z29.literal("confirmed_event_update")
1485
+ ]).optional()
1520
1486
  }),
1521
1487
  message: z29.object({
1522
1488
  message: z29.string().optional(),
@@ -5969,9 +5935,6 @@ var CreateUserSchema = z81.object({
5969
5935
  var UpdateUserSchema = CreateUserSchema.extend({
5970
5936
  newPassword: z81.string()
5971
5937
  });
5972
- var UpdateUserProfileSchema = z81.object({
5973
- password: z81.string()
5974
- });
5975
5938
 
5976
5939
  // src/user/index.ts
5977
5940
  var userContract = initContract31().router(
@@ -6037,7 +6000,7 @@ var userContract = initContract31().router(
6037
6000
  body: UpdateUserSchema,
6038
6001
  responses: {
6039
6002
  201: DefaultSuccessResponseSchema.extend({
6040
- user: UserSchema
6003
+ role: UserSchema
6041
6004
  }),
6042
6005
  400: z82.object({
6043
6006
  message: z82.string()
@@ -6049,26 +6012,6 @@ var userContract = initContract31().router(
6049
6012
  },
6050
6013
  summary: "Update a user."
6051
6014
  },
6052
- updateUserProfile: {
6053
- method: "PATCH",
6054
- path: "/profile/:id",
6055
- pathParams: z82.object({ id: z82.string() }),
6056
- headers: DefaultHeaderSchema,
6057
- body: UpdateUserProfileSchema,
6058
- responses: {
6059
- 201: DefaultSuccessResponseSchema.extend({
6060
- user: UserSchema
6061
- }),
6062
- 400: z82.object({
6063
- message: z82.string()
6064
- }),
6065
- 401: DefaultUnauthorizedSchema,
6066
- 404: DefaultNotFoundSchema,
6067
- 422: DefaultUnprocessibleSchema,
6068
- 500: DefaultErrorResponseSchema
6069
- },
6070
- summary: "Update a user profile."
6071
- },
6072
6015
  deleteUser: {
6073
6016
  method: "DELETE",
6074
6017
  path: "/:id",