plaza-sdk 2.6.1 → 2.7.0
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/lib/cjs/modules/yandex-market-api/core/index.js +1 -1
- package/lib/cjs/modules/yandex-market-api/core/products/api.js +1 -1
- package/lib/cjs/modules/yandex-market-api/core/products/index.js +1 -1
- package/lib/cjs/modules/yandex-market-api/index.js +1 -1
- package/lib/esm/modules/yandex-market-api/core/index.js +1 -1
- package/lib/esm/modules/yandex-market-api/core/products/api.js +1 -1
- package/lib/esm/modules/yandex-market-api/core/products/index.js +1 -1
- package/lib/esm/modules/yandex-market-api/index.js +1 -1
- package/lib/types/src/modules/yandex-market-api/common/index.d.ts +1 -1
- package/lib/types/src/modules/yandex-market-api/common/interfaces.d.ts +2 -1
- package/lib/types/src/modules/yandex-market-api/core/index.d.ts +2 -2
- package/lib/types/src/modules/yandex-market-api/core/products/api.d.ts +6 -4
- package/lib/types/src/modules/yandex-market-api/core/products/index.d.ts +4 -4
- package/lib/types/src/modules/yandex-market-api/core/products/params.d.ts +8 -2
- package/lib/types/src/modules/yandex-market-api/core/products/types.d.ts +27 -2
- package/lib/types/src/modules/yandex-market-api/core/reports/types.d.ts +1 -1
- package/lib/types/src/modules/yandex-market-api/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./orders/api.js"),r=require("./stores/api.js"),s=require("./returns/api.js"),p=require("./reports/api.js"),t=require("./invoices/api.js"),a=require("./products/api.js");exports.CampaignOrder=e.CampaignOrder,exports.CampaignOrders=e.CampaignOrders,exports.Campaign=r.Campaign,exports.Campaigns=r.Campaigns,exports.CampaignReturns=s.CampaignReturns,exports.GenerateSalesReport=p.GenerateSalesReport,exports.GenerateServiceReport=p.GenerateServiceReport,exports.GetSingleServiceReport=p.GetSingleServiceReport,exports.GetSupplyRequests=t.GetSupplyRequests,exports.GetSupplyRequestsItems=t.GetSupplyRequestsItems,exports.BusinessOfferMappings=a.BusinessOfferMappings,exports.CampaignStocks=a.CampaignStocks;
|
|
1
|
+
"use strict";var e=require("./orders/api.js"),r=require("./stores/api.js"),s=require("./returns/api.js"),p=require("./reports/api.js"),t=require("./invoices/api.js"),a=require("./products/api.js");exports.CampaignOrder=e.CampaignOrder,exports.CampaignOrders=e.CampaignOrders,exports.Campaign=r.Campaign,exports.Campaigns=r.Campaigns,exports.CampaignReturns=s.CampaignReturns,exports.GenerateSalesReport=p.GenerateSalesReport,exports.GenerateServiceReport=p.GenerateServiceReport,exports.GetSingleServiceReport=p.GetSingleServiceReport,exports.GetSupplyRequests=t.GetSupplyRequests,exports.GetSupplyRequestsItems=t.GetSupplyRequestsItems,exports.BusinessOfferMappings=a.BusinessOfferMappings,exports.CampaignStocks=a.CampaignStocks,exports.GetSelectedProductsPrices=a.GetSelectedProductsPrices,exports.UpdateOfferPrices=a.UpdateOfferPrices;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("../../../../common/utils.js");exports.BusinessOfferMappings=(s,p)=>{const{businessId:r,apiKey:a,...i}=p;return s.post(`/v2/businesses/${r}/offer-mappings`,null,{params:i,headers:e.pasteApiKeyHeader(a)})},exports.CampaignStocks=(s,p,r)=>{const{campaignId:a,apiKey:i,...t}=p;return s.post(`/v2/campaigns/${a}/offers/stocks`,r,{params:t,headers:e.pasteApiKeyHeader(i)})},exports.GetSelectedProductsPrices=(s,p,r)=>s.post(`/v2/businesses/${p.businessId}/offer-prices`,r,{headers:e.pasteApiKeyHeader(p.apiKey)}),exports.UpdateOfferPrices=(s,p,r)=>s.post(`/v2/businesses/${p.businessId}/offer-prices/updates`,r,{headers:e.pasteApiKeyHeader(p.apiKey)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./api.js");exports.BusinessOfferMappings=e.BusinessOfferMappings,exports.CampaignStocks=e.CampaignStocks,exports.GetSelectedProductsPrices=e.GetSelectedProductsPrices,exports.UpdateOfferPrices=e.UpdateOfferPrices;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./core/orders/api.js"),r=require("./core/stores/api.js"),s=require("./core/returns/api.js"),p=require("./core/reports/api.js"),t=require("./core/invoices/api.js"),a=require("./core/products/api.js");exports.CampaignOrder=e.CampaignOrder,exports.CampaignOrders=e.CampaignOrders,exports.Campaign=r.Campaign,exports.Campaigns=r.Campaigns,exports.CampaignReturns=s.CampaignReturns,exports.GenerateSalesReport=p.GenerateSalesReport,exports.GenerateServiceReport=p.GenerateServiceReport,exports.GetSingleServiceReport=p.GetSingleServiceReport,exports.GetSupplyRequests=t.GetSupplyRequests,exports.GetSupplyRequestsItems=t.GetSupplyRequestsItems,exports.BusinessOfferMappings=a.BusinessOfferMappings,exports.CampaignStocks=a.CampaignStocks;
|
|
1
|
+
"use strict";var e=require("./core/orders/api.js"),r=require("./core/stores/api.js"),s=require("./core/returns/api.js"),p=require("./core/reports/api.js"),t=require("./core/invoices/api.js"),a=require("./core/products/api.js");exports.CampaignOrder=e.CampaignOrder,exports.CampaignOrders=e.CampaignOrders,exports.Campaign=r.Campaign,exports.Campaigns=r.Campaigns,exports.CampaignReturns=s.CampaignReturns,exports.GenerateSalesReport=p.GenerateSalesReport,exports.GenerateServiceReport=p.GenerateServiceReport,exports.GetSingleServiceReport=p.GetSingleServiceReport,exports.GetSupplyRequests=t.GetSupplyRequests,exports.GetSupplyRequestsItems=t.GetSupplyRequestsItems,exports.BusinessOfferMappings=a.BusinessOfferMappings,exports.CampaignStocks=a.CampaignStocks,exports.GetSelectedProductsPrices=a.GetSelectedProductsPrices,exports.UpdateOfferPrices=a.UpdateOfferPrices;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CampaignOrder,CampaignOrders}from"./orders/api.js";export{Campaign,Campaigns}from"./stores/api.js";export{CampaignReturns}from"./returns/api.js";export{GenerateSalesReport,GenerateServiceReport,GetSingleServiceReport}from"./reports/api.js";export{GetSupplyRequests,GetSupplyRequestsItems}from"./invoices/api.js";export{BusinessOfferMappings,CampaignStocks}from"./products/api.js";
|
|
1
|
+
export{CampaignOrder,CampaignOrders}from"./orders/api.js";export{Campaign,Campaigns}from"./stores/api.js";export{CampaignReturns}from"./returns/api.js";export{GenerateSalesReport,GenerateServiceReport,GetSingleServiceReport}from"./reports/api.js";export{GetSupplyRequests,GetSupplyRequestsItems}from"./invoices/api.js";export{BusinessOfferMappings,CampaignStocks,GetSelectedProductsPrices,UpdateOfferPrices}from"./products/api.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{pasteApiKeyHeader as s}from"../../../../common/utils.js";const e=(e,
|
|
1
|
+
import{pasteApiKeyHeader as s}from"../../../../common/utils.js";const e=(e,p,r)=>{const{campaignId:a,apiKey:i,...o}=p;return e.post(`/v2/campaigns/${a}/offers/stocks`,r,{params:o,headers:s(i)})},p=(e,p)=>{const{businessId:r,apiKey:a,...i}=p;return e.post(`/v2/businesses/${r}/offer-mappings`,null,{params:i,headers:s(a)})},r=(e,p,r)=>e.post(`/v2/businesses/${p.businessId}/offer-prices/updates`,r,{headers:s(p.apiKey)}),a=(e,p,r)=>e.post(`/v2/businesses/${p.businessId}/offer-prices`,r,{headers:s(p.apiKey)});export{p as BusinessOfferMappings,e as CampaignStocks,a as GetSelectedProductsPrices,r as UpdateOfferPrices};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BusinessOfferMappings,CampaignStocks}from"./api.js";
|
|
1
|
+
export{BusinessOfferMappings,CampaignStocks,GetSelectedProductsPrices,UpdateOfferPrices}from"./api.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CampaignOrder,CampaignOrders}from"./core/orders/api.js";export{Campaign,Campaigns}from"./core/stores/api.js";export{CampaignReturns}from"./core/returns/api.js";export{GenerateSalesReport,GenerateServiceReport,GetSingleServiceReport}from"./core/reports/api.js";export{GetSupplyRequests,GetSupplyRequestsItems}from"./core/invoices/api.js";export{BusinessOfferMappings,CampaignStocks}from"./core/products/api.js";
|
|
1
|
+
export{CampaignOrder,CampaignOrders}from"./core/orders/api.js";export{Campaign,Campaigns}from"./core/stores/api.js";export{CampaignReturns}from"./core/returns/api.js";export{GenerateSalesReport,GenerateServiceReport,GetSingleServiceReport}from"./core/reports/api.js";export{GetSupplyRequests,GetSupplyRequestsItems}from"./core/invoices/api.js";export{BusinessOfferMappings,CampaignStocks,GetSelectedProductsPrices,UpdateOfferPrices}from"./core/products/api.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { CampaignStockType, CurrencyType, Language, LogisticPointType, OrderBuyerType, OrderDeliveryDispatchType, OrderDeliveryPartnerType, OrderDeliveryType, OrderStatus, OrderSubstatus, PlacementType, ResultStatus, ReturnDecisionReasonType, ReturnDecisionSubreasonType, ReturnDecisionType, ReturnInstanceStatus, ReturnInstanceStockType, ReturnShipmentStatus, ReturnStatus, ReturnType, ShipmentRecipientType, Turnover, VatValue } from './types.js';
|
|
2
2
|
export { CampaignIdBasedParams, PagedParams, TokenPagedParams } from './params.js';
|
|
3
|
-
export { CommodityCode, CurrencyValueCore, Dimensions, Pager, Paging, ResultResponse, TimePeriod } from './interfaces.js';
|
|
3
|
+
export { CommodityCode, CurrencyValueCore, Dimensions, OnlyStatusResponse, Pager, Paging, ResultResponse, TimePeriod } from './interfaces.js';
|
|
4
4
|
import '../../../common/params.js';
|
|
@@ -16,6 +16,7 @@ interface ResultResponse<T> {
|
|
|
16
16
|
status: ResultStatus;
|
|
17
17
|
result: T;
|
|
18
18
|
}
|
|
19
|
+
type OnlyStatusResponse = Omit<ResultResponse<unknown>, "result">;
|
|
19
20
|
interface CommodityCode {
|
|
20
21
|
code: string;
|
|
21
22
|
type: string;
|
|
@@ -36,4 +37,4 @@ interface CurrencyValueCore {
|
|
|
36
37
|
currencyId: CurrencyType;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
export type { CommodityCode, CurrencyValueCore, Dimensions, Pager, Paging, ResultResponse, TimePeriod };
|
|
40
|
+
export type { CommodityCode, CurrencyValueCore, Dimensions, OnlyStatusResponse, Pager, Paging, ResultResponse, TimePeriod };
|
|
@@ -12,9 +12,9 @@ export { GenerateSalesReportParams, GenerateServiceReportParams, GetSingleServic
|
|
|
12
12
|
export { GetSupplyRequests, GetSupplyRequestsItems } from './invoices/api.js';
|
|
13
13
|
export { InvoicesApi, InvoicesEntity } from './invoices/types.js';
|
|
14
14
|
export { GetSupplyRequestsParams } from './invoices/params.js';
|
|
15
|
-
export { BusinessOfferMappings, CampaignStocks } from './products/api.js';
|
|
15
|
+
export { BusinessOfferMappings, CampaignStocks, GetSelectedProductsPrices, UpdateOfferPrices } from './products/api.js';
|
|
16
16
|
export { ProductsApi, ProductsEntity } from './products/types.js';
|
|
17
|
-
export { BusinessOfferMappingsParams, CampaignStocksParams } from './products/params.js';
|
|
17
|
+
export { BusinessOfferMappingsParams, CampaignStocksParams, GetSelectedProductsPricesParams, UpdateOfferPricesParams } from './products/params.js';
|
|
18
18
|
export { YandexMarketEntity } from './types.js';
|
|
19
19
|
import '../common/types.js';
|
|
20
20
|
import '../common/params.js';
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { CallerParamPayload } from '../../../../common/types.js';
|
|
2
2
|
import { ProductsApi } from './types.js';
|
|
3
|
-
import { CampaignStocksParams, BusinessOfferMappingsParams } from './params.js';
|
|
3
|
+
import { CampaignStocksParams, BusinessOfferMappingsParams, UpdateOfferPricesParams, GetSelectedProductsPricesParams } from './params.js';
|
|
4
4
|
import 'axios';
|
|
5
|
-
import '../../common/interfaces.js';
|
|
6
5
|
import '../../common/types.js';
|
|
6
|
+
import '../../common/interfaces.js';
|
|
7
7
|
import '../types.js';
|
|
8
8
|
import '../../../../common/interfaces.js';
|
|
9
|
-
import '../../common/params.js';
|
|
10
9
|
import '../../../../common/params.js';
|
|
10
|
+
import '../../common/params.js';
|
|
11
11
|
|
|
12
12
|
declare const CampaignStocks: CallerParamPayload<CampaignStocksParams, ProductsApi.CampaignStocks.Request, ProductsApi.CampaignStocks.Response>;
|
|
13
13
|
declare const BusinessOfferMappings: CallerParamPayload<BusinessOfferMappingsParams, ProductsApi.BusinessOfferMappings.Request, ProductsApi.BusinessOfferMappings.Response>;
|
|
14
|
+
declare const UpdateOfferPrices: CallerParamPayload<UpdateOfferPricesParams, ProductsApi.UpdateOfferPrices.Request, ProductsApi.UpdateOfferPrices.Response>;
|
|
15
|
+
declare const GetSelectedProductsPrices: CallerParamPayload<GetSelectedProductsPricesParams, ProductsApi.GetSelectedProductsPrices.Request, ProductsApi.GetSelectedProductsPrices.Response>;
|
|
14
16
|
|
|
15
|
-
export { BusinessOfferMappings, CampaignStocks };
|
|
17
|
+
export { BusinessOfferMappings, CampaignStocks, GetSelectedProductsPrices, UpdateOfferPrices };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { BusinessOfferMappings, CampaignStocks } from './api.js';
|
|
1
|
+
export { BusinessOfferMappings, CampaignStocks, GetSelectedProductsPrices, UpdateOfferPrices } from './api.js';
|
|
2
2
|
export { ProductsApi, ProductsEntity } from './types.js';
|
|
3
|
-
export { BusinessOfferMappingsParams, CampaignStocksParams } from './params.js';
|
|
3
|
+
export { BusinessOfferMappingsParams, CampaignStocksParams, GetSelectedProductsPricesParams, UpdateOfferPricesParams } from './params.js';
|
|
4
4
|
import '../../../../common/types.js';
|
|
5
5
|
import 'axios';
|
|
6
|
-
import '../../common/interfaces.js';
|
|
7
6
|
import '../../common/types.js';
|
|
7
|
+
import '../../common/interfaces.js';
|
|
8
8
|
import '../types.js';
|
|
9
9
|
import '../../../../common/interfaces.js';
|
|
10
|
-
import '../../common/params.js';
|
|
11
10
|
import '../../../../common/params.js';
|
|
11
|
+
import '../../common/params.js';
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { ApiKeyParams } from '../../../../common/params.js';
|
|
1
2
|
import { Language } from '../../common/types.js';
|
|
2
3
|
import { TokenPagedParams, CampaignIdBasedParams } from '../../common/params.js';
|
|
3
|
-
import '../../../../common/params.js';
|
|
4
4
|
|
|
5
5
|
type CampaignStocksParams = TokenPagedParams & CampaignIdBasedParams;
|
|
6
6
|
interface BusinessOfferMappingsParams extends TokenPagedParams {
|
|
7
7
|
businessId: number;
|
|
8
8
|
language?: Language;
|
|
9
9
|
}
|
|
10
|
+
interface UpdateOfferPricesParams extends ApiKeyParams {
|
|
11
|
+
businessId: number;
|
|
12
|
+
}
|
|
13
|
+
interface GetSelectedProductsPricesParams extends TokenPagedParams {
|
|
14
|
+
businessId: number;
|
|
15
|
+
}
|
|
10
16
|
|
|
11
|
-
export type { BusinessOfferMappingsParams, CampaignStocksParams };
|
|
17
|
+
export type { BusinessOfferMappingsParams, CampaignStocksParams, GetSelectedProductsPricesParams, UpdateOfferPricesParams };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CurrencyType } from '../../common/types.js';
|
|
2
|
+
import { ResultResponse, Paging, OnlyStatusResponse } from '../../common/interfaces.js';
|
|
2
3
|
import { YandexMarketEntity } from '../types.js';
|
|
3
|
-
import '../../common/types.js';
|
|
4
4
|
import '../../../../common/interfaces.js';
|
|
5
5
|
|
|
6
6
|
declare namespace ProductsEntity {
|
|
@@ -9,6 +9,15 @@ declare namespace ProductsEntity {
|
|
|
9
9
|
mapping: YandexMarketEntity.BusinessMapping;
|
|
10
10
|
showcaseUrls: YandexMarketEntity.MappingShowcaseUrl[];
|
|
11
11
|
}
|
|
12
|
+
interface UpdatePriceModel {
|
|
13
|
+
offerId: string;
|
|
14
|
+
price: {
|
|
15
|
+
value?: number;
|
|
16
|
+
currencyId?: CurrencyType;
|
|
17
|
+
discountBase?: number;
|
|
18
|
+
minimumForBestseller?: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
12
21
|
}
|
|
13
22
|
declare namespace ProductsApi {
|
|
14
23
|
namespace CampaignStocks {
|
|
@@ -38,6 +47,22 @@ declare namespace ProductsApi {
|
|
|
38
47
|
offerMappings: ProductsEntity.BusinessOfferMapping[];
|
|
39
48
|
}>;
|
|
40
49
|
}
|
|
50
|
+
namespace UpdateOfferPrices {
|
|
51
|
+
interface Request {
|
|
52
|
+
offers: ProductsEntity.UpdatePriceModel[];
|
|
53
|
+
}
|
|
54
|
+
type Response = OnlyStatusResponse;
|
|
55
|
+
}
|
|
56
|
+
namespace GetSelectedProductsPrices {
|
|
57
|
+
interface Request {
|
|
58
|
+
offerIds: string[];
|
|
59
|
+
archived: boolean;
|
|
60
|
+
}
|
|
61
|
+
type Response = ResultResponse<{
|
|
62
|
+
paging: Paging;
|
|
63
|
+
offers: ProductsEntity.UpdatePriceModel[];
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
41
66
|
}
|
|
42
67
|
|
|
43
68
|
export { ProductsApi, ProductsEntity };
|
|
@@ -23,7 +23,7 @@ declare namespace ReportsApi {
|
|
|
23
23
|
namespace GetSingleServiceReport {
|
|
24
24
|
type Response = ResultResponse<{
|
|
25
25
|
generationRequestedAt: string;
|
|
26
|
-
status: "PENDING" | "
|
|
26
|
+
status: "PENDING" | "PROCESSING" | "DONE" | "FAILED";
|
|
27
27
|
estimatedGenerationTime: number;
|
|
28
28
|
file: string;
|
|
29
29
|
generationFinishedAt: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { CampaignStockType, CurrencyType, Language, LogisticPointType, OrderBuyerType, OrderDeliveryDispatchType, OrderDeliveryPartnerType, OrderDeliveryType, OrderStatus, OrderSubstatus, PlacementType, ResultStatus, ReturnDecisionReasonType, ReturnDecisionSubreasonType, ReturnDecisionType, ReturnInstanceStatus, ReturnInstanceStockType, ReturnShipmentStatus, ReturnStatus, ReturnType, ShipmentRecipientType, Turnover, VatValue } from './common/types.js';
|
|
2
2
|
export { CampaignIdBasedParams, PagedParams, TokenPagedParams } from './common/params.js';
|
|
3
|
-
export { CommodityCode, CurrencyValueCore, Dimensions, Pager, Paging, ResultResponse, TimePeriod } from './common/interfaces.js';
|
|
3
|
+
export { CommodityCode, CurrencyValueCore, Dimensions, OnlyStatusResponse, Pager, Paging, ResultResponse, TimePeriod } from './common/interfaces.js';
|
|
4
4
|
export { CampaignOrder, CampaignOrders } from './core/orders/api.js';
|
|
5
5
|
export { OrdersApi } from './core/orders/types.js';
|
|
6
6
|
export { CampaignOrderParams, CampaignOrdersParams } from './core/orders/params.js';
|
|
@@ -15,9 +15,9 @@ export { GenerateSalesReportParams, GenerateServiceReportParams, GetSingleServic
|
|
|
15
15
|
export { GetSupplyRequests, GetSupplyRequestsItems } from './core/invoices/api.js';
|
|
16
16
|
export { InvoicesApi, InvoicesEntity } from './core/invoices/types.js';
|
|
17
17
|
export { GetSupplyRequestsParams } from './core/invoices/params.js';
|
|
18
|
-
export { BusinessOfferMappings, CampaignStocks } from './core/products/api.js';
|
|
18
|
+
export { BusinessOfferMappings, CampaignStocks, GetSelectedProductsPrices, UpdateOfferPrices } from './core/products/api.js';
|
|
19
19
|
export { ProductsApi, ProductsEntity } from './core/products/types.js';
|
|
20
|
-
export { BusinessOfferMappingsParams, CampaignStocksParams } from './core/products/params.js';
|
|
20
|
+
export { BusinessOfferMappingsParams, CampaignStocksParams, GetSelectedProductsPricesParams, UpdateOfferPricesParams } from './core/products/params.js';
|
|
21
21
|
export { YandexMarketEntity } from './core/types.js';
|
|
22
22
|
import '../../common/params.js';
|
|
23
23
|
import '../../common/types.js';
|