ozon-api 0.0.5 → 0.0.7
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/lib/Request.js +1 -1
- package/dist/ozon/category/index.d.ts +2 -1
- package/dist/ozon/category/index.js +1 -1
- package/dist/ozon/product/index.d.ts +2 -1
- package/dist/service/api/CategoryController.d.ts +1 -0
- package/dist/service/api/CategoryController.js +1 -1
- package/dist/service/api/ProductController.d.ts +1 -0
- package/dist/types/Category.d.ts +1 -1
- package/dist/types/Category.js +1 -0
- package/dist/types/Product.d.ts +1 -1
- package/dist/types/Product.js +1 -0
- package/package.json +1 -1
package/dist/lib/Request.js
CHANGED
|
@@ -37,7 +37,7 @@ var requestApi = /*#__PURE__*/function () {
|
|
|
37
37
|
}
|
|
38
38
|
optionDomain = options.domain || '';
|
|
39
39
|
optionDomain = optionDomain.match(/\/$/) ? optionDomain : optionDomain + '/';
|
|
40
|
-
url = optionDomain + api;
|
|
40
|
+
url = optionDomain + (api.indexOf('/') === 0 ? api.replace('/', '') : api);
|
|
41
41
|
headers = options.headers || {};
|
|
42
42
|
if (!/^https?:/.test(url)) {
|
|
43
43
|
_context.next = 10;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Category } from "../../types/Category";
|
|
1
2
|
declare class CategoryClass {
|
|
2
|
-
private apiKeyInfo;
|
|
3
|
+
private readonly apiKeyInfo;
|
|
3
4
|
constructor(apiId: string, apiKey: string);
|
|
4
5
|
attribute(description_category_id: number, type_id: number, language?: Global.ApiLanguage): Promise<Category.Attribute[]>;
|
|
5
6
|
attributeValue(description_category_id: number, type_id: number, attribute_id: number, language?: Global.ApiLanguage): Promise<Category.AttributeValue[]>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Product } from "../../types/Product";
|
|
1
2
|
declare class ProductClass {
|
|
2
|
-
private apiKeyInfo;
|
|
3
|
+
private readonly apiKeyInfo;
|
|
3
4
|
constructor(apiId: string, apiKey: string);
|
|
4
5
|
importBySku(query: Product.ImportBySkuQuery): Promise<Product.ImportBySkuResult>;
|
|
5
6
|
checkImportInfo(taskId: number): Promise<Product.CheckImportInfoResult>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { Category } from "../../types/Category";
|
|
1
2
|
export declare function attribute(body: Category.AttributeQuery, options?: Global.RequestOptions): Promise<Category.AttributeApi>;
|
|
2
3
|
export declare function attributeValue(body: Category.AttributeValueQuery, options?: Global.RequestOptions): Promise<Category.AttributeValueApi>;
|
|
@@ -39,7 +39,7 @@ function _attributeValue() {
|
|
|
39
39
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
40
40
|
while (1) switch (_context2.prev = _context2.next) {
|
|
41
41
|
case 0:
|
|
42
|
-
return _context2.abrupt("return", request("/v1/description-category/attribute", _objectSpread({
|
|
42
|
+
return _context2.abrupt("return", request("/v1/description-category/attribute/values", _objectSpread({
|
|
43
43
|
method: 'POST',
|
|
44
44
|
headers: {
|
|
45
45
|
'Content-Type': 'application/json'
|
package/dist/types/Category.d.ts
CHANGED
package/dist/types/Category.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/Product.d.ts
CHANGED
package/dist/types/Product.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|