@colijnit/ioneconnector 1.0.135 → 1.0.138

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.
Files changed (40) hide show
  1. package/build/connector-auth.d.ts +2 -0
  2. package/build/connector-auth.js +19 -26
  3. package/build/connector-public.d.ts +2 -0
  4. package/build/connector-public.js +12 -17
  5. package/build/connector.d.ts +8 -8
  6. package/build/connector.js +173 -204
  7. package/build/connector.unit.test.js +11 -1
  8. package/build/enum/article-method.enum.d.ts +1 -0
  9. package/build/enum/article-method.enum.js +1 -0
  10. package/build/enum/general-method.enum.d.ts +1 -0
  11. package/build/enum/general-method.enum.js +1 -0
  12. package/build/enum/general-object-name.enum.d.ts +2 -1
  13. package/build/enum/general-object-name.enum.js +1 -0
  14. package/build/enum/hd-service-method.d.ts +2 -0
  15. package/build/enum/hd-service-method.js +2 -0
  16. package/build/ione-api-connection.d.ts +2 -0
  17. package/build/model/catalog-definition.d.ts +24 -0
  18. package/build/model/catalog-definition.js +66 -0
  19. package/build/model/external-source-translation.d.ts +7 -0
  20. package/build/model/external-source-translation.js +6 -0
  21. package/build/model/question.d.ts +1 -0
  22. package/build/model/question.js +1 -0
  23. package/build/provider/ajax.service.js +20 -30
  24. package/build/provider/base-backend-connection.service.js +2 -13
  25. package/build/provider/data-repository.service.d.ts +2 -0
  26. package/build/provider/data-repository.service.js +203 -230
  27. package/build/provider/hd-ajax.service.js +31 -39
  28. package/build/provider/hd-ajax.service.unit.test.js +15 -21
  29. package/build/service/datasession.service.js +2 -13
  30. package/build/service/encrypt.service.js +5 -2
  31. package/build/service/hd-data.service.d.ts +2 -0
  32. package/build/service/hd-data.service.js +562 -615
  33. package/build/service/hd-session.service.js +29 -44
  34. package/build/service/hd-session.service.unit.test.js +19 -28
  35. package/build/tests/int/connector-auth.int.test.js +7 -16
  36. package/build/tests/int/connector-public.int.test.js +10 -19
  37. package/build/tests/int/connector.int.test.js +9 -18
  38. package/build/utils/promise-utils.js +3 -12
  39. package/build/websocket/socket.js +2 -13
  40. package/package.json +7 -4
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  const answer_1 = require("./model/answer");
13
4
  const selection_1 = require("./model/selection");
