@tec.pet/tecpet-sdk 0.0.214 → 0.0.216
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/integrationShop/dto/pa.edit-integration-shop.dto.d.ts +2 -0
- package/dist/domain/invoice/dto/pa.register-invoice-pdv-payment.dto.d.ts +1 -0
- package/dist/domain/invoice/invoice.service.d.ts +1 -1
- package/dist/domain/invoice/invoice.service.js +3 -2
- 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/package.json +1 -1
|
@@ -46,6 +46,7 @@ export interface PaEditIntegrationShopRequest {
|
|
|
46
46
|
configurableChoices?: any;
|
|
47
47
|
features?: PaIntegrationShopFeatures;
|
|
48
48
|
invoiceArchitecture?: IntegrationInvoiceArchitecture;
|
|
49
|
+
pdvPayment?: boolean;
|
|
49
50
|
}
|
|
50
51
|
export interface PaEditIntegrationShopResponse {
|
|
51
52
|
id: number;
|
|
@@ -60,6 +61,7 @@ export interface PaEditIntegrationShopResponse {
|
|
|
60
61
|
configurableChoices?: any;
|
|
61
62
|
features?: PaIntegrationShopFeatures;
|
|
62
63
|
invoiceArchitecture?: IntegrationInvoiceArchitecture;
|
|
64
|
+
pdvPayment?: boolean;
|
|
63
65
|
shop: {
|
|
64
66
|
id: number;
|
|
65
67
|
};
|
|
@@ -8,7 +8,7 @@ export declare class InvoiceService {
|
|
|
8
8
|
constructor(api: HttpClient);
|
|
9
9
|
editExternId(invoiceId: string, body: PaEditInvoiceExternIdRequest, shopId: number): Promise<PaEditInvoiceExternIdResponse>;
|
|
10
10
|
registerPdvPayment(invoiceId: string, fiscalInvoiceId: string): Promise<PaRegisterInvoicePdvPaymentResponse>;
|
|
11
|
-
registerPdvPartialPayment(invoiceId: string, fiscalInvoiceIds: string[], amount: number): Promise<PaRegisterInvoicePdvPaymentResponse>;
|
|
11
|
+
registerPdvPartialPayment(invoiceId: string, fiscalInvoiceIds: string[], amount: number, externalPaymentId?: string): Promise<PaRegisterInvoicePdvPaymentResponse>;
|
|
12
12
|
registerReceivablePayment(invoiceId: string, fiscalInvoiceId: string, body: PaRegisterInvoiceReceivablePaymentRequest): Promise<PaRegisterInvoiceReceivablePaymentResponse>;
|
|
13
13
|
reverseReceivablePayment(externalId: string, body: PaReverseInvoiceReceivablePaymentRequest): Promise<PaReverseInvoiceReceivablePaymentResponse>;
|
|
14
14
|
}
|
|
@@ -12,8 +12,9 @@ class InvoiceService {
|
|
|
12
12
|
async registerPdvPayment(invoiceId, fiscalInvoiceId) {
|
|
13
13
|
return await this.api.post(`/invoice/${invoiceId}/pdvPay/${fiscalInvoiceId}`, {});
|
|
14
14
|
}
|
|
15
|
-
async registerPdvPartialPayment(invoiceId, fiscalInvoiceIds, amount) {
|
|
16
|
-
|
|
15
|
+
async registerPdvPartialPayment(invoiceId, fiscalInvoiceIds, amount, externalPaymentId) {
|
|
16
|
+
const body = externalPaymentId ? { fiscalInvoiceIds, amount, externalPaymentId } : { fiscalInvoiceIds, amount };
|
|
17
|
+
return await this.api.post(`/invoice/${invoiceId}/pdvPayPartial`, body);
|
|
17
18
|
}
|
|
18
19
|
async registerReceivablePayment(invoiceId, fiscalInvoiceId, body) {
|
|
19
20
|
return await this.api.post(`/invoice/${invoiceId}/receivablePay/${fiscalInvoiceId}`, body);
|
|
@@ -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);
|