@tec.pet/tecpet-sdk 0.0.35 → 0.0.37
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/booking/dto/pa.create-booking.dto.d.ts +2 -0
- package/dist/domain/breed/breed.service.js +0 -2
- package/dist/domain/client/client.service.js +3 -6
- package/dist/domain/combo/dto/pa.get-combo-pricing.dto.d.ts +2 -0
- package/dist/domain/employee/dto/pa.employee-filter.dto.d.ts +3 -0
- package/dist/domain/employee/dto/pa.get-employee.dto.d.ts +14 -0
- package/dist/domain/employee/dto/pa.get-employee.dto.js +2 -0
- package/dist/domain/employee/employee.service.d.ts +8 -0
- package/dist/domain/employee/employee.service.js +19 -0
- package/dist/domain/employee/index.d.ts +2 -0
- package/dist/domain/employee/index.js +18 -0
- package/dist/domain/service/dto/pa.get-service-pricing.dto.d.ts +6 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/package.json +4 -1
- package/.github/workflows/main.yml +0 -152
- package/changelog.md +0 -2
- package/dist/domain/employee/dto/employee.dto.d.ts +0 -6
- package/jest.config.js +0 -14
- package/src/domain/availableTimes/availableTimes.service.ts +0 -23
- package/src/domain/availableTimes/dto/pa.get-available-time.dto.ts +0 -5
- package/src/domain/availableTimes/dto/pa.get-available-times.dto.ts +0 -9
- package/src/domain/availableTimes/index.ts +0 -3
- package/src/domain/billingMethod/billingMethod.service.ts +0 -20
- package/src/domain/billingMethod/dto/pa.get-billing-methods.dto.ts +0 -22
- package/src/domain/billingMethod/enum/billing-method-type.enum.ts +0 -14
- package/src/domain/billingMethod/index.ts +0 -3
- package/src/domain/booking/booking.service.ts +0 -35
- package/src/domain/booking/dto/pa.change-booking-status.dto.ts +0 -13
- package/src/domain/booking/dto/pa.create-booking.dto.ts +0 -10
- package/src/domain/booking/dto/pa.get-booking.dto.ts +0 -19
- package/src/domain/booking/dto/pa.get-bookings.dto.ts +0 -11
- package/src/domain/booking/index.ts +0 -3
- package/src/domain/breed/breed.service.ts +0 -23
- package/src/domain/breed/dto/pa.get-breed.dto.ts +0 -11
- package/src/domain/breed/dto/pa.get-breeds.dto.ts +0 -8
- package/src/domain/breed/index.ts +0 -3
- package/src/domain/chatbot/chatbotService.ts +0 -49
- package/src/domain/chatbot/dto/chatbot-settings.json.ts +0 -254
- package/src/domain/chatbot/dto/get-chatbot-formatted-messages.dto.ts +0 -20
- package/src/domain/chatbot/dto/pa.change-notification-status.dto.ts +0 -19
- package/src/domain/chatbot/dto/pa.handle-button-action.dto.ts +0 -13
- package/src/domain/chatbot/enum/chatbotActionEnums/chatbot-action-mode-type.enum.ts +0 -5
- package/src/domain/chatbot/enum/chatbotActionEnums/chatbot-action-schedule-permission.enum.ts +0 -5
- package/src/domain/chatbot/enum/chatbotActionEnums/chatbot-action-type.enum.ts +0 -9
- package/src/domain/chatbot/enum/chatbotActionEnums/media-type.enum.ts +0 -5
- package/src/domain/chatbot/enum/chatbotBehaviorEnums/chatbot-behavior-type.enum.ts +0 -4
- package/src/domain/chatbot/enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum.ts +0 -4
- package/src/domain/chatbot/enum/chatbotBehaviorEnums/chatbot-timeout-action.enum.ts +0 -5
- package/src/domain/chatbot/enum/chatbotFluxEnums/chatbot-flux-type.enum.ts +0 -10
- package/src/domain/chatbot/enum/chatbotGuidanceEnums/chatbot-action-button-type.enum.ts +0 -12
- package/src/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-info-collection-subtype.enum.ts +0 -32
- package/src/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-info-collection-type.enum.ts +0 -12
- package/src/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-price-display-mode.enum.ts +0 -5
- package/src/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-size_display-mode.enum.ts +0 -5
- package/src/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-time-display-mode.enum.ts +0 -5
- package/src/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-time-selection-behavior.enum.ts +0 -4
- package/src/domain/chatbot/enum/chatbotSendingInfoItemEnums/chatbot-sending-info-item-type.enum.ts +0 -7
- package/src/domain/chatbot/enum/chatbotSettingsEnums/chatbot-ai-voice.enum.ts +0 -4
- package/src/domain/chatbot/enum/chatbotSettingsEnums/chatbot-channel-type.enum.ts +0 -3
- package/src/domain/chatbot/enum/chatbotSettingsEnums/chatbot-mode.enum.ts +0 -5
- package/src/domain/chatbot/enum/chatbotSettingsEnums/chatbot-platform-type.enum.ts +0 -4
- package/src/domain/chatbot/enum/chatbotSettingsEnums/chatbot-settings-ai-personality.enum.ts +0 -10
- package/src/domain/chatbot/enum/chatbotTriggerEnums/chatbot-trigger-pattern-type.enum.ts +0 -4
- package/src/domain/chatbot/index.ts +0 -10
- package/src/domain/client/client.service.ts +0 -40
- package/src/domain/client/dto/pa.create-client.dto.ts +0 -11
- package/src/domain/client/dto/pa.edit-client.dto.ts +0 -11
- package/src/domain/client/dto/pa.get-client-summary.dto.ts +0 -11
- package/src/domain/client/dto/pa.get-client.dto.ts +0 -20
- package/src/domain/client/dto/pa.get-clients.dto.ts +0 -11
- package/src/domain/client/index.ts +0 -5
- package/src/domain/combo/combo.service.ts +0 -20
- package/src/domain/combo/dto/pa.get-combo-pricing.dto.ts +0 -10
- package/src/domain/combo/index.ts +0 -2
- package/src/domain/employee/dto/employee.dto.ts +0 -6
- package/src/domain/pet/dto/pa.create-pet.dto.ts +0 -13
- package/src/domain/pet/dto/pa.edit-pet.dto.ts +0 -15
- package/src/domain/pet/dto/pa.get-pet-activity.dto.ts +0 -5
- package/src/domain/pet/dto/pa.get-pet.dto.ts +0 -23
- package/src/domain/pet/dto/pa.get-pets.dto.ts +0 -8
- package/src/domain/pet/index.ts +0 -5
- package/src/domain/pet/pet.service.ts +0 -36
- package/src/domain/segment/enum/segment.enum.ts +0 -6
- package/src/domain/service/dto/pa.get-service-pricing.dto.ts +0 -27
- package/src/domain/service/index.ts +0 -2
- package/src/domain/service/service.service.ts +0 -20
- package/src/domain/shop/dto/pa.get-shop-configurations.dto.ts +0 -92
- package/src/domain/shop/index.ts +0 -6
- package/src/domain/shop/shop.service.ts +0 -15
- package/src/domain/specie/dto/pa.get-specie.dto.ts +0 -7
- package/src/domain/specie/dto/pa.get-species.dto.ts +0 -7
- package/src/domain/specie/enum/specie-type.enum.ts +0 -21
- package/src/domain/specie/index.ts +0 -5
- package/src/domain/specie/specie.service.ts +0 -18
- package/src/domain/token/dto/pa.extract-token.dto.ts +0 -4
- package/src/domain/token/index.ts +0 -1
- package/src/domain/token/token.service.ts +0 -15
- package/src/domain/types/pagination.types.ts +0 -10
- package/src/index.ts +0 -62
- package/src/infra/http/client.http.ts +0 -91
- package/src/infra/logger/logger.interface.ts +0 -7
- package/src/infra/logger/stdout.logger.ts +0 -85
- package/tsconfig.json +0 -17
- /package/dist/domain/employee/dto/{employee.dto.js → pa.employee-filter.dto.js} +0 -0
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from "infra/http/client.http";
|
|
2
|
-
import { PaChatbotSettingsResponse } from "./dto/chatbot-settings.json";
|
|
3
|
-
import {
|
|
4
|
-
GetChatbotFormattedMessagesInput,
|
|
5
|
-
PaGetChatbotFormattedMessagesResponse
|
|
6
|
-
} from "./dto/get-chatbot-formatted-messages.dto";
|
|
7
|
-
import {
|
|
8
|
-
PaChangeNotificationStatusInput,
|
|
9
|
-
PaChangeNotificationStatusResponse
|
|
10
|
-
} from "./dto/pa.change-notification-status.dto";
|
|
11
|
-
import { PaHandleButtonActionInput, PaHandleButtonActionResponse } from "./dto/pa.handle-button-action.dto";
|
|
12
|
-
import { ChatbotPlatformTypeEnum } from "./enum/chatbotSettingsEnums/chatbot-platform-type.enum";
|
|
13
|
-
|
|
14
|
-
export class ChatbotService {
|
|
15
|
-
constructor(private readonly api: HttpClient) {
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async getByShop(shopId: number): Promise<PaChatbotSettingsResponse> {
|
|
19
|
-
const response = await this.api.get<PaChatbotSettingsResponse>(`/chatbot/settings`, {}, shopId)
|
|
20
|
-
return response;
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async getByPlatform(platformType: ChatbotPlatformTypeEnum, platformId: string): Promise<PaChatbotSettingsResponse> {
|
|
25
|
-
const response = await this.api.get<PaChatbotSettingsResponse>(`/chatbot/settings`, {platformType, platformId})
|
|
26
|
-
return response;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async getFormattedMessage(body: GetChatbotFormattedMessagesInput, shopId: number): Promise<Array<PaGetChatbotFormattedMessagesResponse>> {
|
|
30
|
-
const response = await this.api.post<Array<PaGetChatbotFormattedMessagesResponse>>(`/chatbot/formattedMessages`, body, shopId)
|
|
31
|
-
if (response) {
|
|
32
|
-
return response;
|
|
33
|
-
}
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async changeNotificationStatus(notificationId: number, body: PaChangeNotificationStatusInput, shopId: number): Promise<PaChangeNotificationStatusResponse> {
|
|
38
|
-
const response = await this.api.put<PaChangeNotificationStatusResponse>(`/chatbot/notification/${notificationId}/changeStatus`, body, shopId)
|
|
39
|
-
return response;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
async handleButtonAction(body: PaHandleButtonActionInput, shopId: number): Promise<PaHandleButtonActionResponse> {
|
|
45
|
-
const response = await this.api.post<PaHandleButtonActionResponse>(`/chatbot/handleButtonAction`, body, shopId)
|
|
46
|
-
return response;
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { ChatbotActionModeTypeEnum } from "../enum/chatbotActionEnums/chatbot-action-mode-type.enum";
|
|
2
|
-
import { ChatBotActionSchedulePermissionEnum } from "../enum/chatbotActionEnums/chatbot-action-schedule-permission.enum";
|
|
3
|
-
import { ChatbotActionTypeEnum } from "../enum/chatbotActionEnums/chatbot-action-type.enum";
|
|
4
|
-
import { MediaTypeEnum } from "../enum/chatbotActionEnums/media-type.enum";
|
|
5
|
-
import { ChatbotBehaviorTypeEnum } from "../enum/chatbotBehaviorEnums/chatbot-behavior-type.enum";
|
|
6
|
-
import { ChatbotInactiveEmployeeActionEnum } from "../enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum";
|
|
7
|
-
import { ChatbotTimeoutActionEnum } from "../enum/chatbotBehaviorEnums/chatbot-timeout-action.enum";
|
|
8
|
-
import { ChatbotFluxTypeEnum } from "../enum/chatbotFluxEnums/chatbot-flux-type.enum";
|
|
9
|
-
import { ChatbotActionButtonTypeEnum } from "../enum/chatbotGuidanceEnums/chatbot-action-button-type.enum";
|
|
10
|
-
import { ChatbotPriceDisplayModeEnum } from "../enum/chatbotInfoCollectionEnums/chatbot-price-display-mode.enum";
|
|
11
|
-
import { ChatbotSizeDisplayModeEnum } from "../enum/chatbotInfoCollectionEnums/chatbot-size_display-mode.enum";
|
|
12
|
-
import { ChatbotTimeDisplayModeEnum } from "../enum/chatbotInfoCollectionEnums/chatbot-time-display-mode.enum";
|
|
13
|
-
import {
|
|
14
|
-
ChatbotInfoCollectionBehaviorEnum
|
|
15
|
-
} from "../enum/chatbotInfoCollectionEnums/chatbot-time-selection-behavior.enum";
|
|
16
|
-
import { ChatbotSendingInfoItemTypeEnum } from "../enum/chatbotSendingInfoItemEnums/chatbot-sending-info-item-type.enum";
|
|
17
|
-
import { ChatbotAIVoiceEnum } from "../enum/chatbotSettingsEnums/chatbot-ai-voice.enum";
|
|
18
|
-
import { ChatbotChannelTypeEnum } from "../enum/chatbotSettingsEnums/chatbot-channel-type.enum";
|
|
19
|
-
import { ChatbotModeEnum } from "../enum/chatbotSettingsEnums/chatbot-mode.enum";
|
|
20
|
-
import { ChatbotPlatformTypeEnum } from "../enum/chatbotSettingsEnums/chatbot-platform-type.enum";
|
|
21
|
-
import { ChatbotSettingsAIPersonalityEnum } from "../enum/chatbotSettingsEnums/chatbot-settings-ai-personality.enum";
|
|
22
|
-
import { ChatbotTriggerPatternTypeEnum } from "../enum/chatbotTriggerEnums/chatbot-trigger-pattern-type.enum";
|
|
23
|
-
|
|
24
|
-
export interface Service {
|
|
25
|
-
id: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface PaChatbotSettingsResponse {
|
|
29
|
-
newClientMessage?: string;
|
|
30
|
-
registeredClientMessage?: string;
|
|
31
|
-
onComercialTimeMessage?: string;
|
|
32
|
-
outOfComercialTimeMessage?: string;
|
|
33
|
-
channelType: ChatbotChannelTypeEnum;
|
|
34
|
-
mode: ChatbotModeEnum;
|
|
35
|
-
aiEnabled: boolean;
|
|
36
|
-
aiPersonality: ChatbotSettingsAIPersonalityEnum;
|
|
37
|
-
voiceResponseEnabled: boolean;
|
|
38
|
-
aiVoice: ChatbotAIVoiceEnum;
|
|
39
|
-
platformType: ChatbotPlatformTypeEnum;
|
|
40
|
-
chatbotActions: ChatbotActionJson[];
|
|
41
|
-
chatbotBehaviors: ChatbotBehaviorDto;
|
|
42
|
-
platformSettings: {
|
|
43
|
-
id: string;
|
|
44
|
-
token: string;
|
|
45
|
-
};
|
|
46
|
-
shop: {
|
|
47
|
-
id: number;
|
|
48
|
-
name: string;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export class ChatbotBehaviorDto {
|
|
53
|
-
human?: {
|
|
54
|
-
timeoutMessage: string;
|
|
55
|
-
onTimeoutAction: ChatbotTimeoutActionEnum;
|
|
56
|
-
inactiveEmployeeAction: ChatbotInactiveEmployeeActionEnum;
|
|
57
|
-
timeoutNotificationMinutes: number;
|
|
58
|
-
minutesToClosing: number;
|
|
59
|
-
employee: ChatbotEmployee;
|
|
60
|
-
alternativeEmployee: ChatbotEmployee;
|
|
61
|
-
behavior: ChatbotBehaviorTypeEnum;
|
|
62
|
-
};
|
|
63
|
-
bot?: {
|
|
64
|
-
timeoutMessage: string;
|
|
65
|
-
closingMessage: string;
|
|
66
|
-
onTimeoutAction: ChatbotTimeoutActionEnum;
|
|
67
|
-
inactiveEmployeeAction: ChatbotInactiveEmployeeActionEnum;
|
|
68
|
-
timeoutNotificationMinutes: number;
|
|
69
|
-
behavior: ChatbotBehaviorTypeEnum;
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface ChatbotEmployee {
|
|
74
|
-
id: number;
|
|
75
|
-
phoneNumber: string;
|
|
76
|
-
name: string;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface MediaDto {
|
|
80
|
-
id: string;
|
|
81
|
-
mimeType: string;
|
|
82
|
-
extension: string;
|
|
83
|
-
type: MediaTypeEnum;
|
|
84
|
-
hasThumb: boolean;
|
|
85
|
-
fileName: string;
|
|
86
|
-
link: string;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface ChatbotSendingInfoItemDto {
|
|
90
|
-
id: string;
|
|
91
|
-
type: ChatbotSendingInfoItemTypeEnum;
|
|
92
|
-
content?: string;
|
|
93
|
-
medias?: MediaDto[];
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface ChatbotActionJson {
|
|
97
|
-
id:string;
|
|
98
|
-
name: string;
|
|
99
|
-
enabled: boolean;
|
|
100
|
-
description: string;
|
|
101
|
-
schedulePermission?: ChatBotActionSchedulePermissionEnum;
|
|
102
|
-
guidanceOptions: ChatbotActionButtonDto[];
|
|
103
|
-
sendingInfoItems: ChatbotSendingInfoItemDto[];
|
|
104
|
-
infoCollectionMenus: InfoCollectionMenuJson;
|
|
105
|
-
mode: ChatbotActionModeTypeEnum;
|
|
106
|
-
actionType: ChatbotActionTypeEnum;
|
|
107
|
-
conclusionMessage?: string;
|
|
108
|
-
chatbotFlux: ChatbotFluxJson;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface ChatbotFluxJson {
|
|
112
|
-
id: string;
|
|
113
|
-
name: string;
|
|
114
|
-
fluxType: ChatbotFluxTypeEnum;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export interface ChatbotActionReference {
|
|
118
|
-
id: string;
|
|
119
|
-
name: string;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface ChatbotTriggerJson {
|
|
123
|
-
id: string;
|
|
124
|
-
|
|
125
|
-
name: string;
|
|
126
|
-
|
|
127
|
-
enabled: boolean;
|
|
128
|
-
|
|
129
|
-
keyText: string;
|
|
130
|
-
|
|
131
|
-
chatbotAction: ChatbotActionReference;
|
|
132
|
-
|
|
133
|
-
description?: string;
|
|
134
|
-
|
|
135
|
-
limit?: Date;
|
|
136
|
-
|
|
137
|
-
patternType: ChatbotTriggerPatternTypeEnum;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface ChatbotActionButtonDto {
|
|
141
|
-
id: string;
|
|
142
|
-
buttonTitle: string;
|
|
143
|
-
actionButtonType: ChatbotActionButtonTypeEnum;
|
|
144
|
-
phone: string;
|
|
145
|
-
url: string;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface InfoCollectionMenuJson {
|
|
149
|
-
petInfo?: {
|
|
150
|
-
petName: {
|
|
151
|
-
enabled: boolean;
|
|
152
|
-
message: string;
|
|
153
|
-
};
|
|
154
|
-
petSpecie: {
|
|
155
|
-
enabled: boolean;
|
|
156
|
-
message: string;
|
|
157
|
-
};
|
|
158
|
-
petBreed: { enabled?: boolean; message: string };
|
|
159
|
-
petSize: { enabled?: boolean; message: string };
|
|
160
|
-
petFur: { enabled?: boolean; message: string; sizeDisplayMode: ChatbotSizeDisplayModeEnum };
|
|
161
|
-
};
|
|
162
|
-
adaptionService?: {
|
|
163
|
-
allowAdaptionService: {
|
|
164
|
-
enabled: boolean;
|
|
165
|
-
message: string;
|
|
166
|
-
service: Service;
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
serviceSelection?: {
|
|
170
|
-
service: {
|
|
171
|
-
message: string;
|
|
172
|
-
};
|
|
173
|
-
showServiceValues: { enabled: boolean; priceDisplayMode: ChatbotPriceDisplayModeEnum };
|
|
174
|
-
serviceAddons: { enabled: boolean; message: string };
|
|
175
|
-
serviceProfessionalChoice: { enabled: boolean };
|
|
176
|
-
showServicePromotions: { enabled: boolean };
|
|
177
|
-
};
|
|
178
|
-
takeAndBring?: {
|
|
179
|
-
allowTakeAndBring: { enabled: boolean; message: string; minAdvanceHours: number };
|
|
180
|
-
};
|
|
181
|
-
timeSelection?: {
|
|
182
|
-
timeSelectionBehavior: {
|
|
183
|
-
message: string;
|
|
184
|
-
behavior: ChatbotInfoCollectionBehaviorEnum;
|
|
185
|
-
timeDisplayMode: ChatbotTimeDisplayModeEnum;
|
|
186
|
-
minAdvanceHours: number;
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
editBooking?: {
|
|
190
|
-
allowChangeDateAndTime: {
|
|
191
|
-
enabled: boolean;
|
|
192
|
-
};
|
|
193
|
-
allowCancel: {
|
|
194
|
-
enabled: boolean;
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
|
-
guidance?: {
|
|
198
|
-
guidanceMessage: {
|
|
199
|
-
message: string;
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
responseMessage?: {
|
|
203
|
-
onCommercialTime: {
|
|
204
|
-
message: string;
|
|
205
|
-
};
|
|
206
|
-
outOfCommercialTime: {
|
|
207
|
-
message: string;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
healthPlan?: {
|
|
211
|
-
askForHealthPlan: {
|
|
212
|
-
message: string;
|
|
213
|
-
enabled: boolean;
|
|
214
|
-
};
|
|
215
|
-
transferToAttendantIfHealthPlan: {
|
|
216
|
-
enabled: true;
|
|
217
|
-
behavior: ChatbotInfoCollectionBehaviorEnum.SEND_TO_ATTENDANT;
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
extraInfo?: {
|
|
221
|
-
confirmClientName: {
|
|
222
|
-
enabled: boolean;
|
|
223
|
-
message: string;
|
|
224
|
-
};
|
|
225
|
-
clientCpf: {
|
|
226
|
-
enabled: boolean;
|
|
227
|
-
message: string;
|
|
228
|
-
};
|
|
229
|
-
scheduleToAnotherPet: {
|
|
230
|
-
enabled: boolean;
|
|
231
|
-
message: string;
|
|
232
|
-
};
|
|
233
|
-
clientAddress: {
|
|
234
|
-
enabled: boolean;
|
|
235
|
-
message: string;
|
|
236
|
-
};
|
|
237
|
-
petGender: {
|
|
238
|
-
enabled: boolean;
|
|
239
|
-
message: string;
|
|
240
|
-
};
|
|
241
|
-
petBirthDate: {
|
|
242
|
-
enabled: boolean;
|
|
243
|
-
message: string;
|
|
244
|
-
};
|
|
245
|
-
petWeight: {
|
|
246
|
-
enabled: boolean;
|
|
247
|
-
message: string;
|
|
248
|
-
};
|
|
249
|
-
petDefaultChecklist: {
|
|
250
|
-
enabled: boolean;
|
|
251
|
-
message: string;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface ChatbotSettingsTagIds {
|
|
2
|
-
clientId?: number;
|
|
3
|
-
petId?: number;
|
|
4
|
-
invoiceId?: number;
|
|
5
|
-
serviceId?: number;
|
|
6
|
-
bookingId?: number;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface ChatbotMessagesToFormat {
|
|
10
|
-
text: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export interface GetChatbotFormattedMessagesInput {
|
|
14
|
-
messages: ChatbotMessagesToFormat[];
|
|
15
|
-
ids: ChatbotSettingsTagIds;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface PaGetChatbotFormattedMessagesResponse {
|
|
19
|
-
message: string
|
|
20
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export enum NotificationStatus {
|
|
2
|
-
NEW = 'NEW',
|
|
3
|
-
SENT = 'SENT',
|
|
4
|
-
SENT_WA = 'SENT_WA',
|
|
5
|
-
DELIVERED = 'DELIVERED',
|
|
6
|
-
READ = 'READ',
|
|
7
|
-
ANSWERED = 'ANSWERED',
|
|
8
|
-
CANCELED = 'CANCELED',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface PaChangeNotificationStatusInput {
|
|
12
|
-
status: NotificationStatus;
|
|
13
|
-
date: Date;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface PaChangeNotificationStatusResponse {
|
|
17
|
-
success: boolean;
|
|
18
|
-
message: string;
|
|
19
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {ChatbotActionButtonTypeEnum} from "../enum/chatbotGuidanceEnums/chatbot-action-button-type.enum";
|
|
2
|
-
|
|
3
|
-
export interface PaHandleButtonActionInput {
|
|
4
|
-
type: ChatbotActionButtonTypeEnum;
|
|
5
|
-
phone?: string;
|
|
6
|
-
clientName?: string;
|
|
7
|
-
invoiceId?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface PaHandleButtonActionResponse {
|
|
11
|
-
success: boolean;
|
|
12
|
-
message: string;
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export enum ChatbotActionButtonTypeEnum {
|
|
2
|
-
NONE = 'NONE',
|
|
3
|
-
BACK_TO_HOME = 'BACK_TO_HOME',
|
|
4
|
-
BOOKING_CONFIRM = 'BOOKING_CONFIRM',
|
|
5
|
-
BOOKING_CANCEL = 'BOOKING_CANCEL',
|
|
6
|
-
BOOKING_RESCHEDULE = 'BOOKING_RESCHEDULE',
|
|
7
|
-
TRANSFER_TO_HUMAN = 'TRANSFER_TO_HUMAN',
|
|
8
|
-
PAY_INVOICE_WITH_VOUCHER = 'PAY_INVOICE_WITH_VOUCHER',
|
|
9
|
-
CALL = 'CALL',
|
|
10
|
-
URL = 'URL',
|
|
11
|
-
END = 'END',
|
|
12
|
-
}
|
package/src/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-info-collection-subtype.enum.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export enum ChatbotInfoCollectionSubtypeEnum {
|
|
2
|
-
'CLIENT_CPF' = 'CLIENT_CPF',
|
|
3
|
-
'CLIENT_ADDRESS' = 'CLIENT_ADDRESS',
|
|
4
|
-
'CLIENT_NAME' = 'CLIENT_NAME',
|
|
5
|
-
'CONFIRM_CLIENT_NAME' = 'CONFIRM_CLIENT_NAME',
|
|
6
|
-
'ALLOW_TAKE_AND_BRING' = 'ALLOW_TAKE_AND_BRING',
|
|
7
|
-
'PET_SPECIE' = 'PET_SPECIE',
|
|
8
|
-
'PET_BREED' = 'PET_BREED',
|
|
9
|
-
'PET_NAME' = 'PET_NAME',
|
|
10
|
-
'PET_SIZE' = 'PET_SIZE',
|
|
11
|
-
'PET_FUR' = 'PET_FUR',
|
|
12
|
-
'PET_GENDER' = 'PET_GENDER',
|
|
13
|
-
'PET_BIRTH_DATE' = 'PET_BIRTH_DATE',
|
|
14
|
-
'PET_DEFAULT_CHECKLIST' = 'PET_DEFAULT_CHECKLIST',
|
|
15
|
-
'PET_NEUTERED' = 'PET_NEUTERED',
|
|
16
|
-
'PET_WEIGHT' = 'PET_WEIGHT',
|
|
17
|
-
'SERVICE' = 'SERVICE',
|
|
18
|
-
'SHOW_SERVICE_VALUES' = 'SHOW_SERVICE_VALUES',
|
|
19
|
-
'SERVICE_PROFESSIONAL_CHOICE' = 'SERVICE_PROFESSIONAL_CHOICE',
|
|
20
|
-
'SERVICE_ADDONS' = 'SERVICE_ADDONS',
|
|
21
|
-
'SERVICE_SHOW_PROMOTIONS' = 'SERVICE_SHOW_PROMOTIONS',
|
|
22
|
-
'SCHEDULE_TO_ANOTHER_PET' = 'SCHEDULE_TO_ANOTHER_PET',
|
|
23
|
-
'ALLOW_CHANGE_DATE_AND_TIME' = 'ALLOW_CHANGE_DATE_AND_TIME',
|
|
24
|
-
'ALLOW_CANCEL' = 'ALLOW_CANCEL',
|
|
25
|
-
'ALLOW_ADAPTION_SERVICE' = 'ALLOW_ADAPTION_SERVICE',
|
|
26
|
-
'ON_COMMERCIAL_TIME' = 'ON_COMMERCIAL_TIME',
|
|
27
|
-
'OUT_OF_COMMERCIAL_TIME' = 'OUT_OF_COMMERCIAL_TIME',
|
|
28
|
-
'GUIDANCE_MESSAGE' = 'GUIDANCE_MESSAGE',
|
|
29
|
-
'TIME_SELECTION_BEHAVIOR' = 'TIME_SELECTION_BEHAVIOR',
|
|
30
|
-
'ASK_FOR_HEALTH_PLAN' = 'ASK_FOR_HEALTH_PLAN',
|
|
31
|
-
'TRANSFER_TO_ATTENDANT_IF_HEALTH_PLAN' = 'TRANSFER_TO_ATTENDANT_IF_HEALTH_PLAN',
|
|
32
|
-
}
|
package/src/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-info-collection-type.enum.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export enum ChatbotInfoCollectionTypeEnum {
|
|
2
|
-
'PET_INFO' = 'PET_INFO',
|
|
3
|
-
'SERVICE_SELECTION' = 'SERVICE_SELECTION',
|
|
4
|
-
'TAKE_AND_BRING' = 'TAKE_AND_BRING',
|
|
5
|
-
'TIME_SELECTION' = 'TIME_SELECTION',
|
|
6
|
-
'EDIT_BOOKING' = 'EDIT_BOOKING',
|
|
7
|
-
'GUINDANCE' = 'GUINDANCE',
|
|
8
|
-
'ADAPTION_SERVICE' = 'ADAPTION_SERVICE',
|
|
9
|
-
'RESPONSE_MESSAGE' = 'RESPONSE_MESSAGE',
|
|
10
|
-
'EXTRA_INFO' = 'EXTRA_INFO',
|
|
11
|
-
'HEALTH_PLAN' = 'HEALTH_PLAN',
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './dto/chatbot-settings.json';
|
|
2
|
-
export * from './dto/get-chatbot-formatted-messages.dto';
|
|
3
|
-
export * from './dto/pa.change-notification-status.dto';
|
|
4
|
-
export * from './enum/chatbotActionEnums/chatbot-action-type.enum';
|
|
5
|
-
export * from './enum/chatbotBehaviorEnums/chatbot-inactive-employee-action.enum';
|
|
6
|
-
export * from './enum/chatbotBehaviorEnums/chatbot-timeout-action.enum';
|
|
7
|
-
export * from './enum/chatbotGuidanceEnums/chatbot-action-button-type.enum';
|
|
8
|
-
export * from './enum/chatbotSettingsEnums/chatbot-platform-type.enum';
|
|
9
|
-
export * from './enum/chatbotSettingsEnums/chatbot-settings-ai-personality.enum';
|
|
10
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { PaClientResponse } from "domain/client/dto/pa.get-client.dto";
|
|
2
|
-
import { PaGetClientsResponse } from "domain/client/dto/pa.get-clients.dto";
|
|
3
|
-
import { HttpClient } from "infra/http/client.http";
|
|
4
|
-
import { PaCreateClientInput } from "./dto/pa.create-client.dto";
|
|
5
|
-
import { PaEditClientInput } from "./dto/pa.edit-client.dto";
|
|
6
|
-
import { PaClientSummaryResponse } from "./dto/pa.get-client-summary.dto";
|
|
7
|
-
|
|
8
|
-
export class ClientService {
|
|
9
|
-
constructor(private readonly api: HttpClient) {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
async getByPhone(phone: string, shopId?: number): Promise<PaClientResponse> {
|
|
13
|
-
const response = await this.api.get<PaGetClientsResponse>(`/client`, {
|
|
14
|
-
page: 1,
|
|
15
|
-
limit: 20,
|
|
16
|
-
phone,
|
|
17
|
-
},
|
|
18
|
-
shopId)
|
|
19
|
-
return response.data[0];
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async edit(clientId: number, body: PaEditClientInput, shopId: number): Promise<PaClientResponse> {
|
|
24
|
-
const response = await this.api.put<PaClientResponse>(`/client/${clientId}`, body, shopId)
|
|
25
|
-
return response;
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async create(body: PaCreateClientInput, shopId: number): Promise<PaClientResponse> {
|
|
30
|
-
const response = await this.api.post<PaClientResponse>(`/client`, body, shopId)
|
|
31
|
-
return response;
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async summary(clientId: number, shopId: number): Promise<PaClientSummaryResponse> {
|
|
36
|
-
const response = await this.api.get<PaClientSummaryResponse>(`/client/${clientId}/summary`, {}, shopId)
|
|
37
|
-
return response;
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {PaClientResponse} from './pa.get-client.dto';
|
|
2
|
-
import {PaPetResponse} from "../../pet/dto/pa.get-pet.dto";
|
|
3
|
-
import {PaGetBookingResponse} from "../../booking/dto/pa.get-booking.dto";
|
|
4
|
-
import {PaGetPetActivityResponse} from "../../pet/dto/pa.get-pet-activity.dto";
|
|
5
|
-
|
|
6
|
-
export interface PaClientSummaryResponse {
|
|
7
|
-
client: PaClientResponse;
|
|
8
|
-
pets: Array<PaPetResponse>;
|
|
9
|
-
bookings: Array<PaGetBookingResponse>;
|
|
10
|
-
activities: Array<PaGetPetActivityResponse>;
|
|
11
|
-
}
|