@tec.pet/tecpet-sdk 0.0.144 → 0.0.146
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/fiscalInvoice/dto/pa.get-opened-fiscal-invoices.dto.d.ts +1 -0
- package/dist/domain/invoice/invoice.service.d.ts +1 -0
- package/dist/domain/invoice/invoice.service.js +3 -0
- package/dist/domain/serviceRecommendation/dto/pa.get-service-recommendation.dto.d.ts +42 -0
- package/dist/domain/serviceRecommendation/dto/pa.get-service-recommendation.dto.js +20 -0
- package/dist/domain/serviceRecommendation/index.d.ts +1 -0
- package/dist/domain/serviceRecommendation/index.js +17 -0
- package/dist/domain/serviceRecommendation/serviceRecommendation.service.d.ts +7 -0
- package/dist/domain/serviceRecommendation/serviceRecommendation.service.js +14 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
|
@@ -8,6 +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
12
|
registerReceivablePayment(invoiceId: string, fiscalInvoiceId: string, body: PaRegisterInvoiceReceivablePaymentRequest): Promise<PaRegisterInvoiceReceivablePaymentResponse>;
|
|
12
13
|
reverseReceivablePayment(externalId: string, body: PaReverseInvoiceReceivablePaymentRequest): Promise<PaReverseInvoiceReceivablePaymentResponse>;
|
|
13
14
|
}
|
|
@@ -12,6 +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
|
+
return await this.api.post(`/invoice/${invoiceId}/pdvPayPartial`, { fiscalInvoiceIds, amount });
|
|
17
|
+
}
|
|
15
18
|
async registerReceivablePayment(invoiceId, fiscalInvoiceId, body) {
|
|
16
19
|
return await this.api.post(`/invoice/${invoiceId}/receivablePay/${fiscalInvoiceId}`, body);
|
|
17
20
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ShopSegment } from '../../segment/enum/segment.enum';
|
|
2
|
+
export declare enum ServiceRecommendationScopeEnum {
|
|
3
|
+
SCHEDULE = "SCHEDULE",
|
|
4
|
+
BOT = "BOT",
|
|
5
|
+
BOTH = "BOTH"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ServiceRecommendationContextEnum {
|
|
8
|
+
PRIMARY_OFFER = "PRIMARY_OFFER",
|
|
9
|
+
ADDITIONAL_OFFER = "ADDITIONAL_OFFER",
|
|
10
|
+
BOTH = "BOTH"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ServiceRecommendationGroupTypeEnum {
|
|
13
|
+
PRIMARY_SERVICE_OFFER = "PRIMARY_SERVICE_OFFER",
|
|
14
|
+
SECONDARY_SERVICE_OFFER = "SECONDARY_SERVICE_OFFER"
|
|
15
|
+
}
|
|
16
|
+
export interface PaSimpleServiceResponse {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export interface PaServiceRecommendation {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
scope: ServiceRecommendationScopeEnum;
|
|
24
|
+
context: ServiceRecommendationContextEnum;
|
|
25
|
+
}
|
|
26
|
+
export interface PaServiceRecommendationGroup {
|
|
27
|
+
id: string;
|
|
28
|
+
serviceRecommendation: PaServiceRecommendation;
|
|
29
|
+
type: ServiceRecommendationGroupTypeEnum;
|
|
30
|
+
recommendedServices: PaSimpleServiceResponse[];
|
|
31
|
+
selectedService: PaSimpleServiceResponse | null;
|
|
32
|
+
justification: string | null;
|
|
33
|
+
}
|
|
34
|
+
export interface PaGetServiceRecommendationGroupResponse {
|
|
35
|
+
data: PaServiceRecommendationGroup[];
|
|
36
|
+
}
|
|
37
|
+
export interface PaGetServiceRecommendationValidationBody {
|
|
38
|
+
petId: number;
|
|
39
|
+
services?: number[];
|
|
40
|
+
segmentType: ShopSegment;
|
|
41
|
+
scope?: ServiceRecommendationScopeEnum;
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceRecommendationGroupTypeEnum = exports.ServiceRecommendationContextEnum = exports.ServiceRecommendationScopeEnum = void 0;
|
|
4
|
+
var ServiceRecommendationScopeEnum;
|
|
5
|
+
(function (ServiceRecommendationScopeEnum) {
|
|
6
|
+
ServiceRecommendationScopeEnum["SCHEDULE"] = "SCHEDULE";
|
|
7
|
+
ServiceRecommendationScopeEnum["BOT"] = "BOT";
|
|
8
|
+
ServiceRecommendationScopeEnum["BOTH"] = "BOTH";
|
|
9
|
+
})(ServiceRecommendationScopeEnum || (exports.ServiceRecommendationScopeEnum = ServiceRecommendationScopeEnum = {}));
|
|
10
|
+
var ServiceRecommendationContextEnum;
|
|
11
|
+
(function (ServiceRecommendationContextEnum) {
|
|
12
|
+
ServiceRecommendationContextEnum["PRIMARY_OFFER"] = "PRIMARY_OFFER";
|
|
13
|
+
ServiceRecommendationContextEnum["ADDITIONAL_OFFER"] = "ADDITIONAL_OFFER";
|
|
14
|
+
ServiceRecommendationContextEnum["BOTH"] = "BOTH";
|
|
15
|
+
})(ServiceRecommendationContextEnum || (exports.ServiceRecommendationContextEnum = ServiceRecommendationContextEnum = {}));
|
|
16
|
+
var ServiceRecommendationGroupTypeEnum;
|
|
17
|
+
(function (ServiceRecommendationGroupTypeEnum) {
|
|
18
|
+
ServiceRecommendationGroupTypeEnum["PRIMARY_SERVICE_OFFER"] = "PRIMARY_SERVICE_OFFER";
|
|
19
|
+
ServiceRecommendationGroupTypeEnum["SECONDARY_SERVICE_OFFER"] = "SECONDARY_SERVICE_OFFER";
|
|
20
|
+
})(ServiceRecommendationGroupTypeEnum || (exports.ServiceRecommendationGroupTypeEnum = ServiceRecommendationGroupTypeEnum = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dto/pa.get-service-recommendation.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.get-service-recommendation.dto"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HttpClient } from '../../infra/http/client.http';
|
|
2
|
+
import { PaGetServiceRecommendationGroupResponse, PaGetServiceRecommendationValidationBody } from './dto/pa.get-service-recommendation.dto';
|
|
3
|
+
export declare class ServiceRecommendationService {
|
|
4
|
+
private readonly api;
|
|
5
|
+
constructor(api: HttpClient);
|
|
6
|
+
validation(body: PaGetServiceRecommendationValidationBody, shopId: number): Promise<PaGetServiceRecommendationGroupResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceRecommendationService = void 0;
|
|
4
|
+
class ServiceRecommendationService {
|
|
5
|
+
api;
|
|
6
|
+
constructor(api) {
|
|
7
|
+
this.api = api;
|
|
8
|
+
}
|
|
9
|
+
async validation(body, shopId) {
|
|
10
|
+
const response = await this.api.post(`/serviceRecommendation/validation`, body, shopId);
|
|
11
|
+
return response;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ServiceRecommendationService = ServiceRecommendationService;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { IntegrationShopService } from "./domain/integrationShop/integrationShop
|
|
|
16
16
|
import { IntegrationClientService } from "./domain/integrationClient/integrationClient.service";
|
|
17
17
|
import { FiscalInvoiceService } from "./domain/fiscalInvoice/fiscalInvoice.service";
|
|
18
18
|
import { InvoiceService } from "./domain/invoice/invoice.service";
|
|
19
|
+
import { ServiceRecommendationService } from "./domain/serviceRecommendation/serviceRecommendation.service";
|
|
19
20
|
export declare class TecpetSDK {
|
|
20
21
|
private api;
|
|
21
22
|
client: ClientService;
|
|
@@ -36,6 +37,7 @@ export declare class TecpetSDK {
|
|
|
36
37
|
integrationClient: IntegrationClientService;
|
|
37
38
|
fiscalInvoice: FiscalInvoiceService;
|
|
38
39
|
invoice: InvoiceService;
|
|
40
|
+
serviceRecommendation: ServiceRecommendationService;
|
|
39
41
|
constructor(baseURL: string, apiKey?: string);
|
|
40
42
|
}
|
|
41
43
|
export * from './domain/availableTimes';
|
|
@@ -56,6 +58,7 @@ export * from './domain/integrationShop';
|
|
|
56
58
|
export * from './domain/integrationClient';
|
|
57
59
|
export * from './domain/fiscalInvoice';
|
|
58
60
|
export * from './domain/invoice';
|
|
61
|
+
export * from './domain/serviceRecommendation';
|
|
59
62
|
export * from './utils/index';
|
|
60
63
|
export * from './domain/petPlan';
|
|
61
64
|
export * from './domain/chain';
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ const integrationShop_service_1 = require("./domain/integrationShop/integrationS
|
|
|
34
34
|
const integrationClient_service_1 = require("./domain/integrationClient/integrationClient.service");
|
|
35
35
|
const fiscalInvoice_service_1 = require("./domain/fiscalInvoice/fiscalInvoice.service");
|
|
36
36
|
const invoice_service_1 = require("./domain/invoice/invoice.service");
|
|
37
|
+
const serviceRecommendation_service_1 = require("./domain/serviceRecommendation/serviceRecommendation.service");
|
|
37
38
|
class TecpetSDK {
|
|
38
39
|
api;
|
|
39
40
|
client;
|
|
@@ -54,6 +55,7 @@ class TecpetSDK {
|
|
|
54
55
|
integrationClient;
|
|
55
56
|
fiscalInvoice;
|
|
56
57
|
invoice;
|
|
58
|
+
serviceRecommendation;
|
|
57
59
|
constructor(baseURL, apiKey) {
|
|
58
60
|
this.api = new client_http_1.HttpClient(baseURL, apiKey);
|
|
59
61
|
this.client = new client_service_1.ClientService(this.api);
|
|
@@ -74,6 +76,7 @@ class TecpetSDK {
|
|
|
74
76
|
this.integrationClient = new integrationClient_service_1.IntegrationClientService(this.api);
|
|
75
77
|
this.fiscalInvoice = new fiscalInvoice_service_1.FiscalInvoiceService(this.api);
|
|
76
78
|
this.invoice = new invoice_service_1.InvoiceService(this.api);
|
|
79
|
+
this.serviceRecommendation = new serviceRecommendation_service_1.ServiceRecommendationService(this.api);
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
exports.TecpetSDK = TecpetSDK;
|
|
@@ -95,6 +98,7 @@ __exportStar(require("./domain/integrationShop"), exports);
|
|
|
95
98
|
__exportStar(require("./domain/integrationClient"), exports);
|
|
96
99
|
__exportStar(require("./domain/fiscalInvoice"), exports);
|
|
97
100
|
__exportStar(require("./domain/invoice"), exports);
|
|
101
|
+
__exportStar(require("./domain/serviceRecommendation"), exports);
|
|
98
102
|
__exportStar(require("./utils/index"), exports);
|
|
99
103
|
__exportStar(require("./domain/petPlan"), exports);
|
|
100
104
|
__exportStar(require("./domain/chain"), exports);
|