@tec.pet/tecpet-sdk 0.0.235 → 0.0.236
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/plan/dto/pa.get-plans-pricing.dto.d.ts +74 -0
- package/dist/domain/plan/dto/pa.get-plans-pricing.dto.js +29 -0
- package/dist/domain/plan/index.d.ts +2 -0
- package/dist/domain/plan/index.js +18 -0
- package/dist/domain/plan/plan.service.d.ts +7 -0
- package/dist/domain/plan/plan.service.js +14 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { BillingItemType } from '../../billingMethod/enum/billing-method-type.enum';
|
|
2
|
+
import { ShopSegment } from '../../segment/enum/segment.enum';
|
|
3
|
+
export declare enum PaPlanPricingMode {
|
|
4
|
+
BREED = "BREED",
|
|
5
|
+
SIZE_HAIR = "SIZE_HAIR"
|
|
6
|
+
}
|
|
7
|
+
export declare enum PaPlanPriceMissingField {
|
|
8
|
+
BREED = "BREED",
|
|
9
|
+
SIZE = "SIZE",
|
|
10
|
+
HAIR = "HAIR"
|
|
11
|
+
}
|
|
12
|
+
export declare enum PaPlanType {
|
|
13
|
+
MONTH = "MONTH",
|
|
14
|
+
QUARTER = "QUARTER",
|
|
15
|
+
SEMESTER = "SEMESTER",
|
|
16
|
+
YEAR = "YEAR",
|
|
17
|
+
PACKAGE = "PACKAGE"
|
|
18
|
+
}
|
|
19
|
+
export declare enum PaPlanServiceRecurrentType {
|
|
20
|
+
WEEKLY = "WEEKLY",
|
|
21
|
+
FORTNIGHTLY = "FORTNIGHTLY",
|
|
22
|
+
MONTHLY = "MONTHLY",
|
|
23
|
+
NONE = "NONE"
|
|
24
|
+
}
|
|
25
|
+
export interface PaGetPlansPricingQuery {
|
|
26
|
+
petId?: number;
|
|
27
|
+
segment?: ShopSegment;
|
|
28
|
+
breedId?: number;
|
|
29
|
+
size?: BillingItemType;
|
|
30
|
+
hair?: BillingItemType;
|
|
31
|
+
}
|
|
32
|
+
export interface PaPlanPricingService {
|
|
33
|
+
serviceId: number;
|
|
34
|
+
name: string;
|
|
35
|
+
quantity: number;
|
|
36
|
+
recurrentType: PaPlanServiceRecurrentType;
|
|
37
|
+
}
|
|
38
|
+
export interface PaPlanPriceRange {
|
|
39
|
+
min: number;
|
|
40
|
+
max: number;
|
|
41
|
+
}
|
|
42
|
+
export interface PaPlanPriceOption {
|
|
43
|
+
tag: BillingItemType;
|
|
44
|
+
name: string;
|
|
45
|
+
}
|
|
46
|
+
export interface PaPlanPricingResponse {
|
|
47
|
+
id: number;
|
|
48
|
+
name: string;
|
|
49
|
+
description: string | null;
|
|
50
|
+
planType: PaPlanType;
|
|
51
|
+
cycleSize: number;
|
|
52
|
+
monthQuantity: number | null;
|
|
53
|
+
hybrid: boolean;
|
|
54
|
+
species: Array<string>;
|
|
55
|
+
services: Array<PaPlanPricingService>;
|
|
56
|
+
pricingMode: PaPlanPricingMode | null;
|
|
57
|
+
price: number | null;
|
|
58
|
+
priceRange: PaPlanPriceRange | null;
|
|
59
|
+
missing: Array<PaPlanPriceMissingField>;
|
|
60
|
+
sizeOptions: Array<PaPlanPriceOption>;
|
|
61
|
+
hairOptions: Array<PaPlanPriceOption>;
|
|
62
|
+
}
|
|
63
|
+
export interface PaPlanPricingPet {
|
|
64
|
+
id: number;
|
|
65
|
+
name: string;
|
|
66
|
+
breed: string | null;
|
|
67
|
+
specie: string | null;
|
|
68
|
+
size: BillingItemType | null;
|
|
69
|
+
hair: BillingItemType | null;
|
|
70
|
+
}
|
|
71
|
+
export interface PaGetPlansPricingResponse {
|
|
72
|
+
pet: PaPlanPricingPet | null;
|
|
73
|
+
data: Array<PaPlanPricingResponse>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaPlanServiceRecurrentType = exports.PaPlanType = exports.PaPlanPriceMissingField = exports.PaPlanPricingMode = void 0;
|
|
4
|
+
var PaPlanPricingMode;
|
|
5
|
+
(function (PaPlanPricingMode) {
|
|
6
|
+
PaPlanPricingMode["BREED"] = "BREED";
|
|
7
|
+
PaPlanPricingMode["SIZE_HAIR"] = "SIZE_HAIR";
|
|
8
|
+
})(PaPlanPricingMode || (exports.PaPlanPricingMode = PaPlanPricingMode = {}));
|
|
9
|
+
var PaPlanPriceMissingField;
|
|
10
|
+
(function (PaPlanPriceMissingField) {
|
|
11
|
+
PaPlanPriceMissingField["BREED"] = "BREED";
|
|
12
|
+
PaPlanPriceMissingField["SIZE"] = "SIZE";
|
|
13
|
+
PaPlanPriceMissingField["HAIR"] = "HAIR";
|
|
14
|
+
})(PaPlanPriceMissingField || (exports.PaPlanPriceMissingField = PaPlanPriceMissingField = {}));
|
|
15
|
+
var PaPlanType;
|
|
16
|
+
(function (PaPlanType) {
|
|
17
|
+
PaPlanType["MONTH"] = "MONTH";
|
|
18
|
+
PaPlanType["QUARTER"] = "QUARTER";
|
|
19
|
+
PaPlanType["SEMESTER"] = "SEMESTER";
|
|
20
|
+
PaPlanType["YEAR"] = "YEAR";
|
|
21
|
+
PaPlanType["PACKAGE"] = "PACKAGE";
|
|
22
|
+
})(PaPlanType || (exports.PaPlanType = PaPlanType = {}));
|
|
23
|
+
var PaPlanServiceRecurrentType;
|
|
24
|
+
(function (PaPlanServiceRecurrentType) {
|
|
25
|
+
PaPlanServiceRecurrentType["WEEKLY"] = "WEEKLY";
|
|
26
|
+
PaPlanServiceRecurrentType["FORTNIGHTLY"] = "FORTNIGHTLY";
|
|
27
|
+
PaPlanServiceRecurrentType["MONTHLY"] = "MONTHLY";
|
|
28
|
+
PaPlanServiceRecurrentType["NONE"] = "NONE";
|
|
29
|
+
})(PaPlanServiceRecurrentType || (exports.PaPlanServiceRecurrentType = PaPlanServiceRecurrentType = {}));
|
|
@@ -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-plans-pricing.dto"), exports);
|
|
18
|
+
__exportStar(require("./plan.service"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HttpClient } from '../../infra/http/client.http';
|
|
2
|
+
import { PaGetPlansPricingQuery, PaGetPlansPricingResponse } from './dto/pa.get-plans-pricing.dto';
|
|
3
|
+
export declare class PlanService {
|
|
4
|
+
private readonly api;
|
|
5
|
+
constructor(api: HttpClient);
|
|
6
|
+
pricing(query: PaGetPlansPricingQuery, shopId: number): Promise<PaGetPlansPricingResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlanService = void 0;
|
|
4
|
+
class PlanService {
|
|
5
|
+
api;
|
|
6
|
+
constructor(api) {
|
|
7
|
+
this.api = api;
|
|
8
|
+
}
|
|
9
|
+
async pricing(query, shopId) {
|
|
10
|
+
const response = await this.api.get(`/plan/pricing`, query, shopId);
|
|
11
|
+
return { pet: response?.pet ?? null, data: response?.data ?? [] };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.PlanService = PlanService;
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { WhatsappEventService } from "./domain/whatsappEvent/whatsappEvent.servi
|
|
|
27
27
|
import { AISettingsService } from "./domain/aiSettings/aiSettings.service";
|
|
28
28
|
import { CampaignService } from "./domain/campaign/campaign.service";
|
|
29
29
|
import { PetPlanService } from "./domain/petPlan/petPlan.service";
|
|
30
|
+
import { PlanService } from "./domain/plan/plan.service";
|
|
30
31
|
import { NpsService } from "./domain/nps/nps.service";
|
|
31
32
|
import { ConversationService } from "./domain/conversation/conversation.service";
|
|
32
33
|
export declare class TecpetSDK {
|
|
@@ -60,6 +61,7 @@ export declare class TecpetSDK {
|
|
|
60
61
|
aiSettings: AISettingsService;
|
|
61
62
|
campaign: CampaignService;
|
|
62
63
|
petPlan: PetPlanService;
|
|
64
|
+
plan: PlanService;
|
|
63
65
|
nps: NpsService;
|
|
64
66
|
conversation: ConversationService;
|
|
65
67
|
constructor(baseURL: string, apiKey?: string);
|
|
@@ -91,6 +93,7 @@ export * from './domain/customField';
|
|
|
91
93
|
export * from './domain/serviceCapacity';
|
|
92
94
|
export * from './utils/index';
|
|
93
95
|
export * from './domain/petPlan';
|
|
96
|
+
export * from './domain/plan';
|
|
94
97
|
export * from './domain/chain';
|
|
95
98
|
export * from './domain/whatsappEvent';
|
|
96
99
|
export * from './domain/aiSettings';
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ const whatsappEvent_service_1 = require("./domain/whatsappEvent/whatsappEvent.se
|
|
|
45
45
|
const aiSettings_service_1 = require("./domain/aiSettings/aiSettings.service");
|
|
46
46
|
const campaign_service_1 = require("./domain/campaign/campaign.service");
|
|
47
47
|
const petPlan_service_1 = require("./domain/petPlan/petPlan.service");
|
|
48
|
+
const plan_service_1 = require("./domain/plan/plan.service");
|
|
48
49
|
const nps_service_1 = require("./domain/nps/nps.service");
|
|
49
50
|
const conversation_service_1 = require("./domain/conversation/conversation.service");
|
|
50
51
|
class TecpetSDK {
|
|
@@ -78,6 +79,7 @@ class TecpetSDK {
|
|
|
78
79
|
aiSettings;
|
|
79
80
|
campaign;
|
|
80
81
|
petPlan;
|
|
82
|
+
plan;
|
|
81
83
|
nps;
|
|
82
84
|
conversation;
|
|
83
85
|
constructor(baseURL, apiKey) {
|
|
@@ -111,6 +113,7 @@ class TecpetSDK {
|
|
|
111
113
|
this.aiSettings = new aiSettings_service_1.AISettingsService(this.api);
|
|
112
114
|
this.campaign = new campaign_service_1.CampaignService(this.api);
|
|
113
115
|
this.petPlan = new petPlan_service_1.PetPlanService(this.api);
|
|
116
|
+
this.plan = new plan_service_1.PlanService(this.api);
|
|
114
117
|
this.nps = new nps_service_1.NpsService(this.api);
|
|
115
118
|
this.conversation = new conversation_service_1.ConversationService(this.api);
|
|
116
119
|
}
|
|
@@ -143,6 +146,7 @@ __exportStar(require("./domain/customField"), exports);
|
|
|
143
146
|
__exportStar(require("./domain/serviceCapacity"), exports);
|
|
144
147
|
__exportStar(require("./utils/index"), exports);
|
|
145
148
|
__exportStar(require("./domain/petPlan"), exports);
|
|
149
|
+
__exportStar(require("./domain/plan"), exports);
|
|
146
150
|
__exportStar(require("./domain/chain"), exports);
|
|
147
151
|
__exportStar(require("./domain/whatsappEvent"), exports);
|
|
148
152
|
__exportStar(require("./domain/aiSettings"), exports);
|