@tec.pet/tecpet-sdk 0.0.185 → 0.0.186

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.
@@ -0,0 +1,13 @@
1
+ export interface PaReportWhatsappEventInput {
2
+ field: string;
3
+ wabaId?: string;
4
+ phoneNumberId?: string;
5
+ occurredAt?: Date | string;
6
+ value?: Record<string, any>;
7
+ payload?: Record<string, any>;
8
+ }
9
+ export interface PaReportWhatsappEventResponse {
10
+ success: boolean;
11
+ duplicated: boolean;
12
+ shopId?: number;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './dto/pa.report-whatsapp-event.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.report-whatsapp-event.dto"), exports);
@@ -0,0 +1,7 @@
1
+ import { HttpClient } from "infra/http/client.http";
2
+ import { PaReportWhatsappEventInput, PaReportWhatsappEventResponse } from "./dto/pa.report-whatsapp-event.dto";
3
+ export declare class WhatsappEventService {
4
+ private readonly api;
5
+ constructor(api: HttpClient);
6
+ report(body: PaReportWhatsappEventInput): Promise<PaReportWhatsappEventResponse>;
7
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WhatsappEventService = void 0;
4
+ class WhatsappEventService {
5
+ api;
6
+ constructor(api) {
7
+ this.api = api;
8
+ }
9
+ async report(body) {
10
+ const response = await this.api.post(`/whatsapp/event`, body);
11
+ return response;
12
+ }
13
+ }
14
+ exports.WhatsappEventService = WhatsappEventService;
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ import { ServiceRecommendationService } from "./domain/serviceRecommendation/ser
23
23
  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
+ import { WhatsappEventService } from "./domain/whatsappEvent/whatsappEvent.service";
26
27
  export declare class TecpetSDK {
27
28
  private api;
28
29
  client: ClientService;
@@ -50,6 +51,7 @@ export declare class TecpetSDK {
50
51
  cep: CepService;
51
52
  customField: CustomFieldService;
52
53
  serviceCapacity: ServiceCapacityService;
54
+ whatsappEvent: WhatsappEventService;
53
55
  constructor(baseURL: string, apiKey?: string);
54
56
  }
55
57
  export * from './domain/availableTimes';
@@ -80,3 +82,4 @@ export * from './domain/serviceCapacity';
80
82
  export * from './utils/index';
81
83
  export * from './domain/petPlan';
82
84
  export * from './domain/chain';
85
+ export * from './domain/whatsappEvent';
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ const serviceRecommendation_service_1 = require("./domain/serviceRecommendation/
41
41
  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
+ const whatsappEvent_service_1 = require("./domain/whatsappEvent/whatsappEvent.service");
44
45
  class TecpetSDK {
45
46
  api;
46
47
  client;
@@ -68,6 +69,7 @@ class TecpetSDK {
68
69
  cep;
69
70
  customField;
70
71
  serviceCapacity;
72
+ whatsappEvent;
71
73
  constructor(baseURL, apiKey) {
72
74
  this.api = new client_http_1.HttpClient(baseURL, apiKey);
73
75
  this.client = new client_service_1.ClientService(this.api);
@@ -95,6 +97,7 @@ class TecpetSDK {
95
97
  this.blockedTime = new blockedTime_service_1.BlockedTimeService(this.api);
96
98
  this.cep = new cep_service_1.CepService(this.api);
97
99
  this.serviceCapacity = new serviceCapacity_service_1.ServiceCapacityService(this.api);
100
+ this.whatsappEvent = new whatsappEvent_service_1.WhatsappEventService(this.api);
98
101
  }
99
102
  }
100
103
  exports.TecpetSDK = TecpetSDK;
@@ -126,3 +129,4 @@ __exportStar(require("./domain/serviceCapacity"), exports);
126
129
  __exportStar(require("./utils/index"), exports);
127
130
  __exportStar(require("./domain/petPlan"), exports);
128
131
  __exportStar(require("./domain/chain"), exports);
132
+ __exportStar(require("./domain/whatsappEvent"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tec.pet/tecpet-sdk",
3
- "version": "0.0.185",
3
+ "version": "0.0.186",
4
4
  "description": "TecPet SDK for integration with TecPet services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",