@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.js
CHANGED
@@ -55,6 +55,7 @@ __export(src_exports, {
|
|
55
55
|
ticketContract: () => ticketContract2,
|
56
56
|
uploadContract: () => uploadContract,
|
57
57
|
userContract: () => userContract,
|
58
|
+
userNotificationContract: () => userNotificationContract,
|
58
59
|
userPresenceStatusLogContract: () => userPresenceStatusLogContract,
|
59
60
|
wrapUpFormContract: () => wrapUpFormContract
|
60
61
|
});
|
@@ -1741,6 +1742,12 @@ var ReceiveMessageSchema = import_zod29.default.object({
|
|
1741
1742
|
sender: UserSchema.optional().nullable()
|
1742
1743
|
})
|
1743
1744
|
});
|
1745
|
+
var LineStickerSchema = import_zod29.default.object({
|
1746
|
+
roomId: import_zod29.default.string().uuid(),
|
1747
|
+
// These IDs are not UUIDs.
|
1748
|
+
packageId: import_zod29.default.string(),
|
1749
|
+
stickerId: import_zod29.default.string()
|
1750
|
+
});
|
1744
1751
|
|
1745
1752
|
// src/channel/validation.ts
|
1746
1753
|
var import_zod30 = __toESM(require("zod"));
|
@@ -2068,6 +2075,16 @@ var mainChatContract = (0, import_core7.initContract)().router(
|
|
2068
2075
|
},
|
2069
2076
|
summary: "Send message to room"
|
2070
2077
|
},
|
2078
|
+
sendLineSticker: {
|
2079
|
+
method: "POST",
|
2080
|
+
path: "/line/sticker",
|
2081
|
+
body: LineStickerSchema,
|
2082
|
+
responses: {
|
2083
|
+
200: import_zod33.default.object({ message: import_zod33.default.string().optional().nullable() }).optional(),
|
2084
|
+
422: DefaultErrorResponseSchema,
|
2085
|
+
500: DefaultErrorResponseSchema
|
2086
|
+
}
|
2087
|
+
},
|
2071
2088
|
getRoomsByPlatformContactId: {
|
2072
2089
|
method: "GET",
|
2073
2090
|
path: "/rooms/:platformContactId",
|
@@ -3823,10 +3840,13 @@ var instagramContract = (0, import_core15.initContract)().router({
|
|
3823
3840
|
400: DefaultErrorResponseSchema
|
3824
3841
|
}
|
3825
3842
|
},
|
3826
|
-
|
3843
|
+
reconnect: {
|
3827
3844
|
method: "POST",
|
3828
|
-
path: "/
|
3829
|
-
|
3845
|
+
path: "/reconnect/:channelId",
|
3846
|
+
pathParams: import_zod51.default.object({
|
3847
|
+
channelId: import_zod51.default.string().uuid()
|
3848
|
+
}),
|
3849
|
+
body: null,
|
3830
3850
|
responses: {
|
3831
3851
|
200: ChannelServiceResponseSchema,
|
3832
3852
|
500: DefaultErrorResponseSchema,
|
@@ -3846,6 +3866,16 @@ var instagramContract = (0, import_core15.initContract)().router({
|
|
3846
3866
|
400: DefaultErrorResponseSchema
|
3847
3867
|
}
|
3848
3868
|
},
|
3869
|
+
relogin: {
|
3870
|
+
method: "POST",
|
3871
|
+
path: "/relogin",
|
3872
|
+
body: ChannelSchema2.partial(),
|
3873
|
+
responses: {
|
3874
|
+
200: ChannelServiceResponseSchema,
|
3875
|
+
500: DefaultErrorResponseSchema,
|
3876
|
+
400: DefaultErrorResponseSchema
|
3877
|
+
}
|
3878
|
+
},
|
3849
3879
|
getInstagramPages: {
|
3850
3880
|
method: "GET",
|
3851
3881
|
path: "/pages",
|
@@ -3876,10 +3906,63 @@ var ConnectLineService = ConnectLineChannelSchema.extend({
|
|
3876
3906
|
// src/line/validation.ts
|
3877
3907
|
var import_zod53 = __toESM(require("zod"));
|
3878
3908
|
var SendLineStickerSchema = import_zod53.default.object({
|
3879
|
-
userId: import_zod53.default.string().uuid(),
|
3880
3909
|
packageId: import_zod53.default.string(),
|
3881
3910
|
stickerId: import_zod53.default.string(),
|
3882
|
-
|
3911
|
+
room: import_zod53.default.object({
|
3912
|
+
id: import_zod53.default.string().uuid(),
|
3913
|
+
lastMessage: import_zod53.default.string().optional(),
|
3914
|
+
handleTime: import_zod53.default.number().optional(),
|
3915
|
+
isLatest: import_zod53.default.boolean(),
|
3916
|
+
direction: MessageDirectionTypeSchema,
|
3917
|
+
platformContact: import_zod53.default.object({
|
3918
|
+
channelId: import_zod53.default.string().uuid(),
|
3919
|
+
socialPlatformId: import_zod53.default.string().nullable(),
|
3920
|
+
type: ChannelTypeSchema,
|
3921
|
+
metadata: PlatformContactMetadataSchema,
|
3922
|
+
contact: import_zod53.default.object({
|
3923
|
+
name: import_zod53.default.string(),
|
3924
|
+
address: import_zod53.default.string().nullable(),
|
3925
|
+
channel: import_zod53.default.string().nullable(),
|
3926
|
+
notes: import_zod53.default.string().nullable(),
|
3927
|
+
contactProfile: import_zod53.default.string().nullable(),
|
3928
|
+
socialProfileUrl: import_zod53.default.string().nullable()
|
3929
|
+
})
|
3930
|
+
}),
|
3931
|
+
actor: import_zod53.default.object({
|
3932
|
+
name: import_zod53.default.string(),
|
3933
|
+
email: import_zod53.default.string().email(),
|
3934
|
+
address: import_zod53.default.string().nullable(),
|
3935
|
+
phone: import_zod53.default.string().nullable()
|
3936
|
+
}).nullable(),
|
3937
|
+
channel: ChannelSchema2
|
3938
|
+
}),
|
3939
|
+
message: import_zod53.default.object({
|
3940
|
+
message: import_zod53.default.string().optional(),
|
3941
|
+
direction: MessageDirectionTypeSchema,
|
3942
|
+
type: MessageTypeSchema,
|
3943
|
+
readAt: import_zod53.default.date().optional(),
|
3944
|
+
metadata: import_zod53.default.any().optional(),
|
3945
|
+
platformId: import_zod53.default.string().optional(),
|
3946
|
+
platformMessageId: import_zod53.default.string().optional(),
|
3947
|
+
replyPlatformMessageId: import_zod53.default.string().optional(),
|
3948
|
+
template: import_zod53.default.any().optional(),
|
3949
|
+
locale: MessageLocaleTypeSchema.optional(),
|
3950
|
+
url: import_zod53.default.string().optional(),
|
3951
|
+
previewUrl: import_zod53.default.string().optional(),
|
3952
|
+
imageSetId: import_zod53.default.string().optional(),
|
3953
|
+
upload: import_zod53.default.object({
|
3954
|
+
bucketName: import_zod53.default.string(),
|
3955
|
+
fileName: import_zod53.default.string(),
|
3956
|
+
fileSize: import_zod53.default.number(),
|
3957
|
+
fileKey: import_zod53.default.string()
|
3958
|
+
}).optional(),
|
3959
|
+
sender: import_zod53.default.object({
|
3960
|
+
name: import_zod53.default.string(),
|
3961
|
+
email: import_zod53.default.string().email(),
|
3962
|
+
address: import_zod53.default.string().nullable(),
|
3963
|
+
phone: import_zod53.default.string().nullable()
|
3964
|
+
})
|
3965
|
+
})
|
3883
3966
|
});
|
3884
3967
|
|
3885
3968
|
// src/line/index.ts
|
@@ -3916,6 +3999,42 @@ var lineContract = (0, import_core16.initContract)().router({
|
|
3916
3999
|
200: SendMessageResponseSchema,
|
3917
4000
|
500: DefaultErrorResponseSchema
|
3918
4001
|
}
|
4002
|
+
},
|
4003
|
+
disconnect: {
|
4004
|
+
method: "POST",
|
4005
|
+
path: "/disconnect",
|
4006
|
+
body: ChannelSchema2.partial(),
|
4007
|
+
responses: {
|
4008
|
+
200: ChannelServiceResponseSchema,
|
4009
|
+
500: DefaultErrorResponseSchema,
|
4010
|
+
400: DefaultErrorResponseSchema
|
4011
|
+
}
|
4012
|
+
},
|
4013
|
+
reconnect: {
|
4014
|
+
method: "POST",
|
4015
|
+
path: "/reconnect/:channelId",
|
4016
|
+
pathParams: import_zod54.default.object({
|
4017
|
+
channelId: import_zod54.default.string().uuid()
|
4018
|
+
}),
|
4019
|
+
body: null,
|
4020
|
+
responses: {
|
4021
|
+
200: ChannelServiceResponseSchema,
|
4022
|
+
500: DefaultErrorResponseSchema,
|
4023
|
+
400: DefaultErrorResponseSchema
|
4024
|
+
}
|
4025
|
+
},
|
4026
|
+
delete: {
|
4027
|
+
method: "DELETE",
|
4028
|
+
path: "/delete/:channelId",
|
4029
|
+
pathParams: import_zod54.default.object({
|
4030
|
+
channelId: import_zod54.default.string().uuid()
|
4031
|
+
}),
|
4032
|
+
body: null,
|
4033
|
+
responses: {
|
4034
|
+
200: ChannelServiceResponseSchema,
|
4035
|
+
500: DefaultErrorResponseSchema,
|
4036
|
+
400: DefaultErrorResponseSchema
|
4037
|
+
}
|
3919
4038
|
}
|
3920
4039
|
});
|
3921
4040
|
|
@@ -6493,15 +6612,29 @@ var import_zod95 = __toESM(require("zod"));
|
|
6493
6612
|
|
6494
6613
|
// src/notification/schema.ts
|
6495
6614
|
var import_zod94 = __toESM(require("zod"));
|
6496
|
-
var NotificationObjectSchema = import_zod94.default.object({
|
6497
|
-
data: import_zod94.default.string()
|
6498
|
-
});
|
6499
6615
|
var NotificationChangeSchema = import_zod94.default.object({
|
6616
|
+
id: import_zod94.default.string().uuid(),
|
6617
|
+
createdAt: import_zod94.default.date(),
|
6618
|
+
updatedAt: import_zod94.default.date(),
|
6619
|
+
deletedAt: import_zod94.default.date().nullable(),
|
6500
6620
|
actorId: import_zod94.default.string().uuid(),
|
6621
|
+
actor: UserSchema,
|
6501
6622
|
notificationObjectId: import_zod94.default.string().uuid(),
|
6502
6623
|
readAt: import_zod94.default.date()
|
6503
6624
|
});
|
6625
|
+
var NotificationObjectSchema = import_zod94.default.object({
|
6626
|
+
id: import_zod94.default.string().uuid(),
|
6627
|
+
createdAt: import_zod94.default.date(),
|
6628
|
+
updatedAt: import_zod94.default.date(),
|
6629
|
+
deletedAt: import_zod94.default.date().nullable(),
|
6630
|
+
data: import_zod94.default.string(),
|
6631
|
+
notificationChange: NotificationChangeSchema
|
6632
|
+
});
|
6504
6633
|
var NotificationSchema = import_zod94.default.object({
|
6634
|
+
id: import_zod94.default.string().uuid(),
|
6635
|
+
createdAt: import_zod94.default.date(),
|
6636
|
+
updatedAt: import_zod94.default.date(),
|
6637
|
+
deletedAt: import_zod94.default.date().nullable(),
|
6505
6638
|
notificationObjectId: import_zod94.default.string().uuid(),
|
6506
6639
|
notifierId: import_zod94.default.string().uuid(),
|
6507
6640
|
notificationObject: NotificationObjectSchema,
|
@@ -6515,21 +6648,12 @@ var GetNotificationsRequestSchema = import_zod95.default.object({
|
|
6515
6648
|
});
|
6516
6649
|
var GetNotificationsResponseSchema = import_zod95.default.object({
|
6517
6650
|
notificationCount: import_zod95.default.number(),
|
6518
|
-
notifications: import_zod95.default.
|
6519
|
-
|
6520
|
-
|
6521
|
-
|
6522
|
-
|
6523
|
-
|
6524
|
-
totalUnreadCount: import_zod95.default.number().optional(),
|
6525
|
-
unreadRoomCount: import_zod95.default.number().optional(),
|
6526
|
-
unreadCountsByAssigneeList: import_zod95.default.array(
|
6527
|
-
import_zod95.default.object({
|
6528
|
-
assigneeId: import_zod95.default.string().optional(),
|
6529
|
-
totalUnreadCount: import_zod95.default.string().optional()
|
6530
|
-
})
|
6531
|
-
)
|
6532
|
-
})
|
6651
|
+
notifications: import_zod95.default.array(NotificationSchema),
|
6652
|
+
total: import_zod95.default.number(),
|
6653
|
+
page: import_zod95.default.number(),
|
6654
|
+
pageSize: import_zod95.default.number(),
|
6655
|
+
lastPage: import_zod95.default.number(),
|
6656
|
+
totalUnreadCount: import_zod95.default.number().optional()
|
6533
6657
|
});
|
6534
6658
|
var ResetNotificationRequestSchema = import_zod95.default.object({
|
6535
6659
|
userId: import_zod95.default.string()
|
@@ -6543,8 +6667,8 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6543
6667
|
path: "",
|
6544
6668
|
query: GetNotificationsRequestSchema,
|
6545
6669
|
responses: {
|
6546
|
-
|
6547
|
-
GetNotificationsResponseSchema
|
6670
|
+
200: DefaultSuccessResponseSchema.extend({
|
6671
|
+
data: GetNotificationsResponseSchema
|
6548
6672
|
}),
|
6549
6673
|
400: import_zod96.default.object({
|
6550
6674
|
message: import_zod96.default.string()
|
@@ -6693,6 +6817,7 @@ var notificationContract = (0, import_core38.initContract)().router({
|
|
6693
6817
|
ticketContract,
|
6694
6818
|
uploadContract,
|
6695
6819
|
userContract,
|
6820
|
+
userNotificationContract,
|
6696
6821
|
userPresenceStatusLogContract,
|
6697
6822
|
wrapUpFormContract
|
6698
6823
|
});
|