@tec.pet/tecpet-sdk 0.0.128 → 0.0.129

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.
@@ -6,6 +6,7 @@ import { PaHandleButtonActionInput, PaHandleButtonActionResponse } from "./dto/p
6
6
  import { ChatbotPlatformTypeEnum } from "./enum/chatbotSettingsEnums/chatbot-platform-type.enum";
7
7
  import { PaStartAiInteractionInput, PaStartAiInteractionResponse } from "./dto/pa.start-ai-interaction.dto";
8
8
  import { PaStopAiInteractionInput, PaStopAiInteractionResponse } from "./dto/pa.stop-ai-interaction.dto";
9
+ import { PaValidateAiInteractionInput, PaValidateAiInteractionResponse } from "./dto/pa.validate-ai-interaction.dto";
9
10
  export declare class ChatbotService {
10
11
  private readonly api;
11
12
  constructor(api: HttpClient);
@@ -14,6 +15,7 @@ export declare class ChatbotService {
14
15
  getFormattedMessage(body: GetChatbotFormattedMessagesInput, shopId: number): Promise<Array<PaGetChatbotFormattedMessagesResponse>>;
15
16
  changeNotificationStatus(notificationId: number, body: PaChangeNotificationStatusInput, shopId: number): Promise<PaChangeNotificationStatusResponse>;
16
17
  handleButtonAction(body: PaHandleButtonActionInput, shopId: number): Promise<PaHandleButtonActionResponse>;
18
+ validateAiInteraction(body: PaValidateAiInteractionInput, shopId: number): Promise<PaValidateAiInteractionResponse>;
17
19
  startAiInteraction(body: PaStartAiInteractionInput, shopId: number): Promise<PaStartAiInteractionResponse>;
18
20
  stopAiInteraction(externId: string, body: PaStopAiInteractionInput, shopId: number): Promise<PaStopAiInteractionResponse>;
19
21
  }
@@ -29,6 +29,10 @@ class ChatbotService {
29
29
  const response = await this.api.post(`/chatbot/handleButtonAction`, body, shopId);
30
30
  return response;
31
31
  }
32
+ async validateAiInteraction(body, shopId) {
33
+ const response = await this.api.post(`/chatbot/aiInteraction/validate`, body, shopId);
34
+ return response;
35
+ }
32
36
  async startAiInteraction(body, shopId) {
33
37
  const response = await this.api.post(`/chatbot/aiInteraction/start`, body, shopId);
34
38
  return response;
@@ -1,9 +1,13 @@
1
+ import { AiInteractionConsumptionSource } from '../enum/aiInteractionEnums/ai-interaction-consumption-source.enum';
2
+ import { InteractionConsumptionType } from '../enum/aiInteractionEnums/interaction-consumption-type.enum';
1
3
  export interface PaStartAiInteractionInput {
2
4
  clientId: number;
3
5
  externId: string;
4
6
  shopId?: number;
7
+ interactionType?: InteractionConsumptionType;
5
8
  }
6
9
  export interface PaStartAiInteractionResponse {
7
- id: number;
10
+ id: string;
8
11
  externId: string;
12
+ source: AiInteractionConsumptionSource;
9
13
  }
@@ -0,0 +1,12 @@
1
+ import { AiInteractionConsumptionSource } from '../enum/aiInteractionEnums/ai-interaction-consumption-source.enum';
2
+ import { AiInteractionValidationReason } from '../enum/aiInteractionEnums/ai-interaction-validation-reason.enum';
3
+ import { InteractionConsumptionType } from '../enum/aiInteractionEnums/interaction-consumption-type.enum';
4
+ export interface PaValidateAiInteractionInput {
5
+ shopId?: number;
6
+ interactionType?: InteractionConsumptionType;
7
+ }
8
+ export interface PaValidateAiInteractionResponse {
9
+ allowed: boolean;
10
+ source?: AiInteractionConsumptionSource;
11
+ reason?: AiInteractionValidationReason;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export declare enum AiInteractionConsumptionSource {
2
+ PLAN = "PLAN",
3
+ WALLET = "WALLET"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AiInteractionConsumptionSource = void 0;
4
+ var AiInteractionConsumptionSource;
5
+ (function (AiInteractionConsumptionSource) {
6
+ AiInteractionConsumptionSource["PLAN"] = "PLAN";
7
+ AiInteractionConsumptionSource["WALLET"] = "WALLET";
8
+ })(AiInteractionConsumptionSource || (exports.AiInteractionConsumptionSource = AiInteractionConsumptionSource = {}));
@@ -0,0 +1,3 @@
1
+ export declare enum AiInteractionValidationReason {
2
+ NO_CREDITS = "NO_CREDITS"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AiInteractionValidationReason = void 0;
4
+ var AiInteractionValidationReason;
5
+ (function (AiInteractionValidationReason) {
6
+ AiInteractionValidationReason["NO_CREDITS"] = "NO_CREDITS";
7
+ })(AiInteractionValidationReason || (exports.AiInteractionValidationReason = AiInteractionValidationReason = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum InteractionConsumptionType {
2
+ AI_INTERACTION = "AI_INTERACTION",
3
+ CHATBOT = "CHATBOT"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InteractionConsumptionType = void 0;
4
+ var InteractionConsumptionType;
5
+ (function (InteractionConsumptionType) {
6
+ InteractionConsumptionType["AI_INTERACTION"] = "AI_INTERACTION";
7
+ InteractionConsumptionType["CHATBOT"] = "CHATBOT";
8
+ })(InteractionConsumptionType || (exports.InteractionConsumptionType = InteractionConsumptionType = {}));
@@ -3,6 +3,7 @@ export * from './dto/get-chatbot-formatted-messages.dto';
3
3
  export * from './dto/pa.change-notification-status.dto';
4
4
  export * from './dto/pa.start-ai-interaction.dto';
5
5
  export * from './dto/pa.stop-ai-interaction.dto';
6
+ export * from './dto/pa.validate-ai-interaction.dto';
6
7
  export * from './enum/chatbotActionEnums/chatbot-action-schedule-permission.enum';
7
8
  export * from './enum/chatbotActionEnums/chatbot-action-type.enum';
8
9
  export * from './enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum';
@@ -22,3 +23,6 @@ export * from './enum/chatbotSettingsEnums/chatbot-settings-ai-personality.enum'
22
23
  export * from './enum/chatbotTriggerEnums/chatbot-trigger-pattern-type.enum';
23
24
  export * from './enum/chatbotActionEnums/chatbot-action-show-sending-info.enum';
24
25
  export * from './enum/chatbotActionEnums/media-type.enum';
26
+ export * from './enum/aiInteractionEnums/ai-interaction-consumption-source.enum';
27
+ export * from './enum/aiInteractionEnums/ai-interaction-validation-reason.enum';
28
+ export * from './enum/aiInteractionEnums/interaction-consumption-type.enum';
@@ -19,6 +19,7 @@ __exportStar(require("./dto/get-chatbot-formatted-messages.dto"), exports);
19
19
  __exportStar(require("./dto/pa.change-notification-status.dto"), exports);
20
20
  __exportStar(require("./dto/pa.start-ai-interaction.dto"), exports);
21
21
  __exportStar(require("./dto/pa.stop-ai-interaction.dto"), exports);
22
+ __exportStar(require("./dto/pa.validate-ai-interaction.dto"), exports);
22
23
  __exportStar(require("./enum/chatbotActionEnums/chatbot-action-schedule-permission.enum"), exports);
23
24
  __exportStar(require("./enum/chatbotActionEnums/chatbot-action-type.enum"), exports);
24
25
  __exportStar(require("./enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum"), exports);
@@ -38,3 +39,6 @@ __exportStar(require("./enum/chatbotSettingsEnums/chatbot-settings-ai-personalit
38
39
  __exportStar(require("./enum/chatbotTriggerEnums/chatbot-trigger-pattern-type.enum"), exports);
39
40
  __exportStar(require("./enum/chatbotActionEnums/chatbot-action-show-sending-info.enum"), exports);
40
41
  __exportStar(require("./enum/chatbotActionEnums/media-type.enum"), exports);
42
+ __exportStar(require("./enum/aiInteractionEnums/ai-interaction-consumption-source.enum"), exports);
43
+ __exportStar(require("./enum/aiInteractionEnums/ai-interaction-validation-reason.enum"), exports);
44
+ __exportStar(require("./enum/aiInteractionEnums/interaction-consumption-type.enum"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tec.pet/tecpet-sdk",
3
- "version": "0.0.128",
3
+ "version": "0.0.129",
4
4
  "description": "TecPet SDK for integration with TecPet services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",