@tec.pet/tecpet-sdk 0.0.215 → 0.0.217
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.get-booking.dto.d.ts +1 -0
- package/dist/domain/service/dto/pa.get-service-pricing.dto.d.ts +3 -0
- package/dist/domain/service/dto/pa.get-services-price-range.dto.d.ts +32 -0
- package/dist/domain/service/dto/pa.get-services-price-range.dto.js +2 -0
- package/dist/domain/service/index.d.ts +1 -0
- package/dist/domain/service/index.js +1 -0
- package/dist/domain/service/service.service.d.ts +2 -0
- package/dist/domain/service/service.service.js +7 -0
- package/dist/domain/serviceCapacity/dto/pa.get-service-capacity.dto.d.ts +5 -0
- package/dist/domain/serviceCapacity/enum/capacity-stay-billing.enum.d.ts +4 -0
- package/dist/domain/serviceCapacity/enum/capacity-stay-billing.enum.js +8 -0
- package/dist/domain/serviceCapacity/index.d.ts +1 -0
- package/dist/domain/serviceCapacity/index.js +1 -0
- package/dist/domain/shop/dto/pa.get-shop-configurations.dto.d.ts +2 -0
- package/package.json +1 -1
|
@@ -12,6 +12,9 @@ export declare enum ServiceCategoryType {
|
|
|
12
12
|
export interface PaServicePriceVariation {
|
|
13
13
|
type: CapacityConfigurationType;
|
|
14
14
|
price: number;
|
|
15
|
+
defaultCheckin?: string;
|
|
16
|
+
defaultCheckout?: string;
|
|
17
|
+
overnight?: boolean;
|
|
15
18
|
}
|
|
16
19
|
export interface PaServicePricingResponse {
|
|
17
20
|
id: number;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BillingItemType } from "../../billingMethod/enum/billing-method-type.enum";
|
|
2
|
+
import { ShopSegment } from "../../segment/enum/segment.enum";
|
|
3
|
+
import { CapacityConfigurationType } from "../../serviceCapacity/enum/capacity-configuration-type.enum";
|
|
4
|
+
import { PaServiceCategoryResponse, ServiceCategoryType } from "./pa.get-service-pricing.dto";
|
|
5
|
+
export interface PaGetServicesPriceRangeQuery {
|
|
6
|
+
segment: ShopSegment;
|
|
7
|
+
serviceCategoryTypes?: ServiceCategoryType[];
|
|
8
|
+
size?: BillingItemType;
|
|
9
|
+
hair?: BillingItemType;
|
|
10
|
+
}
|
|
11
|
+
export interface PaServicePriceRangePeriodResponse {
|
|
12
|
+
type: CapacityConfigurationType;
|
|
13
|
+
defaultCheckin: string;
|
|
14
|
+
defaultCheckout: string;
|
|
15
|
+
overnight?: boolean;
|
|
16
|
+
minPrice: number;
|
|
17
|
+
maxPrice: number;
|
|
18
|
+
}
|
|
19
|
+
export interface PaServicePriceRangeResponse {
|
|
20
|
+
id: number;
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
orientation: string;
|
|
24
|
+
serviceCategory: PaServiceCategoryResponse;
|
|
25
|
+
minPrice: number;
|
|
26
|
+
maxPrice: number;
|
|
27
|
+
periods?: PaServicePriceRangePeriodResponse[];
|
|
28
|
+
}
|
|
29
|
+
export interface PaGetServicesPriceRangeResponse {
|
|
30
|
+
data: PaServicePriceRangeResponse[];
|
|
31
|
+
pricedByBreed: boolean;
|
|
32
|
+
}
|
|
@@ -15,3 +15,4 @@ 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-pricing.dto"), exports);
|
|
18
|
+
__exportStar(require("./dto/pa.get-services-price-range.dto"), exports);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { HttpClient } from "infra/http/client.http";
|
|
2
2
|
import { ShopSegment } from "../segment/enum/segment.enum";
|
|
3
3
|
import { PaGetServicePricingResponse, ServiceCategoryType } from "./dto/pa.get-service-pricing.dto";
|
|
4
|
+
import { PaGetServicesPriceRangeQuery, PaGetServicesPriceRangeResponse } from "./dto/pa.get-services-price-range.dto";
|
|
4
5
|
export declare class ServiceService {
|
|
5
6
|
private readonly api;
|
|
6
7
|
constructor(api: HttpClient);
|
|
7
8
|
pricing(petId: number, segment: ShopSegment, serviceCategoryTypes: ServiceCategoryType[], shopId: number): Promise<Array<PaGetServicePricingResponse> | null>;
|
|
9
|
+
priceRange(query: PaGetServicesPriceRangeQuery, shopId: number): Promise<PaGetServicesPriceRangeResponse>;
|
|
8
10
|
}
|
|
@@ -17,5 +17,12 @@ class ServiceService {
|
|
|
17
17
|
}
|
|
18
18
|
return [];
|
|
19
19
|
}
|
|
20
|
+
async priceRange(query, shopId) {
|
|
21
|
+
const response = await this.api.get(`/service/pricing/range`, query, shopId);
|
|
22
|
+
if (!response || !Array.isArray(response.data)) {
|
|
23
|
+
throw new Error("Invalid response from /service/pricing/range");
|
|
24
|
+
}
|
|
25
|
+
return response;
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
exports.ServiceService = ServiceService;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ShopSegment } from "../../segment/enum/segment.enum";
|
|
2
2
|
import { CapacityConfigurationType } from "../enum/capacity-configuration-type.enum";
|
|
3
|
+
import { CapacityStayBilling } from "../enum/capacity-stay-billing.enum";
|
|
3
4
|
export interface PaGetServiceCapacityBody {
|
|
4
5
|
date: string;
|
|
5
6
|
segment: ShopSegment;
|
|
@@ -16,4 +17,8 @@ export interface PaServiceCapacityResponse {
|
|
|
16
17
|
allocated: number;
|
|
17
18
|
available: number;
|
|
18
19
|
price?: number | null;
|
|
20
|
+
description?: string | null;
|
|
21
|
+
orientation?: string | null;
|
|
22
|
+
stayBilling?: CapacityStayBilling | null;
|
|
23
|
+
overnight?: boolean;
|
|
19
24
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CapacityStayBilling = void 0;
|
|
4
|
+
var CapacityStayBilling;
|
|
5
|
+
(function (CapacityStayBilling) {
|
|
6
|
+
CapacityStayBilling["PER_DAY"] = "PER_DAY";
|
|
7
|
+
CapacityStayBilling["PER_NIGHT"] = "PER_NIGHT";
|
|
8
|
+
})(CapacityStayBilling || (exports.CapacityStayBilling = CapacityStayBilling = {}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './dto/pa.get-service-capacity.dto';
|
|
2
2
|
export * from './dto/pa.get-services-capacity-by-day.dto';
|
|
3
3
|
export * from './enum/capacity-configuration-type.enum';
|
|
4
|
+
export * from './enum/capacity-stay-billing.enum';
|
|
4
5
|
export * from './enum/service-capacity-code.enum';
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./dto/pa.get-service-capacity.dto"), exports);
|
|
18
18
|
__exportStar(require("./dto/pa.get-services-capacity-by-day.dto"), exports);
|
|
19
19
|
__exportStar(require("./enum/capacity-configuration-type.enum"), exports);
|
|
20
|
+
__exportStar(require("./enum/capacity-stay-billing.enum"), exports);
|
|
20
21
|
__exportStar(require("./enum/service-capacity-code.enum"), exports);
|
|
@@ -67,6 +67,8 @@ export interface AdvancedConfigResponseDto {
|
|
|
67
67
|
canCancelIfStarted: boolean;
|
|
68
68
|
canEditIfDelivered: boolean;
|
|
69
69
|
canRevertIfStarted: boolean;
|
|
70
|
+
/** A loja prefere que um único profissional faça todos os serviços do agendamento. */
|
|
71
|
+
preferSameEmployee?: boolean;
|
|
70
72
|
};
|
|
71
73
|
finance: {
|
|
72
74
|
mandatoryCardInputs: boolean;
|