@tec.pet/tecpet-sdk 0.0.87 → 0.0.89

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.
@@ -2,6 +2,7 @@ import { ShopSegment } from "../../segment/enum/segment.enum";
2
2
  import { AddressDto } from "../../client";
3
3
  import { SpecieTypeEnum } from "../../specie/enum/specie-type.enum";
4
4
  import { PaBillingResponse } from "../../billingMethod/dto/pa.get-billing-methods.dto";
5
+ import { PaShopResponse } from "./pa.get-shop.dto";
5
6
  interface AdvancedConfigSegment {
6
7
  id: number;
7
8
  segmentType: ShopSegment;
@@ -88,6 +89,7 @@ export interface PaShopConfigurationsResponse {
88
89
  chain?: {
89
90
  id: string;
90
91
  name: string;
92
+ shops: PaShopResponse[];
91
93
  };
92
94
  }
93
95
  export {};
@@ -0,0 +1,6 @@
1
+ import { AddressDto } from "../../client";
2
+ export interface PaShopResponse {
3
+ id: number;
4
+ name: string;
5
+ address: AddressDto;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { IPaginationResponse } from "../../types/pagination.types";
2
+ import { PaShopResponse } from "./pa.get-shop.dto";
3
+ export interface PaGetShopsQuery {
4
+ city?: string;
5
+ name?: string;
6
+ id?: string;
7
+ chainId?: string;
8
+ }
9
+ export interface PaGetShopsResponse {
10
+ data: PaShopResponse[];
11
+ pagination: IPaginationResponse;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
1
  export * from '../shop/dto/pa.get-shop-configurations.dto';
2
- export * from '../shop/dto/pa.get-shop-configurations.dto';
3
2
  export * from '../segment/enum/segment.enum';
3
+ export * from '../shop/dto/pa.get-shop.dto';
4
+ export * from '../shop/dto/pa.get-shops.dto';
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("../shop/dto/pa.get-shop-configurations.dto"), exports);
18
- __exportStar(require("../shop/dto/pa.get-shop-configurations.dto"), exports);
19
18
  __exportStar(require("../segment/enum/segment.enum"), exports);
19
+ __exportStar(require("../shop/dto/pa.get-shop.dto"), exports);
20
+ __exportStar(require("../shop/dto/pa.get-shops.dto"), exports);
@@ -1,7 +1,9 @@
1
1
  import { HttpClient } from "infra/http/client.http";
2
2
  import { PaShopConfigurationsResponse } from "./dto/pa.get-shop-configurations.dto";
3
+ import { PaShopResponse } from "./dto/pa.get-shop.dto";
3
4
  export declare class ShopService {
4
5
  private readonly api;
5
6
  constructor(api: HttpClient);
6
7
  getConfigurations(shopId: number): Promise<PaShopConfigurationsResponse | null>;
8
+ getChainShops(chainId: string): Promise<PaShopResponse[] | null>;
7
9
  }
@@ -13,5 +13,12 @@ class ShopService {
13
13
  }
14
14
  return null;
15
15
  }
16
+ async getChainShops(chainId) {
17
+ const response = await this.api.get(`/shop`, { chainId });
18
+ if (response?.data?.length) {
19
+ return response.data;
20
+ }
21
+ return null;
22
+ }
16
23
  }
17
24
  exports.ShopService = ShopService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tec.pet/tecpet-sdk",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "description": "TecPet SDK for integration with TecPet services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",