@tec.pet/tecpet-sdk 0.0.70 → 0.0.72

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.
@@ -4,6 +4,8 @@ import { GetChatbotFormattedMessagesInput, PaGetChatbotFormattedMessagesResponse
4
4
  import { PaChangeNotificationStatusInput, PaChangeNotificationStatusResponse } from "./dto/pa.change-notification-status.dto";
5
5
  import { PaHandleButtonActionInput, PaHandleButtonActionResponse } from "./dto/pa.handle-button-action.dto";
6
6
  import { ChatbotPlatformTypeEnum } from "./enum/chatbotSettingsEnums/chatbot-platform-type.enum";
7
+ import { PaStartAiInteractionInput, PaStartAiInteractionResponse } from "./dto/pa.start-ai-interaction.dto";
8
+ import { PaStopAiInteractionInput, PaStopAiInteractionResponse } from "./dto/pa.stop-ai-interaction.dto";
7
9
  export declare class ChatbotService {
8
10
  private readonly api;
9
11
  constructor(api: HttpClient);
@@ -12,4 +14,6 @@ export declare class ChatbotService {
12
14
  getFormattedMessage(body: GetChatbotFormattedMessagesInput, shopId: number): Promise<Array<PaGetChatbotFormattedMessagesResponse>>;
13
15
  changeNotificationStatus(notificationId: number, body: PaChangeNotificationStatusInput, shopId: number): Promise<PaChangeNotificationStatusResponse>;
14
16
  handleButtonAction(body: PaHandleButtonActionInput, shopId: number): Promise<PaHandleButtonActionResponse>;
17
+ startAiInteraction(body: PaStartAiInteractionInput): Promise<PaStartAiInteractionResponse>;
18
+ stopAiInteraction(externId: string, body: PaStopAiInteractionInput): Promise<PaStopAiInteractionResponse>;
15
19
  }
@@ -29,5 +29,13 @@ class ChatbotService {
29
29
  const response = await this.api.post(`/chatbot/handleButtonAction`, body, shopId);
30
30
  return response;
31
31
  }
32
+ async startAiInteraction(body) {
33
+ const response = await this.api.post(`/chatbot/aiInteraction/start`, body);
34
+ return response;
35
+ }
36
+ async stopAiInteraction(externId, body) {
37
+ const response = await this.api.post(`/chatbot/aiInteraction/${externId}/stop`, body);
38
+ return response;
39
+ }
32
40
  }
33
41
  exports.ChatbotService = ChatbotService;
@@ -103,6 +103,7 @@ export interface ChatbotActionJson {
103
103
  actionType: ChatbotActionTypeEnum;
104
104
  conclusionMessage?: string;
105
105
  aiInstruction?: string;
106
+ chatTagInstruction?: string;
106
107
  chatbotFlux: ChatbotFluxJson;
107
108
  }
108
109
  export interface ChatbotFluxJson {
@@ -0,0 +1,5 @@
1
+ export type PaStartAiInteractionInput = Record<string, any>;
2
+ export interface PaStartAiInteractionResponse {
3
+ id: number;
4
+ externId: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface PaStopAiInteractionInput {
2
+ reason?: string;
3
+ usedTokens?: number;
4
+ summary?: string;
5
+ }
6
+ export interface PaStopAiInteractionResponse {
7
+ success: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,8 @@
1
1
  export * from './dto/chatbot-settings.json';
2
2
  export * from './dto/get-chatbot-formatted-messages.dto';
3
3
  export * from './dto/pa.change-notification-status.dto';
4
+ export * from './dto/pa.start-ai-interaction.dto';
5
+ export * from './dto/pa.stop-ai-interaction.dto';
4
6
  export * from './enum/chatbotActionEnums/chatbot-action-type.enum';
5
7
  export * from './enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum';
6
8
  export * from './enum/chatbotBehaviorEnums/chatbot-timeout-action.enum';
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./dto/chatbot-settings.json"), exports);
18
18
  __exportStar(require("./dto/get-chatbot-formatted-messages.dto"), exports);
19
19
  __exportStar(require("./dto/pa.change-notification-status.dto"), exports);
20
+ __exportStar(require("./dto/pa.start-ai-interaction.dto"), exports);
21
+ __exportStar(require("./dto/pa.stop-ai-interaction.dto"), exports);
20
22
  __exportStar(require("./enum/chatbotActionEnums/chatbot-action-type.enum"), exports);
21
23
  __exportStar(require("./enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum"), exports);
22
24
  __exportStar(require("./enum/chatbotBehaviorEnums/chatbot-timeout-action.enum"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tec.pet/tecpet-sdk",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
4
4
  "description": "TecPet SDK for integration with TecPet services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",