@colijnit/transactionapi 1.1.9 → 1.1.12
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/discount-type.enum.d.ts +9 -0
- package/build/enum/discount-type.enum.js +10 -0
- package/build/enum/master-data-object-name.enum.d.ts +4 -1
- package/build/enum/master-data-object-name.enum.js +3 -0
- package/build/enum/operation-name.enum.d.ts +3 -1
- package/build/enum/operation-name.enum.js +2 -0
- package/build/enum/public-service-method.d.ts +4 -1
- package/build/enum/public-service-method.js +3 -0
- package/build/enum/transaction-method.enum.d.ts +18 -4
- package/build/enum/transaction-method.enum.js +17 -3
- package/build/ione-api-transaction.d.ts +36 -4
- package/build/model/cash-register.d.ts +13 -0
- package/build/model/cash-register.js +25 -0
- package/build/model/change-line-assembly-time-request.d.ts +5 -0
- package/build/model/change-line-assembly-time-request.js +6 -0
- package/build/model/change-line-collection-code-request.d.ts +5 -0
- package/build/model/change-line-collection-code-request.js +6 -0
- package/build/model/change-line-commission-code-request.d.ts +5 -0
- package/build/model/change-line-commission-code-request.js +6 -0
- package/build/model/change-line-delivery-date-request.d.ts +5 -0
- package/build/model/change-line-delivery-date-request.js +20 -0
- package/build/model/change-line-delivery-method-request.d.ts +5 -0
- package/build/model/change-line-delivery-method-request.js +6 -0
- package/build/model/change-line-discount-request.d.ts +8 -0
- package/build/model/change-line-discount-request.js +6 -0
- package/build/model/change-line-edit-time-request.d.ts +5 -0
- package/build/model/change-line-edit-time-request.js +6 -0
- package/build/model/change-line-price-list-request.d.ts +5 -0
- package/build/model/change-line-price-list-request.js +6 -0
- package/build/model/change-line-price-request.d.ts +5 -0
- package/build/model/change-line-price-request.js +6 -0
- package/build/model/change-line-quantity-request.d.ts +5 -0
- package/build/model/change-line-quantity-request.js +6 -0
- package/build/model/change-line-reference-request.d.ts +5 -0
- package/build/model/change-line-reference-request.js +6 -0
- package/build/model/change-line-sequence-request.d.ts +6 -0
- package/build/model/change-line-sequence-request.js +6 -0
- package/build/model/change-line-supplier-article-number-request.d.ts +5 -0
- package/build/model/change-line-supplier-article-number-request.js +6 -0
- package/build/model/change-line-vat-request.d.ts +5 -0
- package/build/model/change-line-vat-request.js +6 -0
- package/build/model/change-line-warehouse-request.d.ts +5 -0
- package/build/model/change-line-warehouse-request.js +6 -0
- package/build/model/customer-full-object.bo.d.ts +1 -2
- package/build/model/customer-full-object.bo.js +0 -6
- package/build/model/price-list.d.ts +2 -0
- package/build/model/price-list.js +18 -0
- package/build/model/resolve-pending-reason-request.bo.d.ts +1 -1
- package/build/model/resolve-pending-reason-request.bo.js +4 -4
- 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-info-response.bo.js +2 -0
- package/build/model/transaction-line-info.bo.d.ts +26 -3
- package/build/model/transaction-line-info.bo.js +12 -0
- package/build/model/vat.d.ts +15 -0
- package/build/model/vat.js +43 -0
- package/build/transaction-auth.d.ts +38 -5
- package/build/transaction-auth.js +179 -25
- package/build/transaction-public.d.ts +37 -4
- package/build/transaction-public.js +105 -18
- package/build/transaction.d.ts +36 -4
- package/build/transaction.js +56 -4
- package/build/transaction.unit.test.js +86 -1
- package/package.json +1 -1
|
@@ -4,9 +4,24 @@ import { SequenceName } from "./enum/sequence-name.enum";
|
|
|
4
4
|
import { TransactionLineType } from "./enum/transaction-line-type.enum";
|
|
5
5
|
import { SetTransactionDeliveryOptionsRequest } from "./model/set-transaction-delivery-options-request.bo";
|
|
6
6
|
import { RelationRequest } from "./model/relation-request";
|
|
7
|
-
import {
|
|
7
|
+
import { ResolveLinePendingReasonRequest } from "./model/resolve-pending-reason-request.bo";
|
|
8
8
|
import { DataServiceResponseData } from "./model/data-service-response-data";
|
|
9
9
|
import { CustomerFullObject } from "./model/customer-full-object.bo";
|
|
10
|
+
import { ChangeLineSequenceRequest } from "./model/change-line-sequence-request";
|
|
11
|
+
import { ChangeLineCommissionCodeRequest } from "./model/change-line-commission-code-request";
|
|
12
|
+
import { ChangeLineWarehouseRequest } from "./model/change-line-warehouse-request";
|
|
13
|
+
import { ChangeLinePriceRequest } from "./model/change-line-price-request";
|
|
14
|
+
import { ChangeLinePriceListRequest } from "./model/change-line-price-list-request";
|
|
15
|
+
import { ChangeLineVatRequest } from "./model/change-line-vat-request";
|
|
16
|
+
import { ChangeLineDiscountRequest } from "./model/change-line-discount-request";
|
|
17
|
+
import { ChangeLineDeliveryMethodRequest } from "./model/change-line-delivery-method-request";
|
|
18
|
+
import { ChangeLineDeliveryDateRequest } from "./model/change-line-delivery-date-request";
|
|
19
|
+
import { ChangeLineAssemblyTimeRequest } from "./model/change-line-assembly-time-request";
|
|
20
|
+
import { ChangeLineEditTimeRequest } from "./model/change-line-edit-time-request";
|
|
21
|
+
import { ChangeLineSupplierArticleNumberRequest } from "./model/change-line-supplier-article-number-request";
|
|
22
|
+
import { ChangeLineReferenceRequest } from "./model/change-line-reference-request";
|
|
23
|
+
import { ChangeLineCollectionCodeRequest } from "./model/change-line-collection-code-request";
|
|
24
|
+
import { ChangeLineQuantityRequest } from "./model/change-line-quantity-request";
|
|
10
25
|
export declare class TransactionPublic extends IoneApiTransaction {
|
|
11
26
|
protected endPoint: string;
|
|
12
27
|
getGoodIdFromArticleNr(sku: string): Promise<DataServiceResponseData>;
|
|
@@ -16,6 +31,7 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
16
31
|
getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
|
|
17
32
|
getSingleImage(nodeId: number | string, publication?: number, includeMimetype?: boolean, thumb?: boolean): Promise<DataServiceResponseData>;
|
|
18
33
|
getCountries(): Promise<DataServiceResponseData>;
|
|
34
|
+
getCashRegisters(): Promise<DataServiceResponseData>;
|
|
19
35
|
getCustomerGroups(): Promise<DataServiceResponseData>;
|
|
20
36
|
commit(): Promise<DataServiceResponseData>;
|
|
21
37
|
getPrivacySettings(): Promise<DataServiceResponseData>;
|
|
@@ -28,21 +44,37 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
28
44
|
createTransaction(kind: TransactionKind, branchNr: string): Promise<DataServiceResponseData>;
|
|
29
45
|
getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
|
|
30
46
|
getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
47
|
+
getArticleBoundTextLinesOfArticleLine(articleLineUuid: string): Promise<DataServiceResponseData>;
|
|
31
48
|
addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
32
49
|
saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
33
50
|
setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
|
34
51
|
addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
35
52
|
addTextLineToTransaction(uuid: string, showOnDocuments: number, text: string, amount: number, articleBound: boolean, refArticleLineNr: number, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
36
|
-
changeLineSequence(
|
|
53
|
+
changeLineSequence(request: ChangeLineSequenceRequest): Promise<DataServiceResponseData>;
|
|
54
|
+
changeLineCommissionCode(request: ChangeLineCommissionCodeRequest): Promise<DataServiceResponseData>;
|
|
55
|
+
changeLineWarehouse(request: ChangeLineWarehouseRequest): Promise<DataServiceResponseData>;
|
|
56
|
+
changeLinePrice(request: ChangeLinePriceRequest): Promise<DataServiceResponseData>;
|
|
57
|
+
changeLinePriceList(request: ChangeLinePriceListRequest): Promise<DataServiceResponseData>;
|
|
58
|
+
changeLineVat(request: ChangeLineVatRequest): Promise<DataServiceResponseData>;
|
|
59
|
+
changeLineDiscount(request: ChangeLineDiscountRequest): Promise<DataServiceResponseData>;
|
|
60
|
+
changeLineDeliveryMethod(request: ChangeLineDeliveryMethodRequest): Promise<DataServiceResponseData>;
|
|
61
|
+
changeLineDeliveryDate(request: ChangeLineDeliveryDateRequest): Promise<DataServiceResponseData>;
|
|
62
|
+
changeLineAssemblyTime(request: ChangeLineAssemblyTimeRequest): Promise<DataServiceResponseData>;
|
|
63
|
+
changeLineEditTime(request: ChangeLineEditTimeRequest): Promise<DataServiceResponseData>;
|
|
64
|
+
changeLineSupplierArticleNumber(request: ChangeLineSupplierArticleNumberRequest): Promise<DataServiceResponseData>;
|
|
65
|
+
changeLineReference(request: ChangeLineReferenceRequest): Promise<DataServiceResponseData>;
|
|
66
|
+
changeLineCollectionCode(request: ChangeLineCollectionCodeRequest): Promise<DataServiceResponseData>;
|
|
37
67
|
cancelAddTransactionLine(lineUuid: string): Promise<DataServiceResponseData>;
|
|
38
68
|
deleteTransactionLine(transactionUuid: string, lineUuid: string): Promise<DataServiceResponseData>;
|
|
39
|
-
|
|
40
|
-
resolvePendingLineReason(pendingLineValues:
|
|
69
|
+
changeLineQuantity(request: ChangeLineQuantityRequest): Promise<DataServiceResponseData>;
|
|
70
|
+
resolvePendingLineReason(pendingLineValues: ResolveLinePendingReasonRequest): Promise<DataServiceResponseData>;
|
|
41
71
|
getCustomerFullObject(relationNo: number): Promise<DataServiceResponseData>;
|
|
42
72
|
getRelationNumber(relationId: any): Promise<DataServiceResponseData>;
|
|
43
73
|
insertCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
44
74
|
updateCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
45
75
|
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
76
|
+
getPriceLists(code?: string): Promise<DataServiceResponseData>;
|
|
77
|
+
getVatList(onlyValid: boolean): Promise<DataServiceResponseData>;
|
|
46
78
|
getDeliveryMethods(): Promise<DataServiceResponseData>;
|
|
47
79
|
getDeliveryOptions(): Promise<DataServiceResponseData>;
|
|
48
80
|
getPostalCodeRetrieval(postalCode: string, houseNumber: string): Promise<DataServiceResponseData>;
|
|
@@ -50,6 +82,7 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
50
82
|
setRelationByUser(uuid: string, username: string, password: string): Promise<DataServiceResponseData>;
|
|
51
83
|
private createServiceRequestData;
|
|
52
84
|
private _getDomainCollection;
|
|
85
|
+
private _getMultipleDomainCollection;
|
|
53
86
|
private getValidationResultSuccess;
|
|
54
87
|
private getValidationResultError;
|
|
55
88
|
private _call;
|
|
@@ -165,6 +165,10 @@ 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
|
+
};
|
|
168
172
|
TransactionPublic.prototype.getCustomerGroups = function () {
|
|
169
173
|
return __awaiter(this, void 0, void 0, function () {
|
|
170
174
|
var data;
|
|
@@ -210,7 +214,7 @@ var TransactionPublic = (function (_super) {
|
|
|
210
214
|
TransactionPublic.prototype.getTextTypes = function (languageCode) {
|
|
211
215
|
return __awaiter(this, void 0, void 0, function () {
|
|
212
216
|
return __generator(this, function (_a) {
|
|
213
|
-
return [2, this.
|
|
217
|
+
return [2, this._getMultipleDomainCollection(languageCode, DomainName.TextType)];
|
|
214
218
|
});
|
|
215
219
|
});
|
|
216
220
|
};
|
|
@@ -277,6 +281,13 @@ var TransactionPublic = (function (_super) {
|
|
|
277
281
|
});
|
|
278
282
|
});
|
|
279
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
|
+
};
|
|
280
291
|
TransactionPublic.prototype.addRelationToTransaction = function (uuid, relationId) {
|
|
281
292
|
return __awaiter(this, void 0, void 0, function () {
|
|
282
293
|
return __generator(this, function (_a) {
|
|
@@ -358,21 +369,67 @@ var TransactionPublic = (function (_super) {
|
|
|
358
369
|
});
|
|
359
370
|
});
|
|
360
371
|
};
|
|
361
|
-
TransactionPublic.prototype.changeLineSequence = function (
|
|
372
|
+
TransactionPublic.prototype.changeLineSequence = function (request) {
|
|
362
373
|
return __awaiter(this, void 0, void 0, function () {
|
|
363
|
-
var
|
|
374
|
+
var data;
|
|
364
375
|
return __generator(this, function (_a) {
|
|
365
|
-
|
|
366
|
-
transactionUuid: uuid,
|
|
367
|
-
lineUuid: lineUuid,
|
|
368
|
-
aboveLineNr: aboveLineNr,
|
|
369
|
-
belowLineNr: belowLineNr
|
|
370
|
-
};
|
|
371
|
-
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
376
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: request });
|
|
372
377
|
return [2, this._call(PublicServiceMethod.ChangeLineSequence, data)];
|
|
373
378
|
});
|
|
374
379
|
});
|
|
375
380
|
};
|
|
381
|
+
TransactionPublic.prototype.changeLineCommissionCode = function (request) {
|
|
382
|
+
console.warn('not implemented');
|
|
383
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
384
|
+
};
|
|
385
|
+
TransactionPublic.prototype.changeLineWarehouse = function (request) {
|
|
386
|
+
console.warn('not implemented');
|
|
387
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
388
|
+
};
|
|
389
|
+
TransactionPublic.prototype.changeLinePrice = function (request) {
|
|
390
|
+
console.warn('not implemented');
|
|
391
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
392
|
+
};
|
|
393
|
+
TransactionPublic.prototype.changeLinePriceList = function (request) {
|
|
394
|
+
console.warn('not implemented');
|
|
395
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
396
|
+
};
|
|
397
|
+
TransactionPublic.prototype.changeLineVat = function (request) {
|
|
398
|
+
console.warn('not implemented');
|
|
399
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
400
|
+
};
|
|
401
|
+
TransactionPublic.prototype.changeLineDiscount = function (request) {
|
|
402
|
+
console.warn('not implemented');
|
|
403
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
404
|
+
};
|
|
405
|
+
TransactionPublic.prototype.changeLineDeliveryMethod = function (request) {
|
|
406
|
+
console.warn('not implemented');
|
|
407
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
408
|
+
};
|
|
409
|
+
TransactionPublic.prototype.changeLineDeliveryDate = function (request) {
|
|
410
|
+
console.warn('not implemented');
|
|
411
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
412
|
+
};
|
|
413
|
+
TransactionPublic.prototype.changeLineAssemblyTime = function (request) {
|
|
414
|
+
console.warn('not implemented');
|
|
415
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
416
|
+
};
|
|
417
|
+
TransactionPublic.prototype.changeLineEditTime = function (request) {
|
|
418
|
+
console.warn('not implemented');
|
|
419
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
420
|
+
};
|
|
421
|
+
TransactionPublic.prototype.changeLineSupplierArticleNumber = function (request) {
|
|
422
|
+
console.warn('not implemented');
|
|
423
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
424
|
+
};
|
|
425
|
+
TransactionPublic.prototype.changeLineReference = function (request) {
|
|
426
|
+
console.warn('not implemented');
|
|
427
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
428
|
+
};
|
|
429
|
+
TransactionPublic.prototype.changeLineCollectionCode = function (request) {
|
|
430
|
+
console.warn('not implemented');
|
|
431
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
432
|
+
};
|
|
376
433
|
TransactionPublic.prototype.cancelAddTransactionLine = function (lineUuid) {
|
|
377
434
|
return __awaiter(this, void 0, void 0, function () {
|
|
378
435
|
var params, data;
|
|
@@ -398,16 +455,11 @@ var TransactionPublic = (function (_super) {
|
|
|
398
455
|
});
|
|
399
456
|
});
|
|
400
457
|
};
|
|
401
|
-
TransactionPublic.prototype.
|
|
458
|
+
TransactionPublic.prototype.changeLineQuantity = function (request) {
|
|
402
459
|
return __awaiter(this, void 0, void 0, function () {
|
|
403
|
-
var
|
|
460
|
+
var data;
|
|
404
461
|
return __generator(this, function (_a) {
|
|
405
|
-
|
|
406
|
-
transactionUuid: transactionUuid,
|
|
407
|
-
transactionLineUuid: lineUuid,
|
|
408
|
-
newQuantity: quantity
|
|
409
|
-
};
|
|
410
|
-
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
462
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: request });
|
|
411
463
|
return [2, this._call(PublicServiceMethod.ChangeTransactionLineQuantity, data)];
|
|
412
464
|
});
|
|
413
465
|
});
|
|
@@ -476,6 +528,28 @@ var TransactionPublic = (function (_super) {
|
|
|
476
528
|
});
|
|
477
529
|
});
|
|
478
530
|
};
|
|
531
|
+
TransactionPublic.prototype.getPriceLists = function (code) {
|
|
532
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
533
|
+
var params, data;
|
|
534
|
+
return __generator(this, function (_a) {
|
|
535
|
+
params = {};
|
|
536
|
+
if (code) {
|
|
537
|
+
params.code = code;
|
|
538
|
+
}
|
|
539
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
540
|
+
return [2, this._call(PublicServiceMethod.GetDeliveryMethods, data)];
|
|
541
|
+
});
|
|
542
|
+
});
|
|
543
|
+
};
|
|
544
|
+
TransactionPublic.prototype.getVatList = function (onlyValid) {
|
|
545
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
546
|
+
var data;
|
|
547
|
+
return __generator(this, function (_a) {
|
|
548
|
+
data = __assign({}, this.createServiceRequestData());
|
|
549
|
+
return [2, null];
|
|
550
|
+
});
|
|
551
|
+
});
|
|
552
|
+
};
|
|
479
553
|
TransactionPublic.prototype.getDeliveryMethods = function () {
|
|
480
554
|
return __awaiter(this, void 0, void 0, function () {
|
|
481
555
|
var data;
|
|
@@ -540,6 +614,19 @@ var TransactionPublic = (function (_super) {
|
|
|
540
614
|
});
|
|
541
615
|
});
|
|
542
616
|
};
|
|
617
|
+
TransactionPublic.prototype._getMultipleDomainCollection = function (languageCode, domainName) {
|
|
618
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
619
|
+
var params, data;
|
|
620
|
+
return __generator(this, function (_a) {
|
|
621
|
+
params = {
|
|
622
|
+
domainName: domainName,
|
|
623
|
+
language: languageCode
|
|
624
|
+
};
|
|
625
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
626
|
+
return [2, this._call(PublicServiceMethod.GetMultipleDomainValues, data)];
|
|
627
|
+
});
|
|
628
|
+
});
|
|
629
|
+
};
|
|
543
630
|
TransactionPublic.prototype.getValidationResultSuccess = function () {
|
|
544
631
|
var validationResult = new ValidationResult();
|
|
545
632
|
validationResult.success = true;
|
package/build/transaction.d.ts
CHANGED
|
@@ -5,11 +5,26 @@ import { DataServiceResponseData } from "./model/data-service-response-data";
|
|
|
5
5
|
import { TransactionKind } from "./enum/transaction-kind.enum";
|
|
6
6
|
import { SetTransactionDeliveryOptionsRequest } from "./model/set-transaction-delivery-options-request.bo";
|
|
7
7
|
import { TransactionLineType } from "./enum/transaction-line-type.enum";
|
|
8
|
-
import {
|
|
8
|
+
import { ResolveLinePendingReasonRequest } from "./model/resolve-pending-reason-request.bo";
|
|
9
9
|
import { SequenceName } from "./enum/sequence-name.enum";
|
|
10
10
|
import { CustomerFullObject } from "./model/customer-full-object.bo";
|
|
11
11
|
import { RelationRequest } from "./model/relation-request";
|
|
12
12
|
import { Options } from "@colijnit/ioneconnector/build/model/options";
|
|
13
|
+
import { ChangeLineSequenceRequest } from "./model/change-line-sequence-request";
|
|
14
|
+
import { ChangeLineQuantityRequest } from "./model/change-line-quantity-request";
|
|
15
|
+
import { ChangeLineCommissionCodeRequest } from "./model/change-line-commission-code-request";
|
|
16
|
+
import { ChangeLineWarehouseRequest } from "./model/change-line-warehouse-request";
|
|
17
|
+
import { ChangeLinePriceRequest } from "./model/change-line-price-request";
|
|
18
|
+
import { ChangeLinePriceListRequest } from "./model/change-line-price-list-request";
|
|
19
|
+
import { ChangeLineVatRequest } from "./model/change-line-vat-request";
|
|
20
|
+
import { ChangeLineDiscountRequest } from "./model/change-line-discount-request";
|
|
21
|
+
import { ChangeLineDeliveryMethodRequest } from "./model/change-line-delivery-method-request";
|
|
22
|
+
import { ChangeLineDeliveryDateRequest } from "./model/change-line-delivery-date-request";
|
|
23
|
+
import { ChangeLineAssemblyTimeRequest } from "./model/change-line-assembly-time-request";
|
|
24
|
+
import { ChangeLineEditTimeRequest } from "./model/change-line-edit-time-request";
|
|
25
|
+
import { ChangeLineSupplierArticleNumberRequest } from "./model/change-line-supplier-article-number-request";
|
|
26
|
+
import { ChangeLineReferenceRequest } from "./model/change-line-reference-request";
|
|
27
|
+
import { ChangeLineCollectionCodeRequest } from "./model/change-line-collection-code-request";
|
|
13
28
|
export declare class Transaction {
|
|
14
29
|
readonly showLoader: Subject<boolean>;
|
|
15
30
|
readonly connectionAborted: Subject<void>;
|
|
@@ -45,19 +60,36 @@ export declare class Transaction {
|
|
|
45
60
|
createTransaction(kind: TransactionKind, branchNr: string): Promise<DataServiceResponseData>;
|
|
46
61
|
getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
|
|
47
62
|
getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
63
|
+
getArticleBoundTextLinesOfArticleLine(articleLineUuid: string): Promise<DataServiceResponseData>;
|
|
64
|
+
getCashRegister(branch?: string, group?: number): Promise<DataServiceResponseData>;
|
|
48
65
|
addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
49
66
|
saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
50
67
|
setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
|
51
68
|
addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
52
69
|
addTextLineToTransaction(uuid: string, showOnDocuments: number, text: string, amount: number, articleBound: boolean, refArticleLineNr: number, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
53
|
-
changeLineSequence(
|
|
70
|
+
changeLineSequence(request: ChangeLineSequenceRequest): Promise<DataServiceResponseData>;
|
|
54
71
|
cancelAddTransactionLine(lineUuid: string): Promise<DataServiceResponseData>;
|
|
55
72
|
deleteTransactionLine(uuid: string, lineUuid: string): Promise<DataServiceResponseData>;
|
|
56
|
-
changeTransactionLineQuantity(
|
|
57
|
-
|
|
73
|
+
changeTransactionLineQuantity(request: ChangeLineQuantityRequest): Promise<DataServiceResponseData>;
|
|
74
|
+
changeTransactionLineCommissionCode(request: ChangeLineCommissionCodeRequest): Promise<DataServiceResponseData>;
|
|
75
|
+
changeTransactionLineWarehouse(request: ChangeLineWarehouseRequest): Promise<DataServiceResponseData>;
|
|
76
|
+
changeTransactionLinePrice(request: ChangeLinePriceRequest): Promise<DataServiceResponseData>;
|
|
77
|
+
changeTransactionLinePriceList(request: ChangeLinePriceListRequest): Promise<DataServiceResponseData>;
|
|
78
|
+
changeTransactionLineVat(request: ChangeLineVatRequest): Promise<DataServiceResponseData>;
|
|
79
|
+
changeTransactionLineDiscount(request: ChangeLineDiscountRequest): Promise<DataServiceResponseData>;
|
|
80
|
+
changeTransactionLineDeliveryMethod(request: ChangeLineDeliveryMethodRequest): Promise<DataServiceResponseData>;
|
|
81
|
+
changeTransactionLineDeliveryDate(request: ChangeLineDeliveryDateRequest): Promise<DataServiceResponseData>;
|
|
82
|
+
changeTransactionLineAssemblyTime(request: ChangeLineAssemblyTimeRequest): Promise<DataServiceResponseData>;
|
|
83
|
+
changeTransactionLineEditTime(request: ChangeLineEditTimeRequest): Promise<DataServiceResponseData>;
|
|
84
|
+
changeTransactionLineSupplierArticleNumber(request: ChangeLineSupplierArticleNumberRequest): Promise<DataServiceResponseData>;
|
|
85
|
+
changeTransactionLineReference(request: ChangeLineReferenceRequest): Promise<DataServiceResponseData>;
|
|
86
|
+
changeTransactionLineCollectionCode(request: ChangeLineCollectionCodeRequest): Promise<DataServiceResponseData>;
|
|
87
|
+
resolvePendingLineReason(pendingLineValues: ResolveLinePendingReasonRequest): Promise<DataServiceResponseData>;
|
|
58
88
|
getCustomerFullObject(relationNo: number): Promise<DataServiceResponseData>;
|
|
59
89
|
getRelationNumber(relationId: any): Promise<DataServiceResponseData>;
|
|
60
90
|
getSequenceValue(sequenceName: SequenceName, noSequence?: boolean): Promise<DataServiceResponseData>;
|
|
91
|
+
getPriceLists(code?: string): Promise<DataServiceResponseData>;
|
|
92
|
+
getVatList(onlyValid?: boolean): Promise<DataServiceResponseData>;
|
|
61
93
|
insertCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
62
94
|
updateCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
63
95
|
getDeliveryMethods(): Promise<DataServiceResponseData>;
|
package/build/transaction.js
CHANGED
|
@@ -121,6 +121,12 @@ var Transaction = (function () {
|
|
|
121
121
|
Transaction.prototype.getTransactionById = function (transactionId) {
|
|
122
122
|
return this.transaction.getTransactionById(transactionId);
|
|
123
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
|
+
};
|
|
124
130
|
Transaction.prototype.addRelationToTransaction = function (uuid, relationId) {
|
|
125
131
|
return this.transaction.addRelationToTransaction(uuid, relationId);
|
|
126
132
|
};
|
|
@@ -136,8 +142,8 @@ var Transaction = (function () {
|
|
|
136
142
|
Transaction.prototype.addTextLineToTransaction = function (uuid, showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr) {
|
|
137
143
|
return this.transaction.addTextLineToTransaction(uuid, showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr);
|
|
138
144
|
};
|
|
139
|
-
Transaction.prototype.changeLineSequence = function (
|
|
140
|
-
return this.transaction.changeLineSequence(
|
|
145
|
+
Transaction.prototype.changeLineSequence = function (request) {
|
|
146
|
+
return this.transaction.changeLineSequence(request);
|
|
141
147
|
};
|
|
142
148
|
Transaction.prototype.cancelAddTransactionLine = function (lineUuid) {
|
|
143
149
|
return this.transaction.cancelAddTransactionLine(lineUuid);
|
|
@@ -145,8 +151,47 @@ var Transaction = (function () {
|
|
|
145
151
|
Transaction.prototype.deleteTransactionLine = function (uuid, lineUuid) {
|
|
146
152
|
return this.transaction.deleteTransactionLine(uuid, lineUuid);
|
|
147
153
|
};
|
|
148
|
-
Transaction.prototype.changeTransactionLineQuantity = function (
|
|
149
|
-
return this.transaction.
|
|
154
|
+
Transaction.prototype.changeTransactionLineQuantity = function (request) {
|
|
155
|
+
return this.transaction.changeLineQuantity(request);
|
|
156
|
+
};
|
|
157
|
+
Transaction.prototype.changeTransactionLineCommissionCode = function (request) {
|
|
158
|
+
return this.transaction.changeLineCommissionCode(request);
|
|
159
|
+
};
|
|
160
|
+
Transaction.prototype.changeTransactionLineWarehouse = function (request) {
|
|
161
|
+
return this.transaction.changeLineWarehouse(request);
|
|
162
|
+
};
|
|
163
|
+
Transaction.prototype.changeTransactionLinePrice = function (request) {
|
|
164
|
+
return this.transaction.changeLinePrice(request);
|
|
165
|
+
};
|
|
166
|
+
Transaction.prototype.changeTransactionLinePriceList = function (request) {
|
|
167
|
+
return this.transaction.changeLinePriceList(request);
|
|
168
|
+
};
|
|
169
|
+
Transaction.prototype.changeTransactionLineVat = function (request) {
|
|
170
|
+
return this.transaction.changeLineVat(request);
|
|
171
|
+
};
|
|
172
|
+
Transaction.prototype.changeTransactionLineDiscount = function (request) {
|
|
173
|
+
return this.transaction.changeLineDiscount(request);
|
|
174
|
+
};
|
|
175
|
+
Transaction.prototype.changeTransactionLineDeliveryMethod = function (request) {
|
|
176
|
+
return this.transaction.changeLineDeliveryMethod(request);
|
|
177
|
+
};
|
|
178
|
+
Transaction.prototype.changeTransactionLineDeliveryDate = function (request) {
|
|
179
|
+
return this.transaction.changeLineDeliveryDate(request);
|
|
180
|
+
};
|
|
181
|
+
Transaction.prototype.changeTransactionLineAssemblyTime = function (request) {
|
|
182
|
+
return this.transaction.changeLineAssemblyTime(request);
|
|
183
|
+
};
|
|
184
|
+
Transaction.prototype.changeTransactionLineEditTime = function (request) {
|
|
185
|
+
return this.transaction.changeLineEditTime(request);
|
|
186
|
+
};
|
|
187
|
+
Transaction.prototype.changeTransactionLineSupplierArticleNumber = function (request) {
|
|
188
|
+
return this.transaction.changeLineSupplierArticleNumber(request);
|
|
189
|
+
};
|
|
190
|
+
Transaction.prototype.changeTransactionLineReference = function (request) {
|
|
191
|
+
return this.transaction.changeLineReference(request);
|
|
192
|
+
};
|
|
193
|
+
Transaction.prototype.changeTransactionLineCollectionCode = function (request) {
|
|
194
|
+
return this.transaction.changeLineCollectionCode(request);
|
|
150
195
|
};
|
|
151
196
|
Transaction.prototype.resolvePendingLineReason = function (pendingLineValues) {
|
|
152
197
|
return this.transaction.resolvePendingLineReason(pendingLineValues);
|
|
@@ -161,6 +206,13 @@ var Transaction = (function () {
|
|
|
161
206
|
if (noSequence === void 0) { noSequence = false; }
|
|
162
207
|
return this.transaction.getSequenceValue(sequenceName, noSequence);
|
|
163
208
|
};
|
|
209
|
+
Transaction.prototype.getPriceLists = function (code) {
|
|
210
|
+
return this.transaction.getPriceLists(code);
|
|
211
|
+
};
|
|
212
|
+
Transaction.prototype.getVatList = function (onlyValid) {
|
|
213
|
+
if (onlyValid === void 0) { onlyValid = false; }
|
|
214
|
+
return this.transaction.getVatList(onlyValid);
|
|
215
|
+
};
|
|
164
216
|
Transaction.prototype.insertCustomer = function (customer) {
|
|
165
217
|
return this.transaction.insertCustomer(customer);
|
|
166
218
|
};
|
|
@@ -46,7 +46,7 @@ var localOptions = {
|
|
|
46
46
|
url: "http://localhost:8080/ione",
|
|
47
47
|
ajaxUrl: "http://localhost:8080/ione",
|
|
48
48
|
schema: "815",
|
|
49
|
-
version: "
|
|
49
|
+
version: "252",
|
|
50
50
|
useLoginEncryption: true,
|
|
51
51
|
username: "patrick",
|
|
52
52
|
password: "patrick"
|
|
@@ -70,6 +70,7 @@ describe("TransactionAPI", function () {
|
|
|
70
70
|
var transaction;
|
|
71
71
|
beforeEach(function () {
|
|
72
72
|
transaction = new Transaction(localOptions);
|
|
73
|
+
jest.setTimeout(30000);
|
|
73
74
|
});
|
|
74
75
|
it('getPostalCodeRetrieval_shouldContainCityMiddelburg', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
75
76
|
var result;
|
|
@@ -218,4 +219,88 @@ describe("TransactionAPI", function () {
|
|
|
218
219
|
}
|
|
219
220
|
});
|
|
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
|
+
}); });
|
|
270
|
+
it('getPriceLists', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
271
|
+
var result;
|
|
272
|
+
return __generator(this, function (_a) {
|
|
273
|
+
switch (_a.label) {
|
|
274
|
+
case 0: return [4, transaction.getPriceLists('test')];
|
|
275
|
+
case 1:
|
|
276
|
+
result = _a.sent();
|
|
277
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
278
|
+
return [2];
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}); });
|
|
282
|
+
it('getVatCodes', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
283
|
+
var result;
|
|
284
|
+
return __generator(this, function (_a) {
|
|
285
|
+
switch (_a.label) {
|
|
286
|
+
case 0: return [4, transaction.getVatList(true)];
|
|
287
|
+
case 1:
|
|
288
|
+
result = _a.sent();
|
|
289
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
290
|
+
return [2];
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
}); });
|
|
294
|
+
it('getDeliveryMethods', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
295
|
+
var result;
|
|
296
|
+
return __generator(this, function (_a) {
|
|
297
|
+
switch (_a.label) {
|
|
298
|
+
case 0: return [4, transaction.getDeliveryMethods()];
|
|
299
|
+
case 1:
|
|
300
|
+
result = _a.sent();
|
|
301
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
302
|
+
return [2];
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
}); });
|
|
221
306
|
});
|