@tec.pet/tecpet-sdk 0.0.122 → 0.0.123
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/integrationShop/dto/pa.get-integration-shop-by-shop-id.dto.d.ts +8 -0
- package/dist/domain/integrationShop/dto/pa.get-integration-shop-by-shop-id.dto.js +11 -0
- package/dist/domain/integrationShop/index.d.ts +1 -0
- package/dist/domain/integrationShop/index.js +1 -0
- package/dist/domain/integrationShop/integrationShop.service.d.ts +2 -0
- package/dist/domain/integrationShop/integrationShop.service.js +5 -2
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApiIntegrationType } from './pa.get-integration-shop-by-login.dto';
|
|
2
|
+
export declare class PaGetIntegrationShopByShopIdResponse {
|
|
3
|
+
shopId: number;
|
|
4
|
+
shopName: string;
|
|
5
|
+
integrationShopId: number;
|
|
6
|
+
integrationShopType: ApiIntegrationType;
|
|
7
|
+
chainId: string | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaGetIntegrationShopByShopIdResponse = void 0;
|
|
4
|
+
class PaGetIntegrationShopByShopIdResponse {
|
|
5
|
+
shopId;
|
|
6
|
+
shopName;
|
|
7
|
+
integrationShopId;
|
|
8
|
+
integrationShopType;
|
|
9
|
+
chainId;
|
|
10
|
+
}
|
|
11
|
+
exports.PaGetIntegrationShopByShopIdResponse = PaGetIntegrationShopByShopIdResponse;
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./integrationShop.service"), exports);
|
|
18
18
|
__exportStar(require("./dto/pa.get-integration-shop-by-login.dto"), exports);
|
|
19
|
+
__exportStar(require("./dto/pa.get-integration-shop-by-shop-id.dto"), exports);
|
|
19
20
|
__exportStar(require("./dto/pa.edit-integration-shop.dto"), exports);
|
|
@@ -2,9 +2,11 @@ import { HttpClient } from "infra/http/client.http";
|
|
|
2
2
|
import { ApiIntegrationType, PaGetIntegrationShopByLoginResponse } from "./dto/pa.get-integration-shop-by-login.dto";
|
|
3
3
|
import { PaEditIntegrationShopRequest, PaEditIntegrationShopResponse } from "./dto/pa.edit-integration-shop.dto";
|
|
4
4
|
import { PaShopWithIntegrationResponse } from "./dto/pa.get-shops-with-integration.dto";
|
|
5
|
+
import { PaGetIntegrationShopByShopIdResponse } from "./dto/pa.get-integration-shop-by-shop-id.dto";
|
|
5
6
|
export declare class IntegrationShopService {
|
|
6
7
|
private readonly api;
|
|
7
8
|
constructor(api: HttpClient);
|
|
9
|
+
getIntegrationShopByShopId(shopId: number, integrationType: ApiIntegrationType | string): Promise<PaGetIntegrationShopByShopIdResponse>;
|
|
8
10
|
getIntegrationShopByLogin(type: ApiIntegrationType | string, login: string): Promise<PaGetIntegrationShopByLoginResponse>;
|
|
9
11
|
edit(body: PaEditIntegrationShopRequest, shopId: number): Promise<PaEditIntegrationShopResponse>;
|
|
10
12
|
getShopsWithIntegration(integrationType: string): Promise<PaShopWithIntegrationResponse[]>;
|
|
@@ -6,10 +6,13 @@ class IntegrationShopService {
|
|
|
6
6
|
constructor(api) {
|
|
7
7
|
this.api = api;
|
|
8
8
|
}
|
|
9
|
+
async getIntegrationShopByShopId(shopId, integrationType) {
|
|
10
|
+
const path = `/integrationShop/shop/type/${integrationType}`;
|
|
11
|
+
return await this.api.get(path, undefined, shopId);
|
|
12
|
+
}
|
|
9
13
|
async getIntegrationShopByLogin(type, login) {
|
|
10
14
|
const path = `/integrationShop/type/${type}/login/${login}`;
|
|
11
|
-
|
|
12
|
-
return response;
|
|
15
|
+
return await this.api.get(path);
|
|
13
16
|
}
|
|
14
17
|
async edit(body, shopId) {
|
|
15
18
|
return await this.api.post(`/integrationShop`, body, shopId);
|