@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.
- package/dist/domain/shop/dto/pa.get-shop-configurations.dto.d.ts +2 -0
- package/dist/domain/shop/dto/pa.get-shop.dto.d.ts +6 -0
- package/dist/domain/shop/dto/pa.get-shop.dto.js +2 -0
- package/dist/domain/shop/dto/pa.get-shops.dto.d.ts +12 -0
- package/dist/domain/shop/dto/pa.get-shops.dto.js +2 -0
- package/dist/domain/shop/index.d.ts +2 -1
- package/dist/domain/shop/index.js +2 -1
- package/dist/domain/shop/shop.service.d.ts +2 -0
- package/dist/domain/shop/shop.service.js +7 -0
- package/package.json +1 -1
|
@@ -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,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
|
+
}
|
|
@@ -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;
|