@colijnit/mainapi 1.0.17 → 1.0.18
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/enum/internal-param.enum.d.ts +2 -1
- package/build/enum/internal-param.enum.js +1 -0
- package/build/enum/public-service-method.d.ts +1 -0
- package/build/enum/public-service-method.js +1 -0
- package/build/main-api-connection.d.ts +1 -0
- package/build/main-api.d.ts +1 -0
- package/build/main-api.js +3 -0
- package/build/main-api.unit.test.js +10 -0
- package/build/main-auth.d.ts +1 -0
- package/build/main-auth.js +7 -0
- package/build/main-public.d.ts +3 -1
- package/build/main-public.js +22 -2
- package/package.json +3 -3
|
@@ -3,5 +3,6 @@ export declare enum InternalParam {
|
|
|
3
3
|
PartialInvoicing = "DEEL_FACTUUR",
|
|
4
4
|
ReceiveGoodsWithDataTerminal = "PAKBINNEN",
|
|
5
5
|
GeneralAssetUrl = "3D_GENERAL_ASSET_URL",
|
|
6
|
-
AssetUrl = "3D_ASSET_URL"
|
|
6
|
+
AssetUrl = "3D_ASSET_URL",
|
|
7
|
+
CatalogBundleSettings = "CATALOG_BUNDLE_SETTINGS"
|
|
7
8
|
}
|
|
@@ -8,4 +8,5 @@ var InternalParam;
|
|
|
8
8
|
InternalParam["ReceiveGoodsWithDataTerminal"] = "PAKBINNEN";
|
|
9
9
|
InternalParam["GeneralAssetUrl"] = "3D_GENERAL_ASSET_URL";
|
|
10
10
|
InternalParam["AssetUrl"] = "3D_ASSET_URL";
|
|
11
|
+
InternalParam["CatalogBundleSettings"] = "CATALOG_BUNDLE_SETTINGS";
|
|
11
12
|
})(InternalParam = exports.InternalParam || (exports.InternalParam = {}));
|
|
@@ -6,6 +6,7 @@ export declare enum PublicServiceMethod {
|
|
|
6
6
|
GetColors = "getColors",
|
|
7
7
|
GetCountries = "getCountries",
|
|
8
8
|
GetPrivacySettings = "getPrivacySettings",
|
|
9
|
+
GetPublicParams = "getPublicParams",
|
|
9
10
|
GetMarketingCodes = "getMarketingCodes",
|
|
10
11
|
GetBranches = "getBranches",
|
|
11
12
|
GetDomainValues = "getDomainValue",
|
|
@@ -10,6 +10,7 @@ var PublicServiceMethod;
|
|
|
10
10
|
PublicServiceMethod["GetColors"] = "getColors";
|
|
11
11
|
PublicServiceMethod["GetCountries"] = "getCountries";
|
|
12
12
|
PublicServiceMethod["GetPrivacySettings"] = "getPrivacySettings";
|
|
13
|
+
PublicServiceMethod["GetPublicParams"] = "getPublicParams";
|
|
13
14
|
PublicServiceMethod["GetMarketingCodes"] = "getMarketingCodes";
|
|
14
15
|
PublicServiceMethod["GetBranches"] = "getBranches";
|
|
15
16
|
PublicServiceMethod["GetDomainValues"] = "getDomainValue";
|
|
@@ -18,6 +18,7 @@ export declare abstract class MainApiConnection {
|
|
|
18
18
|
abstract getCurrencies(active: boolean): Promise<DataServiceResponseData>;
|
|
19
19
|
abstract getPaymentConditions(name: string): Promise<DataServiceResponseData>;
|
|
20
20
|
abstract getJoinedTags(table: string, key: string): Promise<DataServiceResponseData>;
|
|
21
|
+
abstract getPublicParams(upId: number): Promise<DataServiceResponseData>;
|
|
21
22
|
abstract getInternalParameterValue(param: InternalParam): Promise<DataServiceResponseData>;
|
|
22
23
|
abstract getPackageStickerPrintLayouts(): Promise<DataServiceResponseData>;
|
|
23
24
|
abstract getObjectConfigurations(screenCfgModule: string, params: string | string[], insertMode: boolean): Promise<DataServiceResponseData>;
|
package/build/main-api.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare class MainApi {
|
|
|
29
29
|
getCurrencies(active?: boolean): Promise<DataServiceResponseData>;
|
|
30
30
|
getPaymentConditions(name?: string): Promise<DataServiceResponseData>;
|
|
31
31
|
getJoinedTags(table: string, key: string): Promise<DataServiceResponseData>;
|
|
32
|
+
getPublicParams(upId: number): Promise<DataServiceResponseData>;
|
|
32
33
|
getInternalParameterValue(param: InternalParam): Promise<DataServiceResponseData>;
|
|
33
34
|
getPackageStickerPrintLayouts(): Promise<DataServiceResponseData>;
|
|
34
35
|
getObjectConfigurations(screenCfgModule: string, params?: string | string[], insertMode?: boolean): Promise<DataServiceResponseData>;
|
package/build/main-api.js
CHANGED
|
@@ -67,6 +67,9 @@ class MainApi {
|
|
|
67
67
|
getJoinedTags(table, key) {
|
|
68
68
|
return this.mainApi.getJoinedTags(table, key);
|
|
69
69
|
}
|
|
70
|
+
getPublicParams(upId) {
|
|
71
|
+
return this.mainApi.getPublicParams(upId);
|
|
72
|
+
}
|
|
70
73
|
getInternalParameterValue(param) {
|
|
71
74
|
return this.mainApi.getInternalParameterValue(param);
|
|
72
75
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const main_api_1 = require("./main-api");
|
|
13
13
|
const sequence_name_enum_1 = require("./enum/sequence-name.enum");
|
|
14
14
|
const domain_name_enum_1 = require("./enum/domain-name.enum");
|
|
15
|
+
const internal_param_enum_1 = require("./enum/internal-param.enum");
|
|
15
16
|
const options = {
|
|
16
17
|
url: 'http',
|
|
17
18
|
ajaxUrl: 'http'
|
|
@@ -93,4 +94,13 @@ describe("Connector", () => {
|
|
|
93
94
|
const result = yield connector.getCategories();
|
|
94
95
|
expect(result).toBeDefined();
|
|
95
96
|
}));
|
|
97
|
+
it('getInternalParameter', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
98
|
+
const param = internal_param_enum_1.InternalParam.CatalogBundleSettings;
|
|
99
|
+
const result = yield connector.getInternalParameterValue(param);
|
|
100
|
+
expect(result).toBeDefined();
|
|
101
|
+
}));
|
|
102
|
+
it('getPublicParams', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
+
const result = yield connector.getPublicParams(815);
|
|
104
|
+
expect(result).toBeDefined();
|
|
105
|
+
}));
|
|
96
106
|
});
|
package/build/main-auth.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare class MainAuth extends MainApiConnection {
|
|
|
12
12
|
getCurrencies(active?: boolean): Promise<DataServiceResponseData>;
|
|
13
13
|
getPaymentConditions(name?: string): Promise<DataServiceResponseData>;
|
|
14
14
|
getJoinedTags(table: string, key: string): Promise<DataServiceResponseData>;
|
|
15
|
+
getPublicParams(upId: number): Promise<DataServiceResponseData>;
|
|
15
16
|
getInternalParameterValue(param: InternalParam): Promise<DataServiceResponseData>;
|
|
16
17
|
getPackageStickerPrintLayouts(): Promise<DataServiceResponseData>;
|
|
17
18
|
getObjectConfigurations(screenCfgModule: string, params?: string | string[], insertMode?: boolean): Promise<DataServiceResponseData>;
|
package/build/main-auth.js
CHANGED
|
@@ -24,6 +24,7 @@ const simple_base_data_object_name_enum_1 = require("./enum/simple-base-data-obj
|
|
|
24
24
|
const simple_base_data_operation_name_enum_1 = require("./enum/simple-base-data-operation-name.enum");
|
|
25
25
|
const config_object_name_enum_1 = require("./enum/config-object-name.enum");
|
|
26
26
|
const master_data_object_name_enum_1 = require("./enum/master-data-object-name.enum");
|
|
27
|
+
const public_service_method_1 = require("./enum/public-service-method");
|
|
27
28
|
class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
28
29
|
constructor() {
|
|
29
30
|
super(...arguments);
|
|
@@ -113,6 +114,12 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
113
114
|
};
|
|
114
115
|
return this._call(data_service_method_enum_1.DataServiceMethod.ExecuteMethod, data);
|
|
115
116
|
}
|
|
117
|
+
getPublicParams(upId) {
|
|
118
|
+
const data = {
|
|
119
|
+
upId: upId.toString()
|
|
120
|
+
};
|
|
121
|
+
return this._call(public_service_method_1.PublicServiceMethod.GetPublicParams, data, backend_service_name_enum_1.BackendServiceName.PublicService);
|
|
122
|
+
}
|
|
116
123
|
getInternalParameterValue(param) {
|
|
117
124
|
const data = {
|
|
118
125
|
moduleName: module_name_enum_1.ModuleName.General,
|
package/build/main-public.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MainApiConnection } from './main-api-connection';
|
|
2
2
|
import { SequenceName } from './enum/sequence-name.enum';
|
|
3
3
|
import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/data-service-response-data';
|
|
4
|
-
import { InternalParam } from
|
|
4
|
+
import { InternalParam } from './enum/internal-param.enum';
|
|
5
5
|
import { DomainName } from './enum/domain-name.enum';
|
|
6
6
|
export declare class MainPublic extends MainApiConnection {
|
|
7
7
|
protected endPoint: string;
|
|
@@ -14,6 +14,7 @@ export declare class MainPublic extends MainApiConnection {
|
|
|
14
14
|
getCurrencies(active?: boolean): Promise<DataServiceResponseData>;
|
|
15
15
|
getPaymentConditions(name?: string): Promise<DataServiceResponseData>;
|
|
16
16
|
getJoinedTags(table: string, key: string): Promise<DataServiceResponseData>;
|
|
17
|
+
getPublicParams(upId: number): Promise<DataServiceResponseData>;
|
|
17
18
|
getObjectConfigurations(screenCfgModule: string, params?: string | string[], insertMode?: boolean): Promise<DataServiceResponseData>;
|
|
18
19
|
getStoreGroups(): Promise<DataServiceResponseData>;
|
|
19
20
|
getDomainCollection(languageCode: string, domainName: DomainName): Promise<DataServiceResponseData>;
|
|
@@ -22,4 +23,5 @@ export declare class MainPublic extends MainApiConnection {
|
|
|
22
23
|
getPriceLists(code?: string): Promise<DataServiceResponseData>;
|
|
23
24
|
private createServiceRequestData;
|
|
24
25
|
private _call;
|
|
26
|
+
private _callAjaxService;
|
|
25
27
|
}
|
package/build/main-public.js
CHANGED
|
@@ -14,6 +14,7 @@ const main_api_connection_1 = require("./main-api-connection");
|
|
|
14
14
|
const end_point_enum_1 = require("@colijnit/ioneconnector/build/enum/end-point.enum");
|
|
15
15
|
const public_service_method_1 = require("./enum/public-service-method");
|
|
16
16
|
const data_service_response_data_1 = require("@colijnit/ioneconnector/build/model/data-service-response-data");
|
|
17
|
+
const backend_service_name_enum_1 = require("./enum/backend-service-name.enum");
|
|
17
18
|
class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
18
19
|
constructor() {
|
|
19
20
|
super(...arguments);
|
|
@@ -61,6 +62,20 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
61
62
|
console.warn('getJoinedTags not implemented');
|
|
62
63
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
63
64
|
}
|
|
65
|
+
getPublicParams(upId) {
|
|
66
|
+
const data = {
|
|
67
|
+
upId: upId.toString()
|
|
68
|
+
};
|
|
69
|
+
const message = {
|
|
70
|
+
service: backend_service_name_enum_1.BackendServiceName.PublicService,
|
|
71
|
+
method: public_service_method_1.PublicServiceMethod.GetPublicParams,
|
|
72
|
+
id: "1",
|
|
73
|
+
data: data,
|
|
74
|
+
windowSessionId: "1",
|
|
75
|
+
sessionId: "1"
|
|
76
|
+
};
|
|
77
|
+
return this._callAjaxService(public_service_method_1.PublicServiceMethod.GetPublicParams, data, backend_service_name_enum_1.BackendServiceName.PublicService, false, message);
|
|
78
|
+
}
|
|
64
79
|
getObjectConfigurations(screenCfgModule, params = ['ALL'], insertMode = false) {
|
|
65
80
|
console.warn('getObjectConfigurations not implemented');
|
|
66
81
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
@@ -91,9 +106,14 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
91
106
|
const data = { languageCode: this.languageCode };
|
|
92
107
|
return data;
|
|
93
108
|
}
|
|
94
|
-
_call(method, data, showLoader = false) {
|
|
109
|
+
_call(method, data, showLoader = false, endPoint) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return this.connector.call(method, data, showLoader, undefined, endPoint ? endPoint : this.endPoint);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
_callAjaxService(method, data, service = backend_service_name_enum_1.BackendServiceName.DataService, showLoader = false, ownMessage) {
|
|
95
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
return this.connector.call(method, data, showLoader,
|
|
116
|
+
return this.connector.call(method, data, showLoader, service, end_point_enum_1.EndPoint.AjaxService, ownMessage);
|
|
97
117
|
});
|
|
98
118
|
}
|
|
99
119
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colijnit/mainapi",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "grunt clean && tsc",
|
|
6
6
|
"browserify": "browserify build/connector.js --s colijn -o dist/out-tsc/bundle.js",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"rxjs": "6.6.3"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@colijnit/ioneconnector": ">=2.1.
|
|
26
|
+
"@colijnit/ioneconnector": ">=2.1.16"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/jest": "^24.0.13",
|
|
30
|
-
"@colijnit/ioneconnector": "2.1.
|
|
30
|
+
"@colijnit/ioneconnector": "2.1.16",
|
|
31
31
|
"grunt": "^1.0.3",
|
|
32
32
|
"grunt-clean": "^0.4.0",
|
|
33
33
|
"grunt-contrib-clean": "^1.1.0",
|