@tec.pet/tecpet-sdk 0.0.187 → 0.0.189
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/dto/chatbot-settings.json.d.ts +5 -0
- package/dist/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-info-collection-subtype.enum.d.ts +1 -0
- package/dist/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-info-collection-subtype.enum.js +1 -0
- package/dist/domain/serviceCapacity/dto/pa.get-service-capacity.dto.d.ts +2 -0
- package/dist/domain/serviceCapacity/dto/pa.get-services-capacity-by-day.dto.d.ts +34 -0
- package/dist/domain/serviceCapacity/dto/pa.get-services-capacity-by-day.dto.js +2 -0
- package/dist/domain/serviceCapacity/enum/service-capacity-code.enum.d.ts +24 -0
- package/dist/domain/serviceCapacity/enum/service-capacity-code.enum.js +36 -0
- package/dist/domain/serviceCapacity/index.d.ts +2 -0
- package/dist/domain/serviceCapacity/index.js +2 -0
- package/dist/domain/serviceCapacity/serviceCapacity.service.d.ts +3 -0
- package/dist/domain/serviceCapacity/serviceCapacity.service.js +17 -2
- package/package.json +1 -1
|
@@ -261,6 +261,11 @@ export interface InfoCollectionMenuJson {
|
|
|
261
261
|
aiInstruction?: string;
|
|
262
262
|
minCancelAdvanceHours?: number;
|
|
263
263
|
};
|
|
264
|
+
allowShowBookingStatus?: {
|
|
265
|
+
enabled: boolean;
|
|
266
|
+
message?: string;
|
|
267
|
+
aiInstruction?: string;
|
|
268
|
+
};
|
|
264
269
|
};
|
|
265
270
|
guidance?: {
|
|
266
271
|
guidanceMessage: {
|
|
@@ -23,6 +23,7 @@ export declare enum ChatbotInfoCollectionSubtypeEnum {
|
|
|
23
23
|
'SCHEDULE_TO_ANOTHER_PET' = "SCHEDULE_TO_ANOTHER_PET",
|
|
24
24
|
'ALLOW_CHANGE_DATE_AND_TIME' = "ALLOW_CHANGE_DATE_AND_TIME",
|
|
25
25
|
'ALLOW_CANCEL' = "ALLOW_CANCEL",
|
|
26
|
+
'ALLOW_SHOW_BOOKING_STATUS' = "ALLOW_SHOW_BOOKING_STATUS",
|
|
26
27
|
'ALLOW_ADAPTION_SERVICE' = "ALLOW_ADAPTION_SERVICE",
|
|
27
28
|
'ON_COMMERCIAL_TIME' = "ON_COMMERCIAL_TIME",
|
|
28
29
|
'OUT_OF_COMMERCIAL_TIME' = "OUT_OF_COMMERCIAL_TIME",
|
package/dist/domain/chatbot/enum/chatbotInfoCollectionEnums/chatbot-info-collection-subtype.enum.js
CHANGED
|
@@ -27,6 +27,7 @@ var ChatbotInfoCollectionSubtypeEnum;
|
|
|
27
27
|
ChatbotInfoCollectionSubtypeEnum["SCHEDULE_TO_ANOTHER_PET"] = "SCHEDULE_TO_ANOTHER_PET";
|
|
28
28
|
ChatbotInfoCollectionSubtypeEnum["ALLOW_CHANGE_DATE_AND_TIME"] = "ALLOW_CHANGE_DATE_AND_TIME";
|
|
29
29
|
ChatbotInfoCollectionSubtypeEnum["ALLOW_CANCEL"] = "ALLOW_CANCEL";
|
|
30
|
+
ChatbotInfoCollectionSubtypeEnum["ALLOW_SHOW_BOOKING_STATUS"] = "ALLOW_SHOW_BOOKING_STATUS";
|
|
30
31
|
ChatbotInfoCollectionSubtypeEnum["ALLOW_ADAPTION_SERVICE"] = "ALLOW_ADAPTION_SERVICE";
|
|
31
32
|
ChatbotInfoCollectionSubtypeEnum["ON_COMMERCIAL_TIME"] = "ON_COMMERCIAL_TIME";
|
|
32
33
|
ChatbotInfoCollectionSubtypeEnum["OUT_OF_COMMERCIAL_TIME"] = "OUT_OF_COMMERCIAL_TIME";
|
|
@@ -9,9 +9,11 @@ export interface PaGetServiceCapacityBody {
|
|
|
9
9
|
}
|
|
10
10
|
export interface PaServiceCapacityResponse {
|
|
11
11
|
period: CapacityConfigurationType;
|
|
12
|
+
periodLabel: string;
|
|
12
13
|
defaultCheckin: string;
|
|
13
14
|
defaultCheckout: string;
|
|
14
15
|
capacity: number;
|
|
15
16
|
allocated: number;
|
|
16
17
|
available: number;
|
|
18
|
+
price?: number | null;
|
|
17
19
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PaServiceCategoryResponse } from "../../service/dto/pa.get-service-pricing.dto";
|
|
2
|
+
import { CapacityConfigurationType } from "../enum/capacity-configuration-type.enum";
|
|
3
|
+
import { PaServiceCapacityCode } from "../enum/service-capacity-code.enum";
|
|
4
|
+
export interface PaGetServicesCapacityByDayBody {
|
|
5
|
+
date: string;
|
|
6
|
+
petId?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface PaCapacityPeriodResponse {
|
|
9
|
+
period: CapacityConfigurationType;
|
|
10
|
+
periodLabel: string;
|
|
11
|
+
defaultCheckin: string;
|
|
12
|
+
defaultCheckout: string;
|
|
13
|
+
price: number | null;
|
|
14
|
+
}
|
|
15
|
+
export interface PaServiceCapacityByDayResponse {
|
|
16
|
+
id: number;
|
|
17
|
+
name: string;
|
|
18
|
+
serviceCategory: PaServiceCategoryResponse | null;
|
|
19
|
+
periods: Array<PaCapacityPeriodResponse>;
|
|
20
|
+
}
|
|
21
|
+
export interface PaServiceCapacityUnavailableResponse {
|
|
22
|
+
id: number;
|
|
23
|
+
name: string;
|
|
24
|
+
reason: PaServiceCapacityCode;
|
|
25
|
+
reasonMessage: string;
|
|
26
|
+
}
|
|
27
|
+
export interface PaGetServicesCapacityByDayResponse {
|
|
28
|
+
date: string;
|
|
29
|
+
services: Array<PaServiceCapacityByDayResponse>;
|
|
30
|
+
unavailable: Array<PaServiceCapacityUnavailableResponse>;
|
|
31
|
+
reason?: PaServiceCapacityCode;
|
|
32
|
+
reasonMessage?: string;
|
|
33
|
+
canRetryAnotherDate: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum PaServiceCapacityCode {
|
|
2
|
+
CLOSED_DAY = "CLOSED_DAY",
|
|
3
|
+
BLOCKED_DAY = "BLOCKED_DAY",
|
|
4
|
+
WEEK_DAY_BLOCKED = "WEEK_DAY_BLOCKED",
|
|
5
|
+
PAST_DATE = "PAST_DATE",
|
|
6
|
+
CHECKIN_PASSED = "CHECKIN_PASSED",
|
|
7
|
+
NO_VACANCY = "NO_VACANCY",
|
|
8
|
+
NO_SERVICE_AVAILABLE = "NO_SERVICE_AVAILABLE",
|
|
9
|
+
SPECIE_NOT_ALLOWED = "SPECIE_NOT_ALLOWED",
|
|
10
|
+
SEGMENT_NOT_FOUND = "SEGMENT_NOT_FOUND",
|
|
11
|
+
SEGMENT_INACTIVE = "SEGMENT_INACTIVE",
|
|
12
|
+
NO_ACTIVE_SERVICE = "NO_ACTIVE_SERVICE",
|
|
13
|
+
NO_SERVICE_ON_CHATBOT = "NO_SERVICE_ON_CHATBOT",
|
|
14
|
+
SERVICE_CATEGORY_INACTIVE = "SERVICE_CATEGORY_INACTIVE",
|
|
15
|
+
INVALID_SEGMENT = "INVALID_SEGMENT",
|
|
16
|
+
INVALID_SEGMENT_SERVICE = "INVALID_SEGMENT_SERVICE",
|
|
17
|
+
EMPTY_SERVICES_OR_COMBOS = "EMPTY_SERVICES_OR_COMBOS",
|
|
18
|
+
SERVICE_NOT_FOUND = "SERVICE_NOT_FOUND",
|
|
19
|
+
PET_NOT_FOUND = "PET_NOT_FOUND",
|
|
20
|
+
BOOKING_NOT_FOUND = "BOOKING_NOT_FOUND",
|
|
21
|
+
UNEXPECTED_ERROR = "UNEXPECTED_ERROR",
|
|
22
|
+
PRICE_NOT_SET = "PRICE_NOT_SET"
|
|
23
|
+
}
|
|
24
|
+
export declare const PA_SERVICE_CAPACITY_DAY_OUTCOME_CODES: Array<PaServiceCapacityCode>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PA_SERVICE_CAPACITY_DAY_OUTCOME_CODES = exports.PaServiceCapacityCode = void 0;
|
|
4
|
+
var PaServiceCapacityCode;
|
|
5
|
+
(function (PaServiceCapacityCode) {
|
|
6
|
+
PaServiceCapacityCode["CLOSED_DAY"] = "CLOSED_DAY";
|
|
7
|
+
PaServiceCapacityCode["BLOCKED_DAY"] = "BLOCKED_DAY";
|
|
8
|
+
PaServiceCapacityCode["WEEK_DAY_BLOCKED"] = "WEEK_DAY_BLOCKED";
|
|
9
|
+
PaServiceCapacityCode["PAST_DATE"] = "PAST_DATE";
|
|
10
|
+
PaServiceCapacityCode["CHECKIN_PASSED"] = "CHECKIN_PASSED";
|
|
11
|
+
PaServiceCapacityCode["NO_VACANCY"] = "NO_VACANCY";
|
|
12
|
+
PaServiceCapacityCode["NO_SERVICE_AVAILABLE"] = "NO_SERVICE_AVAILABLE";
|
|
13
|
+
PaServiceCapacityCode["SPECIE_NOT_ALLOWED"] = "SPECIE_NOT_ALLOWED";
|
|
14
|
+
PaServiceCapacityCode["SEGMENT_NOT_FOUND"] = "SEGMENT_NOT_FOUND";
|
|
15
|
+
PaServiceCapacityCode["SEGMENT_INACTIVE"] = "SEGMENT_INACTIVE";
|
|
16
|
+
PaServiceCapacityCode["NO_ACTIVE_SERVICE"] = "NO_ACTIVE_SERVICE";
|
|
17
|
+
PaServiceCapacityCode["NO_SERVICE_ON_CHATBOT"] = "NO_SERVICE_ON_CHATBOT";
|
|
18
|
+
PaServiceCapacityCode["SERVICE_CATEGORY_INACTIVE"] = "SERVICE_CATEGORY_INACTIVE";
|
|
19
|
+
PaServiceCapacityCode["INVALID_SEGMENT"] = "INVALID_SEGMENT";
|
|
20
|
+
PaServiceCapacityCode["INVALID_SEGMENT_SERVICE"] = "INVALID_SEGMENT_SERVICE";
|
|
21
|
+
PaServiceCapacityCode["EMPTY_SERVICES_OR_COMBOS"] = "EMPTY_SERVICES_OR_COMBOS";
|
|
22
|
+
PaServiceCapacityCode["SERVICE_NOT_FOUND"] = "SERVICE_NOT_FOUND";
|
|
23
|
+
PaServiceCapacityCode["PET_NOT_FOUND"] = "PET_NOT_FOUND";
|
|
24
|
+
PaServiceCapacityCode["BOOKING_NOT_FOUND"] = "BOOKING_NOT_FOUND";
|
|
25
|
+
PaServiceCapacityCode["UNEXPECTED_ERROR"] = "UNEXPECTED_ERROR";
|
|
26
|
+
PaServiceCapacityCode["PRICE_NOT_SET"] = "PRICE_NOT_SET";
|
|
27
|
+
})(PaServiceCapacityCode || (exports.PaServiceCapacityCode = PaServiceCapacityCode = {}));
|
|
28
|
+
exports.PA_SERVICE_CAPACITY_DAY_OUTCOME_CODES = [
|
|
29
|
+
PaServiceCapacityCode.CLOSED_DAY,
|
|
30
|
+
PaServiceCapacityCode.BLOCKED_DAY,
|
|
31
|
+
PaServiceCapacityCode.WEEK_DAY_BLOCKED,
|
|
32
|
+
PaServiceCapacityCode.PAST_DATE,
|
|
33
|
+
PaServiceCapacityCode.CHECKIN_PASSED,
|
|
34
|
+
PaServiceCapacityCode.NO_VACANCY,
|
|
35
|
+
PaServiceCapacityCode.NO_SERVICE_AVAILABLE,
|
|
36
|
+
];
|
|
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./dto/pa.get-service-capacity.dto"), exports);
|
|
18
|
+
__exportStar(require("./dto/pa.get-services-capacity-by-day.dto"), exports);
|
|
18
19
|
__exportStar(require("./enum/capacity-configuration-type.enum"), exports);
|
|
20
|
+
__exportStar(require("./enum/service-capacity-code.enum"), exports);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { HttpClient } from "infra/http/client.http";
|
|
2
2
|
import { PaGetServiceCapacityBody, PaServiceCapacityResponse } from "./dto/pa.get-service-capacity.dto";
|
|
3
|
+
import { PaGetServicesCapacityByDayBody, PaGetServicesCapacityByDayResponse } from "./dto/pa.get-services-capacity-by-day.dto";
|
|
3
4
|
export declare class ServiceCapacityService {
|
|
4
5
|
private readonly api;
|
|
5
6
|
constructor(api: HttpClient);
|
|
6
7
|
getServiceCapacity(body: PaGetServiceCapacityBody, shopId: number): Promise<Array<PaServiceCapacityResponse>>;
|
|
8
|
+
getServicesCapacityByDay(body: PaGetServicesCapacityByDayBody, shopId: number): Promise<PaGetServicesCapacityByDayResponse>;
|
|
9
|
+
private isDayOutcome;
|
|
7
10
|
}
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServiceCapacityService = void 0;
|
|
4
|
+
const service_capacity_code_enum_1 = require("./enum/service-capacity-code.enum");
|
|
4
5
|
class ServiceCapacityService {
|
|
5
6
|
api;
|
|
6
7
|
constructor(api) {
|
|
7
8
|
this.api = api;
|
|
8
9
|
}
|
|
9
10
|
async getServiceCapacity(body, shopId) {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
try {
|
|
12
|
+
const response = await this.api.post(`/service-capacity`, body, shopId);
|
|
13
|
+
return response ?? [];
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (this.isDayOutcome(error)) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async getServicesCapacityByDay(body, shopId) {
|
|
23
|
+
return await this.api.post(`/service-capacity/by-day`, body, shopId);
|
|
24
|
+
}
|
|
25
|
+
isDayOutcome(error) {
|
|
26
|
+
return service_capacity_code_enum_1.PA_SERVICE_CAPACITY_DAY_OUTCOME_CODES.some(dayOutcome => dayOutcome === error?.code);
|
|
12
27
|
}
|
|
13
28
|
}
|
|
14
29
|
exports.ServiceCapacityService = ServiceCapacityService;
|