Skip to content

Commit

Permalink
Merge branch 'master' of github.com:craftzing/node-akeneo-api
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellknapen committed Nov 8, 2022
2 parents dcd3c40 + 2d8f441 commit 879d3b2
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 22 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/endpoints/asset-family.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ describe('Asset Family', () => {
expect(axios.get).toBeCalledWith('/api/rest/v1/asset-families', {
params: {
limit: 100,
page: 1,
with_count: true,
},
});
expect(assetFamilies).toHaveLength(1);
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/asset-family.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const getAll = (
http: AxiosInstance,
{ query }: { query?: AssetFamilyQueryParameters },
): Promise<ListResponse & { items: AssetFamily[] }> =>
raw.getAllByPage(http, `/api/rest/v1/asset-families`, {
raw.getAllBySearchAfter(http, `/api/rest/v1/asset-families`, {
params: query,
});
/**
Expand Down
6 changes: 1 addition & 5 deletions src/endpoints/attribute.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ describe('Attribute', () => {
expect(axios.get).toBeCalledWith('/api/rest/v1/attributes', {
params: {
limit: 100,
page: 1,
with_count: true,
},
});
expect(attributes).toHaveLength(1);
Expand All @@ -96,8 +94,6 @@ describe('Attribute', () => {
{
params: {
limit: 100,
page: 1,
with_count: true,
},
},
);
Expand All @@ -118,7 +114,7 @@ describe('Attribute', () => {
expect(axios.get).toBeCalledWith(
'/api/rest/v1/attributes/back_material/options',
{
params: { limit: 100, page: 1, with_count: true },
params: { limit: 100, },
},
);
expect(attributes).toHaveLength(1);
Expand Down
4 changes: 2 additions & 2 deletions src/endpoints/attribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const getAll = (
http: AxiosInstance,
{ query = {} }: { query?: AttributeQueryParameters },
): Promise<ListResponse & { items: Attribute[] }> =>
raw.getAllByPage(http, `/api/rest/v1/attributes`, {
raw.getAllBySearchAfter(http, `/api/rest/v1/attributes`, {
params: query,
});

Expand All @@ -52,6 +52,6 @@ export const getOptions = (
query,
}: { attributeCode: string; query?: AttributeOptionQueryParameters },
): Promise<ListResponse & { items: AttributeOption[] }> =>
raw.getAllByPage(http, `/api/rest/v1/attributes/${attributeCode}/options`, {
raw.getAllBySearchAfter(http, `/api/rest/v1/attributes/${attributeCode}/options`, {
params: query,
});
2 changes: 0 additions & 2 deletions src/endpoints/category.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ describe('Category', () => {
expect(axios.get).toBeCalledWith('/api/rest/v1/categories', {
params: {
limit: 100,
page: 1,
with_count: true,
},
});
expect(categories).toHaveLength(1);
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export const getAll = (
http: AxiosInstance,
params: { query?: CategoryQueryParameters },
): Promise<ListResponse & { items: Category[] }> =>
raw.getAllByPage(http, `/api/rest/v1/categories`, {
raw.getAllBySearchAfter(http, `/api/rest/v1/categories`, {
params,
});
4 changes: 1 addition & 3 deletions src/endpoints/product-model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ describe('Product Model', () => {
expect(axios.get).toBeCalledWith('/api/rest/v1/product-models', {
params: {
limit: 100,
page: 1,
with_count: true,
},
});
expect(products).toHaveLength(2);
expect(products).toHaveLength(1);
});
});
2 changes: 1 addition & 1 deletion src/endpoints/product-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ export const getAll = (
http: AxiosInstance,
{ query }: { query?: ProductModelQueryParameters },
): Promise<ListResponse & { items: ProductModel[] }> =>
raw.getAllByPage(http, `/api/rest/v1/product-models`, {
raw.getAllBySearchAfter(http, `/api/rest/v1/product-models`, {
params: query,
});
2 changes: 0 additions & 2 deletions src/endpoints/product.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ describe('Product', () => {
expect(axios.get).toBeCalledWith('/api/rest/v1/products', {
params: {
limit: 100,
page: 1,
with_count: true,
},
});
expect(products).toHaveLength(1);
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ export const getAll = (
http: AxiosInstance,
{ query = {} }: { query?: ProductQueryParameters },
): Promise<ListResponse & { items: Product[] }> =>
raw.getAllByPage(http, `/api/rest/v1/products`, {
raw.getAllBySearchAfter(http, `/api/rest/v1/products`, {
params: query,
});

0 comments on commit 879d3b2

Please sign in to comment.