@colijnit/transactionapi 1.1.8 → 1.1.11
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/data-service-method.enum.d.ts +2 -1
- package/build/enum/data-service-method.enum.js +1 -0
- package/build/enum/master-data-object-name.enum.d.ts +3 -1
- package/build/enum/master-data-object-name.enum.js +2 -0
- package/build/enum/public-service-method.d.ts +6 -1
- package/build/enum/public-service-method.js +5 -0
- package/build/enum/transaction-method.enum.d.ts +1 -0
- package/build/enum/transaction-method.enum.js +1 -0
- package/build/ione-api-transaction.d.ts +4 -0
- package/build/model/cash-register.d.ts +13 -0
- package/build/model/cash-register.js +25 -0
- package/build/model/customer-group.bo.d.ts +6 -0
- package/build/model/customer-group.bo.js +36 -0
- package/build/model/set-transaction-delivery-options-request.bo.d.ts +7 -0
- package/build/model/set-transaction-delivery-options-request.bo.js +4 -0
- package/build/model/transaction-add-text-line-request.bo.d.ts +10 -0
- package/build/model/transaction-add-text-line-request.bo.js +38 -0
- package/build/model/transaction-line-info.bo.d.ts +2 -0
- package/build/model/transaction-line-info.bo.js +12 -0
- package/build/transaction-auth.d.ts +6 -1
- package/build/transaction-auth.js +316 -418
- package/build/transaction-public.d.ts +5 -0
- package/build/transaction-public.js +43 -1
- package/build/transaction.d.ts +4 -0
- package/build/transaction.js +12 -0
- package/build/transaction.unit.test.js +81 -7
- package/package.json +7 -4
|
@@ -16,6 +16,9 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
16
16
|
getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
|
|
17
17
|
getSingleImage(nodeId: number | string, publication?: number, includeMimetype?: boolean, thumb?: boolean): Promise<DataServiceResponseData>;
|
|
18
18
|
getCountries(): Promise<DataServiceResponseData>;
|
|
19
|
+
getCashRegisters(): Promise<DataServiceResponseData>;
|
|
20
|
+
getCustomerGroups(): Promise<DataServiceResponseData>;
|
|
21
|
+
commit(): Promise<DataServiceResponseData>;
|
|
19
22
|
getPrivacySettings(): Promise<DataServiceResponseData>;
|
|
20
23
|
getMarketingCodes(): Promise<DataServiceResponseData>;
|
|
21
24
|
getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
|
|
@@ -26,6 +29,7 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
26
29
|
createTransaction(kind: TransactionKind, branchNr: string): Promise<DataServiceResponseData>;
|
|
27
30
|
getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
|
|
28
31
|
getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
32
|
+
getArticleBoundTextLinesOfArticleLine(articleLineUuid: string): Promise<DataServiceResponseData>;
|
|
29
33
|
addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
30
34
|
saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
31
35
|
setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
|
@@ -48,6 +52,7 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
48
52
|
setRelationByUser(uuid: string, username: string, password: string): Promise<DataServiceResponseData>;
|
|
49
53
|
private createServiceRequestData;
|
|
50
54
|
private _getDomainCollection;
|
|
55
|
+
private _getMultipleDomainCollection;
|
|
51
56
|
private getValidationResultSuccess;
|
|
52
57
|
private getValidationResultError;
|
|
53
58
|
private _call;
|
|
@@ -165,6 +165,28 @@ var TransactionPublic = (function (_super) {
|
|
|
165
165
|
});
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
|
+
TransactionPublic.prototype.getCashRegisters = function () {
|
|
169
|
+
var data = __assign({}, this.createServiceRequestData());
|
|
170
|
+
return this._call(PublicServiceMethod.GetCashRegisters, data);
|
|
171
|
+
};
|
|
172
|
+
TransactionPublic.prototype.getCustomerGroups = function () {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
174
|
+
var data;
|
|
175
|
+
return __generator(this, function (_a) {
|
|
176
|
+
data = __assign({}, this.createServiceRequestData());
|
|
177
|
+
return [2, this._call(PublicServiceMethod.GetCustomerGroups, data)];
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
TransactionPublic.prototype.commit = function () {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
183
|
+
var data;
|
|
184
|
+
return __generator(this, function (_a) {
|
|
185
|
+
data = __assign({}, this.createServiceRequestData());
|
|
186
|
+
return [2, this._call(PublicServiceMethod.Commit, data)];
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
};
|
|
168
190
|
TransactionPublic.prototype.getPrivacySettings = function () {
|
|
169
191
|
return __awaiter(this, void 0, void 0, function () {
|
|
170
192
|
var data;
|
|
@@ -192,7 +214,7 @@ var TransactionPublic = (function (_super) {
|
|
|
192
214
|
TransactionPublic.prototype.getTextTypes = function (languageCode) {
|
|
193
215
|
return __awaiter(this, void 0, void 0, function () {
|
|
194
216
|
return __generator(this, function (_a) {
|
|
195
|
-
return [2, this.
|
|
217
|
+
return [2, this._getMultipleDomainCollection(languageCode, DomainName.TextType)];
|
|
196
218
|
});
|
|
197
219
|
});
|
|
198
220
|
};
|
|
@@ -259,6 +281,13 @@ var TransactionPublic = (function (_super) {
|
|
|
259
281
|
});
|
|
260
282
|
});
|
|
261
283
|
};
|
|
284
|
+
TransactionPublic.prototype.getArticleBoundTextLinesOfArticleLine = function (articleLineUuid) {
|
|
285
|
+
var params = {
|
|
286
|
+
articleLineUuid: articleLineUuid
|
|
287
|
+
};
|
|
288
|
+
var data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
289
|
+
return this._call(PublicServiceMethod.GetArticleBoundTextLinesOfArticleLine, data);
|
|
290
|
+
};
|
|
262
291
|
TransactionPublic.prototype.addRelationToTransaction = function (uuid, relationId) {
|
|
263
292
|
return __awaiter(this, void 0, void 0, function () {
|
|
264
293
|
return __generator(this, function (_a) {
|
|
@@ -522,6 +551,19 @@ var TransactionPublic = (function (_super) {
|
|
|
522
551
|
});
|
|
523
552
|
});
|
|
524
553
|
};
|
|
554
|
+
TransactionPublic.prototype._getMultipleDomainCollection = function (languageCode, domainName) {
|
|
555
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
556
|
+
var params, data;
|
|
557
|
+
return __generator(this, function (_a) {
|
|
558
|
+
params = {
|
|
559
|
+
domainName: domainName,
|
|
560
|
+
language: languageCode
|
|
561
|
+
};
|
|
562
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
563
|
+
return [2, this._call(PublicServiceMethod.GetMultipleDomainValues, data)];
|
|
564
|
+
});
|
|
565
|
+
});
|
|
566
|
+
};
|
|
525
567
|
TransactionPublic.prototype.getValidationResultSuccess = function () {
|
|
526
568
|
var validationResult = new ValidationResult();
|
|
527
569
|
validationResult.success = true;
|
package/build/transaction.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export declare class Transaction {
|
|
|
33
33
|
getSingleImage(nodeId: number | string, publication: number, includeMimetype: boolean, thumb: boolean): Promise<DataServiceResponseData>;
|
|
34
34
|
getDocumentContent(id: number, thumbnail: boolean): Promise<DataServiceResponseData>;
|
|
35
35
|
getCountries(): Promise<DataServiceResponseData>;
|
|
36
|
+
getCustomerGroups(): Promise<DataServiceResponseData>;
|
|
37
|
+
commit(): Promise<DataServiceResponseData>;
|
|
36
38
|
getPrivacySettings(): Promise<DataServiceResponseData>;
|
|
37
39
|
getMarketingCodes(): Promise<DataServiceResponseData>;
|
|
38
40
|
getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
|
|
@@ -43,6 +45,8 @@ export declare class Transaction {
|
|
|
43
45
|
createTransaction(kind: TransactionKind, branchNr: string): Promise<DataServiceResponseData>;
|
|
44
46
|
getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
|
|
45
47
|
getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
48
|
+
getArticleBoundTextLinesOfArticleLine(articleLineUuid: string): Promise<DataServiceResponseData>;
|
|
49
|
+
getCashRegister(branch?: string, group?: number): Promise<DataServiceResponseData>;
|
|
46
50
|
addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
47
51
|
saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
48
52
|
setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
package/build/transaction.js
CHANGED
|
@@ -85,6 +85,12 @@ var Transaction = (function () {
|
|
|
85
85
|
Transaction.prototype.getCountries = function () {
|
|
86
86
|
return this.transaction.getCountries();
|
|
87
87
|
};
|
|
88
|
+
Transaction.prototype.getCustomerGroups = function () {
|
|
89
|
+
return this.transaction.getCustomerGroups();
|
|
90
|
+
};
|
|
91
|
+
Transaction.prototype.commit = function () {
|
|
92
|
+
return this.transaction.commit();
|
|
93
|
+
};
|
|
88
94
|
Transaction.prototype.getPrivacySettings = function () {
|
|
89
95
|
return this.transaction.getPrivacySettings();
|
|
90
96
|
};
|
|
@@ -115,6 +121,12 @@ var Transaction = (function () {
|
|
|
115
121
|
Transaction.prototype.getTransactionById = function (transactionId) {
|
|
116
122
|
return this.transaction.getTransactionById(transactionId);
|
|
117
123
|
};
|
|
124
|
+
Transaction.prototype.getArticleBoundTextLinesOfArticleLine = function (articleLineUuid) {
|
|
125
|
+
return this.transaction.getArticleBoundTextLinesOfArticleLine(articleLineUuid);
|
|
126
|
+
};
|
|
127
|
+
Transaction.prototype.getCashRegister = function (branch, group) {
|
|
128
|
+
return this.transaction.getCashRegisters(branch, group);
|
|
129
|
+
};
|
|
118
130
|
Transaction.prototype.addRelationToTransaction = function (uuid, relationId) {
|
|
119
131
|
return this.transaction.addRelationToTransaction(uuid, relationId);
|
|
120
132
|
};
|
|
@@ -37,18 +37,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
import { Transaction } from "./transaction";
|
|
38
38
|
import { RelationRequest } from "./model/relation-request";
|
|
39
39
|
import { TransactionKind } from "./enum/transaction-kind.enum";
|
|
40
|
+
import { SequenceName } from "./enum/sequence-name.enum";
|
|
40
41
|
var options = {
|
|
41
42
|
url: 'http',
|
|
42
43
|
ajaxUrl: 'http'
|
|
43
44
|
};
|
|
44
45
|
var localOptions = {
|
|
45
|
-
url: "http://
|
|
46
|
-
ajaxUrl: "http://
|
|
46
|
+
url: "http://localhost:8080/ione",
|
|
47
|
+
ajaxUrl: "http://localhost:8080/ione",
|
|
47
48
|
schema: "815",
|
|
48
|
-
version: "
|
|
49
|
+
version: "252",
|
|
49
50
|
useLoginEncryption: true,
|
|
50
|
-
username: "
|
|
51
|
-
password: "
|
|
51
|
+
username: "patrick",
|
|
52
|
+
password: "patrick"
|
|
52
53
|
};
|
|
53
54
|
var remoteOptions = {
|
|
54
55
|
url: "http://130.62.7.180:8082/ione",
|
|
@@ -56,8 +57,8 @@ var remoteOptions = {
|
|
|
56
57
|
schema: "815",
|
|
57
58
|
version: "251",
|
|
58
59
|
useLoginEncryption: true,
|
|
59
|
-
username: "
|
|
60
|
-
password: "
|
|
60
|
+
username: "patrick",
|
|
61
|
+
password: "patrick"
|
|
61
62
|
};
|
|
62
63
|
var publicOptions = {
|
|
63
64
|
url: "http://130.62.7.180:8082/ione",
|
|
@@ -69,6 +70,7 @@ describe("TransactionAPI", function () {
|
|
|
69
70
|
var transaction;
|
|
70
71
|
beforeEach(function () {
|
|
71
72
|
transaction = new Transaction(localOptions);
|
|
73
|
+
jest.setTimeout(30000);
|
|
72
74
|
});
|
|
73
75
|
it('getPostalCodeRetrieval_shouldContainCityMiddelburg', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
74
76
|
var result;
|
|
@@ -193,4 +195,76 @@ describe("TransactionAPI", function () {
|
|
|
193
195
|
}
|
|
194
196
|
});
|
|
195
197
|
}); });
|
|
198
|
+
it('getSequenceValue', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
199
|
+
var result;
|
|
200
|
+
return __generator(this, function (_a) {
|
|
201
|
+
switch (_a.label) {
|
|
202
|
+
case 0: return [4, transaction.getSequenceValue(SequenceName.RelationId)];
|
|
203
|
+
case 1:
|
|
204
|
+
result = _a.sent();
|
|
205
|
+
expect(result).toBeDefined();
|
|
206
|
+
return [2];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}); });
|
|
210
|
+
it('getCustomerGroups', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
211
|
+
var result;
|
|
212
|
+
return __generator(this, function (_a) {
|
|
213
|
+
switch (_a.label) {
|
|
214
|
+
case 0: return [4, transaction.getCustomerGroups()];
|
|
215
|
+
case 1:
|
|
216
|
+
result = _a.sent();
|
|
217
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
218
|
+
return [2];
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}); });
|
|
222
|
+
it('getCustomerFullObject', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
223
|
+
var result;
|
|
224
|
+
return __generator(this, function (_a) {
|
|
225
|
+
switch (_a.label) {
|
|
226
|
+
case 0: return [4, transaction.getCustomerFullObject(1006600)];
|
|
227
|
+
case 1:
|
|
228
|
+
result = _a.sent();
|
|
229
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
230
|
+
return [2];
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}); });
|
|
234
|
+
it('getCashRegisters', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
235
|
+
var result;
|
|
236
|
+
return __generator(this, function (_a) {
|
|
237
|
+
switch (_a.label) {
|
|
238
|
+
case 0: return [4, transaction.getCashRegister()];
|
|
239
|
+
case 1:
|
|
240
|
+
result = _a.sent();
|
|
241
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
242
|
+
return [2];
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}); });
|
|
246
|
+
it('getCashRegistersFromBranch', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
247
|
+
var result;
|
|
248
|
+
return __generator(this, function (_a) {
|
|
249
|
+
switch (_a.label) {
|
|
250
|
+
case 0: return [4, transaction.getCashRegister("1")];
|
|
251
|
+
case 1:
|
|
252
|
+
result = _a.sent();
|
|
253
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
254
|
+
return [2];
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}); });
|
|
258
|
+
it('getCashRegistersFromGroup', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
259
|
+
var result;
|
|
260
|
+
return __generator(this, function (_a) {
|
|
261
|
+
switch (_a.label) {
|
|
262
|
+
case 0: return [4, transaction.getCashRegister()];
|
|
263
|
+
case 1:
|
|
264
|
+
result = _a.sent();
|
|
265
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
266
|
+
return [2];
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}); });
|
|
196
270
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colijnit/transactionapi",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "grunt clean && tsc",
|
|
6
6
|
"browserify": "browserify build/connector.js --s colijn -o dist/out-tsc/bundle.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"private": false,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"axios": "^0.
|
|
23
|
+
"axios": "^0.24.0",
|
|
24
24
|
"jsencrypt": "3.0.0-beta.1",
|
|
25
25
|
"reflect-metadata": "^0.1.12",
|
|
26
26
|
"rxjs": "~6.5.4",
|
|
27
27
|
"rxjs-compat": "^6.6.3",
|
|
28
|
-
"@colijnit/ioneconnector": "2.0.
|
|
28
|
+
"@colijnit/ioneconnector": "2.0.4"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jest": "^24.0.13",
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
],
|
|
52
52
|
"transform": {
|
|
53
53
|
"^.+\\.tsx?$": "ts-jest"
|
|
54
|
-
}
|
|
54
|
+
},
|
|
55
|
+
"transformIgnorePatterns": [
|
|
56
|
+
"node_modules\\/(?!(@colijnit\\/ioneconnector)\\/)"
|
|
57
|
+
]
|
|
55
58
|
}
|
|
56
59
|
}
|