@tec.pet/tecpet-sdk 0.0.165 → 0.0.166

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,7 @@
1
+ import { HttpClient } from "../../infra/http/client.http";
2
+ import { PaLookupCepResponse } from "./dto/pa.lookup-cep.dto";
3
+ export declare class CepService {
4
+ private readonly api;
5
+ constructor(api: HttpClient);
6
+ lookupCep(cep: string): Promise<PaLookupCepResponse | null>;
7
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CepService = void 0;
4
+ class CepService {
5
+ api;
6
+ constructor(api) {
7
+ this.api = api;
8
+ }
9
+ async lookupCep(cep) {
10
+ const clean = (cep || '').replace(/\D/g, '');
11
+ try {
12
+ const response = await this.api.get(`/cep/${clean}`);
13
+ return response || null;
14
+ }
15
+ catch (e) {
16
+ return null;
17
+ }
18
+ }
19
+ }
20
+ exports.CepService = CepService;
@@ -0,0 +1,7 @@
1
+ export interface PaLookupCepResponse {
2
+ zipCode: string;
3
+ street: string;
4
+ neighborhood: string;
5
+ city: string;
6
+ uf: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './dto/pa.lookup-cep.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.lookup-cep.dto"), exports);
@@ -292,41 +292,49 @@ export interface InfoCollectionMenuJson {
292
292
  enabled: boolean;
293
293
  message: string;
294
294
  aiInstruction?: string;
295
+ required?: boolean;
295
296
  };
296
297
  clientCpf: {
297
298
  enabled: boolean;
298
299
  message: string;
299
300
  aiInstruction?: string;
301
+ required?: boolean;
300
302
  };
301
303
  scheduleToAnotherPet: {
302
304
  enabled: boolean;
303
305
  message: string;
304
306
  aiInstruction?: string;
307
+ required?: boolean;
305
308
  };
306
309
  clientAddress: {
307
310
  enabled: boolean;
308
311
  message: string;
309
312
  aiInstruction?: string;
313
+ required?: boolean;
310
314
  };
311
315
  petGender: {
312
316
  enabled: boolean;
313
317
  message: string;
314
318
  aiInstruction?: string;
319
+ required?: boolean;
315
320
  };
316
321
  petBirthDate: {
317
322
  enabled: boolean;
318
323
  message: string;
319
324
  aiInstruction?: string;
325
+ required?: boolean;
320
326
  };
321
327
  petWeight: {
322
328
  enabled: boolean;
323
329
  message: string;
324
330
  aiInstruction?: string;
331
+ required?: boolean;
325
332
  };
326
333
  petDefaultChecklist: {
327
334
  enabled: boolean;
328
335
  message: string;
329
336
  aiInstruction?: string;
337
+ required?: boolean;
330
338
  };
331
339
  };
332
340
  }
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ import { IntegrationClientService } from "./domain/integrationClient/integration
17
17
  import { FiscalInvoiceService } from "./domain/fiscalInvoice/fiscalInvoice.service";
18
18
  import { InvoiceService } from "./domain/invoice/invoice.service";
19
19
  import { ServiceRecommendationService } from "./domain/serviceRecommendation/serviceRecommendation.service";
20
+ import { CepService } from "./domain/cep/cep.service";
20
21
  export declare class TecpetSDK {
21
22
  private api;
22
23
  client: ClientService;
@@ -38,6 +39,7 @@ export declare class TecpetSDK {
38
39
  fiscalInvoice: FiscalInvoiceService;
39
40
  invoice: InvoiceService;
40
41
  serviceRecommendation: ServiceRecommendationService;
42
+ cep: CepService;
41
43
  constructor(baseURL: string, apiKey?: string);
42
44
  }
43
45
  export * from './domain/availableTimes';
@@ -59,6 +61,7 @@ export * from './domain/integrationClient';
59
61
  export * from './domain/fiscalInvoice';
60
62
  export * from './domain/invoice';
61
63
  export * from './domain/serviceRecommendation';
64
+ export * from './domain/cep';
62
65
  export * from './utils/index';
63
66
  export * from './domain/petPlan';
64
67
  export * from './domain/chain';
package/dist/index.js CHANGED
@@ -35,6 +35,7 @@ const integrationClient_service_1 = require("./domain/integrationClient/integrat
35
35
  const fiscalInvoice_service_1 = require("./domain/fiscalInvoice/fiscalInvoice.service");
36
36
  const invoice_service_1 = require("./domain/invoice/invoice.service");
37
37
  const serviceRecommendation_service_1 = require("./domain/serviceRecommendation/serviceRecommendation.service");
38
+ const cep_service_1 = require("./domain/cep/cep.service");
38
39
  class TecpetSDK {
39
40
  api;
40
41
  client;
@@ -56,6 +57,7 @@ class TecpetSDK {
56
57
  fiscalInvoice;
57
58
  invoice;
58
59
  serviceRecommendation;
60
+ cep;
59
61
  constructor(baseURL, apiKey) {
60
62
  this.api = new client_http_1.HttpClient(baseURL, apiKey);
61
63
  this.client = new client_service_1.ClientService(this.api);
@@ -77,6 +79,7 @@ class TecpetSDK {
77
79
  this.fiscalInvoice = new fiscalInvoice_service_1.FiscalInvoiceService(this.api);
78
80
  this.invoice = new invoice_service_1.InvoiceService(this.api);
79
81
  this.serviceRecommendation = new serviceRecommendation_service_1.ServiceRecommendationService(this.api);
82
+ this.cep = new cep_service_1.CepService(this.api);
80
83
  }
81
84
  }
82
85
  exports.TecpetSDK = TecpetSDK;
@@ -99,6 +102,7 @@ __exportStar(require("./domain/integrationClient"), exports);
99
102
  __exportStar(require("./domain/fiscalInvoice"), exports);
100
103
  __exportStar(require("./domain/invoice"), exports);
101
104
  __exportStar(require("./domain/serviceRecommendation"), exports);
105
+ __exportStar(require("./domain/cep"), exports);
102
106
  __exportStar(require("./utils/index"), exports);
103
107
  __exportStar(require("./domain/petPlan"), exports);
104
108
  __exportStar(require("./domain/chain"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tec.pet/tecpet-sdk",
3
- "version": "0.0.165",
3
+ "version": "0.0.166",
4
4
  "description": "TecPet SDK for integration with TecPet services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",