@tec.pet/tecpet-sdk 0.0.186 → 0.0.187
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/aiSettings/aiSettings.service.d.ts +7 -0
- package/dist/domain/aiSettings/aiSettings.service.js +14 -0
- package/dist/domain/aiSettings/dto/pa.get-ai-settings.dto.d.ts +17 -0
- package/dist/domain/aiSettings/dto/pa.get-ai-settings.dto.js +2 -0
- package/dist/domain/aiSettings/index.d.ts +1 -0
- package/dist/domain/aiSettings/index.js +17 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HttpClient } from "infra/http/client.http";
|
|
2
|
+
import { PaAISettingsResponse } from "./dto/pa.get-ai-settings.dto";
|
|
3
|
+
export declare class AISettingsService {
|
|
4
|
+
private readonly api;
|
|
5
|
+
constructor(api: HttpClient);
|
|
6
|
+
get(shopId: number): Promise<PaAISettingsResponse | null>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AISettingsService = void 0;
|
|
4
|
+
class AISettingsService {
|
|
5
|
+
api;
|
|
6
|
+
constructor(api) {
|
|
7
|
+
this.api = api;
|
|
8
|
+
}
|
|
9
|
+
async get(shopId) {
|
|
10
|
+
const response = await this.api.get(`/ai-settings/settings`, undefined, shopId);
|
|
11
|
+
return response ?? null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.AISettingsService = AISettingsService;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contrato de configuração da IA como o tecpet-server o entrega em
|
|
3
|
+
* `GET /v1/ai-settings/settings` (AISettingsJson).
|
|
4
|
+
*
|
|
5
|
+
* O consumidor deste contrato é o tecpet-ai v2, que faz a própria adaptação para o
|
|
6
|
+
* formato interno dele (`IaSettings`). O SDK repassa a resposta como veio: tipar campo
|
|
7
|
+
* a campo aqui criaria uma terceira cópia do contrato para sair de sincronia com as
|
|
8
|
+
* outras duas. Os campos abaixo são só os que identificam o contrato — o resto trafega
|
|
9
|
+
* intacto.
|
|
10
|
+
*/
|
|
11
|
+
export interface PaAISettingsResponse {
|
|
12
|
+
id: string;
|
|
13
|
+
mode: string;
|
|
14
|
+
agents: unknown[];
|
|
15
|
+
triggers?: unknown[];
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dto/pa.get-ai-settings.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-ai-settings.dto"), exports);
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { BlockedTimeService } from "./domain/blockedTime/blockedTime.service";
|
|
|
24
24
|
import { CepService } from "./domain/cep/cep.service";
|
|
25
25
|
import { ServiceCapacityService } from "./domain/serviceCapacity/serviceCapacity.service";
|
|
26
26
|
import { WhatsappEventService } from "./domain/whatsappEvent/whatsappEvent.service";
|
|
27
|
+
import { AISettingsService } from "./domain/aiSettings/aiSettings.service";
|
|
27
28
|
export declare class TecpetSDK {
|
|
28
29
|
private api;
|
|
29
30
|
client: ClientService;
|
|
@@ -52,6 +53,7 @@ export declare class TecpetSDK {
|
|
|
52
53
|
customField: CustomFieldService;
|
|
53
54
|
serviceCapacity: ServiceCapacityService;
|
|
54
55
|
whatsappEvent: WhatsappEventService;
|
|
56
|
+
aiSettings: AISettingsService;
|
|
55
57
|
constructor(baseURL: string, apiKey?: string);
|
|
56
58
|
}
|
|
57
59
|
export * from './domain/availableTimes';
|
|
@@ -83,3 +85,4 @@ export * from './utils/index';
|
|
|
83
85
|
export * from './domain/petPlan';
|
|
84
86
|
export * from './domain/chain';
|
|
85
87
|
export * from './domain/whatsappEvent';
|
|
88
|
+
export * from './domain/aiSettings';
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ const blockedTime_service_1 = require("./domain/blockedTime/blockedTime.service"
|
|
|
42
42
|
const cep_service_1 = require("./domain/cep/cep.service");
|
|
43
43
|
const serviceCapacity_service_1 = require("./domain/serviceCapacity/serviceCapacity.service");
|
|
44
44
|
const whatsappEvent_service_1 = require("./domain/whatsappEvent/whatsappEvent.service");
|
|
45
|
+
const aiSettings_service_1 = require("./domain/aiSettings/aiSettings.service");
|
|
45
46
|
class TecpetSDK {
|
|
46
47
|
api;
|
|
47
48
|
client;
|
|
@@ -70,6 +71,7 @@ class TecpetSDK {
|
|
|
70
71
|
customField;
|
|
71
72
|
serviceCapacity;
|
|
72
73
|
whatsappEvent;
|
|
74
|
+
aiSettings;
|
|
73
75
|
constructor(baseURL, apiKey) {
|
|
74
76
|
this.api = new client_http_1.HttpClient(baseURL, apiKey);
|
|
75
77
|
this.client = new client_service_1.ClientService(this.api);
|
|
@@ -98,6 +100,7 @@ class TecpetSDK {
|
|
|
98
100
|
this.cep = new cep_service_1.CepService(this.api);
|
|
99
101
|
this.serviceCapacity = new serviceCapacity_service_1.ServiceCapacityService(this.api);
|
|
100
102
|
this.whatsappEvent = new whatsappEvent_service_1.WhatsappEventService(this.api);
|
|
103
|
+
this.aiSettings = new aiSettings_service_1.AISettingsService(this.api);
|
|
101
104
|
}
|
|
102
105
|
}
|
|
103
106
|
exports.TecpetSDK = TecpetSDK;
|
|
@@ -130,3 +133,4 @@ __exportStar(require("./utils/index"), exports);
|
|
|
130
133
|
__exportStar(require("./domain/petPlan"), exports);
|
|
131
134
|
__exportStar(require("./domain/chain"), exports);
|
|
132
135
|
__exportStar(require("./domain/whatsappEvent"), exports);
|
|
136
|
+
__exportStar(require("./domain/aiSettings"), exports);
|