@dataggo/node-akeneo-api 1.2.1 → 1.3.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/dist/cjs/endpoints/category.js +1 -1
- package/dist/cjs/endpoints/index.d.ts +1 -0
- package/dist/cjs/endpoints/index.js +2 -1
- package/dist/cjs/endpoints/measurement-family.d.ts +6 -0
- package/dist/cjs/endpoints/measurement-family.js +15 -0
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.js +3 -0
- package/dist/cjs/types.d.ts +14 -0
- package/dist/mjs/endpoints/category.js +3 -1
- package/dist/mjs/endpoints/index.d.ts +1 -0
- package/dist/mjs/endpoints/index.js +1 -0
- package/dist/mjs/endpoints/measurement-family.d.ts +6 -0
- package/dist/mjs/endpoints/measurement-family.js +8 -0
- package/dist/mjs/index.d.ts +9 -0
- package/dist/mjs/index.js +3 -0
- package/dist/mjs/types.d.ts +14 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ export * as assetFamily from './asset-family';
|
|
|
2
2
|
export * as attribute from './attribute';
|
|
3
3
|
export * as category from './category';
|
|
4
4
|
export * as family from './family';
|
|
5
|
+
export * as measurementFamily from './measurement-family';
|
|
5
6
|
export * as productModel from './product-model';
|
|
6
7
|
export * as product from './product';
|
|
7
8
|
export * as referenceEntity from './reference-entity';
|
|
@@ -23,11 +23,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.referenceEntity = exports.product = exports.productModel = exports.family = exports.category = exports.attribute = exports.assetFamily = void 0;
|
|
26
|
+
exports.referenceEntity = exports.product = exports.productModel = exports.measurementFamily = exports.family = exports.category = exports.attribute = exports.assetFamily = void 0;
|
|
27
27
|
exports.assetFamily = __importStar(require("./asset-family"));
|
|
28
28
|
exports.attribute = __importStar(require("./attribute"));
|
|
29
29
|
exports.category = __importStar(require("./category"));
|
|
30
30
|
exports.family = __importStar(require("./family"));
|
|
31
|
+
exports.measurementFamily = __importStar(require("./measurement-family"));
|
|
31
32
|
exports.productModel = __importStar(require("./product-model"));
|
|
32
33
|
exports.product = __importStar(require("./product"));
|
|
33
34
|
exports.referenceEntity = __importStar(require("./reference-entity"));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { ListResponse, MeasurementFamily } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* @see https://api.akeneo.com/api-reference.html#measurement_families_get_list
|
|
5
|
+
*/
|
|
6
|
+
export declare const getAll: (http: AxiosInstance) => Promise<ListResponse<MeasurementFamily>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getAll = void 0;
|
|
7
|
+
const raw_1 = __importDefault(require("./raw"));
|
|
8
|
+
/**
|
|
9
|
+
* @see https://api.akeneo.com/api-reference.html#measurement_families_get_list
|
|
10
|
+
*/
|
|
11
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
12
|
+
const getAll = (http) => raw_1.default.get(http, `/api/rest/v1/measurement-families`, {
|
|
13
|
+
params: {},
|
|
14
|
+
});
|
|
15
|
+
exports.getAll = getAll;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -161,6 +161,9 @@ declare const getHttpClientWithEndpoint: (http: AxiosInstance) => {
|
|
|
161
161
|
query?: import("./types").FamilyVariantQueryParameters | undefined;
|
|
162
162
|
}) => Promise<import("./types").ListResponse<import("./types").Variant>>;
|
|
163
163
|
};
|
|
164
|
+
measurementFamily: {
|
|
165
|
+
getAll: (params: Record<string, any>) => Promise<import("./types").ListResponse<import("./types").MeasurementFamily>>;
|
|
166
|
+
};
|
|
164
167
|
};
|
|
165
168
|
/**
|
|
166
169
|
* Create a client instance
|
|
@@ -333,6 +336,9 @@ export declare const createClient: (params: ClientParams) => {
|
|
|
333
336
|
query?: import("./types").FamilyVariantQueryParameters | undefined;
|
|
334
337
|
}) => Promise<import("./types").ListResponse<import("./types").Variant>>;
|
|
335
338
|
};
|
|
339
|
+
measurementFamily: {
|
|
340
|
+
getAll: (params: Record<string, any>) => Promise<import("./types").ListResponse<import("./types").MeasurementFamily>>;
|
|
341
|
+
};
|
|
336
342
|
};
|
|
337
343
|
/**
|
|
338
344
|
* Create a client instance
|
|
@@ -502,6 +508,9 @@ export declare const createAppClient: (params: AppParams) => {
|
|
|
502
508
|
query?: import("./types").FamilyVariantQueryParameters | undefined;
|
|
503
509
|
}) => Promise<import("./types").ListResponse<import("./types").Variant>>;
|
|
504
510
|
};
|
|
511
|
+
measurementFamily: {
|
|
512
|
+
getAll: (params: Record<string, any>) => Promise<import("./types").ListResponse<import("./types").MeasurementFamily>>;
|
|
513
|
+
};
|
|
505
514
|
};
|
|
506
515
|
export type AkeneoClientAPI = ReturnType<typeof getHttpClientWithEndpoint>;
|
|
507
516
|
export * from './types';
|
package/dist/cjs/index.js
CHANGED
|
@@ -131,6 +131,9 @@ const getHttpClientWithEndpoint = (http) => ({
|
|
|
131
131
|
get: wrap(http, endpoints.family.get),
|
|
132
132
|
getVariants: wrap(http, endpoints.family.getVariants),
|
|
133
133
|
},
|
|
134
|
+
measurementFamily: {
|
|
135
|
+
getAll: wrap(http, endpoints.measurementFamily.getAll),
|
|
136
|
+
}
|
|
134
137
|
});
|
|
135
138
|
/**
|
|
136
139
|
* Create a client instance
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -249,4 +249,18 @@ export type Asset = {
|
|
|
249
249
|
code: string;
|
|
250
250
|
values: Record<string, ValuesRecord[]>;
|
|
251
251
|
};
|
|
252
|
+
export type MeasurementFamily = {
|
|
253
|
+
code: string;
|
|
254
|
+
labels: Record<string, string>;
|
|
255
|
+
standard_unit_code: string;
|
|
256
|
+
units: Record<string, {
|
|
257
|
+
code: string;
|
|
258
|
+
labels: Record<string, string>;
|
|
259
|
+
convert_from_standard?: Record<string, {
|
|
260
|
+
operator: string;
|
|
261
|
+
value: string;
|
|
262
|
+
}>;
|
|
263
|
+
symbol: string;
|
|
264
|
+
}>;
|
|
265
|
+
};
|
|
252
266
|
export {};
|
|
@@ -2,6 +2,7 @@ export * as assetFamily from './asset-family';
|
|
|
2
2
|
export * as attribute from './attribute';
|
|
3
3
|
export * as category from './category';
|
|
4
4
|
export * as family from './family';
|
|
5
|
+
export * as measurementFamily from './measurement-family';
|
|
5
6
|
export * as productModel from './product-model';
|
|
6
7
|
export * as product from './product';
|
|
7
8
|
export * as referenceEntity from './reference-entity';
|
|
@@ -2,6 +2,7 @@ export * as assetFamily from './asset-family';
|
|
|
2
2
|
export * as attribute from './attribute';
|
|
3
3
|
export * as category from './category';
|
|
4
4
|
export * as family from './family';
|
|
5
|
+
export * as measurementFamily from './measurement-family';
|
|
5
6
|
export * as productModel from './product-model';
|
|
6
7
|
export * as product from './product';
|
|
7
8
|
export * as referenceEntity from './reference-entity';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { ListResponse, MeasurementFamily } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* @see https://api.akeneo.com/api-reference.html#measurement_families_get_list
|
|
5
|
+
*/
|
|
6
|
+
export declare const getAll: (http: AxiosInstance) => Promise<ListResponse<MeasurementFamily>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import raw from './raw';
|
|
2
|
+
/**
|
|
3
|
+
* @see https://api.akeneo.com/api-reference.html#measurement_families_get_list
|
|
4
|
+
*/
|
|
5
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
6
|
+
export const getAll = (http) => raw.get(http, `/api/rest/v1/measurement-families`, {
|
|
7
|
+
params: {},
|
|
8
|
+
});
|
package/dist/mjs/index.d.ts
CHANGED
|
@@ -161,6 +161,9 @@ declare const getHttpClientWithEndpoint: (http: AxiosInstance) => {
|
|
|
161
161
|
query?: import("./types").FamilyVariantQueryParameters | undefined;
|
|
162
162
|
}) => Promise<import("./types").ListResponse<import("./types").Variant>>;
|
|
163
163
|
};
|
|
164
|
+
measurementFamily: {
|
|
165
|
+
getAll: (params: Record<string, any>) => Promise<import("./types").ListResponse<import("./types").MeasurementFamily>>;
|
|
166
|
+
};
|
|
164
167
|
};
|
|
165
168
|
/**
|
|
166
169
|
* Create a client instance
|
|
@@ -333,6 +336,9 @@ export declare const createClient: (params: ClientParams) => {
|
|
|
333
336
|
query?: import("./types").FamilyVariantQueryParameters | undefined;
|
|
334
337
|
}) => Promise<import("./types").ListResponse<import("./types").Variant>>;
|
|
335
338
|
};
|
|
339
|
+
measurementFamily: {
|
|
340
|
+
getAll: (params: Record<string, any>) => Promise<import("./types").ListResponse<import("./types").MeasurementFamily>>;
|
|
341
|
+
};
|
|
336
342
|
};
|
|
337
343
|
/**
|
|
338
344
|
* Create a client instance
|
|
@@ -502,6 +508,9 @@ export declare const createAppClient: (params: AppParams) => {
|
|
|
502
508
|
query?: import("./types").FamilyVariantQueryParameters | undefined;
|
|
503
509
|
}) => Promise<import("./types").ListResponse<import("./types").Variant>>;
|
|
504
510
|
};
|
|
511
|
+
measurementFamily: {
|
|
512
|
+
getAll: (params: Record<string, any>) => Promise<import("./types").ListResponse<import("./types").MeasurementFamily>>;
|
|
513
|
+
};
|
|
505
514
|
};
|
|
506
515
|
export type AkeneoClientAPI = ReturnType<typeof getHttpClientWithEndpoint>;
|
|
507
516
|
export * from './types';
|
package/dist/mjs/index.js
CHANGED
|
@@ -87,6 +87,9 @@ const getHttpClientWithEndpoint = (http) => ({
|
|
|
87
87
|
get: wrap(http, endpoints.family.get),
|
|
88
88
|
getVariants: wrap(http, endpoints.family.getVariants),
|
|
89
89
|
},
|
|
90
|
+
measurementFamily: {
|
|
91
|
+
getAll: wrap(http, endpoints.measurementFamily.getAll),
|
|
92
|
+
}
|
|
90
93
|
});
|
|
91
94
|
/**
|
|
92
95
|
* Create a client instance
|
package/dist/mjs/types.d.ts
CHANGED
|
@@ -249,4 +249,18 @@ export type Asset = {
|
|
|
249
249
|
code: string;
|
|
250
250
|
values: Record<string, ValuesRecord[]>;
|
|
251
251
|
};
|
|
252
|
+
export type MeasurementFamily = {
|
|
253
|
+
code: string;
|
|
254
|
+
labels: Record<string, string>;
|
|
255
|
+
standard_unit_code: string;
|
|
256
|
+
units: Record<string, {
|
|
257
|
+
code: string;
|
|
258
|
+
labels: Record<string, string>;
|
|
259
|
+
convert_from_standard?: Record<string, {
|
|
260
|
+
operator: string;
|
|
261
|
+
value: string;
|
|
262
|
+
}>;
|
|
263
|
+
symbol: string;
|
|
264
|
+
}>;
|
|
265
|
+
};
|
|
252
266
|
export {};
|