@tec.pet/tecpet-sdk 0.0.171 → 0.0.173
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.add-services-to-booking.dto.d.ts +2 -0
- package/dist/domain/booking/dto/pa.create-booking.dto.d.ts +3 -1
- package/dist/domain/booking/dto/pa.get-booking-pricing.dto.d.ts +2 -0
- package/dist/domain/booking/dto/pa.get-booking.dto.d.ts +2 -0
- package/dist/domain/booking/dto/pa.reschedule-booking.dto.d.ts +4 -2
- package/dist/domain/customField/customField.service.d.ts +7 -0
- package/dist/domain/customField/customField.service.js +13 -0
- package/dist/domain/customField/dto/pa.set-custom-field-values.dto.d.ts +17 -0
- package/dist/domain/customField/dto/pa.set-custom-field-values.dto.js +8 -0
- package/dist/domain/customField/index.d.ts +1 -0
- package/dist/domain/customField/index.js +17 -0
- package/dist/domain/service/dto/pa.get-service-pricing.dto.d.ts +6 -0
- package/dist/domain/serviceCapacity/dto/pa.get-service-capacity.dto.d.ts +17 -0
- package/dist/domain/serviceCapacity/dto/pa.get-service-capacity.dto.js +2 -0
- package/dist/domain/serviceCapacity/enum/capacity-configuration-type.enum.d.ts +5 -0
- package/dist/domain/serviceCapacity/enum/capacity-configuration-type.enum.js +9 -0
- package/dist/domain/serviceCapacity/index.d.ts +2 -0
- package/dist/domain/serviceCapacity/index.js +18 -0
- package/dist/domain/serviceCapacity/serviceCapacity.service.d.ts +7 -0
- package/dist/domain/serviceCapacity/serviceCapacity.service.js +14 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +8 -0
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { CapacityConfigurationType } from "../../serviceCapacity/enum/capacity-configuration-type.enum";
|
|
1
2
|
export interface PaAddServicesToBookingInput {
|
|
2
3
|
services: number[];
|
|
3
4
|
combos?: number[];
|
|
5
|
+
period?: CapacityConfigurationType;
|
|
4
6
|
}
|
|
5
7
|
export interface PaAddServicesToBookingResponse {
|
|
6
8
|
success: boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PaEmployeeIndication } from "../../employee";
|
|
2
2
|
import { ShopSegment } from "../../segment/enum/segment.enum";
|
|
3
|
+
import { CapacityConfigurationType } from "../../serviceCapacity/enum/capacity-configuration-type.enum";
|
|
3
4
|
export interface PaCreateBookingInput {
|
|
4
5
|
date?: string;
|
|
5
|
-
timeId
|
|
6
|
+
timeId?: string;
|
|
6
7
|
petId?: number;
|
|
7
8
|
servicesId: Array<number>;
|
|
8
9
|
combosId: Array<number>;
|
|
@@ -10,6 +11,7 @@ export interface PaCreateBookingInput {
|
|
|
10
11
|
comment?: string;
|
|
11
12
|
plan?: PaPlanBookingInput;
|
|
12
13
|
employeeIndication?: Array<PaEmployeeIndication>;
|
|
14
|
+
period?: CapacityConfigurationType;
|
|
13
15
|
}
|
|
14
16
|
export interface PaPlanBookingInput {
|
|
15
17
|
petPlan: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ShopSegment } from '../../segment/enum/segment.enum';
|
|
2
2
|
import { BillingItemType } from '../../billingMethod/enum/billing-method-type.enum';
|
|
3
|
+
import { CapacityConfigurationType } from '../../serviceCapacity/enum/capacity-configuration-type.enum';
|
|
3
4
|
export interface PaGetBookingPricingBody {
|
|
4
5
|
petId?: number;
|
|
5
6
|
segment: ShopSegment;
|
|
@@ -7,6 +8,7 @@ export interface PaGetBookingPricingBody {
|
|
|
7
8
|
hair?: BillingItemType;
|
|
8
9
|
size?: BillingItemType;
|
|
9
10
|
breed?: number;
|
|
11
|
+
period?: CapacityConfigurationType;
|
|
10
12
|
}
|
|
11
13
|
export interface PaGetBookingPricingResponse {
|
|
12
14
|
totalPrice: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ShopSegment } from "../../segment/enum/segment.enum";
|
|
2
2
|
import { ServiceCategoryType } from "../../service";
|
|
3
|
+
import { CapacityConfigurationType } from "../../serviceCapacity/enum/capacity-configuration-type.enum";
|
|
3
4
|
export declare enum Status {
|
|
4
5
|
SCHEDULED = "SCHEDULED",
|
|
5
6
|
CONFIRMED = "CONFIRMED",
|
|
@@ -30,6 +31,7 @@ export interface PaGetBookingResponse {
|
|
|
30
31
|
}>;
|
|
31
32
|
petPlanId?: number;
|
|
32
33
|
hasTakeAndBring?: boolean;
|
|
34
|
+
period?: CapacityConfigurationType;
|
|
33
35
|
}
|
|
34
36
|
export interface PaBookingInvoiceResponse {
|
|
35
37
|
id: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { CapacityConfigurationType } from "../../serviceCapacity/enum/capacity-configuration-type.enum";
|
|
1
2
|
export interface PaRescheduleBookingInput {
|
|
2
|
-
date
|
|
3
|
-
timeId
|
|
3
|
+
date?: string;
|
|
4
|
+
timeId?: string;
|
|
5
|
+
period?: CapacityConfigurationType;
|
|
4
6
|
}
|
|
5
7
|
export interface PaRescheduleBookingResponse {
|
|
6
8
|
success: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HttpClient } from "infra/http/client.http";
|
|
2
|
+
import { PaSetCustomFieldValuesInput, PaSetCustomFieldValuesResponse } from "./dto/pa.set-custom-field-values.dto";
|
|
3
|
+
export declare class CustomFieldService {
|
|
4
|
+
private readonly api;
|
|
5
|
+
constructor(api: HttpClient);
|
|
6
|
+
setValues(body: PaSetCustomFieldValuesInput, shopId: number): Promise<PaSetCustomFieldValuesResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomFieldService = void 0;
|
|
4
|
+
class CustomFieldService {
|
|
5
|
+
api;
|
|
6
|
+
constructor(api) {
|
|
7
|
+
this.api = api;
|
|
8
|
+
}
|
|
9
|
+
async setValues(body, shopId) {
|
|
10
|
+
return await this.api.post(`/custom-fields/values`, body, shopId);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.CustomFieldService = CustomFieldService;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum PaCustomFieldTargetEnum {
|
|
2
|
+
CLIENT = "CLIENT",
|
|
3
|
+
PET = "PET"
|
|
4
|
+
}
|
|
5
|
+
export interface PaCustomFieldValueInput {
|
|
6
|
+
customFieldId: string;
|
|
7
|
+
value: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface PaSetCustomFieldValuesInput {
|
|
10
|
+
type: PaCustomFieldTargetEnum;
|
|
11
|
+
entityId: number;
|
|
12
|
+
fieldsValues: PaCustomFieldValueInput[];
|
|
13
|
+
}
|
|
14
|
+
export interface PaSetCustomFieldValuesResponse {
|
|
15
|
+
success: boolean;
|
|
16
|
+
message: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaCustomFieldTargetEnum = void 0;
|
|
4
|
+
var PaCustomFieldTargetEnum;
|
|
5
|
+
(function (PaCustomFieldTargetEnum) {
|
|
6
|
+
PaCustomFieldTargetEnum["CLIENT"] = "CLIENT";
|
|
7
|
+
PaCustomFieldTargetEnum["PET"] = "PET";
|
|
8
|
+
})(PaCustomFieldTargetEnum || (exports.PaCustomFieldTargetEnum = PaCustomFieldTargetEnum = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dto/pa.set-custom-field-values.dto';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dto/pa.set-custom-field-values.dto"), exports);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CapacityConfigurationType } from "../../serviceCapacity/enum/capacity-configuration-type.enum";
|
|
1
2
|
export declare enum ServiceCategoryType {
|
|
2
3
|
BATH = "BATH",
|
|
3
4
|
GROOM = "GROOM",
|
|
@@ -8,6 +9,10 @@ export declare enum ServiceCategoryType {
|
|
|
8
9
|
CUSTOM = "CUSTOM",
|
|
9
10
|
TAKE_AND_BRING = "TAKE_AND_BRING"
|
|
10
11
|
}
|
|
12
|
+
export interface PaServicePriceVariation {
|
|
13
|
+
type: CapacityConfigurationType;
|
|
14
|
+
price: number;
|
|
15
|
+
}
|
|
11
16
|
export interface PaServicePricingResponse {
|
|
12
17
|
id: number;
|
|
13
18
|
name: string;
|
|
@@ -15,6 +20,7 @@ export interface PaServicePricingResponse {
|
|
|
15
20
|
description: string;
|
|
16
21
|
orientation: string;
|
|
17
22
|
serviceCategory: PaServiceCategoryResponse;
|
|
23
|
+
priceVariations?: PaServicePriceVariation[];
|
|
18
24
|
}
|
|
19
25
|
export interface PaServiceCategoryResponse {
|
|
20
26
|
id: number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ShopSegment } from "../../segment/enum/segment.enum";
|
|
2
|
+
import { CapacityConfigurationType } from "../enum/capacity-configuration-type.enum";
|
|
3
|
+
export interface PaGetServiceCapacityBody {
|
|
4
|
+
date: string;
|
|
5
|
+
segment: ShopSegment;
|
|
6
|
+
serviceId: number;
|
|
7
|
+
petId?: number;
|
|
8
|
+
bookingIdException?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface PaServiceCapacityResponse {
|
|
11
|
+
period: CapacityConfigurationType;
|
|
12
|
+
defaultCheckin: string;
|
|
13
|
+
defaultCheckout: string;
|
|
14
|
+
capacity: number;
|
|
15
|
+
allocated: number;
|
|
16
|
+
available: number;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CapacityConfigurationType = void 0;
|
|
4
|
+
var CapacityConfigurationType;
|
|
5
|
+
(function (CapacityConfigurationType) {
|
|
6
|
+
CapacityConfigurationType["MORNING"] = "MORNING";
|
|
7
|
+
CapacityConfigurationType["EVENING"] = "EVENING";
|
|
8
|
+
CapacityConfigurationType["ALL_DAY"] = "ALL_DAY";
|
|
9
|
+
})(CapacityConfigurationType || (exports.CapacityConfigurationType = CapacityConfigurationType = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dto/pa.get-service-capacity.dto"), exports);
|
|
18
|
+
__exportStar(require("./enum/capacity-configuration-type.enum"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HttpClient } from "infra/http/client.http";
|
|
2
|
+
import { PaGetServiceCapacityBody, PaServiceCapacityResponse } from "./dto/pa.get-service-capacity.dto";
|
|
3
|
+
export declare class ServiceCapacityService {
|
|
4
|
+
private readonly api;
|
|
5
|
+
constructor(api: HttpClient);
|
|
6
|
+
getServiceCapacity(body: PaGetServiceCapacityBody, shopId: number): Promise<Array<PaServiceCapacityResponse>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceCapacityService = void 0;
|
|
4
|
+
class ServiceCapacityService {
|
|
5
|
+
api;
|
|
6
|
+
constructor(api) {
|
|
7
|
+
this.api = api;
|
|
8
|
+
}
|
|
9
|
+
async getServiceCapacity(body, shopId) {
|
|
10
|
+
const response = await this.api.post(`/service-capacity`, body, shopId);
|
|
11
|
+
return response ?? [];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ServiceCapacityService = ServiceCapacityService;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { BookingService } from "./domain/booking/booking.service";
|
|
|
4
4
|
import { BreedService } from "./domain/breed/breed.service";
|
|
5
5
|
import { ChatbotService } from "./domain/chatbot/chatbotService";
|
|
6
6
|
import { ClientService } from "./domain/client/client.service";
|
|
7
|
+
import { CustomFieldService } from "./domain/customField/customField.service";
|
|
7
8
|
import { ComboService } from "./domain/combo/combo.service";
|
|
8
9
|
import { EmployeeService } from "./domain/employee/employee.service";
|
|
9
10
|
import { PetService } from "./domain/pet/pet.service";
|
|
@@ -21,6 +22,7 @@ import { InvoiceService } from "./domain/invoice/invoice.service";
|
|
|
21
22
|
import { ServiceRecommendationService } from "./domain/serviceRecommendation/serviceRecommendation.service";
|
|
22
23
|
import { BlockedTimeService } from "./domain/blockedTime/blockedTime.service";
|
|
23
24
|
import { CepService } from "./domain/cep/cep.service";
|
|
25
|
+
import { ServiceCapacityService } from "./domain/serviceCapacity/serviceCapacity.service";
|
|
24
26
|
export declare class TecpetSDK {
|
|
25
27
|
private api;
|
|
26
28
|
client: ClientService;
|
|
@@ -46,6 +48,8 @@ export declare class TecpetSDK {
|
|
|
46
48
|
serviceRecommendation: ServiceRecommendationService;
|
|
47
49
|
blockedTime: BlockedTimeService;
|
|
48
50
|
cep: CepService;
|
|
51
|
+
customField: CustomFieldService;
|
|
52
|
+
serviceCapacity: ServiceCapacityService;
|
|
49
53
|
constructor(baseURL: string, apiKey?: string);
|
|
50
54
|
}
|
|
51
55
|
export * from './domain/availableTimes';
|
|
@@ -71,6 +75,8 @@ export * from './domain/invoice';
|
|
|
71
75
|
export * from './domain/serviceRecommendation';
|
|
72
76
|
export * from './domain/blockedTime';
|
|
73
77
|
export * from './domain/cep';
|
|
78
|
+
export * from './domain/customField';
|
|
79
|
+
export * from './domain/serviceCapacity';
|
|
74
80
|
export * from './utils/index';
|
|
75
81
|
export * from './domain/petPlan';
|
|
76
82
|
export * from './domain/chain';
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ const booking_service_1 = require("./domain/booking/booking.service");
|
|
|
21
21
|
const breed_service_1 = require("./domain/breed/breed.service");
|
|
22
22
|
const chatbotService_1 = require("./domain/chatbot/chatbotService");
|
|
23
23
|
const client_service_1 = require("./domain/client/client.service");
|
|
24
|
+
const customField_service_1 = require("./domain/customField/customField.service");
|
|
24
25
|
const combo_service_1 = require("./domain/combo/combo.service");
|
|
25
26
|
const employee_service_1 = require("./domain/employee/employee.service");
|
|
26
27
|
const pet_service_1 = require("./domain/pet/pet.service");
|
|
@@ -39,6 +40,7 @@ const invoice_service_1 = require("./domain/invoice/invoice.service");
|
|
|
39
40
|
const serviceRecommendation_service_1 = require("./domain/serviceRecommendation/serviceRecommendation.service");
|
|
40
41
|
const blockedTime_service_1 = require("./domain/blockedTime/blockedTime.service");
|
|
41
42
|
const cep_service_1 = require("./domain/cep/cep.service");
|
|
43
|
+
const serviceCapacity_service_1 = require("./domain/serviceCapacity/serviceCapacity.service");
|
|
42
44
|
class TecpetSDK {
|
|
43
45
|
api;
|
|
44
46
|
client;
|
|
@@ -64,9 +66,12 @@ class TecpetSDK {
|
|
|
64
66
|
serviceRecommendation;
|
|
65
67
|
blockedTime;
|
|
66
68
|
cep;
|
|
69
|
+
customField;
|
|
70
|
+
serviceCapacity;
|
|
67
71
|
constructor(baseURL, apiKey) {
|
|
68
72
|
this.api = new client_http_1.HttpClient(baseURL, apiKey);
|
|
69
73
|
this.client = new client_service_1.ClientService(this.api);
|
|
74
|
+
this.customField = new customField_service_1.CustomFieldService(this.api);
|
|
70
75
|
this.pet = new pet_service_1.PetService(this.api);
|
|
71
76
|
this.breed = new breed_service_1.BreedService(this.api);
|
|
72
77
|
this.chatbot = new chatbotService_1.ChatbotService(this.api);
|
|
@@ -89,6 +94,7 @@ class TecpetSDK {
|
|
|
89
94
|
this.serviceRecommendation = new serviceRecommendation_service_1.ServiceRecommendationService(this.api);
|
|
90
95
|
this.blockedTime = new blockedTime_service_1.BlockedTimeService(this.api);
|
|
91
96
|
this.cep = new cep_service_1.CepService(this.api);
|
|
97
|
+
this.serviceCapacity = new serviceCapacity_service_1.ServiceCapacityService(this.api);
|
|
92
98
|
}
|
|
93
99
|
}
|
|
94
100
|
exports.TecpetSDK = TecpetSDK;
|
|
@@ -115,6 +121,8 @@ __exportStar(require("./domain/invoice"), exports);
|
|
|
115
121
|
__exportStar(require("./domain/serviceRecommendation"), exports);
|
|
116
122
|
__exportStar(require("./domain/blockedTime"), exports);
|
|
117
123
|
__exportStar(require("./domain/cep"), exports);
|
|
124
|
+
__exportStar(require("./domain/customField"), exports);
|
|
125
|
+
__exportStar(require("./domain/serviceCapacity"), exports);
|
|
118
126
|
__exportStar(require("./utils/index"), exports);
|
|
119
127
|
__exportStar(require("./domain/petPlan"), exports);
|
|
120
128
|
__exportStar(require("./domain/chain"), exports);
|