@colijnit/ioneconnector 1.0.130 → 1.0.134

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.
@@ -427,7 +427,7 @@ class Connector {
427
427
  return new Promise((resolve, reject) => {
428
428
  this.connection.getFrozenArticle(configuratorStatistics)
429
429
  .then((result) => {
430
- resolve(JSON.stringify(this.getMappedFrozenArticle(result.data.resultObject)));
430
+ resolve(JSON.stringify(result));
431
431
  })
432
432
  .catch((e) => {
433
433
  reject(e);
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const connector_1 = require("./connector");
4
4
  const selection_1 = require("./model/selection");
5
5
  const node_type_enum_1 = require("./enum/node-type.enum");
6
+ const selector_article_1 = require("./model/selector-article");
7
+ const business_object_factory_1 = require("./service/business-object-factory");
8
+ const map_property_decorator_1 = require("./factory/decorators/map-property.decorator");
6
9
  const options = {
7
10
  url: 'http'
8
11
  };
@@ -11,6 +14,58 @@ describe("Connector", () => {
11
14
  beforeEach(() => {
12
15
  connector = new connector_1.Connector(options);
13
16
  });
17
+ it('checkMapProperty', () => {
18
+ const raw = {
19
+ "compositionGoodId": 28847372,
20
+ "sequence": 1,
21
+ "articleNr": "1000561899",
22
+ "mutationPrice": 0,
23
+ "salesPrice": 719.94,
24
+ "CompositeArticleNo": "1000561898",
25
+ "currencyCodePurchase": "EUR",
26
+ "selectorMaxNodeId": 136,
27
+ "CompositeDescription": "Elixir Modular Sofa",
28
+ "excluded": false,
29
+ "articleNoSupplier": "111",
30
+ "barcode": "1234567893341",
31
+ "freeInputConfigurationText": "Stofkeuze: Stof River, Stof Gr1 River Sand-2;\nGuardsmen 5 Year protection plan: Yes;\nLeft element: Elixir 1 Seater Modular Unit with LHF Arm, ;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nRecliner: Overslaan;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes;\nLeft middle element: Elixir 1 Seater Armless Modular Unit, ;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nRecliner: Overslaan;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes;\nCorner element: Elixir Corner Unit, ;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nRecliner: Overslaan;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes;\nRight middle element: Elixir 1.5 Seater Modular Unit , ;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nRecliner: Overslaan;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes;\nRight element: Elixir 1 Seater Modular Unit with RHF Arm, ;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nRecliner: Overslaan;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes",
32
+ "standardDeliveryTimePurchase": 12,
33
+ "selectorMinNodeId": 3,
34
+ "representedArticle": true,
35
+ "goodId": 28847377,
36
+ "suggestedPrice": 1500,
37
+ "isFreeCommissionCode": true,
38
+ "purchaseDescription": "Elixir Modular Sofa",
39
+ "pricelistCode": "x106",
40
+ "descriptionEditable": true,
41
+ "isStockArticle": false,
42
+ "configurationText": "Stofkeuze: Stof River, Stof Gr1 River Sand-2;\nGuardsmen 5 Year protection plan: Yes;\nLeft element: Elixir 1 Seater Modular Unit with LHF Arm;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes;\nLeft middle element: Elixir 1 Seater Armless Modular Unit;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes;\nCorner element: Elixir Corner Unit;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes;\nRight middle element: Elixir 1.5 Seater Modular Unit ;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes;\nRight element: Elixir 1 Seater Modular Unit with RHF Arm;\nStofkeuze: Stof Bready, Stof Gr1 Bready Antracite;\nFoot options: Metal;\nGuardsmen 5 Year protection plan: Yes",
43
+ "isLocationArticle": true,
44
+ "CompositeSupplementDescription": "Dit is een aanvullende omschrijving",
45
+ "turnOverGroup": "232",
46
+ "amount": 1,
47
+ "articleDescription": "Elixir Modular Sofa",
48
+ "hashCodeID": "FA19520ECA88BB8AEAC1D6CF80EBF9B944CE9F03",
49
+ "hashCodeEAN": "859451B4B79CF782C6CBB8F1B4161B48D9632782",
50
+ "freePrice": true,
51
+ "goodType": "E",
52
+ "vatCodePurchase": 1,
53
+ "inOutCollection": "IN",
54
+ "selectorMinArtSeq": 1,
55
+ "VatCode": 3,
56
+ "articleSupplementDescription": "Dit is een aanvullende omschrijving",
57
+ "combined": true,
58
+ "currencyCode": "EUR",
59
+ "branchNo": "1"
60
+ };
61
+ const boFactory = new business_object_factory_1.BusinessObjectFactory();
62
+ const article = boFactory.makeWithRawBackendData(selector_article_1.SelectorArticle, raw);
63
+ expect(article.compositionArticleNo).toBeDefined();
64
+ });
65
+ it('checkMapDecorator', () => {
66
+ const isMap = map_property_decorator_1.MapPropertyDecorator.IsMapProperty(selector_article_1.SelectorArticle.prototype, 'CompositeArticleNo');
67
+ expect(isMap).toBeTruthy();
68
+ });
14
69
  it('getSelectionsToDisplay_shouldHideSelectionIfParentPublicationCodeIsNull', () => {
15
70
  const question = new selection_1.Selection();
16
71
  question.presentationLevel = 1;
@@ -7,6 +7,9 @@ function MapProperty(propName) {
7
7
  if (!target || !propertyKey) {
8
8
  return;
9
9
  }
10
+ if (!target.hasOwnProperty(propertyKey)) {
11
+ target[propertyKey] = undefined;
12
+ }
10
13
  Reflect.defineMetadata(PROP_META_KEY, propName, target, propertyKey);
11
14
  };
12
15
  }
@@ -74,6 +74,7 @@ export declare class Answer extends BusinessObject {
74
74
  parentArticleDecoId: any;
75
75
  useNextCombNode: boolean;
76
76
  treeLevel: any;
77
+ nodeLinkedText: string;
77
78
  isGroupHeader: boolean;
78
79
  imageData: string;
79
80
  instanceId: string;
@@ -33,6 +33,7 @@ class Answer extends business_object_1.BusinessObject {
33
33
  this.tagsOptions = [];
34
34
  this.nodeId = null;
35
35
  this.decoId = null;
36
+ this.price = null;
36
37
  this.answer = null;
37
38
  this.commercialAnswer = null;
38
39
  this.type = null;
@@ -51,6 +52,7 @@ class Answer extends business_object_1.BusinessObject {
51
52
  this.parentArticleDecoId = null;
52
53
  this.useNextCombNode = false;
53
54
  this.treeLevel = null;
55
+ this.nodeLinkedText = null;
54
56
  this.isGroupHeader = false;
55
57
  }
56
58
  _customPostProcessSelfFromRawData(rawData, nodeHierarchyLevelOffset = 0) {
@@ -116,6 +118,10 @@ __decorate([
116
118
  map_property_decorator_1.MapProperty("selDecoId"),
117
119
  __metadata("design:type", Object)
118
120
  ], Answer.prototype, "decoId", void 0);
121
+ __decorate([
122
+ map_property_decorator_1.MapProperty("salesAdditionalPrice"),
123
+ __metadata("design:type", Number)
124
+ ], Answer.prototype, "price", void 0);
119
125
  __decorate([
120
126
  map_property_decorator_1.MapProperty("nodeText"),
121
127
  __metadata("design:type", String)
@@ -4,11 +4,14 @@ import { HdecoPlacement } from "../enum/hdeco-placement.enum";
4
4
  import { HdecoPositioning } from "../enum/hdeco-positioning.enum";
5
5
  export declare class Article extends BusinessObject {
6
6
  assetUrl: string;
7
+ connectors: any[];
8
+ contentDeliveryUrl: string;
7
9
  description: string;
8
10
  extraDescription: string;
9
- contentDeliveryUrl: string;
10
11
  threeDObjectName: string;
12
+ hdObjectName: string;
11
13
  id: string;
14
+ fromPrice: number;
12
15
  goodType: string;
13
16
  distId: string;
14
17
  distSchema: string;
@@ -16,12 +19,15 @@ export declare class Article extends BusinessObject {
16
19
  composition: boolean;
17
20
  name: string;
18
21
  price: number;
22
+ recprice: number;
23
+ pdescription: string;
19
24
  relatedArticles: any[];
20
25
  rendersAvailable: boolean;
21
26
  texts: any[];
22
27
  defaultHeight: number;
23
28
  defaultHeightAdjustable: boolean;
24
29
  positioning: HdecoPositioning;
30
+ type: string;
25
31
  placement: HdecoPlacement;
26
32
  canRotate: number;
27
33
  stackable: boolean;
@@ -20,11 +20,14 @@ class Article extends business_object_1.BusinessObject {
20
20
  constructor(rawData = {}) {
21
21
  super();
22
22
  this.assetUrl = null;
23
+ this.connectors = [];
24
+ this.contentDeliveryUrl = null;
23
25
  this.description = null;
24
26
  this.extraDescription = null;
25
- this.contentDeliveryUrl = null;
26
27
  this.threeDObjectName = null;
28
+ this.hdObjectName = null;
27
29
  this.id = null;
30
+ this.fromPrice = null;
28
31
  this.goodType = null;
29
32
  this.distId = null;
30
33
  this.distSchema = null;
@@ -32,12 +35,15 @@ class Article extends business_object_1.BusinessObject {
32
35
  this.composition = null;
33
36
  this.name = null;
34
37
  this.price = null;
38
+ this.recprice = null;
39
+ this.pdescription = null;
35
40
  this.relatedArticles = [];
36
41
  this.rendersAvailable = null;
37
42
  this.texts = [];
38
43
  this.defaultHeight = null;
39
44
  this.defaultHeightAdjustable = null;
40
45
  this.positioning = null;
46
+ this.type = null;
41
47
  this.placement = null;
42
48
  this.canRotate = null;
43
49
  this.stackable = null;
@@ -65,6 +71,10 @@ __decorate([
65
71
  map_property_decorator_1.MapProperty("gameObjectName"),
66
72
  __metadata("design:type", String)
67
73
  ], Article.prototype, "threeDObjectName", void 0);
74
+ __decorate([
75
+ map_property_decorator_1.MapProperty("hdecoGameObject"),
76
+ __metadata("design:type", String)
77
+ ], Article.prototype, "hdObjectName", void 0);
68
78
  __decorate([
69
79
  map_property_decorator_1.MapProperty("goodId"),
70
80
  __metadata("design:type", String)
@@ -96,6 +106,10 @@ __decorate([
96
106
  map_property_decorator_1.MapProperty("hdecoPositioning"),
97
107
  __metadata("design:type", String)
98
108
  ], Article.prototype, "positioning", void 0);
109
+ __decorate([
110
+ map_property_decorator_1.MapProperty("hdecoType"),
111
+ __metadata("design:type", String)
112
+ ], Article.prototype, "type", void 0);
99
113
  __decorate([
100
114
  map_property_decorator_1.MapProperty("homePlacement"),
101
115
  __metadata("design:type", Number)
@@ -10,5 +10,57 @@ export declare class FrozenArticle extends BusinessObject {
10
10
  articleName: string;
11
11
  configurationText: string;
12
12
  compositions: FrozenArticleComposition[];
13
+ compositeSeqenceNo: string;
14
+ goodId: string;
15
+ frozenArticleNr: string;
16
+ articleDescription: string;
17
+ articleSupplementDescription: string;
18
+ name: string;
19
+ amount: number;
20
+ surcharcheReductionPriceSales: number;
21
+ suggestedPrice: number;
22
+ currencyCode: string;
23
+ currencyCodePurchase: string;
24
+ pricelistCode: string;
25
+ branchNo: string;
26
+ partGoodId: number;
27
+ selectorMinNodeId: number;
28
+ selectorMaxNodeId: number;
29
+ selectorMinArtSeq: number;
30
+ representedArticle: string;
31
+ excluded: string;
32
+ isStockArticle: string;
33
+ isLocationArticle: string;
34
+ purchaseDescription: string;
35
+ shippingCost: number;
36
+ customsCost: number;
37
+ portCost: number;
38
+ additionalCost: number;
39
+ productionCost: number;
40
+ shippingCurrency: string;
41
+ currencyCodeCustoms: string;
42
+ portCurrency: string;
43
+ additionalCurrency: string;
44
+ productionCurrency: string;
45
+ articleNoSupplier: string;
46
+ barcode: string;
47
+ hashCodeEAN: string;
48
+ standardDeliveryTimeSales: number;
49
+ standardDeliveryTimePurchase: number;
50
+ unitIdSales: string;
51
+ unitIdPurchase: string;
52
+ standardCommissionCode: string;
53
+ isFreeCommissionCode: string;
54
+ inOutCollection: string;
55
+ superArtId: string;
56
+ turnOverGroup: string;
57
+ freeInputConfigurationText: string;
58
+ freePrice: string;
59
+ descriptionEditable: string;
60
+ hashCodeID: string;
61
+ vatCodePurchase: number;
62
+ goodType: string;
63
+ combined: string;
64
+ weight: number;
13
65
  constructor(rawData?: any);
14
66
  }
@@ -58,4 +58,16 @@ __decorate([
58
58
  map_property_decorator_1.MapProperty("configurationText"),
59
59
  __metadata("design:type", String)
60
60
  ], FrozenArticle.prototype, "configurationText", void 0);
61
+ __decorate([
62
+ map_property_decorator_1.MapProperty("CompositeSeqenceNo"),
63
+ __metadata("design:type", String)
64
+ ], FrozenArticle.prototype, "compositeSeqenceNo", void 0);
65
+ __decorate([
66
+ map_property_decorator_1.MapProperty("articleNo"),
67
+ __metadata("design:type", String)
68
+ ], FrozenArticle.prototype, "frozenArticleNr", void 0);
69
+ __decorate([
70
+ map_property_decorator_1.MapProperty("articleName"),
71
+ __metadata("design:type", String)
72
+ ], FrozenArticle.prototype, "name", void 0);
61
73
  exports.FrozenArticle = FrozenArticle;
@@ -9,11 +9,15 @@ export declare class Selection extends BusinessObject {
9
9
  assetUrl: string;
10
10
  amountInComposition: number;
11
11
  artSelGoodId: number;
12
+ artCostPrice: number;
12
13
  artMountingPrice: number;
14
+ artOptId: number;
13
15
  artSelSeq: number;
14
16
  brandId: string;
17
+ totalCostPrice: number;
15
18
  totalMountingPrice: number;
16
19
  articleDescription: string;
20
+ articleNumber: string;
17
21
  colorCodeString: string;
18
22
  connectorArticle: string;
19
23
  defaultNumber: any;
@@ -25,6 +29,10 @@ export declare class Selection extends BusinessObject {
25
29
  gameObject: string;
26
30
  imgUrl: string;
27
31
  inquireNbrMode: string;
32
+ referenceArticle: string;
33
+ referenceNode: string;
34
+ weightArticle: number;
35
+ weightNode: number;
28
36
  hashCheck: boolean;
29
37
  nodeId: number;
30
38
  colors: any[];
@@ -87,6 +95,7 @@ export declare class Selection extends BusinessObject {
87
95
  hdecoType: string;
88
96
  hdecoPositioning: HdecoPositioning;
89
97
  supplierArticleNr: string;
98
+ supplierArticleNrNode: string;
90
99
  tagArrayOpt: Tag[];
91
100
  optCategory: string;
92
101
  opvCategory: string;
@@ -61,6 +61,7 @@ class Selection extends business_object_1.BusinessObject {
61
61
  this.hdecoType = null;
62
62
  this.hdecoPositioning = null;
63
63
  this.supplierArticleNr = null;
64
+ this.supplierArticleNrNode = null;
64
65
  this.tagArrayOpt = [];
65
66
  this.setOwnMappedPropsFromRawData(rawData);
66
67
  }
@@ -180,6 +181,10 @@ __decorate([
180
181
  map_property_decorator_1.MapProperty("supplierArticleNo"),
181
182
  __metadata("design:type", String)
182
183
  ], Selection.prototype, "supplierArticleNr", void 0);
184
+ __decorate([
185
+ map_property_decorator_1.MapProperty("supplierArticleNoNode"),
186
+ __metadata("design:type", String)
187
+ ], Selection.prototype, "supplierArticleNrNode", void 0);
183
188
  __decorate([
184
189
  json_decorator_1.JsonField(),
185
190
  complex_array_decorator_1.ComplexArray(tag_1.Tag),
@@ -0,0 +1,64 @@
1
+ import { BusinessObject } from "./business-object";
2
+ export declare class SelectorArticle extends BusinessObject {
3
+ compositionGoodId: number;
4
+ compositionArticleNo: string;
5
+ compositionDescription: string;
6
+ compositionSupplementDescription: string;
7
+ compositionArticleName: string;
8
+ sequence: string;
9
+ goodId: number;
10
+ articleNr: string;
11
+ articleDescription: string;
12
+ articleSupplementDescription: string;
13
+ compositions: SelectorArticle[];
14
+ articleName: string;
15
+ amount: number;
16
+ salesPrice: number;
17
+ mutationPrice: number;
18
+ suggestedPrice: number;
19
+ vatCode: number;
20
+ currencyCode: string;
21
+ currencyCodePurchase: string;
22
+ pricelistCode: string;
23
+ branchNo: string;
24
+ configurationText: string;
25
+ partGoodId: number;
26
+ selectorMinNodeId: number;
27
+ selectorMaxNodeId: number;
28
+ selectorMinArtSeq: number;
29
+ representedArticle: boolean;
30
+ excluded: boolean;
31
+ isStockArticle: boolean;
32
+ isLocationArticle: boolean;
33
+ purchaseDescription: string;
34
+ shippingCost: number;
35
+ customsCost: number;
36
+ portCost: number;
37
+ additionalCost: number;
38
+ productionCost: number;
39
+ shippingCurrency: string;
40
+ currencyCodeCustoms: string;
41
+ portCurrency: string;
42
+ additionalCurrency: string;
43
+ productionCurrency: string;
44
+ articleNoSupplier: string;
45
+ barcode: string;
46
+ hashCodeEAN: string;
47
+ standardDeliveryTimeSales: number;
48
+ standardDeliveryTimePurchase: number;
49
+ unitIdSales: string;
50
+ unitIdPurchase: string;
51
+ standardCommissionCode: boolean;
52
+ isFreeCommissionCode: boolean;
53
+ inOutCollection: string;
54
+ superArtId: string;
55
+ turnOverGroup: string;
56
+ freeInputConfigurationText: string;
57
+ freePrice: boolean;
58
+ descriptionEditable: boolean;
59
+ hashCodeID: string;
60
+ vatCodePurchase: number;
61
+ goodType: string;
62
+ combined: boolean;
63
+ weight: number;
64
+ }
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const business_object_1 = require("./business-object");
13
+ const boolean_decorator_1 = require("../factory/decorators/boolean.decorator");
14
+ const map_property_decorator_1 = require("../factory/decorators/map-property.decorator");
15
+ class SelectorArticle extends business_object_1.BusinessObject {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.compositionGoodId = null;
19
+ this.compositionArticleNo = null;
20
+ this.compositionDescription = null;
21
+ this.compositionSupplementDescription = null;
22
+ this.compositionArticleName = null;
23
+ this.sequence = null;
24
+ this.articleNr = null;
25
+ this.mutationPrice = null;
26
+ this.vatCode = null;
27
+ }
28
+ }
29
+ __decorate([
30
+ map_property_decorator_1.MapProperty("CompositeGoodId"),
31
+ __metadata("design:type", Number)
32
+ ], SelectorArticle.prototype, "compositionGoodId", void 0);
33
+ __decorate([
34
+ map_property_decorator_1.MapProperty("CompositeArticleNo"),
35
+ __metadata("design:type", String)
36
+ ], SelectorArticle.prototype, "compositionArticleNo", void 0);
37
+ __decorate([
38
+ map_property_decorator_1.MapProperty("CompositeDescription"),
39
+ __metadata("design:type", String)
40
+ ], SelectorArticle.prototype, "compositionDescription", void 0);
41
+ __decorate([
42
+ map_property_decorator_1.MapProperty("CompositeSupplementDescription"),
43
+ __metadata("design:type", String)
44
+ ], SelectorArticle.prototype, "compositionSupplementDescription", void 0);
45
+ __decorate([
46
+ map_property_decorator_1.MapProperty("CompositeArticleName"),
47
+ __metadata("design:type", String)
48
+ ], SelectorArticle.prototype, "compositionArticleName", void 0);
49
+ __decorate([
50
+ map_property_decorator_1.MapProperty("CompositeSeqenceNo"),
51
+ __metadata("design:type", String)
52
+ ], SelectorArticle.prototype, "sequence", void 0);
53
+ __decorate([
54
+ map_property_decorator_1.MapProperty("articleNo"),
55
+ __metadata("design:type", String)
56
+ ], SelectorArticle.prototype, "articleNr", void 0);
57
+ __decorate([
58
+ map_property_decorator_1.MapProperty("surcharcheReductionPriceSales"),
59
+ __metadata("design:type", Number)
60
+ ], SelectorArticle.prototype, "mutationPrice", void 0);
61
+ __decorate([
62
+ map_property_decorator_1.MapProperty("VatCode"),
63
+ __metadata("design:type", Number)
64
+ ], SelectorArticle.prototype, "vatCode", void 0);
65
+ __decorate([
66
+ boolean_decorator_1.BooleanText('T'),
67
+ __metadata("design:type", Boolean)
68
+ ], SelectorArticle.prototype, "representedArticle", void 0);
69
+ __decorate([
70
+ boolean_decorator_1.BooleanText('T'),
71
+ __metadata("design:type", Boolean)
72
+ ], SelectorArticle.prototype, "excluded", void 0);
73
+ __decorate([
74
+ boolean_decorator_1.BooleanText('T'),
75
+ __metadata("design:type", Boolean)
76
+ ], SelectorArticle.prototype, "isStockArticle", void 0);
77
+ __decorate([
78
+ boolean_decorator_1.BooleanText('T'),
79
+ __metadata("design:type", Boolean)
80
+ ], SelectorArticle.prototype, "isLocationArticle", void 0);
81
+ __decorate([
82
+ boolean_decorator_1.BooleanText('T'),
83
+ __metadata("design:type", Boolean)
84
+ ], SelectorArticle.prototype, "standardCommissionCode", void 0);
85
+ __decorate([
86
+ boolean_decorator_1.BooleanText('T'),
87
+ __metadata("design:type", Boolean)
88
+ ], SelectorArticle.prototype, "isFreeCommissionCode", void 0);
89
+ __decorate([
90
+ boolean_decorator_1.BooleanText('T'),
91
+ __metadata("design:type", Boolean)
92
+ ], SelectorArticle.prototype, "freePrice", void 0);
93
+ __decorate([
94
+ boolean_decorator_1.BooleanText('T'),
95
+ __metadata("design:type", Boolean)
96
+ ], SelectorArticle.prototype, "descriptionEditable", void 0);
97
+ __decorate([
98
+ boolean_decorator_1.BooleanText('T'),
99
+ __metadata("design:type", Boolean)
100
+ ], SelectorArticle.prototype, "combined", void 0);
101
+ exports.SelectorArticle = SelectorArticle;
@@ -1,26 +1,26 @@
1
- import { Article } from '../model/article';
2
- import { Options } from '../model/options';
3
- import { ExternalStorage } from '../model/external-storage';
4
- import { ArticleListObjectExtended } from '../model/article-list-object-extended';
5
- import { GetArticlesForCatalogRequest } from '../model/get-articles-for-catalog';
6
- import { DataServiceResponseRoot } from '../model/data-service-response-root';
7
- import { PagingParameters } from '../model/paging-parameters';
8
- import { BaseBackendConnectionService } from './base-backend-connection.service';
9
- import { Subject } from 'rxjs';
10
- import { ArticleCategory } from '../model/article-category';
11
- import { ArticleGroupImage } from '../model/article-group-image';
12
- import { TurnoverGroupImage } from '../model/turnover-group-image';
13
- import { SuperArticleImage } from '../model/super-article-image';
14
- import { Tag } from '../model/tag';
15
- import { Color } from '../model/color';
16
- import { Design } from '../model/design';
17
- import { Material } from '../model/material';
18
- import { Brand } from '../model/brand';
19
- import { Catalog } from '../catalog';
20
- import { Atmosphere } from '../model/atmosphere';
21
- import { ArticlePrice } from '../model/article-price';
22
- import { ArticleFullObject } from '../model/article-full-object';
23
- import { Session } from '../model/session';
1
+ import { Article } from "../model/article";
2
+ import { Options } from "../model/options";
3
+ import { ExternalStorage } from "../model/external-storage";
4
+ import { ArticleListObjectExtended } from "../model/article-list-object-extended";
5
+ import { GetArticlesForCatalogRequest } from "../model/get-articles-for-catalog";
6
+ import { DataServiceResponseRoot } from "../model/data-service-response-root";
7
+ import { PagingParameters } from "../model/paging-parameters";
8
+ import { BaseBackendConnectionService } from "./base-backend-connection.service";
9
+ import { Subject } from "rxjs";
10
+ import { ArticleCategory } from "../model/article-category";
11
+ import { ArticleGroupImage } from "../model/article-group-image";
12
+ import { TurnoverGroupImage } from "../model/turnover-group-image";
13
+ import { SuperArticleImage } from "../model/super-article-image";
14
+ import { Tag } from "../model/tag";
15
+ import { Color } from "../model/color";
16
+ import { Design } from "../model/design";
17
+ import { Material } from "../model/material";
18
+ import { Brand } from "../model/brand";
19
+ import { Catalog } from "../catalog";
20
+ import { Atmosphere } from "../model/atmosphere";
21
+ import { ArticlePrice } from "../model/article-price";
22
+ import { ArticleFullObject } from "../model/article-full-object";
23
+ import { Session } from "../model/session";
24
24
  import { SkipButtonInfo } from "../model/skip-button-info";
25
25
  import { SuperArticle } from "../model/super-article";
26
26
  import { Concept } from "../model/concept";
@@ -50,6 +50,7 @@ const skip_button_info_1 = require("../model/skip-button-info");
50
50
  const super_article_1 = require("../model/super-article");
51
51
  const article_group_1 = require("../model/article-group");
52
52
  const article_extended_dto_1 = require("../model/article-extended-dto");
53
+ const selector_article_1 = require("../model/selector-article");
53
54
  class DataRepositoryService {
54
55
  constructor(url, branchNr, currencyId, useGroups, options, session = undefined, externalStorage = undefined) {
55
56
  this.showLoader = new rxjs_1.Subject();
@@ -125,7 +126,23 @@ class DataRepositoryService {
125
126
  return this.callGenerateFrozenArticle(configuratorStatistics)
126
127
  .then((result) => {
127
128
  if (result.data.validationResult && result.data.validationResult.success === true) {
128
- return resolve(result);
129
+ return this.callGetFrozenArticleArray().then((frozenResult) => {
130
+ if (frozenResult && frozenResult.data.validationResult && frozenResult.data.validationResult.success) {
131
+ const rawArray = frozenResult.data.resultObject;
132
+ const articles = this.boFactory.makeBOArrayFromRawBackendDataArray(selector_article_1.SelectorArticle, rawArray);
133
+ const composedArticle = !!articles[0].compositionArticleNo;
134
+ let frozenart;
135
+ frozenart = this.boFactory.makeWithRawBackendData(selector_article_1.SelectorArticle, articles[0]);
136
+ if (composedArticle) {
137
+ frozenart.compositions = [];
138
+ frozenart.compositions.push(articles);
139
+ }
140
+ resolve(frozenart);
141
+ }
142
+ else {
143
+ reject(frozenResult);
144
+ }
145
+ });
129
146
  }
130
147
  else {
131
148
  return reject(result);
@@ -29,6 +29,7 @@ const material_1 = require("../model/material");
29
29
  const atmosphere_1 = require("../model/atmosphere");
30
30
  const article_group_1 = require("../model/article-group");
31
31
  const article_extended_dto_1 = require("../model/article-extended-dto");
32
+ const selector_article_1 = require("../model/selector-article");
32
33
  class HdDataService {
33
34
  constructor(sessionService, boFactory, options) {
34
35
  this._useGroups = false;
@@ -119,7 +120,15 @@ class HdDataService {
119
120
  return Promise.reject(e);
120
121
  });
121
122
  if (response && response.data && response.data.validationResult && response.data.validationResult.success) {
122
- return response;
123
+ const articles = this._boFactory.makeBOArrayFromRawBackendDataArray(selector_article_1.SelectorArticle, response.data.resultObject);
124
+ const composedArticle = !!articles[0].compositionArticleNo;
125
+ let frozenart;
126
+ frozenart = this._boFactory.makeWithRawBackendData(selector_article_1.SelectorArticle, articles[0]);
127
+ if (composedArticle) {
128
+ frozenart.compositions = [];
129
+ frozenart.compositions.push(articles);
130
+ }
131
+ return frozenart;
123
132
  }
124
133
  else {
125
134
  return Promise.reject(response);
@@ -128,7 +137,7 @@ class HdDataService {
128
137
  }
129
138
  getJsonArticleFlatTree(goodId) {
130
139
  return __awaiter(this, void 0, void 0, function* () {
131
- const params = { instanceId: this._instanceId, goodId: goodId };
140
+ const params = { goodId: goodId };
132
141
  const data = Object.assign(Object.assign({}, this.createServiceRequestData()), { parameterValues: params });
133
142
  const response = yield this._sessionService.call(hd_service_method_1.HdServiceMethod.GetArticleTree, data)
134
143
  .catch((e) => {
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const connector_auth_1 = require("../../connector-auth");
13
13
  const paging_parameters_1 = require("../../model/paging-parameters");
14
14
  const internal_param_enum_1 = require("../../enum/internal-param.enum");
15
- let options = {
15
+ const options = {
16
16
  url: 'http://localhost:8080/ione',
17
17
  schema: '815',
18
18
  version: "251",
@@ -39,6 +39,12 @@ describe("ConnectorAuth", () => {
39
39
  expect(article.id).toBe(772);
40
40
  });
41
41
  });
42
+ it('getFrozenArticle', () => __awaiter(void 0, void 0, void 0, function* () {
43
+ yield connector.initNodeInstance(7497142);
44
+ return connector.getFrozenArticle().then((result) => {
45
+ expect(result.validationResult.succsss).toBeTruthy();
46
+ });
47
+ }));
42
48
  it('getSelections', () => {
43
49
  return connector.getSelections().then((data) => {
44
50
  expect(data).toBe([]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/ioneconnector",
3
- "version": "1.0.130",
3
+ "version": "1.0.134",
4
4
  "scripts": {
5
5
  "build": "grunt clean && tsc",
6
6
  "browserify": "browserify build/connector.js --s colijn -o dist/out-tsc/bundle.js",
@@ -27,7 +27,7 @@
27
27
  "ts-node": "^10.2.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@types/jest": "^27.0.2",
30
+ "@types/jest": "^24.0.13",
31
31
  "@types/reflect-metadata": "0.1.0",
32
32
  "grunt": "^1.0.3",
33
33
  "grunt-clean": "^0.4.0",
@@ -35,13 +35,22 @@
35
35
  "grunt-contrib-concat": "^1.0.1",
36
36
  "grunt-contrib-uglify-es": "git+https://github.com/gruntjs/grunt-contrib-uglify.git#harmony",
37
37
  "gulp": "^3.9.1",
38
- "jest": "^27.2.4",
39
- "ts-jest": "^27.0.5",
38
+ "jest": "^24.8.0",
39
+ "ts-jest": "^24.0.2",
40
40
  "typescript": "3.8.3"
41
41
  },
42
42
  "files": [
43
43
  "build/"
44
44
  ],
45
45
  "main": "build/connector.js",
46
- "types": "build/connector.d.ts"
46
+ "types": "build/connector.d.ts",
47
+ "jest": {
48
+ "verbose": true,
49
+ "roots": [
50
+ "<rootDir>/src"
51
+ ],
52
+ "transform": {
53
+ "^.+\\.tsx?$": "ts-jest"
54
+ }
55
+ }
47
56
  }