@dataggo/node-akeneo-api 1.3.0 → 1.4.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/measurement-family.js +1 -1
- package/dist/cjs/endpoints/raw.d.ts +1 -0
- package/dist/cjs/endpoints/raw.js +10 -0
- package/dist/cjs/types.d.ts +1 -0
- package/dist/mjs/endpoints/measurement-family.js +1 -1
- package/dist/mjs/endpoints/raw.d.ts +1 -0
- package/dist/mjs/endpoints/raw.js +12 -0
- package/dist/mjs/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ const raw_1 = __importDefault(require("./raw"));
|
|
|
9
9
|
* @see https://api.akeneo.com/api-reference.html#measurement_families_get_list
|
|
10
10
|
*/
|
|
11
11
|
// eslint-disable-next-line import/prefer-default-export
|
|
12
|
-
const getAll = (http) => raw_1.default.
|
|
12
|
+
const getAll = (http) => raw_1.default.getAllNoPagination(http, `/api/rest/v1/measurement-families`, {
|
|
13
13
|
params: {},
|
|
14
14
|
});
|
|
15
15
|
exports.getAll = getAll;
|
|
@@ -4,6 +4,7 @@ declare const _default: {
|
|
|
4
4
|
get: (http: AxiosInstance, url: string, config: AxiosRequestConfig) => Promise<ListResponse<any> & {
|
|
5
5
|
_links: any;
|
|
6
6
|
}>;
|
|
7
|
+
getAllNoPagination: (http: AxiosInstance, url: string, config: AxiosRequestConfig) => Promise<ListResponse<any>>;
|
|
7
8
|
getOne: (http: AxiosInstance, url: string, config?: AxiosRequestConfig) => Promise<any>;
|
|
8
9
|
getAllByPage: (http: AxiosInstance, url: string, { params }: AxiosRequestConfig) => Promise<ListResponse<any>>;
|
|
9
10
|
getAllBySearchAfter: (http: AxiosInstance, url: string, config?: AxiosRequestConfig) => Promise<ListResponse<any>>;
|
|
@@ -46,6 +46,16 @@ exports.default = {
|
|
|
46
46
|
return Object.assign(Object.assign(Object.assign({}, (data.current_page ? { current_page: data.current_page } : {})), (data.items_count ? { items_count: data.items_count } : {})), { items: data._embedded.items, _links: data._links });
|
|
47
47
|
}, error_handler_1.default);
|
|
48
48
|
},
|
|
49
|
+
getAllNoPagination: function getAllNoPagination(http, url, config) {
|
|
50
|
+
return http
|
|
51
|
+
.get(url, Object.assign({}, config))
|
|
52
|
+
.then((response) => {
|
|
53
|
+
const { data } = response;
|
|
54
|
+
return {
|
|
55
|
+
items: data,
|
|
56
|
+
};
|
|
57
|
+
}, error_handler_1.default);
|
|
58
|
+
},
|
|
49
59
|
getOne: function getOne(http, url, config) {
|
|
50
60
|
return http
|
|
51
61
|
.get(url, Object.assign({}, config))
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import raw from './raw';
|
|
|
3
3
|
* @see https://api.akeneo.com/api-reference.html#measurement_families_get_list
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line import/prefer-default-export
|
|
6
|
-
export const getAll = (http) => raw.
|
|
6
|
+
export const getAll = (http) => raw.getAllNoPagination(http, `/api/rest/v1/measurement-families`, {
|
|
7
7
|
params: {},
|
|
8
8
|
});
|
|
@@ -4,6 +4,7 @@ declare const _default: {
|
|
|
4
4
|
get: (http: AxiosInstance, url: string, config: AxiosRequestConfig) => Promise<ListResponse<any> & {
|
|
5
5
|
_links: any;
|
|
6
6
|
}>;
|
|
7
|
+
getAllNoPagination: (http: AxiosInstance, url: string, config: AxiosRequestConfig) => Promise<ListResponse<any>>;
|
|
7
8
|
getOne: (http: AxiosInstance, url: string, config?: AxiosRequestConfig) => Promise<any>;
|
|
8
9
|
getAllByPage: (http: AxiosInstance, url: string, { params }: AxiosRequestConfig) => Promise<ListResponse<any>>;
|
|
9
10
|
getAllBySearchAfter: (http: AxiosInstance, url: string, config?: AxiosRequestConfig) => Promise<ListResponse<any>>;
|
|
@@ -16,6 +16,18 @@ export default {
|
|
|
16
16
|
};
|
|
17
17
|
}, errorHandler);
|
|
18
18
|
},
|
|
19
|
+
getAllNoPagination: function getAllNoPagination(http, url, config) {
|
|
20
|
+
return http
|
|
21
|
+
.get(url, {
|
|
22
|
+
...config,
|
|
23
|
+
})
|
|
24
|
+
.then((response) => {
|
|
25
|
+
const { data } = response;
|
|
26
|
+
return {
|
|
27
|
+
items: data,
|
|
28
|
+
};
|
|
29
|
+
}, errorHandler);
|
|
30
|
+
},
|
|
19
31
|
getOne: function getOne(http, url, config) {
|
|
20
32
|
return http
|
|
21
33
|
.get(url, {
|
package/dist/mjs/types.d.ts
CHANGED