@kl1/contracts 1.0.80 → 1.0.82
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 +150 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +149 -25
- package/dist/index.mjs.map +1 -1
- package/dist/src/chat/index.d.ts +64 -1
- package/dist/src/chat/index.d.ts.map +1 -1
- package/dist/src/chat/validation.d.ts +13 -0
- package/dist/src/chat/validation.d.ts.map +1 -1
- package/dist/src/contract.d.ts +11707 -8883
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/instagram/index.d.ts +269 -91
- package/dist/src/instagram/index.d.ts.map +1 -1
- package/dist/src/line/index.d.ts +1527 -352
- package/dist/src/line/index.d.ts.map +1 -1
- package/dist/src/line/validation.d.ts +564 -6
- package/dist/src/line/validation.d.ts.map +1 -1
- package/dist/src/notification/index.d.ts +1562 -149
- package/dist/src/notification/index.d.ts.map +1 -1
- package/dist/src/notification/schema.d.ts +1307 -7
- package/dist/src/notification/schema.d.ts.map +1 -1
- package/dist/src/notification/validation.d.ts +725 -107
- package/dist/src/notification/validation.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1679,6 +1679,12 @@ var ReceiveMessageSchema = z29.object({
|
|
1679
1679
|
sender: UserSchema.optional().nullable()
|
1680
1680
|
})
|
1681
1681
|
});
|
1682
|
+
var LineStickerSchema = z29.object({
|
1683
|
+
roomId: z29.string().uuid(),
|
1684
|
+
// These IDs are not UUIDs.
|
1685
|
+
packageId: z29.string(),
|
1686
|
+
stickerId: z29.string()
|
1687
|
+
});
|
1682
1688
|
|
1683
1689
|
// src/channel/validation.ts
|
1684
1690
|
import z30 from "zod";
|
@@ -2006,6 +2012,16 @@ var mainChatContract = initContract7().router(
|
|
2006
2012
|
},
|
2007
2013
|
summary: "Send message to room"
|
2008
2014
|
},
|
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
|
+
},
|
2009
2025
|
getRoomsByPlatformContactId: {
|
2010
2026
|
method: "GET",
|
2011
2027
|
path: "/rooms/:platformContactId",
|
@@ -3761,10 +3777,13 @@ var instagramContract = initContract15().router({
|
|
3761
3777
|
400: DefaultErrorResponseSchema
|
3762
3778
|
}
|
3763
3779
|
},
|
3764
|
-
|
3780
|
+
reconnect: {
|
3765
3781
|
method: "POST",
|
3766
|
-
path: "/
|
3767
|
-
|
3782
|
+
path: "/reconnect/:channelId",
|
3783
|
+
pathParams: z51.object({
|
3784
|
+
channelId: z51.string().uuid()
|
3785
|
+
}),
|
3786
|
+
body: null,
|
3768
3787
|
responses: {
|
3769
3788
|
200: ChannelServiceResponseSchema,
|
3770
3789
|
500: DefaultErrorResponseSchema,
|
@@ -3784,6 +3803,16 @@ var instagramContract = initContract15().router({
|
|
3784
3803
|
400: DefaultErrorResponseSchema
|
3785
3804
|
}
|
3786
3805
|
},
|
3806
|
+
relogin: {
|
3807
|
+
method: "POST",
|
3808
|
+
path: "/relogin",
|
3809
|
+
body: ChannelSchema2.partial(),
|
3810
|
+
responses: {
|
3811
|
+
200: ChannelServiceResponseSchema,
|
3812
|
+
500: DefaultErrorResponseSchema,
|
3813
|
+
400: DefaultErrorResponseSchema
|
3814
|
+
}
|
3815
|
+
},
|
3787
3816
|
getInstagramPages: {
|
3788
3817
|
method: "GET",
|
3789
3818
|
path: "/pages",
|
@@ -3814,10 +3843,63 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
|
|
3814
3843
|
// src/line/validation.ts
|
3815
3844
|
import z53 from "zod";
|
3816
3845
|
var SendLineStickerSchema = z53.object({
|
3817
|
-
userId: z53.string().uuid(),
|
3818
3846
|
packageId: z53.string(),
|
3819
3847
|
stickerId: z53.string(),
|
3820
|
-
|
3848
|
+
room: z53.object({
|
3849
|
+
id: z53.string().uuid(),
|
3850
|
+
lastMessage: z53.string().optional(),
|
3851
|
+
handleTime: z53.number().optional(),
|
3852
|
+
isLatest: z53.boolean(),
|
3853
|
+
direction: MessageDirectionTypeSchema,
|
3854
|
+
platformContact: z53.object({
|
3855
|
+
channelId: z53.string().uuid(),
|
3856
|
+
socialPlatformId: z53.string().nullable(),
|
3857
|
+
type: ChannelTypeSchema,
|
3858
|
+
metadata: PlatformContactMetadataSchema,
|
3859
|
+
contact: z53.object({
|
3860
|
+
name: z53.string(),
|
3861
|
+
address: z53.string().nullable(),
|
3862
|
+
channel: z53.string().nullable(),
|
3863
|
+
notes: z53.string().nullable(),
|
3864
|
+
contactProfile: z53.string().nullable(),
|
3865
|
+
socialProfileUrl: z53.string().nullable()
|
3866
|
+
})
|
3867
|
+
}),
|
3868
|
+
actor: z53.object({
|
3869
|
+
name: z53.string(),
|
3870
|
+
email: z53.string().email(),
|
3871
|
+
address: z53.string().nullable(),
|
3872
|
+
phone: z53.string().nullable()
|
3873
|
+
}).nullable(),
|
3874
|
+
channel: ChannelSchema2
|
3875
|
+
}),
|
3876
|
+
message: z53.object({
|
3877
|
+
message: z53.string().optional(),
|
3878
|
+
direction: MessageDirectionTypeSchema,
|
3879
|
+
type: MessageTypeSchema,
|
3880
|
+
readAt: z53.date().optional(),
|
3881
|
+
metadata: z53.any().optional(),
|
3882
|
+
platformId: z53.string().optional(),
|
3883
|
+
platformMessageId: z53.string().optional(),
|
3884
|
+
replyPlatformMessageId: z53.string().optional(),
|
3885
|
+
template: z53.any().optional(),
|
3886
|
+
locale: MessageLocaleTypeSchema.optional(),
|
3887
|
+
url: z53.string().optional(),
|
3888
|
+
previewUrl: z53.string().optional(),
|
3889
|
+
imageSetId: z53.string().optional(),
|
3890
|
+
upload: z53.object({
|
3891
|
+
bucketName: z53.string(),
|
3892
|
+
fileName: z53.string(),
|
3893
|
+
fileSize: z53.number(),
|
3894
|
+
fileKey: z53.string()
|
3895
|
+
}).optional(),
|
3896
|
+
sender: z53.object({
|
3897
|
+
name: z53.string(),
|
3898
|
+
email: z53.string().email(),
|
3899
|
+
address: z53.string().nullable(),
|
3900
|
+
phone: z53.string().nullable()
|
3901
|
+
})
|
3902
|
+
})
|
3821
3903
|
});
|
3822
3904
|
|
3823
3905
|
// src/line/index.ts
|
@@ -3854,6 +3936,42 @@ var lineContract = initContract16().router({
|
|
3854
3936
|
200: SendMessageResponseSchema,
|
3855
3937
|
500: DefaultErrorResponseSchema
|
3856
3938
|
}
|
3939
|
+
},
|
3940
|
+
disconnect: {
|
3941
|
+
method: "POST",
|
3942
|
+
path: "/disconnect",
|
3943
|
+
body: ChannelSchema2.partial(),
|
3944
|
+
responses: {
|
3945
|
+
200: ChannelServiceResponseSchema,
|
3946
|
+
500: DefaultErrorResponseSchema,
|
3947
|
+
400: DefaultErrorResponseSchema
|
3948
|
+
}
|
3949
|
+
},
|
3950
|
+
reconnect: {
|
3951
|
+
method: "POST",
|
3952
|
+
path: "/reconnect/:channelId",
|
3953
|
+
pathParams: z54.object({
|
3954
|
+
channelId: z54.string().uuid()
|
3955
|
+
}),
|
3956
|
+
body: null,
|
3957
|
+
responses: {
|
3958
|
+
200: ChannelServiceResponseSchema,
|
3959
|
+
500: DefaultErrorResponseSchema,
|
3960
|
+
400: DefaultErrorResponseSchema
|
3961
|
+
}
|
3962
|
+
},
|
3963
|
+
delete: {
|
3964
|
+
method: "DELETE",
|
3965
|
+
path: "/delete/:channelId",
|
3966
|
+
pathParams: z54.object({
|
3967
|
+
channelId: z54.string().uuid()
|
3968
|
+
}),
|
3969
|
+
body: null,
|
3970
|
+
responses: {
|
3971
|
+
200: ChannelServiceResponseSchema,
|
3972
|
+
500: DefaultErrorResponseSchema,
|
3973
|
+
400: DefaultErrorResponseSchema
|
3974
|
+
}
|
3857
3975
|
}
|
3858
3976
|
});
|
3859
3977
|
|
@@ -6431,15 +6549,29 @@ import z95 from "zod";
|
|
6431
6549
|
|
6432
6550
|
// src/notification/schema.ts
|
6433
6551
|
import z94 from "zod";
|
6434
|
-
var NotificationObjectSchema = z94.object({
|
6435
|
-
data: z94.string()
|
6436
|
-
});
|
6437
6552
|
var NotificationChangeSchema = z94.object({
|
6553
|
+
id: z94.string().uuid(),
|
6554
|
+
createdAt: z94.date(),
|
6555
|
+
updatedAt: z94.date(),
|
6556
|
+
deletedAt: z94.date().nullable(),
|
6438
6557
|
actorId: z94.string().uuid(),
|
6558
|
+
actor: UserSchema,
|
6439
6559
|
notificationObjectId: z94.string().uuid(),
|
6440
6560
|
readAt: z94.date()
|
6441
6561
|
});
|
6562
|
+
var NotificationObjectSchema = z94.object({
|
6563
|
+
id: z94.string().uuid(),
|
6564
|
+
createdAt: z94.date(),
|
6565
|
+
updatedAt: z94.date(),
|
6566
|
+
deletedAt: z94.date().nullable(),
|
6567
|
+
data: z94.string(),
|
6568
|
+
notificationChange: NotificationChangeSchema
|
6569
|
+
});
|
6442
6570
|
var NotificationSchema = z94.object({
|
6571
|
+
id: z94.string().uuid(),
|
6572
|
+
createdAt: z94.date(),
|
6573
|
+
updatedAt: z94.date(),
|
6574
|
+
deletedAt: z94.date().nullable(),
|
6443
6575
|
notificationObjectId: z94.string().uuid(),
|
6444
6576
|
notifierId: z94.string().uuid(),
|
6445
6577
|
notificationObject: NotificationObjectSchema,
|
@@ -6453,21 +6585,12 @@ var GetNotificationsRequestSchema = z95.object({
|
|
6453
6585
|
});
|
6454
6586
|
var GetNotificationsResponseSchema = z95.object({
|
6455
6587
|
notificationCount: z95.number(),
|
6456
|
-
notifications: z95.
|
6457
|
-
|
6458
|
-
|
6459
|
-
|
6460
|
-
|
6461
|
-
|
6462
|
-
totalUnreadCount: z95.number().optional(),
|
6463
|
-
unreadRoomCount: z95.number().optional(),
|
6464
|
-
unreadCountsByAssigneeList: z95.array(
|
6465
|
-
z95.object({
|
6466
|
-
assigneeId: z95.string().optional(),
|
6467
|
-
totalUnreadCount: z95.string().optional()
|
6468
|
-
})
|
6469
|
-
)
|
6470
|
-
})
|
6588
|
+
notifications: z95.array(NotificationSchema),
|
6589
|
+
total: z95.number(),
|
6590
|
+
page: z95.number(),
|
6591
|
+
pageSize: z95.number(),
|
6592
|
+
lastPage: z95.number(),
|
6593
|
+
totalUnreadCount: z95.number().optional()
|
6471
6594
|
});
|
6472
6595
|
var ResetNotificationRequestSchema = z95.object({
|
6473
6596
|
userId: z95.string()
|
@@ -6481,8 +6604,8 @@ var userNotificationContract = initContract37().router(
|
|
6481
6604
|
path: "",
|
6482
6605
|
query: GetNotificationsRequestSchema,
|
6483
6606
|
responses: {
|
6484
|
-
|
6485
|
-
GetNotificationsResponseSchema
|
6607
|
+
200: DefaultSuccessResponseSchema.extend({
|
6608
|
+
data: GetNotificationsResponseSchema
|
6486
6609
|
}),
|
6487
6610
|
400: z96.object({
|
6488
6611
|
message: z96.string()
|
@@ -6630,6 +6753,7 @@ export {
|
|
6630
6753
|
ticketContract2 as ticketContract,
|
6631
6754
|
uploadContract,
|
6632
6755
|
userContract,
|
6756
|
+
userNotificationContract,
|
6633
6757
|
userPresenceStatusLogContract,
|
6634
6758
|
wrapUpFormContract
|
6635
6759
|
};
|