@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.
- package/build/connector-auth.d.ts +2 -0
- package/build/connector-auth.js +19 -26
- package/build/connector-public.d.ts +2 -0
- package/build/connector-public.js +12 -17
- package/build/connector.d.ts +8 -8
- package/build/connector.js +173 -204
- package/build/connector.unit.test.js +11 -1
- package/build/enum/article-method.enum.d.ts +1 -0
- package/build/enum/article-method.enum.js +1 -0
- package/build/enum/general-method.enum.d.ts +1 -0
- package/build/enum/general-method.enum.js +1 -0
- package/build/enum/general-object-name.enum.d.ts +2 -1
- package/build/enum/general-object-name.enum.js +1 -0
- package/build/enum/hd-service-method.d.ts +2 -0
- package/build/enum/hd-service-method.js +2 -0
- package/build/ione-api-connection.d.ts +2 -0
- package/build/model/catalog-definition.d.ts +24 -0
- package/build/model/catalog-definition.js +66 -0
- package/build/model/external-source-translation.d.ts +7 -0
- package/build/model/external-source-translation.js +6 -0
- package/build/model/question.d.ts +1 -0
- package/build/model/question.js +1 -0
- package/build/provider/ajax.service.js +20 -30
- package/build/provider/base-backend-connection.service.js +2 -13
- package/build/provider/data-repository.service.d.ts +2 -0
- package/build/provider/data-repository.service.js +203 -230
- package/build/provider/hd-ajax.service.js +31 -39
- package/build/provider/hd-ajax.service.unit.test.js +15 -21
- package/build/service/datasession.service.js +2 -13
- package/build/service/encrypt.service.js +5 -2
- package/build/service/hd-data.service.d.ts +2 -0
- package/build/service/hd-data.service.js +562 -615
- package/build/service/hd-session.service.js +29 -44
- package/build/service/hd-session.service.unit.test.js +19 -28
- package/build/tests/int/connector-auth.int.test.js +7 -16
- package/build/tests/int/connector-public.int.test.js +10 -19
- package/build/tests/int/connector.int.test.js +9 -18
- package/build/utils/promise-utils.js +3 -12
- package/build/websocket/socket.js +2 -13
- package/package.json +7 -4
|
@@ -46,6 +46,7 @@ export declare class ConnectorAuth implements IoneApiConnection {
|
|
|
46
46
|
saveConfigurations(): Promise<boolean>;
|
|
47
47
|
setInstanceToConfigure(instanceId: string, changeInstance?: boolean): Promise<DataServiceResponseRoot>;
|
|
48
48
|
initNodeInstance(goodId: number): Promise<any>;
|
|
49
|
+
changeConnection(oldConnection: string, newConnection: string): Promise<any>;
|
|
49
50
|
copyInstance(instanceId: string, shouldSaveCurrentInstanceId: boolean): Promise<DataServiceResponseRoot>;
|
|
50
51
|
getArticleQuickSel(goodId: number): Promise<Article>;
|
|
51
52
|
getSuperArticleQuickSel(id: string): Promise<SuperArticle>;
|
|
@@ -57,6 +58,7 @@ export declare class ConnectorAuth implements IoneApiConnection {
|
|
|
57
58
|
getSelectorActiveOptionValuesPrices(): Promise<any>;
|
|
58
59
|
getAnswerTexts(params: any): Promise<any>;
|
|
59
60
|
getDocumentContent(id: number, thumbnail: boolean): Promise<any>;
|
|
61
|
+
getCatalogDefinitions(showLoader?: boolean): Promise<any>;
|
|
60
62
|
getSingleImage(nodeId: number | string, publication: number, includeMimetype: boolean, thumb: boolean, showLoader: boolean): Promise<string>;
|
|
61
63
|
getDecos(): Promise<any>;
|
|
62
64
|
getSelections(): Promise<any>;
|
package/build/connector-auth.js
CHANGED
|
@@ -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 data_repository_service_1 = require("./provider/data-repository.service");
|
|
13
4
|
const rxjs_1 = require("rxjs");
|
|
@@ -34,28 +25,27 @@ class ConnectorAuth {
|
|
|
34
25
|
this.dataRepository.showLoader.subscribe(value => this.showLoader.next(value));
|
|
35
26
|
this.dataRepository.connectionResetInactivity.subscribe(() => this.connectionResetInactivity.next());
|
|
36
27
|
}
|
|
37
|
-
saveConfigurations() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
28
|
+
async saveConfigurations() {
|
|
29
|
+
const result = await this.dataRepository.storeInstance();
|
|
30
|
+
return result.data.validationResult.success;
|
|
31
|
+
}
|
|
32
|
+
async setInstanceToConfigure(instanceId, changeInstance = true) {
|
|
33
|
+
if (this.currentInstanceId !== instanceId) {
|
|
34
|
+
this.currentInstanceId = instanceId;
|
|
35
|
+
if (changeInstance) {
|
|
36
|
+
return await this.dataRepository.changeInstance(instanceId);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return;
|
|
53
40
|
}
|
|
54
|
-
}
|
|
41
|
+
}
|
|
55
42
|
}
|
|
56
43
|
initNodeInstance(goodId) {
|
|
57
44
|
return this.dataRepository.initNodeInstance(goodId);
|
|
58
45
|
}
|
|
46
|
+
changeConnection(oldConnection, newConnection) {
|
|
47
|
+
return this.dataRepository.changeConnection(oldConnection, newConnection);
|
|
48
|
+
}
|
|
59
49
|
copyInstance(instanceId, shouldSaveCurrentInstanceId) {
|
|
60
50
|
return this.dataRepository.copyInstance(instanceId, shouldSaveCurrentInstanceId);
|
|
61
51
|
}
|
|
@@ -89,6 +79,9 @@ class ConnectorAuth {
|
|
|
89
79
|
getDocumentContent(id, thumbnail) {
|
|
90
80
|
return this.dataRepository.getDocumentContent(id, thumbnail);
|
|
91
81
|
}
|
|
82
|
+
getCatalogDefinitions(showLoader = true) {
|
|
83
|
+
return this.dataRepository.getCatalogDefinitions(showLoader);
|
|
84
|
+
}
|
|
92
85
|
getSingleImage(nodeId, publication, includeMimetype, thumb, showLoader) {
|
|
93
86
|
return this.dataRepository.getSingleImage(nodeId, publication, includeMimetype, thumb, showLoader);
|
|
94
87
|
}
|
|
@@ -41,6 +41,7 @@ export declare class ConnectorPublic implements IoneApiConnection {
|
|
|
41
41
|
saveConfigurations(): Promise<boolean>;
|
|
42
42
|
setInstanceToConfigure(instanceId: string, changeInstance?: boolean): Promise<DataServiceResponseRoot>;
|
|
43
43
|
initNodeInstance(goodId: number): Promise<any>;
|
|
44
|
+
changeConnection(oldConnection: string, newConnection: string): Promise<any>;
|
|
44
45
|
copyInstance(instanceId: string, shouldSaveCurrentInstanceId: boolean): Promise<DataServiceResponseRoot>;
|
|
45
46
|
getArticleQuickSel(goodId: number): Promise<Article>;
|
|
46
47
|
getSuperArticleQuickSel(id: string): Promise<SuperArticle>;
|
|
@@ -52,6 +53,7 @@ export declare class ConnectorPublic implements IoneApiConnection {
|
|
|
52
53
|
getSelectorActiveOptionValuesPrices(): Promise<any>;
|
|
53
54
|
getAnswerTexts(params: any): Promise<any>;
|
|
54
55
|
getDocumentContent(id: number, thumbnail: boolean): Promise<any>;
|
|
56
|
+
getCatalogDefinitions(showLoader?: boolean): Promise<any>;
|
|
55
57
|
getSingleImage(nodeId: number | string, publication: number, includeMimetype: boolean, thumb: boolean, showLoader: boolean): Promise<string>;
|
|
56
58
|
getDecos(): Promise<any>;
|
|
57
59
|
getSelections(): Promise<any>;
|
|
@@ -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 rxjs_1 = require("rxjs");
|
|
13
4
|
const data_service_response_data_1 = require("./model/data-service-response-data");
|
|
@@ -41,14 +32,15 @@ class ConnectorPublic {
|
|
|
41
32
|
};
|
|
42
33
|
return Promise.resolve(responseRoot);
|
|
43
34
|
}
|
|
44
|
-
initNodeInstance(goodId) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
35
|
+
async initNodeInstance(goodId) {
|
|
36
|
+
const response = await this.dataService.initNodeInstance(goodId, this._branch);
|
|
37
|
+
if (response && response.data && response.data.validationResult && response.data.validationResult.success) {
|
|
38
|
+
this.setInstanceToConfigure(response.data.resultObject);
|
|
39
|
+
}
|
|
40
|
+
return response;
|
|
41
|
+
}
|
|
42
|
+
async changeConnection(oldConnection, newConnection) {
|
|
43
|
+
return this.dataService.changeConnection(oldConnection, newConnection);
|
|
52
44
|
}
|
|
53
45
|
copyInstance(instanceId, shouldSaveCurrentInstanceId) {
|
|
54
46
|
return this.dataService.copyInstance(instanceId);
|
|
@@ -84,6 +76,9 @@ class ConnectorPublic {
|
|
|
84
76
|
getDocumentContent(id, thumbnail) {
|
|
85
77
|
return this.dataService.getDocumentContent(id, thumbnail);
|
|
86
78
|
}
|
|
79
|
+
getCatalogDefinitions(showLoader = true) {
|
|
80
|
+
return this.dataService.getCatalogDefinitions(showLoader);
|
|
81
|
+
}
|
|
87
82
|
getSingleImage(nodeId, publication, includeMimetype, thumb, showLoader) {
|
|
88
83
|
return this.dataService.getSingleImage(nodeId, publication, includeMimetype, thumb, showLoader);
|
|
89
84
|
}
|
package/build/connector.d.ts
CHANGED
|
@@ -19,8 +19,6 @@ import { Tag } from "./model/tag";
|
|
|
19
19
|
import { Color } from "./model/color";
|
|
20
20
|
import { Catalog } from "./catalog";
|
|
21
21
|
import { Atmosphere } from "./model/atmosphere";
|
|
22
|
-
import { MatchArticle } from "./model/match-article";
|
|
23
|
-
import { FrozenArticle } from "./model/frozen-article";
|
|
24
22
|
import { ArticleFullObject } from "./model/article-full-object";
|
|
25
23
|
import { IoneApiConnection } from "./ione-api-connection";
|
|
26
24
|
import { Question } from "./model/question";
|
|
@@ -79,6 +77,7 @@ export declare class Connector {
|
|
|
79
77
|
copyInstance(instanceId: string, shouldSaveCurrentInstanceId: boolean): Promise<DataServiceResponseRoot>;
|
|
80
78
|
getArticle(skuOrId: string): Promise<Article>;
|
|
81
79
|
initNodeInstance(skuOrId: string): Promise<any>;
|
|
80
|
+
changeConnection(oldConnection: string, newConnection: string): Promise<any>;
|
|
82
81
|
getArticleQuickSel(id: number): Promise<Article>;
|
|
83
82
|
getSuperArticle(id: string): Promise<SuperArticle>;
|
|
84
83
|
getFullArticle(skuOrId: string): Promise<ArticleFullObject>;
|
|
@@ -89,6 +88,7 @@ export declare class Connector {
|
|
|
89
88
|
getAnswersPrices(): Promise<AnswerPrice[]>;
|
|
90
89
|
getAnswerInfo(answer: Answer): void;
|
|
91
90
|
getDocumentContent(docId: number, thumbnail?: boolean): Promise<any>;
|
|
91
|
+
getCatalogDefinitions(showLoader?: boolean): Promise<any>;
|
|
92
92
|
getImageForAnswerSelection(answerOrSelection: Answer | Selection, thumbNail?: boolean, showLoader?: boolean): void;
|
|
93
93
|
getImageForAnswerOrSelection(answerOrSelection: Answer | Selection, publication?: number, thumbNail?: boolean, showLoader?: boolean): Promise<string>;
|
|
94
94
|
getMoodImageForAnswerSelection(answerOrSelection: Answer | Selection, thumbNail?: boolean, showLoader?: boolean): void;
|
|
@@ -121,17 +121,17 @@ export declare class Connector {
|
|
|
121
121
|
getSelectorArticleThumbnail(documentKey: string, showLoader?: boolean): Promise<string>;
|
|
122
122
|
getConcepts(): Promise<Concept[]>;
|
|
123
123
|
getArticleGroups(): Promise<ArticleGroup[]>;
|
|
124
|
-
handleSelectionsReceived
|
|
125
|
-
handleDecoNodesReceived
|
|
124
|
+
private handleSelectionsReceived;
|
|
125
|
+
private handleDecoNodesReceived;
|
|
126
126
|
private _nextCombNode;
|
|
127
127
|
private _nextNode;
|
|
128
128
|
private _cancelBack2node;
|
|
129
129
|
private _navigateTo;
|
|
130
|
-
getDeliveryDateDescription
|
|
131
|
-
checkSkuOrId
|
|
130
|
+
private getDeliveryDateDescription;
|
|
131
|
+
private checkSkuOrId;
|
|
132
132
|
getSelectionsToDisplay(allSelections: Selection[]): Selection[];
|
|
133
|
-
getMappedMatchTable
|
|
134
|
-
getMappedFrozenArticle
|
|
133
|
+
private getMappedMatchTable;
|
|
134
|
+
private getMappedFrozenArticle;
|
|
135
135
|
static createConnector(options: Options, externalStorage: ExternalStorage): IoneApiConnection;
|
|
136
136
|
private _handleConnectionReset;
|
|
137
137
|
private _prepareAnswersAndImages;
|