Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc9862c368 |
@@ -1,6 +1,6 @@
|
||||
# @apilki/yandex-market — JavaScript/TypeScript клиент
|
||||
|
||||
**Версия: 0.1.0 · API от 2026-08-20** <!-- штампуется пайплайном (github-distro) -->
|
||||
**Версия: 0.2.0 · API от 2026-08-21** <!-- штампуется пайплайном (github-distro) -->
|
||||
|
||||
JavaScript/TypeScript клиент для **Yandex Market Partner API** (продавец-сторона: заказы, каталог, цены, отчёты). Построен на базе `fetch` API. Работает и в Node.js, и в браузере. Публикуется в npm-скоупе `@apilki` (GitHub-орг `apilki`).
|
||||
|
||||
|
||||
10
dist/apis/ShipmentsApi.d.ts
vendored
10
dist/apis/ShipmentsApi.d.ts
vendored
@@ -10,7 +10,7 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { ConfirmShipmentRequest, EmptyApiResponse, GetShipmentOrdersInfoResponse, GetShipmentResponse, SearchShipmentsRequest, SearchShipmentsResponse, SetShipmentPalletsCountRequest, ShipmentPalletLabelPageFormatType, TransferOrdersFromShipmentRequest } from '../models/index';
|
||||
import type { ConfirmShipmentRequest, Echo200Response, EmptyApiResponse, GetShipmentOrdersInfoResponse, GetShipmentResponse, SearchShipmentsRequest, SearchShipmentsResponse, SetShipmentPalletsCountRequest, ShipmentPalletLabelPageFormatType, TransferOrdersFromShipmentRequest } from '../models/index';
|
||||
export interface ShipmentsApiConfirmShipmentOperationRequest {
|
||||
campaignId: number;
|
||||
shipmentId: number;
|
||||
@@ -141,6 +141,14 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
|
||||
* Получение транспортной накладной
|
||||
*/
|
||||
downloadShipmentTransportationWaybill(campaignId: number, shipmentId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
||||
/**
|
||||
* Echo (mock upstream update test)
|
||||
*/
|
||||
echoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Echo200Response>>;
|
||||
/**
|
||||
* Echo (mock upstream update test)
|
||||
*/
|
||||
echo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Echo200Response>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getShipment.md) %} Возвращает информацию об отгрузке по ее идентификатору. {% include notitle [limit](../../_auto/method_limits/getShipment.md) %}
|
||||
* Получение информации об одной отгрузке
|
||||
|
||||
32
dist/apis/ShipmentsApi.js
vendored
32
dist/apis/ShipmentsApi.js
vendored
@@ -317,6 +317,38 @@ class ShipmentsApi extends runtime.BaseAPI {
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Echo (mock upstream update test)
|
||||
*/
|
||||
echoRaw(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/echo`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.Echo200ResponseFromJSON)(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Echo (mock upstream update test)
|
||||
*/
|
||||
echo(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.echoRaw(initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getShipment.md) %} Возвращает информацию об отгрузке по ее идентификатору. {% include notitle [limit](../../_auto/method_limits/getShipment.md) %}
|
||||
* Получение информации об одной отгрузке
|
||||
|
||||
10
dist/esm/apis/ShipmentsApi.d.ts
vendored
10
dist/esm/apis/ShipmentsApi.d.ts
vendored
@@ -10,7 +10,7 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import * as runtime from '../runtime';
|
||||
import type { ConfirmShipmentRequest, EmptyApiResponse, GetShipmentOrdersInfoResponse, GetShipmentResponse, SearchShipmentsRequest, SearchShipmentsResponse, SetShipmentPalletsCountRequest, ShipmentPalletLabelPageFormatType, TransferOrdersFromShipmentRequest } from '../models/index';
|
||||
import type { ConfirmShipmentRequest, Echo200Response, EmptyApiResponse, GetShipmentOrdersInfoResponse, GetShipmentResponse, SearchShipmentsRequest, SearchShipmentsResponse, SetShipmentPalletsCountRequest, ShipmentPalletLabelPageFormatType, TransferOrdersFromShipmentRequest } from '../models/index';
|
||||
export interface ShipmentsApiConfirmShipmentOperationRequest {
|
||||
campaignId: number;
|
||||
shipmentId: number;
|
||||
@@ -141,6 +141,14 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
|
||||
* Получение транспортной накладной
|
||||
*/
|
||||
downloadShipmentTransportationWaybill(campaignId: number, shipmentId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
||||
/**
|
||||
* Echo (mock upstream update test)
|
||||
*/
|
||||
echoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Echo200Response>>;
|
||||
/**
|
||||
* Echo (mock upstream update test)
|
||||
*/
|
||||
echo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Echo200Response>;
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getShipment.md) %} Возвращает информацию об отгрузке по ее идентификатору. {% include notitle [limit](../../_auto/method_limits/getShipment.md) %}
|
||||
* Получение информации об одной отгрузке
|
||||
|
||||
34
dist/esm/apis/ShipmentsApi.js
vendored
34
dist/esm/apis/ShipmentsApi.js
vendored
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
});
|
||||
};
|
||||
import * as runtime from '../runtime';
|
||||
import { ConfirmShipmentRequestToJSON, EmptyApiResponseFromJSON, GetShipmentOrdersInfoResponseFromJSON, GetShipmentResponseFromJSON, SearchShipmentsRequestToJSON, SearchShipmentsResponseFromJSON, SetShipmentPalletsCountRequestToJSON, TransferOrdersFromShipmentRequestToJSON, } from '../models/index';
|
||||
import { ConfirmShipmentRequestToJSON, Echo200ResponseFromJSON, EmptyApiResponseFromJSON, GetShipmentOrdersInfoResponseFromJSON, GetShipmentResponseFromJSON, SearchShipmentsRequestToJSON, SearchShipmentsResponseFromJSON, SetShipmentPalletsCountRequestToJSON, TransferOrdersFromShipmentRequestToJSON, } from '../models/index';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -314,6 +314,38 @@ export class ShipmentsApi extends runtime.BaseAPI {
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Echo (mock upstream update test)
|
||||
*/
|
||||
echoRaw(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const queryParameters = {};
|
||||
const headerParameters = {};
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Api-Key"] = yield this.configuration.apiKey("Api-Key"); // ApiKey authentication
|
||||
}
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth", ["market:partner-api"]);
|
||||
}
|
||||
const response = yield this.request({
|
||||
path: `/v1/echo`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => Echo200ResponseFromJSON(jsonValue));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Echo (mock upstream update test)
|
||||
*/
|
||||
echo(initOverrides) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const response = yield this.echoRaw(initOverrides);
|
||||
return yield response.value();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* {% include notitle [access](../../_auto/method_scopes/getShipment.md) %} Возвращает информацию об отгрузке по ее идентификатору. {% include notitle [limit](../../_auto/method_limits/getShipment.md) %}
|
||||
* Получение информации об одной отгрузке
|
||||
|
||||
31
dist/esm/models/Echo200Response.d.ts
vendored
Normal file
31
dist/esm/models/Echo200Response.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Echo200Response
|
||||
*/
|
||||
export interface Echo200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Echo200Response
|
||||
*/
|
||||
message?: string;
|
||||
}
|
||||
/**
|
||||
* Check if a given object implements the Echo200Response interface.
|
||||
*/
|
||||
export declare function instanceOfEcho200Response(value: object): value is Echo200Response;
|
||||
export declare function Echo200ResponseFromJSON(json: any): Echo200Response;
|
||||
export declare function Echo200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Echo200Response;
|
||||
export declare function Echo200ResponseToJSON(value?: Echo200Response | null): any;
|
||||
38
dist/esm/models/Echo200Response.js
vendored
Normal file
38
dist/esm/models/Echo200Response.js
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/**
|
||||
* Check if a given object implements the Echo200Response interface.
|
||||
*/
|
||||
export function instanceOfEcho200Response(value) {
|
||||
return true;
|
||||
}
|
||||
export function Echo200ResponseFromJSON(json) {
|
||||
return Echo200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
export function Echo200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
'message': json['message'] == null ? undefined : json['message'],
|
||||
};
|
||||
}
|
||||
export function Echo200ResponseToJSON(value) {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
'message': value['message'],
|
||||
};
|
||||
}
|
||||
1
dist/esm/models/index.d.ts
vendored
1
dist/esm/models/index.d.ts
vendored
@@ -171,6 +171,7 @@ export * from './DigitalGoodsDeliveryType';
|
||||
export * from './DocumentDTO';
|
||||
export * from './EacVerificationResultDTO';
|
||||
export * from './EacVerificationStatusType';
|
||||
export * from './Echo200Response';
|
||||
export * from './EmptyApiResponse';
|
||||
export * from './EnrichedOrderBoxLayoutDTO';
|
||||
export * from './ExtensionShipmentDTO';
|
||||
|
||||
1
dist/esm/models/index.js
vendored
1
dist/esm/models/index.js
vendored
@@ -173,6 +173,7 @@ export * from './DigitalGoodsDeliveryType';
|
||||
export * from './DocumentDTO';
|
||||
export * from './EacVerificationResultDTO';
|
||||
export * from './EacVerificationStatusType';
|
||||
export * from './Echo200Response';
|
||||
export * from './EmptyApiResponse';
|
||||
export * from './EnrichedOrderBoxLayoutDTO';
|
||||
export * from './ExtensionShipmentDTO';
|
||||
|
||||
31
dist/models/Echo200Response.d.ts
vendored
Normal file
31
dist/models/Echo200Response.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Echo200Response
|
||||
*/
|
||||
export interface Echo200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Echo200Response
|
||||
*/
|
||||
message?: string;
|
||||
}
|
||||
/**
|
||||
* Check if a given object implements the Echo200Response interface.
|
||||
*/
|
||||
export declare function instanceOfEcho200Response(value: object): value is Echo200Response;
|
||||
export declare function Echo200ResponseFromJSON(json: any): Echo200Response;
|
||||
export declare function Echo200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Echo200Response;
|
||||
export declare function Echo200ResponseToJSON(value?: Echo200Response | null): any;
|
||||
44
dist/models/Echo200Response.js
vendored
Normal file
44
dist/models/Echo200Response.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* API Яндекс Маркета для продавцов
|
||||
* API Яндекс Маркета помогает продавцам автоматизировать и упростить работу с маркетплейсом. В числе возможностей интеграции: * управление каталогом товаров и витриной, * обработка заказов, * изменение настроек магазина, * получение отчетов.
|
||||
*
|
||||
* The version of the OpenAPI document: LATEST
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.instanceOfEcho200Response = instanceOfEcho200Response;
|
||||
exports.Echo200ResponseFromJSON = Echo200ResponseFromJSON;
|
||||
exports.Echo200ResponseFromJSONTyped = Echo200ResponseFromJSONTyped;
|
||||
exports.Echo200ResponseToJSON = Echo200ResponseToJSON;
|
||||
/**
|
||||
* Check if a given object implements the Echo200Response interface.
|
||||
*/
|
||||
function instanceOfEcho200Response(value) {
|
||||
return true;
|
||||
}
|
||||
function Echo200ResponseFromJSON(json) {
|
||||
return Echo200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
function Echo200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
'message': json['message'] == null ? undefined : json['message'],
|
||||
};
|
||||
}
|
||||
function Echo200ResponseToJSON(value) {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
'message': value['message'],
|
||||
};
|
||||
}
|
||||
1
dist/models/index.d.ts
vendored
1
dist/models/index.d.ts
vendored
@@ -171,6 +171,7 @@ export * from './DigitalGoodsDeliveryType';
|
||||
export * from './DocumentDTO';
|
||||
export * from './EacVerificationResultDTO';
|
||||
export * from './EacVerificationStatusType';
|
||||
export * from './Echo200Response';
|
||||
export * from './EmptyApiResponse';
|
||||
export * from './EnrichedOrderBoxLayoutDTO';
|
||||
export * from './ExtensionShipmentDTO';
|
||||
|
||||
1
dist/models/index.js
vendored
1
dist/models/index.js
vendored
@@ -189,6 +189,7 @@ __exportStar(require("./DigitalGoodsDeliveryType"), exports);
|
||||
__exportStar(require("./DocumentDTO"), exports);
|
||||
__exportStar(require("./EacVerificationResultDTO"), exports);
|
||||
__exportStar(require("./EacVerificationStatusType"), exports);
|
||||
__exportStar(require("./Echo200Response"), exports);
|
||||
__exportStar(require("./EmptyApiResponse"), exports);
|
||||
__exportStar(require("./EnrichedOrderBoxLayoutDTO"), exports);
|
||||
__exportStar(require("./ExtensionShipmentDTO"), exports);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apilki/yandex-market",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"description": "JavaScript/TypeScript client for Yandex Market Partner API",
|
||||
"author": "vitya.kuznetsov@gmail.com",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user