@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.
@@ -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.get(http, `/api/rest/v1/measurement-families`, {
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))
@@ -74,6 +74,7 @@ export type AttributeQueryParameters = {
74
74
  search?: string;
75
75
  page?: number;
76
76
  limit?: number;
77
+ with_table_select_options?: boolean;
77
78
  with_count?: boolean;
78
79
  };
79
80
  export type AttributeOptionQueryParameters = {
@@ -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.get(http, `/api/rest/v1/measurement-families`, {
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, {
@@ -74,6 +74,7 @@ export type AttributeQueryParameters = {
74
74
  search?: string;
75
75
  page?: number;
76
76
  limit?: number;
77
+ with_table_select_options?: boolean;
77
78
  with_count?: boolean;
78
79
  };
79
80
  export type AttributeOptionQueryParameters = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataggo/node-akeneo-api",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "A Node Rest Client for the Akeneo PIM",
5
5
  "author": "Dataggo <contact@dataggo>",
6
6
  "license": "MIT",