@@ -99,26 +90,25 @@ class Connector {
99
90
  copyInstance(instanceId, shouldSaveCurrentInstanceId) {
100
91
  return this.connection.copyInstance(instanceId, shouldSaveCurrentInstanceId);
101
92
  }
102
- getArticle(skuOrId) {
103
- return __awaiter(this, void 0, void 0, function* () {
104
- const goodId = yield this.checkSkuOrId(skuOrId)
105
- .catch((e) => {
106
- return Promise.reject(e);
107
- });
108
- const article = yield this.connection.getArticleQuickSel(goodId)
109
- .catch((e) => {
110
- return Promise.reject(e);
111
- });
112
- article.sku = skuOrId;
113
- return article;
93
+ async getArticle(skuOrId) {
94
+ const goodId = await this.checkSkuOrId(skuOrId)
95
+ .catch((e) => {
96
+ return Promise.reject(e);
114
97
  });
115
- }
116
- initNodeInstance(skuOrId) {
117
- return __awaiter(this, void 0, void 0, function* () {
118
- const goodId = yield this.checkSkuOrId(skuOrId)
119
- .catch((e) => Promise.reject(e));
120
- return this.connection.initNodeInstance(goodId);
98
+ const article = await this.connection.getArticleQuickSel(goodId)
99
+ .catch((e) => {
100
+ return Promise.reject(e);
121
101
  });
102
+ article.sku = skuOrId;
103
+ return article;
104
+ }
105
+ async initNodeInstance(skuOrId) {
106
+ const goodId = await this.checkSkuOrId(skuOrId)
107
+ .catch((e) => Promise.reject(e));
108
+ return this.connection.initNodeInstance(goodId);
109
+ }
110
+ async changeConnection(oldConnection, newConnection) {
111
+ return this.connection.changeConnection(oldConnection, newConnection);
122
112
  }
123
113
  getArticleQuickSel(id) {
124
114
  return this.connection.getArticleQuickSel(id);
@@ -126,12 +116,10 @@ class Connector {
126
116
  getSuperArticle(id) {
127
117
  return this.connection.getSuperArticleQuickSel(id);
128
118
  }
129
- getFullArticle(skuOrId) {
130
- return __awaiter(this, void 0, void 0, function* () {
131
- const goodId = yield this.checkSkuOrId(skuOrId)
132
- .catch((e) => Promise.reject(e));
133
- return this.connection.getArticleFullObject(goodId);
134
- });
119
+ async getFullArticle(skuOrId) {
120
+ const goodId = await this.checkSkuOrId(skuOrId)
121
+ .catch((e) => Promise.reject(e));
122
+ return this.connection.getArticleFullObject(goodId);
135
123
  }
136
124
  getQuestionAndAnswers() {
137
125
  this.connection.getQuestionAndAnswers().then((rawDatas) => {
@@ -184,69 +172,63 @@ class Connector {
184
172
  }
185
173
  });
186
174
  }
187
- getQuestionAndAnswersAsync() {
188
- return __awaiter(this, void 0, void 0, function* () {
189
- const rawDatas = yield this.connection.getQuestionAndAnswers();
190
- const result = new question_and_answer_1.QuestionAndAnswer();
191
- if (rawDatas && (rawDatas && rawDatas.data && rawDatas.data.length > 0)) {
192
- this.match = rawDatas.match;
193
- const rawAnswers = rawDatas.data && rawDatas.data.length > 0 ? rawDatas.data.slice(1, rawDatas.data.length) : null;
194
- const nodeHierarchyLevelOffset = rawAnswers && rawAnswers[0] ? rawAnswers[0].treeLevel - 1 : 0;
195
- const answers = [];
196
- const len = rawAnswers ? rawAnswers.length : 0;
197
- for (let i = 0; i < len; i++) {
198
- const answer = this.boFactory.makeWithRawBackendData(answer_1.Answer, rawAnswers[i]);
199
- answer.isGroupHeader = rawAnswers[i].hasChildren === db_boolean_value_type_enum_1.DbBooleanValueType.True;
200
- answer.treeLevel = answer.treeLevel - nodeHierarchyLevelOffset;
201
- answer.instanceId = this.connection.currentInstanceId;
202
- const shouldHide = (not_nill_function_1.notNill(answer.hierarchicalPublicationCode) && (answer.hierarchicalPublicationCode & 2) === 0) ||
203
- (answer.type === node_type_enum_1.NodeType.Question && (answer.questionPublicationCode & 2) === 0 && not_nill_function_1.notNill(answer.questionPublicationCode)) ||
204
- (answer.type === node_type_enum_1.NodeType.Answer && (answer.publicationCode & 2) === 0 && not_nill_function_1.notNill(answer.publicationCode));
205
- if (!shouldHide) {
206
- answers.push(answer);
207
- }
175
+ async getQuestionAndAnswersAsync() {
176
+ const rawDatas = await this.connection.getQuestionAndAnswers();
177
+ const result = new question_and_answer_1.QuestionAndAnswer();
178
+ if (rawDatas && (rawDatas && rawDatas.data && rawDatas.data.length > 0)) {
179
+ this.match = rawDatas.match;
180
+ const rawAnswers = rawDatas.data && rawDatas.data.length > 0 ? rawDatas.data.slice(1, rawDatas.data.length) : null;
181
+ const nodeHierarchyLevelOffset = rawAnswers && rawAnswers[0] ? rawAnswers[0].treeLevel - 1 : 0;
182
+ const answers = [];
183
+ const len = rawAnswers ? rawAnswers.length : 0;
184
+ for (let i = 0; i < len; i++) {
185
+ const answer = this.boFactory.makeWithRawBackendData(answer_1.Answer, rawAnswers[i]);
186
+ answer.isGroupHeader = rawAnswers[i].hasChildren === db_boolean_value_type_enum_1.DbBooleanValueType.True;
187
+ answer.treeLevel = answer.treeLevel - nodeHierarchyLevelOffset;
188
+ answer.instanceId = this.connection.currentInstanceId;
189
+ const shouldHide = (not_nill_function_1.notNill(answer.hierarchicalPublicationCode) && (answer.hierarchicalPublicationCode & 2) === 0) ||
190
+ (answer.type === node_type_enum_1.NodeType.Question && (answer.questionPublicationCode & 2) === 0 && not_nill_function_1.notNill(answer.questionPublicationCode)) ||
191
+ (answer.type === node_type_enum_1.NodeType.Answer && (answer.publicationCode & 2) === 0 && not_nill_function_1.notNill(answer.publicationCode));
192
+ if (!shouldHide) {
193
+ answers.push(answer);
208
194
  }
209
- const rawQuestion = rawDatas.data && rawDatas.data.length > 0 ? rawDatas.data[0] : null;
210
- const question = rawQuestion ? this.boFactory.makeWithRawBackendData(question_1.Question, rawQuestion) : null;
211
- result.question = question;
212
- result.answers = answers;
213
195
  }
214
- return result;
215
- });
196
+ const rawQuestion = rawDatas.data && rawDatas.data.length > 0 ? rawDatas.data[0] : null;
197
+ const question = rawQuestion ? this.boFactory.makeWithRawBackendData(question_1.Question, rawQuestion) : null;
198
+ result.question = question;
199
+ result.answers = answers;
200
+ }
201
+ return result;
216
202
  }
217
203
  getSkipButtonImageAndText(goodId) {
218
204
  return this.connection.getSkipButtonImageAndText(goodId);
219
205
  }
220
- getDeliveryPrognosisForArticle(goodId) {
221
- return __awaiter(this, void 0, void 0, function* () {
222
- const data = yield this.connection.getDeliveryPrognosis(goodId, this.branch);
223
- let result = { stock: 0, deliveryDescription: '' };
224
- if (data) {
225
- if (data.hasOwnProperty('dateExplanation')) {
226
- let dateExplanation = data.dateExplanation;
227
- dateExplanation = dateExplanation.substr(dateExplanation.search('in voorraad'));
228
- dateExplanation = dateExplanation.substr(0, dateExplanation.indexOf(','));
229
- const stock = dateExplanation.split(':');
230
- result.stock = parseInt(stock[1]);
231
- }
232
- const deliveryDate = new Date(data.returnValue);
233
- result.deliveryDescription = this.getDeliveryDateDescription(deliveryDate);
234
- }
235
- return result;
236
- });
206
+ async getDeliveryPrognosisForArticle(goodId) {
207
+ const data = await this.connection.getDeliveryPrognosis(goodId, this.branch);
208
+ let result = { stock: 0, deliveryDescription: '' };
209
+ if (data) {
210
+ if (data.hasOwnProperty('dateExplanation')) {
211
+ let dateExplanation = data.dateExplanation;
212
+ dateExplanation = dateExplanation.substr(dateExplanation.search('in voorraad'));
213
+ dateExplanation = dateExplanation.substr(0, dateExplanation.indexOf(','));
214
+ const stock = dateExplanation.split(':');
215
+ result.stock = parseInt(stock[1]);
216
+ }
217
+ const deliveryDate = new Date(data.returnValue);
218
+ result.deliveryDescription = this.getDeliveryDateDescription(deliveryDate);
219
+ }
220
+ return result;
237
221
  }
238
- getAnswersPrices() {
239
- return __awaiter(this, void 0, void 0, function* () {
240
- const rawDatas = yield this.connection.getSelectorActiveOptionValuesPrices();
241
- const pricesArr = rawDatas && rawDatas.length > 0 ? rawDatas : null;
242
- const prices = [];
243
- const len = pricesArr ? pricesArr.length : 0;
244
- for (let i = 0; i < len; i++) {
245
- const price = new answer_price_1.AnswerPrice(pricesArr[i]);
246
- prices.push(price);
247
- }
248
- return prices;
249
- });
222
+ async getAnswersPrices() {
223
+ const rawDatas = await this.connection.getSelectorActiveOptionValuesPrices();
224
+ const pricesArr = rawDatas && rawDatas.length > 0 ? rawDatas : null;
225
+ const prices = [];
226
+ const len = pricesArr ? pricesArr.length : 0;
227
+ for (let i = 0; i < len; i++) {
228
+ const price = new answer_price_1.AnswerPrice(pricesArr[i]);
229
+ prices.push(price);
230
+ }
231
+ return prices;
250
232
  }
251
233
  getAnswerInfo(answer) {
252
234
  this.connection.getAnswerTexts({ goodId: answer.nodeId }).then((data) => {
@@ -265,6 +247,9 @@ class Connector {
265
247
  getDocumentContent(docId, thumbnail = true) {
266
248
  return this.connection.getDocumentContent(docId, thumbnail);
267
249
  }
250
+ getCatalogDefinitions(showLoader = true) {
251
+ return this.connection.getCatalogDefinitions(showLoader);
252
+ }
268
253
  getImageForAnswerSelection(answerOrSelection, thumbNail = true, showLoader = true) {
269
254
  this.connection.getSingleImage(answerOrSelection.nodeId, 4, true, thumbNail, showLoader).then((data) => {
270
255
  if (this.handleImages !== void 0) {
@@ -297,131 +282,117 @@ class Connector {
297
282
  });
298
283
  }
299
284
  }
300
- getSelectionsAsync() {
301
- return __awaiter(this, void 0, void 0, function* () {
302
- const rawData = yield this.connection.getSelections();
303
- const selections = [];
304
- const len = rawData ? rawData.length : 0;
305
- for (let i = 0; i < len; i++) {
306
- const selection = new selection_1.Selection(rawData[i]);
307
- selection.instanceId = this.connection.currentInstanceId;
308
- selections.push(selection);
309
- }
310
- return selections;
311
- });
285
+ async getSelectionsAsync() {
286
+ const rawData = await this.connection.getSelections();
287
+ const selections = [];
288
+ const len = rawData ? rawData.length : 0;
289
+ for (let i = 0; i < len; i++) {
290
+ const selection = new selection_1.Selection(rawData[i]);
291
+ selection.instanceId = this.connection.currentInstanceId;
292
+ selections.push(selection);
293
+ }
294
+ return selections;
312
295
  }
313
- getDecosAsync() {
314
- return __awaiter(this, void 0, void 0, function* () {
315
- const rawData = yield this.connection.getDecos();
316
- const decoNodes = [];
317
- const len = rawData ? rawData.length : 0;
318
- for (let i = 0; i < len; i++) {
319
- const deco = new deco_node_1.DecoNode(rawData[i]);
320
- deco.instanceId = this.connection.currentInstanceId;
321
- decoNodes.push(deco);
322
- }
323
- return decoNodes;
324
- });
296
+ async getDecosAsync() {
297
+ const rawData = await this.connection.getDecos();
298
+ const decoNodes = [];
299
+ const len = rawData ? rawData.length : 0;
300
+ for (let i = 0; i < len; i++) {
301
+ const deco = new deco_node_1.DecoNode(rawData[i]);
302
+ deco.instanceId = this.connection.currentInstanceId;
303
+ decoNodes.push(deco);
304
+ }
305
+ return decoNodes;
325
306
  }
326
- selectAnswer(answer, userInput) {
327
- return __awaiter(this, void 0, void 0, function* () {
328
- if (!answer) {
329
- return;
307
+ async selectAnswer(answer, userInput) {
308
+ if (!answer) {
309
+ return;
310
+ }
311
+ if (answer.instanceId !== this.connection.currentInstanceId) {
312
+ await this.connection.changeInstance(answer.instanceId);
313
+ }
314
+ const params = {};
315
+ if (answer.treeHierarchy !== null && answer.treeHierarchy !== undefined) {
316
+ params.treeHierarchie = answer.treeHierarchy;
317
+ return this._navigateTo(params);
318
+ }
319
+ else {
320
+ this.stepBackNode = this.use3D ? -1 : answer.node.node;
321
+ if (this.connectorName) {
322
+ params.decoConnection = this.connectorName;
330
323
  }
331
- if (answer.instanceId !== this.connection.currentInstanceId) {
332
- yield this.connection.changeInstance(answer.instanceId);
324
+ if (answer.userInput && userInput !== undefined) {
325
+ params.inqString = userInput;
333
326
  }
334
- const params = {};
335
- if (answer.treeHierarchy !== null && answer.treeHierarchy !== undefined) {
336
- params.treeHierarchie = answer.treeHierarchy;
337
- return this._navigateTo(params);
327
+ if (this.combNode || answer.useNextCombNode) {
328
+ params.nodeId = answer.node.node ? answer.node.node : answer.node;
329
+ return this._nextCombNode(params);
338
330
  }
339
331
  else {
340
- this.stepBackNode = this.use3D ? -1 : answer.node.node;
341
- if (this.connectorName) {
342
- params.decoConnection = this.connectorName;
343
- }
344
- if (answer.userInput && userInput !== undefined) {
345
- params.inqString = userInput;
346
- }
347
- if (this.combNode || answer.useNextCombNode) {
348
- params.nodeId = answer.node.node ? answer.node.node : answer.node;
349
- return this._nextCombNode(params);
350
- }
351
- else {
352
- params.opvId = answer.id;
353
- return this._nextNode(params);
354
- }
332
+ params.opvId = answer.id;
333
+ return this._nextNode(params);
355
334
  }
356
- });
335
+ }
357
336
  }
358
- deleteSelection(selection) {
359
- return __awaiter(this, void 0, void 0, function* () {
360
- if (!selection) {
361
- return;
362
- }
363
- const params = {
364
- nodeId: selection.node
365
- };
366
- yield this.connection.back2Node(params);
367
- return this.connection.nextNode({ opvId: 0 });
368
- });
337
+ async deleteSelection(selection) {
338
+ if (!selection) {
339
+ return;
340
+ }
341
+ const params = {
342
+ nodeId: selection.node
343
+ };
344
+ await this.connection.back2Node(params);
345
+ return this.connection.nextNode({ opvId: 0 });
369
346
  }
370
- replaceSelection(selection) {
371
- return __awaiter(this, void 0, void 0, function* () {
372
- if (!selection) {
373
- return;
374
- }
375
- const params = {
376
- nodeId: selection.node
377
- };
378
- return this.connection.back2Node(params);
379
- });
347
+ async replaceSelection(selection) {
348
+ if (!selection) {
349
+ return;
350
+ }
351
+ const params = {
352
+ nodeId: selection.node
353
+ };
354
+ return this.connection.back2Node(params);
380
355
  }
381
- selectSelection(selection, forceBackToNode, after, connector) {
382
- return __awaiter(this, void 0, void 0, function* () {
383
- if (!selection) {
384
- return;
385
- }
386
- if (forceBackToNode === undefined) {
387
- forceBackToNode = true;
388
- }
389
- if (selection.instanceId !== this.connection.currentInstanceId) {
390
- yield this.connection.changeInstance(selection.instanceId);
391
- }
392
- this.connectorName = connector;
393
- this.combNode = after !== undefined;
394
- const params = {};
395
- if (after !== undefined) {
396
- params.copyAfter = after ? 'T' : 'F';
397
- }
398
- if (connector !== undefined) {
399
- params.selectedConnector = connector;
400
- }
401
- if (!selection.optCycle || forceBackToNode) {
402
- params.nodeId = selection.node;
403
- params.useCombinationNodes = this.combNode ? 'T' : 'F';
404
- return this.connection.back2Node(params);
405
- }
406
- else {
407
- params.optCycle = selection.optCycle;
408
- return this.connection.repeatOption(params);
409
- }
410
- });
356
+ async selectSelection(selection, forceBackToNode, after, connector) {
357
+ if (!selection) {
358
+ return;
359
+ }
360
+ if (forceBackToNode === undefined) {
361
+ forceBackToNode = true;
362
+ }
363
+ if (selection.instanceId !== this.connection.currentInstanceId) {
364
+ await this.connection.changeInstance(selection.instanceId);
365
+ }
366
+ this.connectorName = connector;
367
+ this.combNode = after !== undefined;
368
+ const params = {};
369
+ if (after !== undefined) {
370
+ params.copyAfter = after ? 'T' : 'F';
371
+ }
372
+ if (connector !== undefined) {
373
+ params.selectedConnector = connector;
374
+ }
375
+ if (!selection.optCycle || forceBackToNode) {
376
+ params.nodeId = selection.node;
377
+ params.useCombinationNodes = this.combNode ? 'T' : 'F';
378
+ return this.connection.back2Node(params);
379
+ }
380
+ else {
381
+ params.optCycle = selection.optCycle;
382
+ return this.connection.repeatOption(params);
383
+ }
411
384
  }
412
385
  cancelAnswer() {
413
386
  return this._cancelBack2node();
414
387
  }
415
- getAnswerStock(answer) {
416
- return __awaiter(this, void 0, void 0, function* () {
417
- if (answer) {
418
- const stockStatusNr = yield this.connection.getStockForArtNode(this.branch, answer.id);
419
- return stock_status_enum_1.NumberToStockStatus(stockStatusNr);
420
- }
421
- else {
422
- return stock_status_enum_1.StockStatus.None;
423
- }
424
- });
388
+ async getAnswerStock(answer) {
389
+ if (answer) {
390
+ const stockStatusNr = await this.connection.getStockForArtNode(this.branch, answer.id);
391
+ return stock_status_enum_1.NumberToStockStatus(stockStatusNr);
392
+ }
393
+ else {
394
+ return stock_status_enum_1.StockStatus.None;
395
+ }
425
396
  }
426
397
  getJsonConfiguredArticles(configuratorStatistics) {
427
398
  return new Promise((resolve, reject) => {
@@ -459,10 +430,8 @@ class Connector {
459
430
  getInternalParameter(parameter) {
460
431
  return this.connection.getInternalParameter(parameter);
461
432
  }
462
- getArticlesForCatalog(params, paging = paging_parameters_1.PagingParameters.DEFAULTS, showLoader = true) {
463
- return __awaiter(this, void 0, void 0, function* () {
464
- return this.connection.getArticlesForCatalog(params, paging, showLoader);
465
- });
433
+ async getArticlesForCatalog(params, paging = paging_parameters_1.PagingParameters.DEFAULTS, showLoader = true) {
434
+ return this.connection.getArticlesForCatalog(params, paging, showLoader);
466
435
  }
467
436
  getArticlePrice(goodId) {
468
437
  return this.connection.getArticlePrice(goodId);
@@ -7,12 +7,18 @@ const selector_article_1 = require("./model/selector-article");
7
7
  const business_object_factory_1 = require("./service/business-object-factory");
8
8
  const map_property_decorator_1 = require("./factory/decorators/map-property.decorator");
9
9
  const options = {
10
- url: 'http'
10
+ url: 'http://localhost:8080/ione',
11
+ schema: "815",
12
+ version: "252",
13
+ username: "patrick",
14
+ password: "patrick",
15
+ useLoginEncryption: true
11
16
  };
12
17
  describe("Connector", () => {
13
18
  let connector;
14
19
  beforeEach(() => {
15
20
  connector = new connector_1.Connector(options);
21
+ jest.setTimeout(30000);
16
22
  });
17
23
  it('checkMapProperty', () => {
18
24
  const raw = {
@@ -126,4 +132,8 @@ describe("Connector", () => {
126
132
  const selectionsToDisplay = connector.getSelectionsToDisplay(selections);
127
133
  expect(selectionsToDisplay.length).toBe(0);
128
134
  });
135
+ it('getCatalogDefinitions', async () => {
136
+ const catalogDefinitions = await connector.getCatalogDefinitions();
137
+ expect(catalogDefinitions).toBeDefined();
138
+ });
129
139
  });
@@ -6,6 +6,7 @@ export declare enum ArticleMethod {
6
6
  CheckChangableUnit = "checkChangableUnit",
7
7
  InitNode = "initNode",
8
8
  InitNodeInstance = "InitNodeInstance",
9
+ ChangeConnection = "changeConnection",
9
10
  CopyInstance = "copyInstance",
10
11
  ChangeInstance = "changeInstance",
11
12
  StoreInstance = "storeInstance",
@@ -9,6 +9,7 @@ var ArticleMethod;
9
9
  ArticleMethod["CheckChangableUnit"] = "checkChangableUnit";
10
10
  ArticleMethod["InitNode"] = "initNode";
11
11
  ArticleMethod["InitNodeInstance"] = "InitNodeInstance";
12
+ ArticleMethod["ChangeConnection"] = "changeConnection";
12
13
  ArticleMethod["CopyInstance"] = "copyInstance";
13
14
  ArticleMethod["ChangeInstance"] = "changeInstance";
14
15
  ArticleMethod["StoreInstance"] = "storeInstance";
@@ -1,4 +1,5 @@
1
1
  export declare enum GeneralMethod {
2
2
  GetDocumentContent = "getDocumentContent",
3
+ GetCatalogDefinitions = "getCatalogDefinitions",
3
4
  GetParamValue = "getParamValue"
4
5
  }
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var GeneralMethod;
4
4
  (function (GeneralMethod) {
5
5
  GeneralMethod["GetDocumentContent"] = "getDocumentContent";
6
+ GeneralMethod["GetCatalogDefinitions"] = "getCatalogDefinitions";
6
7
  GeneralMethod["GetParamValue"] = "getParamValue";
7
8
  })(GeneralMethod = exports.GeneralMethod || (exports.GeneralMethod = {}));
@@ -1,3 +1,4 @@
1
1
  export declare enum GeneralObjectName {
2
- CoDocument = "CoDocument"
2
+ CoDocument = "CoDocument",
3
+ CatalogDefinition = "CatalogDefinition"
3
4
  }
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var GeneralObjectName;
4
4
  (function (GeneralObjectName) {
5
5
  GeneralObjectName["CoDocument"] = "CoDocument";
6
+ GeneralObjectName["CatalogDefinition"] = "CatalogDefinition";
6
7
  })(GeneralObjectName = exports.GeneralObjectName || (exports.GeneralObjectName = {}));
@@ -2,6 +2,7 @@ export declare enum HdServiceMethod {
2
2
  CreatePublicSession = "createPublicSession",
3
3
  ClosePublicSession = "closePublicSession",
4
4
  InitNodeInstance = "initNodeInstance",
5
+ ChangeConnection = "changeConnection",
5
6
  CopyInstance = "copyInstance",
6
7
  NextNode = "nextNode",
7
8
  NextCombNode = "nextCombNode",
@@ -32,6 +33,7 @@ export declare enum HdServiceMethod {
32
33
  GetArticleFullObject = "getArticleFullObject",
33
34
  GetAnswerTexts = "getAnswerTexts",
34
35
  GetDocumentContent = "getDocumentContent",
36
+ GetCatalogDefinitions = "getCatalogDefinitions",
35
37
  GetSingleImage = "getSingleImage",
36
38
  GetColors = "getColors",
37
39
  GetBrands = "getBrands",
@@ -5,6 +5,7 @@ var HdServiceMethod;
5
5
  HdServiceMethod["CreatePublicSession"] = "createPublicSession";
6
6
  HdServiceMethod["ClosePublicSession"] = "closePublicSession";
7
7
  HdServiceMethod["InitNodeInstance"] = "initNodeInstance";
8
+ HdServiceMethod["ChangeConnection"] = "changeConnection";
8
9
  HdServiceMethod["CopyInstance"] = "copyInstance";
9
10
  HdServiceMethod["NextNode"] = "nextNode";
10
11
  HdServiceMethod["NextCombNode"] = "nextCombNode";
@@ -35,6 +36,7 @@ var HdServiceMethod;
35
36
  HdServiceMethod["GetArticleFullObject"] = "getArticleFullObject";
36
37
  HdServiceMethod["GetAnswerTexts"] = "getAnswerTexts";
37
38
  HdServiceMethod["GetDocumentContent"] = "getDocumentContent";
39
+ HdServiceMethod["GetCatalogDefinitions"] = "getCatalogDefinitions";
38
40
  HdServiceMethod["GetSingleImage"] = "getSingleImage";
39
41
  HdServiceMethod["GetColors"] = "getColors";
40
42
  HdServiceMethod["GetBrands"] = "getBrands";
@@ -31,6 +31,7 @@ export interface IoneApiConnection {
31
31
  saveConfigurations(): Promise<boolean>;
32
32
  setInstanceToConfigure(instanceId: string, changeInstance: boolean): Promise<DataServiceResponseRoot>;
33
33
  initNodeInstance(goodId: number): Promise<any>;
34
+ changeConnection(oldConnection: string, newConnection: string): Promise<any>;
34
35
  copyInstance(instanceId: string, shouldSaveCurrentInstanceId: boolean): Promise<DataServiceResponseRoot>;
35
36
  getArticleQuickSel(goodId: number): Promise<Article>;
36
37
  getSuperArticleQuickSel(id: string): Promise<SuperArticle>;
@@ -42,6 +43,7 @@ export interface IoneApiConnection {
42
43
  getSelectorActiveOptionValuesPrices(): Promise<any>;
43
44
  getAnswerTexts(params: any): Promise<any>;
44
45
  getDocumentContent(id: number, thumbnail: boolean): Promise<any>;
46
+ getCatalogDefinitions(showLoader: boolean): Promise<any>;
45
47
  getSingleImage(nodeId: number | string, publication: number, includeMimetype: boolean, thumb: boolean, showLoader: boolean): Promise<string>;
46
48
  getDecos(): Promise<any>;
47
49
  getSelections(): Promise<any>;
@@ -0,0 +1,24 @@
1
+ import { BusinessObject } from "./business-object";
2
+ import { CoDocument } from "./co-document";
3
+ import { ExternalSourceTranslation } from "./external-source-translation";
4
+ export declare class CatalogDefinition extends BusinessObject {
5
+ name: string;
6
+ supplierId: number;
7
+ externalSourceId: number;
8
+ image: CoDocument;
9
+ turnoverGroups: string[];
10
+ turnoverGroupTranslations: ExternalSourceTranslation[];
11
+ defaultTurnoverGroup: string;
12
+ articleGroups: string[];
13
+ articleGroupTranslations: ExternalSourceTranslation[];
14
+ defaultArticleGroup: string;
15
+ concepts: string[];
16
+ conceptTranslations: ExternalSourceTranslation[];
17
+ defaultConcept: number;
18
+ vatCodeTranslations: ExternalSourceTranslation[];
19
+ useWebviewUI: boolean;
20
+ webviewUrl: string;
21
+ useCatalogPage: boolean;
22
+ updateArticles: boolean;
23
+ get hasExternalSource(): boolean;
24
+ }