@kl1/contracts 1.0.81 → 1.0.83
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 +131 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +131 -21
- package/dist/index.mjs.map +1 -1
- package/dist/src/app/index.d.ts +17 -0
- package/dist/src/app/index.d.ts.map +1 -0
- 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 +2031 -812
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/cx-log/index.d.ts +5 -0
- package/dist/src/cx-log/index.d.ts.map +1 -1
- package/dist/src/cx-log/schema.d.ts +3 -0
- package/dist/src/cx-log/schema.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/mail/mail-server.d.ts +216 -0
- package/dist/src/mail/mail-server.d.ts.map +1 -0
- package/dist/src/notification/index.d.ts +514 -715
- package/dist/src/notification/index.d.ts.map +1 -1
- package/dist/src/notification/validation.d.ts +421 -608
- package/dist/src/notification/validation.d.ts.map +1 -1
- package/dist/src/platform-contact/schema.d.ts +30 -0
- package/dist/src/platform-contact/schema.d.ts.map +1 -0
- package/package.json +1 -1
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(),
|
@@ -1679,6 +1680,12 @@ var ReceiveMessageSchema = z29.object({
|
|
1679
1680
|
sender: UserSchema.optional().nullable()
|
1680
1681
|
})
|
1681
1682
|
});
|
1683
|
+
var LineStickerSchema = z29.object({
|
1684
|
+
roomId: z29.string().uuid(),
|
1685
|
+
// These IDs are not UUIDs.
|
1686
|
+
packageId: z29.string(),
|
1687
|
+
stickerId: z29.string()
|
1688
|
+
});
|
1682
1689
|
|
1683
1690
|
// src/channel/validation.ts
|
1684
1691
|
import z30 from "zod";
|
@@ -2006,6 +2013,16 @@ var mainChatContract = initContract7().router(
|
|
2006
2013
|
},
|
2007
2014
|
summary: "Send message to room"
|
2008
2015
|
},
|
2016
|
+
sendLineSticker: {
|
2017
|
+
method: "POST",
|
2018
|
+
path: "/line/sticker",
|
2019
|
+
body: LineStickerSchema,
|
2020
|
+
responses: {
|
2021
|
+
200: z33.object({ message: z33.string().optional().nullable() }).optional(),
|
2022
|
+
422: DefaultErrorResponseSchema,
|
2023
|
+
500: DefaultErrorResponseSchema
|
2024
|
+
}
|
2025
|
+
},
|
2009
2026
|
getRoomsByPlatformContactId: {
|
2010
2027
|
method: "GET",
|
2011
2028
|
path: "/rooms/:platformContactId",
|
@@ -3761,10 +3778,13 @@ var instagramContract = initContract15().router({
|
|
3761
3778
|
400: DefaultErrorResponseSchema
|
3762
3779
|
}
|
3763
3780
|
},
|
3764
|
-
|
3781
|
+
reconnect: {
|
3765
3782
|
method: "POST",
|
3766
|
-
path: "/
|
3767
|
-
|
3783
|
+
path: "/reconnect/:channelId",
|
3784
|
+
pathParams: z51.object({
|
3785
|
+
channelId: z51.string().uuid()
|
3786
|
+
}),
|
3787
|
+
body: null,
|
3768
3788
|
responses: {
|
3769
3789
|
200: ChannelServiceResponseSchema,
|
3770
3790
|
500: DefaultErrorResponseSchema,
|
@@ -3784,6 +3804,16 @@ var instagramContract = initContract15().router({
|
|
3784
3804
|
400: DefaultErrorResponseSchema
|
3785
3805
|
}
|
3786
3806
|
},
|
3807
|
+
relogin: {
|
3808
|
+
method: "POST",
|
3809
|
+
path: "/relogin",
|
3810
|
+
body: ChannelSchema2.partial(),
|
3811
|
+
responses: {
|
3812
|
+
200: ChannelServiceResponseSchema,
|
3813
|
+
500: DefaultErrorResponseSchema,
|
3814
|
+
400: DefaultErrorResponseSchema
|
3815
|
+
}
|
3816
|
+
},
|
3787
3817
|
getInstagramPages: {
|
3788
3818
|
method: "GET",
|
3789
3819
|
path: "/pages",
|
@@ -3814,10 +3844,63 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
|
|
3814
3844
|
// src/line/validation.ts
|
3815
3845
|
import z53 from "zod";
|
3816
3846
|
var SendLineStickerSchema = z53.object({
|
3817
|
-
userId: z53.string().uuid(),
|
3818
3847
|
packageId: z53.string(),
|
3819
3848
|
stickerId: z53.string(),
|
3820
|
-
|
3849
|
+
room: z53.object({
|
3850
|
+
id: z53.string().uuid(),
|
3851
|
+
lastMessage: z53.string().optional(),
|
3852
|
+
handleTime: z53.number().optional(),
|
3853
|
+
isLatest: z53.boolean(),
|
3854
|
+
direction: MessageDirectionTypeSchema,
|
3855
|
+
platformContact: z53.object({
|
3856
|
+
channelId: z53.string().uuid(),
|
3857
|
+
socialPlatformId: z53.string().nullable(),
|
3858
|
+
type: ChannelTypeSchema,
|
3859
|
+
metadata: PlatformContactMetadataSchema,
|
3860
|
+
contact: z53.object({
|
3861
|
+
name: z53.string(),
|
3862
|
+
address: z53.string().nullable(),
|
3863
|
+
channel: z53.string().nullable(),
|
3864
|
+
notes: z53.string().nullable(),
|
3865
|
+
contactProfile: z53.string().nullable(),
|
3866
|
+
socialProfileUrl: z53.string().nullable()
|
3867
|
+
})
|
3868
|
+
}),
|
3869
|
+
actor: z53.object({
|
3870
|
+
name: z53.string(),
|
3871
|
+
email: z53.string().email(),
|
3872
|
+
address: z53.string().nullable(),
|
3873
|
+
phone: z53.string().nullable()
|
3874
|
+
}).nullable(),
|
3875
|
+
channel: ChannelSchema2
|
3876
|
+
}),
|
3877
|
+
message: z53.object({
|
3878
|
+
message: z53.string().optional(),
|
3879
|
+
direction: MessageDirectionTypeSchema,
|
3880
|
+
type: MessageTypeSchema,
|
3881
|
+
readAt: z53.date().optional(),
|
3882
|
+
metadata: z53.any().optional(),
|
3883
|
+
platformId: z53.string().optional(),
|
3884
|
+
platformMessageId: z53.string().optional(),
|
3885
|
+
replyPlatformMessageId: z53.string().optional(),
|
3886
|
+
template: z53.any().optional(),
|
3887
|
+
locale: MessageLocaleTypeSchema.optional(),
|
3888
|
+
url: z53.string().optional(),
|
3889
|
+
previewUrl: z53.string().optional(),
|
3890
|
+
imageSetId: z53.string().optional(),
|
3891
|
+
upload: z53.object({
|
3892
|
+
bucketName: z53.string(),
|
3893
|
+
fileName: z53.string(),
|
3894
|
+
fileSize: z53.number(),
|
3895
|
+
fileKey: z53.string()
|
3896
|
+
}).optional(),
|
3897
|
+
sender: z53.object({
|
3898
|
+
name: z53.string(),
|
3899
|
+
email: z53.string().email(),
|
3900
|
+
address: z53.string().nullable(),
|
3901
|
+
phone: z53.string().nullable()
|
3902
|
+
})
|
3903
|
+
})
|
3821
3904
|
});
|
3822
3905
|
|
3823
3906
|
// src/line/index.ts
|
@@ -3854,6 +3937,42 @@ var lineContract = initContract16().router({
|
|
3854
3937
|
200: SendMessageResponseSchema,
|
3855
3938
|
500: DefaultErrorResponseSchema
|
3856
3939
|
}
|
3940
|
+
},
|
3941
|
+
disconnect: {
|
3942
|
+
method: "POST",
|
3943
|
+
path: "/disconnect",
|
3944
|
+
body: ChannelSchema2.partial(),
|
3945
|
+
responses: {
|
3946
|
+
200: ChannelServiceResponseSchema,
|
3947
|
+
500: DefaultErrorResponseSchema,
|
3948
|
+
400: DefaultErrorResponseSchema
|
3949
|
+
}
|
3950
|
+
},
|
3951
|
+
reconnect: {
|
3952
|
+
method: "POST",
|
3953
|
+
path: "/reconnect/:channelId",
|
3954
|
+
pathParams: z54.object({
|
3955
|
+
channelId: z54.string().uuid()
|
3956
|
+
}),
|
3957
|
+
body: null,
|
3958
|
+
responses: {
|
3959
|
+
200: ChannelServiceResponseSchema,
|
3960
|
+
500: DefaultErrorResponseSchema,
|
3961
|
+
400: DefaultErrorResponseSchema
|
3962
|
+
}
|
3963
|
+
},
|
3964
|
+
delete: {
|
3965
|
+
method: "DELETE",
|
3966
|
+
path: "/delete/:channelId",
|
3967
|
+
pathParams: z54.object({
|
3968
|
+
channelId: z54.string().uuid()
|
3969
|
+
}),
|
3970
|
+
body: null,
|
3971
|
+
responses: {
|
3972
|
+
200: ChannelServiceResponseSchema,
|
3973
|
+
500: DefaultErrorResponseSchema,
|
3974
|
+
400: DefaultErrorResponseSchema
|
3975
|
+
}
|
3857
3976
|
}
|
3858
3977
|
});
|
3859
3978
|
|
@@ -6467,21 +6586,12 @@ var GetNotificationsRequestSchema = z95.object({
|
|
6467
6586
|
});
|
6468
6587
|
var GetNotificationsResponseSchema = z95.object({
|
6469
6588
|
notificationCount: z95.number(),
|
6470
|
-
notifications: z95.
|
6471
|
-
|
6472
|
-
|
6473
|
-
|
6474
|
-
|
6475
|
-
|
6476
|
-
totalUnreadCount: z95.number().optional(),
|
6477
|
-
unreadRoomCount: z95.number().optional(),
|
6478
|
-
unreadCountsByAssigneeList: z95.array(
|
6479
|
-
z95.object({
|
6480
|
-
assigneeId: z95.string().optional(),
|
6481
|
-
totalUnreadCount: z95.string().optional()
|
6482
|
-
})
|
6483
|
-
)
|
6484
|
-
})
|
6589
|
+
notifications: z95.array(NotificationSchema),
|
6590
|
+
total: z95.number(),
|
6591
|
+
page: z95.number(),
|
6592
|
+
pageSize: z95.number(),
|
6593
|
+
lastPage: z95.number(),
|
6594
|
+
totalUnreadCount: z95.number().optional()
|
6485
6595
|
});
|
6486
6596
|
var ResetNotificationRequestSchema = z95.object({
|
6487
6597
|
userId: z95.string()
|
@@ -6495,7 +6605,7 @@ var userNotificationContract = initContract37().router(
|
|
6495
6605
|
path: "",
|
6496
6606
|
query: GetNotificationsRequestSchema,
|
6497
6607
|
responses: {
|
6498
|
-
|
6608
|
+
200: DefaultSuccessResponseSchema.extend({
|
6499
6609
|
data: GetNotificationsResponseSchema
|
6500
6610
|
}),
|
6501
6611
|
400: z96.object({
|