@kl1/contracts 1.0.99-uat → 1.0.99

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,9 +1101,7 @@ var PlatformContactSchema = z26.object({
1101
1101
  var RoomSchema = DefaultEntitySchema.extend({
1102
1102
  lastMessage: z26.string(),
1103
1103
  handleTime: z26.number(),
1104
- closedAt: z26.date(),
1105
- lastMessageAt: z26.date().nullable(),
1106
- status: z26.number(),
1104
+ closeAt: z26.date(),
1107
1105
  unreadCount: z26.number(),
1108
1106
  firstResponseAt: z26.date(),
1109
1107
  firstResponseTime: z26.number(),
@@ -1280,8 +1278,61 @@ var RepliedMessageSchema = DefaultEntitySchema.extend({
1280
1278
  url: z26.string(),
1281
1279
  previewUrl: z26.string(),
1282
1280
  imageSetId: z26.string(),
1281
+ // room: RoomSchema,
1283
1282
  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
+ // }),
1284
1309
  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
+ // }),
1285
1336
  assignee: UserSchema,
1286
1337
  sender: UserSchema
1287
1338
  });
@@ -1397,12 +1448,7 @@ var SendMessageSchema = z29.object({
1397
1448
  messageAttachments: MessageAttachmentSchema.optional(),
1398
1449
  user: UserSchema.optional(),
1399
1450
  sticker: StickerSchema.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()
1451
+ file: z29.custom().optional()
1406
1452
  });
1407
1453
  var SolveRoomSchema = z29.object({
1408
1454
  roomId: z29.string(),
@@ -1451,7 +1497,6 @@ var SendMessageToPlatformSchema = z29.object({
1451
1497
  createdAt: z29.string(),
1452
1498
  updatedAt: z29.string(),
1453
1499
  platformContact: z29.object({
1454
- id: z29.string().uuid(),
1455
1500
  channelId: z29.string().uuid(),
1456
1501
  socialPlatformId: z29.string().nullable(),
1457
1502
  type: ChannelTypeSchema,
@@ -1466,23 +1511,12 @@ var SendMessageToPlatformSchema = z29.object({
1466
1511
  })
1467
1512
  }),
1468
1513
  actor: z29.object({
1469
- id: z29.string().uuid(),
1470
1514
  name: z29.string(),
1471
1515
  email: z29.string().email(),
1472
1516
  address: z29.string().nullable(),
1473
1517
  phone: z29.string().nullable()
1474
1518
  }).nullable(),
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()
1519
+ channel: ChannelSchema2
1486
1520
  }),
1487
1521
  message: z29.object({
1488
1522
  message: z29.string().optional(),
@@ -5935,6 +5969,9 @@ var CreateUserSchema = z81.object({
5935
5969
  var UpdateUserSchema = CreateUserSchema.extend({
5936
5970
  newPassword: z81.string()
5937
5971
  });
5972
+ var UpdateUserProfileSchema = z81.object({
5973
+ password: z81.string()
5974
+ });
5938
5975
 
5939
5976
  // src/user/index.ts
5940
5977
  var userContract = initContract31().router(
@@ -6000,7 +6037,7 @@ var userContract = initContract31().router(
6000
6037
  body: UpdateUserSchema,
6001
6038
  responses: {
6002
6039
  201: DefaultSuccessResponseSchema.extend({
6003
- role: UserSchema
6040
+ user: UserSchema
6004
6041
  }),
6005
6042
  400: z82.object({
6006
6043
  message: z82.string()
@@ -6012,6 +6049,26 @@ var userContract = initContract31().router(
6012
6049
  },
6013
6050
  summary: "Update a user."
6014
6051
  },
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
+ },
6015
6072
  deleteUser: {
6016
6073
  method: "DELETE",
6017
6074
  path: "/:id",