@tec.pet/tecpet-sdk 0.0.217 → 0.0.218
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/domain/chatbot/chatbotService.d.ts +3 -0
- package/dist/domain/chatbot/chatbotService.js +8 -0
- package/dist/domain/chatbot/dto/pa.waiting-client.dto.d.ts +23 -0
- package/dist/domain/chatbot/dto/pa.waiting-client.dto.js +2 -0
- package/dist/domain/chatbot/enum/waitingClientEnums/whatsapp-message-type.enum.d.ts +11 -0
- package/dist/domain/chatbot/enum/waitingClientEnums/whatsapp-message-type.enum.js +15 -0
- package/dist/domain/chatbot/enum/waitingClientEnums/whatsapp-waiting-end-reason.enum.d.ts +7 -0
- package/dist/domain/chatbot/enum/waitingClientEnums/whatsapp-waiting-end-reason.enum.js +11 -0
- package/dist/domain/chatbot/enum/waitingClientEnums/whatsapp-waiting-reason.enum.d.ts +16 -0
- package/dist/domain/chatbot/enum/waitingClientEnums/whatsapp-waiting-reason.enum.js +20 -0
- package/dist/domain/chatbot/index.d.ts +5 -0
- package/dist/domain/chatbot/index.js +5 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { PaStopAiInteractionInput, PaStopAiInteractionResponse } from "./dto/pa.
|
|
|
9
9
|
import { PaValidateAiInteractionInput, PaValidateAiInteractionResponse } from "./dto/pa.validate-ai-interaction.dto";
|
|
10
10
|
import { PaGetInteractionModeResponse } from "./dto/pa.get-interaction-mode.dto";
|
|
11
11
|
import { PaTrialDemoShopResponse } from "./dto/pa.get-trial-demo-shop.dto";
|
|
12
|
+
import { PaCloseWaitingClientInput, PaOpenWaitingClientInput, PaWaitingClientResponse } from "./dto/pa.waiting-client.dto";
|
|
12
13
|
export declare class ChatbotService {
|
|
13
14
|
private readonly api;
|
|
14
15
|
constructor(api: HttpClient);
|
|
@@ -22,4 +23,6 @@ export declare class ChatbotService {
|
|
|
22
23
|
validateAiInteraction(body: PaValidateAiInteractionInput, shopId: number): Promise<PaValidateAiInteractionResponse>;
|
|
23
24
|
startAiInteraction(body: PaStartAiInteractionInput, shopId: number): Promise<PaStartAiInteractionResponse>;
|
|
24
25
|
stopAiInteraction(externId: string, body: PaStopAiInteractionInput, shopId: number): Promise<PaStopAiInteractionResponse>;
|
|
26
|
+
openWaitingClient(body: PaOpenWaitingClientInput, shopId: number): Promise<PaWaitingClientResponse>;
|
|
27
|
+
closeWaitingClient(body: PaCloseWaitingClientInput, shopId: number): Promise<PaWaitingClientResponse>;
|
|
25
28
|
}
|
|
@@ -49,5 +49,13 @@ class ChatbotService {
|
|
|
49
49
|
const response = await this.api.post(`/chatbot/aiInteraction/${externId}/stop`, body, shopId);
|
|
50
50
|
return response;
|
|
51
51
|
}
|
|
52
|
+
async openWaitingClient(body, shopId) {
|
|
53
|
+
const response = await this.api.post(`/chatbot/waitingClient/open`, body, shopId);
|
|
54
|
+
return response;
|
|
55
|
+
}
|
|
56
|
+
async closeWaitingClient(body, shopId) {
|
|
57
|
+
const response = await this.api.post(`/chatbot/waitingClient/close`, body, shopId);
|
|
58
|
+
return response;
|
|
59
|
+
}
|
|
52
60
|
}
|
|
53
61
|
exports.ChatbotService = ChatbotService;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WhatsappMessageType } from "../enum/waitingClientEnums/whatsapp-message-type.enum";
|
|
2
|
+
import { WhatsappWaitingEndReason } from "../enum/waitingClientEnums/whatsapp-waiting-end-reason.enum";
|
|
3
|
+
import { WhatsappWaitingReason } from "../enum/waitingClientEnums/whatsapp-waiting-reason.enum";
|
|
4
|
+
export interface PaOpenWaitingClientInput {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
clientId?: number | null;
|
|
8
|
+
clientName?: string | null;
|
|
9
|
+
waitingSince?: Date | string | null;
|
|
10
|
+
reason?: WhatsappWaitingReason | null;
|
|
11
|
+
context?: string | null;
|
|
12
|
+
lastMessagePreview?: string | null;
|
|
13
|
+
lastMessageType?: WhatsappMessageType | null;
|
|
14
|
+
}
|
|
15
|
+
export interface PaCloseWaitingClientInput {
|
|
16
|
+
sessionId: string;
|
|
17
|
+
reason: WhatsappWaitingEndReason;
|
|
18
|
+
closedAt?: Date | string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface PaWaitingClientResponse {
|
|
21
|
+
success: boolean;
|
|
22
|
+
id: string | null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WhatsappMessageType = void 0;
|
|
4
|
+
var WhatsappMessageType;
|
|
5
|
+
(function (WhatsappMessageType) {
|
|
6
|
+
WhatsappMessageType["TEXT"] = "TEXT";
|
|
7
|
+
WhatsappMessageType["IMAGE"] = "IMAGE";
|
|
8
|
+
WhatsappMessageType["AUDIO"] = "AUDIO";
|
|
9
|
+
WhatsappMessageType["VIDEO"] = "VIDEO";
|
|
10
|
+
WhatsappMessageType["DOCUMENT"] = "DOCUMENT";
|
|
11
|
+
WhatsappMessageType["STICKER"] = "STICKER";
|
|
12
|
+
WhatsappMessageType["LOCATION"] = "LOCATION";
|
|
13
|
+
WhatsappMessageType["CONTACT"] = "CONTACT";
|
|
14
|
+
WhatsappMessageType["OTHER"] = "OTHER";
|
|
15
|
+
})(WhatsappMessageType || (exports.WhatsappMessageType = WhatsappMessageType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WhatsappWaitingEndReason = void 0;
|
|
4
|
+
var WhatsappWaitingEndReason;
|
|
5
|
+
(function (WhatsappWaitingEndReason) {
|
|
6
|
+
WhatsappWaitingEndReason["ATTENDANT_REPLIED"] = "ATTENDANT_REPLIED";
|
|
7
|
+
WhatsappWaitingEndReason["BACK_TO_BOT"] = "BACK_TO_BOT";
|
|
8
|
+
WhatsappWaitingEndReason["SESSION_ENDED"] = "SESSION_ENDED";
|
|
9
|
+
WhatsappWaitingEndReason["SESSION_EXPIRED"] = "SESSION_EXPIRED";
|
|
10
|
+
WhatsappWaitingEndReason["SHOP_CHANGED"] = "SHOP_CHANGED";
|
|
11
|
+
})(WhatsappWaitingEndReason || (exports.WhatsappWaitingEndReason = WhatsappWaitingEndReason = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum WhatsappWaitingReason {
|
|
2
|
+
AI_REQUEST = "AI_REQUEST",
|
|
3
|
+
FLOW_REQUEST = "FLOW_REQUEST",
|
|
4
|
+
CLIENT_REQUEST = "CLIENT_REQUEST",
|
|
5
|
+
CAMPAIGN_REPLY = "CAMPAIGN_REPLY",
|
|
6
|
+
TRIGGER = "TRIGGER",
|
|
7
|
+
AI_OFF_HOURS = "AI_OFF_HOURS",
|
|
8
|
+
NO_CREDITS = "NO_CREDITS",
|
|
9
|
+
BOT_TIMEOUT = "BOT_TIMEOUT",
|
|
10
|
+
BOOKING_ACTION_FAILED = "BOOKING_ACTION_FAILED",
|
|
11
|
+
CLIENT_BLOCKED = "CLIENT_BLOCKED",
|
|
12
|
+
CONTACT_WITHOUT_CLIENT = "CONTACT_WITHOUT_CLIENT",
|
|
13
|
+
BOT_DISABLED = "BOT_DISABLED",
|
|
14
|
+
AUTO_REPLY = "AUTO_REPLY",
|
|
15
|
+
CLIENT_MESSAGE = "CLIENT_MESSAGE"
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WhatsappWaitingReason = void 0;
|
|
4
|
+
var WhatsappWaitingReason;
|
|
5
|
+
(function (WhatsappWaitingReason) {
|
|
6
|
+
WhatsappWaitingReason["AI_REQUEST"] = "AI_REQUEST";
|
|
7
|
+
WhatsappWaitingReason["FLOW_REQUEST"] = "FLOW_REQUEST";
|
|
8
|
+
WhatsappWaitingReason["CLIENT_REQUEST"] = "CLIENT_REQUEST";
|
|
9
|
+
WhatsappWaitingReason["CAMPAIGN_REPLY"] = "CAMPAIGN_REPLY";
|
|
10
|
+
WhatsappWaitingReason["TRIGGER"] = "TRIGGER";
|
|
11
|
+
WhatsappWaitingReason["AI_OFF_HOURS"] = "AI_OFF_HOURS";
|
|
12
|
+
WhatsappWaitingReason["NO_CREDITS"] = "NO_CREDITS";
|
|
13
|
+
WhatsappWaitingReason["BOT_TIMEOUT"] = "BOT_TIMEOUT";
|
|
14
|
+
WhatsappWaitingReason["BOOKING_ACTION_FAILED"] = "BOOKING_ACTION_FAILED";
|
|
15
|
+
WhatsappWaitingReason["CLIENT_BLOCKED"] = "CLIENT_BLOCKED";
|
|
16
|
+
WhatsappWaitingReason["CONTACT_WITHOUT_CLIENT"] = "CONTACT_WITHOUT_CLIENT";
|
|
17
|
+
WhatsappWaitingReason["BOT_DISABLED"] = "BOT_DISABLED";
|
|
18
|
+
WhatsappWaitingReason["AUTO_REPLY"] = "AUTO_REPLY";
|
|
19
|
+
WhatsappWaitingReason["CLIENT_MESSAGE"] = "CLIENT_MESSAGE";
|
|
20
|
+
})(WhatsappWaitingReason || (exports.WhatsappWaitingReason = WhatsappWaitingReason = {}));
|
|
@@ -6,6 +6,11 @@ export * from './dto/pa.stop-ai-interaction.dto';
|
|
|
6
6
|
export * from './dto/pa.validate-ai-interaction.dto';
|
|
7
7
|
export * from './dto/pa.get-interaction-mode.dto';
|
|
8
8
|
export * from './dto/pa.get-trial-demo-shop.dto';
|
|
9
|
+
export * from './dto/pa.handle-button-action.dto';
|
|
10
|
+
export * from './dto/pa.waiting-client.dto';
|
|
11
|
+
export * from './enum/waitingClientEnums/whatsapp-waiting-reason.enum';
|
|
12
|
+
export * from './enum/waitingClientEnums/whatsapp-waiting-end-reason.enum';
|
|
13
|
+
export * from './enum/waitingClientEnums/whatsapp-message-type.enum';
|
|
9
14
|
export * from './enum/chatbotActionEnums/chatbot-action-schedule-permission.enum';
|
|
10
15
|
export * from './enum/chatbotActionEnums/chatbot-action-type.enum';
|
|
11
16
|
export * from './enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum';
|
|
@@ -22,6 +22,11 @@ __exportStar(require("./dto/pa.stop-ai-interaction.dto"), exports);
|
|
|
22
22
|
__exportStar(require("./dto/pa.validate-ai-interaction.dto"), exports);
|
|
23
23
|
__exportStar(require("./dto/pa.get-interaction-mode.dto"), exports);
|
|
24
24
|
__exportStar(require("./dto/pa.get-trial-demo-shop.dto"), exports);
|
|
25
|
+
__exportStar(require("./dto/pa.handle-button-action.dto"), exports);
|
|
26
|
+
__exportStar(require("./dto/pa.waiting-client.dto"), exports);
|
|
27
|
+
__exportStar(require("./enum/waitingClientEnums/whatsapp-waiting-reason.enum"), exports);
|
|
28
|
+
__exportStar(require("./enum/waitingClientEnums/whatsapp-waiting-end-reason.enum"), exports);
|
|
29
|
+
__exportStar(require("./enum/waitingClientEnums/whatsapp-message-type.enum"), exports);
|
|
25
30
|
__exportStar(require("./enum/chatbotActionEnums/chatbot-action-schedule-permission.enum"), exports);
|
|
26
31
|
__exportStar(require("./enum/chatbotActionEnums/chatbot-action-type.enum"), exports);
|
|
27
32
|
__exportStar(require("./enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum"), exports);
|