@kl1/contracts 1.3.3 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api-contracts/src/chat/index.d.ts +300 -301
- package/dist/api-contracts/src/chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/schema.d.ts +78 -81
- package/dist/api-contracts/src/chat/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/validation.d.ts +91 -91
- package/dist/api-contracts/src/contract.d.ts +539 -539
- package/dist/api-contracts/src/cx-log/index.d.ts +7 -7
- package/dist/api-contracts/src/cx-log/schema.d.ts +5 -5
- package/dist/api-contracts/src/facebook-feed/index.d.ts +71 -71
- package/dist/api-contracts/src/facebook-feed/schema.d.ts +1 -1
- package/dist/api-contracts/src/index.d.ts +0 -1
- package/dist/api-contracts/src/index.d.ts.map +1 -1
- package/dist/api-contracts/src/instagram/index.d.ts +59 -59
- package/dist/api-contracts/src/line/index.d.ts +70 -70
- package/dist/api-contracts/src/line/validation.d.ts +11 -11
- package/dist/api-contracts/src/messenger/index.d.ts +59 -59
- package/dist/api-contracts/src/sms/index.d.ts +11 -11
- package/dist/api-contracts/src/telegram/index.d.ts +59 -59
- package/dist/api-contracts/src/viber/index.d.ts +59 -59
- package/dist/api-contracts/src/webchat/index.d.ts +59 -59
- package/dist/api-contracts/src/whatsapp/index.d.ts +59 -59
- package/dist/api-contracts/src/workflow-rule/index.d.ts +34 -34
- package/dist/index.js +56 -51
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -50
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
@@ -50,7 +50,7 @@ export declare const chatContract: {
|
|
50
50
|
firstResponseTime: z.ZodNumber;
|
51
51
|
isLatest: z.ZodBoolean;
|
52
52
|
isBotRoom: z.ZodBoolean;
|
53
|
-
direction: z.
|
53
|
+
direction: z.ZodEnum<[string, ...string[]]>;
|
54
54
|
platformContact: z.ZodObject<{
|
55
55
|
id: z.ZodString;
|
56
56
|
createdAt: z.ZodDate;
|
@@ -2735,7 +2735,7 @@ export declare const chatContract: {
|
|
2735
2735
|
integrationId: string;
|
2736
2736
|
} | null;
|
2737
2737
|
};
|
2738
|
-
direction:
|
2738
|
+
direction: string;
|
2739
2739
|
status: number;
|
2740
2740
|
createdAt: Date;
|
2741
2741
|
updatedAt: Date;
|
@@ -3164,7 +3164,7 @@ export declare const chatContract: {
|
|
3164
3164
|
integrationId: string;
|
3165
3165
|
} | null;
|
3166
3166
|
};
|
3167
|
-
direction:
|
3167
|
+
direction: string;
|
3168
3168
|
status: number;
|
3169
3169
|
createdAt: Date;
|
3170
3170
|
updatedAt: Date;
|
@@ -3595,7 +3595,7 @@ export declare const chatContract: {
|
|
3595
3595
|
integrationId: string;
|
3596
3596
|
} | null;
|
3597
3597
|
};
|
3598
|
-
direction:
|
3598
|
+
direction: string;
|
3599
3599
|
status: number;
|
3600
3600
|
createdAt: Date;
|
3601
3601
|
updatedAt: Date;
|
@@ -4027,7 +4027,7 @@ export declare const chatContract: {
|
|
4027
4027
|
integrationId: string;
|
4028
4028
|
} | null;
|
4029
4029
|
};
|
4030
|
-
direction:
|
4030
|
+
direction: string;
|
4031
4031
|
status: number;
|
4032
4032
|
createdAt: Date;
|
4033
4033
|
updatedAt: Date;
|
@@ -4377,15 +4377,15 @@ export declare const chatContract: {
|
|
4377
4377
|
body: z.ZodObject<{
|
4378
4378
|
roomId: z.ZodString;
|
4379
4379
|
message: z.ZodString;
|
4380
|
-
messageType: z.ZodDefault<z.ZodEnum<[
|
4380
|
+
messageType: z.ZodDefault<z.ZodEnum<[string, ...string[]]>>;
|
4381
4381
|
}, "strip", z.ZodTypeAny, {
|
4382
4382
|
message: string;
|
4383
|
-
messageType:
|
4383
|
+
messageType: string;
|
4384
4384
|
roomId: string;
|
4385
4385
|
}, {
|
4386
4386
|
message: string;
|
4387
4387
|
roomId: string;
|
4388
|
-
messageType?:
|
4388
|
+
messageType?: string | undefined;
|
4389
4389
|
}>;
|
4390
4390
|
summary: "send auto reply message";
|
4391
4391
|
method: "POST";
|
@@ -4411,8 +4411,8 @@ export declare const chatContract: {
|
|
4411
4411
|
deletedAt: z.ZodNullable<z.ZodDate>;
|
4412
4412
|
}, {
|
4413
4413
|
message: z.ZodString;
|
4414
|
-
direction: z.
|
4415
|
-
type: z.
|
4414
|
+
direction: z.ZodEnum<[string, ...string[]]>;
|
4415
|
+
type: z.ZodEnum<[string, ...string[]]>;
|
4416
4416
|
readAt: z.ZodDate;
|
4417
4417
|
metadata: z.ZodAny;
|
4418
4418
|
platformId: z.ZodString;
|
@@ -4439,7 +4439,7 @@ export declare const chatContract: {
|
|
4439
4439
|
firstResponseTime: z.ZodNumber;
|
4440
4440
|
isLatest: z.ZodBoolean;
|
4441
4441
|
isBotRoom: z.ZodBoolean;
|
4442
|
-
direction: z.
|
4442
|
+
direction: z.ZodEnum<[string, ...string[]]>;
|
4443
4443
|
platformContact: z.ZodObject<{
|
4444
4444
|
id: z.ZodString;
|
4445
4445
|
createdAt: z.ZodDate;
|
@@ -7124,7 +7124,7 @@ export declare const chatContract: {
|
|
7124
7124
|
integrationId: string;
|
7125
7125
|
} | null;
|
7126
7126
|
};
|
7127
|
-
direction:
|
7127
|
+
direction: string;
|
7128
7128
|
status: number;
|
7129
7129
|
createdAt: Date;
|
7130
7130
|
updatedAt: Date;
|
@@ -7553,7 +7553,7 @@ export declare const chatContract: {
|
|
7553
7553
|
integrationId: string;
|
7554
7554
|
} | null;
|
7555
7555
|
};
|
7556
|
-
direction:
|
7556
|
+
direction: string;
|
7557
7557
|
status: number;
|
7558
7558
|
createdAt: Date;
|
7559
7559
|
updatedAt: Date;
|
@@ -7927,8 +7927,8 @@ export declare const chatContract: {
|
|
7927
7927
|
deletedAt: z.ZodNullable<z.ZodDate>;
|
7928
7928
|
}, {
|
7929
7929
|
message: z.ZodString;
|
7930
|
-
direction: z.
|
7931
|
-
type: z.
|
7930
|
+
direction: z.ZodEnum<[string, ...string[]]>;
|
7931
|
+
type: z.ZodEnum<[string, ...string[]]>;
|
7932
7932
|
readAt: z.ZodDate;
|
7933
7933
|
metadata: z.ZodAny;
|
7934
7934
|
platformId: z.ZodString;
|
@@ -8594,7 +8594,7 @@ export declare const chatContract: {
|
|
8594
8594
|
message: string;
|
8595
8595
|
id: string;
|
8596
8596
|
url: string;
|
8597
|
-
direction:
|
8597
|
+
direction: string;
|
8598
8598
|
createdAt: Date;
|
8599
8599
|
updatedAt: Date;
|
8600
8600
|
deletedAt: Date | null;
|
@@ -8756,7 +8756,7 @@ export declare const chatContract: {
|
|
8756
8756
|
message: string;
|
8757
8757
|
id: string;
|
8758
8758
|
url: string;
|
8759
|
-
direction:
|
8759
|
+
direction: string;
|
8760
8760
|
createdAt: Date;
|
8761
8761
|
updatedAt: Date;
|
8762
8762
|
deletedAt: Date | null;
|
@@ -9559,7 +9559,7 @@ export declare const chatContract: {
|
|
9559
9559
|
message: string;
|
9560
9560
|
id: string;
|
9561
9561
|
url: string;
|
9562
|
-
direction:
|
9562
|
+
direction: string;
|
9563
9563
|
createdAt: Date;
|
9564
9564
|
updatedAt: Date;
|
9565
9565
|
deletedAt: Date | null;
|
@@ -9762,7 +9762,7 @@ export declare const chatContract: {
|
|
9762
9762
|
integrationId: string;
|
9763
9763
|
} | null;
|
9764
9764
|
};
|
9765
|
-
direction:
|
9765
|
+
direction: string;
|
9766
9766
|
status: number;
|
9767
9767
|
createdAt: Date;
|
9768
9768
|
updatedAt: Date;
|
@@ -10114,7 +10114,7 @@ export declare const chatContract: {
|
|
10114
10114
|
message: string;
|
10115
10115
|
id: string;
|
10116
10116
|
url: string;
|
10117
|
-
direction:
|
10117
|
+
direction: string;
|
10118
10118
|
createdAt: Date;
|
10119
10119
|
updatedAt: Date;
|
10120
10120
|
deletedAt: Date | null;
|
@@ -10325,7 +10325,7 @@ export declare const chatContract: {
|
|
10325
10325
|
message: string;
|
10326
10326
|
id: string;
|
10327
10327
|
url: string;
|
10328
|
-
direction:
|
10328
|
+
direction: string;
|
10329
10329
|
createdAt: Date;
|
10330
10330
|
updatedAt: Date;
|
10331
10331
|
deletedAt: Date | null;
|
@@ -10528,7 +10528,7 @@ export declare const chatContract: {
|
|
10528
10528
|
integrationId: string;
|
10529
10529
|
} | null;
|
10530
10530
|
};
|
10531
|
-
direction:
|
10531
|
+
direction: string;
|
10532
10532
|
status: number;
|
10533
10533
|
createdAt: Date;
|
10534
10534
|
updatedAt: Date;
|
@@ -10880,7 +10880,7 @@ export declare const chatContract: {
|
|
10880
10880
|
message: string;
|
10881
10881
|
id: string;
|
10882
10882
|
url: string;
|
10883
|
-
direction:
|
10883
|
+
direction: string;
|
10884
10884
|
createdAt: Date;
|
10885
10885
|
updatedAt: Date;
|
10886
10886
|
deletedAt: Date | null;
|
@@ -11093,7 +11093,7 @@ export declare const chatContract: {
|
|
11093
11093
|
message: string;
|
11094
11094
|
id: string;
|
11095
11095
|
url: string;
|
11096
|
-
direction:
|
11096
|
+
direction: string;
|
11097
11097
|
createdAt: Date;
|
11098
11098
|
updatedAt: Date;
|
11099
11099
|
deletedAt: Date | null;
|
@@ -11296,7 +11296,7 @@ export declare const chatContract: {
|
|
11296
11296
|
integrationId: string;
|
11297
11297
|
} | null;
|
11298
11298
|
};
|
11299
|
-
direction:
|
11299
|
+
direction: string;
|
11300
11300
|
status: number;
|
11301
11301
|
createdAt: Date;
|
11302
11302
|
updatedAt: Date;
|
@@ -11648,7 +11648,7 @@ export declare const chatContract: {
|
|
11648
11648
|
message: string;
|
11649
11649
|
id: string;
|
11650
11650
|
url: string;
|
11651
|
-
direction:
|
11651
|
+
direction: string;
|
11652
11652
|
createdAt: Date;
|
11653
11653
|
updatedAt: Date;
|
11654
11654
|
deletedAt: Date | null;
|
@@ -11862,7 +11862,7 @@ export declare const chatContract: {
|
|
11862
11862
|
message: string;
|
11863
11863
|
id: string;
|
11864
11864
|
url: string;
|
11865
|
-
direction:
|
11865
|
+
direction: string;
|
11866
11866
|
createdAt: Date;
|
11867
11867
|
updatedAt: Date;
|
11868
11868
|
deletedAt: Date | null;
|
@@ -12065,7 +12065,7 @@ export declare const chatContract: {
|
|
12065
12065
|
integrationId: string;
|
12066
12066
|
} | null;
|
12067
12067
|
};
|
12068
|
-
direction:
|
12068
|
+
direction: string;
|
12069
12069
|
status: number;
|
12070
12070
|
createdAt: Date;
|
12071
12071
|
updatedAt: Date;
|
@@ -12417,7 +12417,7 @@ export declare const chatContract: {
|
|
12417
12417
|
message: string;
|
12418
12418
|
id: string;
|
12419
12419
|
url: string;
|
12420
|
-
direction:
|
12420
|
+
direction: string;
|
12421
12421
|
createdAt: Date;
|
12422
12422
|
updatedAt: Date;
|
12423
12423
|
deletedAt: Date | null;
|
@@ -12685,7 +12685,7 @@ export declare const chatContract: {
|
|
12685
12685
|
firstResponseTime: z.ZodNumber;
|
12686
12686
|
isLatest: z.ZodBoolean;
|
12687
12687
|
isBotRoom: z.ZodBoolean;
|
12688
|
-
direction: z.
|
12688
|
+
direction: z.ZodEnum<[string, ...string[]]>;
|
12689
12689
|
platformContact: z.ZodObject<{
|
12690
12690
|
id: z.ZodString;
|
12691
12691
|
createdAt: z.ZodDate;
|
@@ -15372,7 +15372,7 @@ export declare const chatContract: {
|
|
15372
15372
|
integrationId: string;
|
15373
15373
|
} | null;
|
15374
15374
|
};
|
15375
|
-
direction:
|
15375
|
+
direction: string;
|
15376
15376
|
status: number;
|
15377
15377
|
createdAt: Date;
|
15378
15378
|
updatedAt: Date;
|
@@ -15802,7 +15802,7 @@ export declare const chatContract: {
|
|
15802
15802
|
integrationId: string;
|
15803
15803
|
} | null;
|
15804
15804
|
};
|
15805
|
-
direction:
|
15805
|
+
direction: string;
|
15806
15806
|
status: number;
|
15807
15807
|
createdAt: Date;
|
15808
15808
|
updatedAt: Date;
|
@@ -16234,7 +16234,7 @@ export declare const chatContract: {
|
|
16234
16234
|
integrationId: string;
|
16235
16235
|
} | null;
|
16236
16236
|
};
|
16237
|
-
direction:
|
16237
|
+
direction: string;
|
16238
16238
|
status: number;
|
16239
16239
|
createdAt: Date;
|
16240
16240
|
updatedAt: Date;
|
@@ -16667,7 +16667,7 @@ export declare const chatContract: {
|
|
16667
16667
|
integrationId: string;
|
16668
16668
|
} | null;
|
16669
16669
|
};
|
16670
|
-
direction:
|
16670
|
+
direction: string;
|
16671
16671
|
status: number;
|
16672
16672
|
createdAt: Date;
|
16673
16673
|
updatedAt: Date;
|
package/dist/index.js
CHANGED
@@ -99,7 +99,6 @@ __export(index_exports, {
|
|
99
99
|
userContract: () => userContract,
|
100
100
|
userNotificationContract: () => userNotificationContract,
|
101
101
|
userPresenceStatusLogContract: () => userPresenceStatusLogContract,
|
102
|
-
widgetContract: () => widgetContract,
|
103
102
|
widgetSettingContract: () => widgetSettingContract,
|
104
103
|
workflowContract: () => workflowContract,
|
105
104
|
wrapUpFormContract: () => wrapUpFormContract
|
@@ -717,64 +716,72 @@ var WorkflowRuleSchema = DefaultEntitySchema.extend({
|
|
717
716
|
});
|
718
717
|
|
719
718
|
// src/chat/schema.ts
|
720
|
-
var
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
]
|
725
|
-
var
|
719
|
+
var messageDirections = [
|
720
|
+
"incoming",
|
721
|
+
"outgoing",
|
722
|
+
"system"
|
723
|
+
];
|
724
|
+
var MessageDirectionTypeSchema = import_zod18.default.enum(messageDirections);
|
725
|
+
var workflowAutoReplyMessageTypes = ["text", "image"];
|
726
|
+
var WorkflowAutoReplyMessageTypeSchema = import_zod18.default.enum(workflowAutoReplyMessageTypes).default("text");
|
726
727
|
var messageTypes = [
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
728
|
+
"text",
|
729
|
+
"image",
|
730
|
+
"video",
|
731
|
+
"audio",
|
732
|
+
"file",
|
733
|
+
"imagemap",
|
734
|
+
"group",
|
735
|
+
"fallback",
|
736
|
+
"location",
|
737
|
+
"sticker",
|
738
|
+
// botpress specific
|
739
|
+
"carousel",
|
740
|
+
"card",
|
741
|
+
"choice",
|
742
|
+
"dropdown",
|
743
|
+
"text_with_image",
|
744
|
+
"reaction",
|
745
|
+
"contacts",
|
737
746
|
// botpress specific
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
import_zod18.default.literal("text_with_image"),
|
743
|
-
import_zod18.default.literal("reaction"),
|
744
|
-
import_zod18.default.literal("contacts"),
|
747
|
+
"carousel",
|
748
|
+
"card",
|
749
|
+
"choice",
|
750
|
+
"dropdown",
|
745
751
|
// system
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
752
|
+
"csat",
|
753
|
+
"assign",
|
754
|
+
"solve",
|
755
|
+
"resolved",
|
756
|
+
"reopen",
|
757
|
+
"open",
|
758
|
+
"closed",
|
759
|
+
"handed_over",
|
760
|
+
"updated",
|
761
|
+
"started",
|
762
|
+
"hold",
|
763
|
+
"unhold",
|
764
|
+
"auto_unhold",
|
765
|
+
"edited",
|
766
|
+
"deleted",
|
767
|
+
"unsupported",
|
762
768
|
// lazada specific
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
769
|
+
"lazada_item",
|
770
|
+
"lazada_sys_msg",
|
771
|
+
"lazada_order",
|
772
|
+
"lazada_order_invite",
|
773
|
+
"lazada_shop_invite"
|
768
774
|
];
|
769
|
-
var MessageTypeSchema = import_zod18.default.
|
770
|
-
var
|
775
|
+
var MessageTypeSchema = import_zod18.default.enum(messageTypes);
|
776
|
+
var feedPostTypes = [
|
771
777
|
"text",
|
772
778
|
"added_photos",
|
773
779
|
"added_video",
|
774
780
|
"shared_story",
|
775
781
|
"mobile_status_update",
|
776
782
|
"no_data"
|
777
|
-
]
|
783
|
+
];
|
784
|
+
var FeedPostTypeSchema = import_zod18.default.enum(feedPostTypes);
|
778
785
|
var MessageLocaleTypeSchema = import_zod18.default.enum(["mm", "en", "th", ""]);
|
779
786
|
var PlatformContactMetadataSchema = import_zod18.default.object({
|
780
787
|
id: import_zod18.default.string(),
|
@@ -2918,8 +2925,7 @@ var mainFeedContract = (0, import_core8.initContract)().router(
|
|
2918
2925
|
}
|
2919
2926
|
},
|
2920
2927
|
{
|
2921
|
-
baseHeaders: DefaultHeaderSchema
|
2922
|
-
pathPrefix: "ms"
|
2928
|
+
baseHeaders: DefaultHeaderSchema
|
2923
2929
|
}
|
2924
2930
|
);
|
2925
2931
|
var mainChatRoomContract = (0, import_core8.initContract)().router(
|
@@ -10768,7 +10774,6 @@ var settingCxIntelligenceContract = (0, import_core54.initContract)().router(
|
|
10768
10774
|
userContract,
|
10769
10775
|
userNotificationContract,
|
10770
10776
|
userPresenceStatusLogContract,
|
10771
|
-
widgetContract,
|
10772
10777
|
widgetSettingContract,
|
10773
10778
|
workflowContract,
|
10774
10779
|
wrapUpFormContract
|