Skip to content

Commit

Permalink
adapt to the API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmt-kirill committed Dec 5, 2024
1 parent 39d40fa commit 9fa4dc8
Show file tree
Hide file tree
Showing 17 changed files with 4,495 additions and 4,291 deletions.
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.2.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs
yarnPath: .yarn/releases/yarn-4.5.3.cjs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"ts-node": "10.9.1",
"typescript": "~5.3.2"
},
"packageManager": "yarn@4.0.2",
"packageManager": "yarn@4.5.3",
"dependencies": {
"@commercetools/platform-sdk": "^4.11.0",
"@commercetools/sdk-client-v2": "^2.3.0",
Expand Down
9 changes: 5 additions & 4 deletions packages/commercetools-product-import/src/lib/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Transformer,
TransformerFunction,
} from '@rmt-sdk-ts/rmt-product-import';
import { ProductResponse } from '@rmt-sdk-ts/rmt-product-service';

export class CtpTransformer implements Transformer {
protected locale: string;
Expand Down Expand Up @@ -57,9 +58,9 @@ export class CtpTransformer implements Transformer {

const categories = Array.isArray(ctpCategories)
? ctpCategories.map((c) => ({
category_key: c.id,
category_name: this.categories.get(c.id) || undefined,
}))
category_key: c.id,
category_name: this.categories.get(c.id) || undefined,
}))
: undefined;

const status = published ? 'ACTIVE' : 'ARCHIVED';
Expand All @@ -73,7 +74,7 @@ export class CtpTransformer implements Transformer {
image_url: imageUrl,
brand,
categories,
},
} as ProductResponse,
status,
},
];
Expand Down
Loading

0 comments on commit 9fa4dc8

Please sign in to comment.