@colijnit/transactionapi 1.1.4 → 1.1.8
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/domain-name.enum.d.ts +2 -1
- package/build/enum/domain-name.enum.js +1 -0
- package/build/enum/public-service-method.d.ts +5 -1
- package/build/enum/public-service-method.js +4 -0
- package/build/enum/sla-publication.enum.d.ts +4 -0
- package/build/enum/sla-publication.enum.js +5 -0
- package/build/enum/transaction-method.enum.d.ts +5 -1
- package/build/enum/transaction-method.enum.js +4 -0
- package/build/ione-api-transaction.d.ts +6 -1
- package/build/model/nul-relation-object.d.ts +2 -0
- package/build/model/nul-relation-object.js +1 -0
- package/build/model/relation-list-object.bo.d.ts +1 -0
- package/build/model/relation-list-object.bo.js +8 -0
- package/build/model/sla-product.bo.d.ts +20 -0
- package/build/model/sla-product.bo.js +56 -0
- package/build/transaction-auth.d.ts +6 -1
- package/build/transaction-auth.js +88 -2
- package/build/transaction-public.d.ts +6 -1
- package/build/transaction-public.js +68 -2
- package/build/transaction.d.ts +6 -1
- package/build/transaction.js +17 -2
- package/build/transaction.unit.test.js +12 -0
- package/package.json +1 -1
|
@@ -55,5 +55,6 @@ export declare enum DomainName {
|
|
|
55
55
|
PaymentCondition = "DOM_BETALINGSCONDITIE",
|
|
56
56
|
PinTerminal = "DOM_PINTERMINALS",
|
|
57
57
|
ValidityUnit = "DOM_GELDIGHEIDSDUUR_TYPES",
|
|
58
|
-
VoucherType = "DOM_VOUCHERTYPES"
|
|
58
|
+
VoucherType = "DOM_VOUCHERTYPES",
|
|
59
|
+
TextType = "TEKSTSOORT"
|
|
59
60
|
}
|
|
@@ -31,12 +31,15 @@ export declare enum PublicServiceMethod {
|
|
|
31
31
|
GetPrivacySettings = "getPrivacySettings",
|
|
32
32
|
GetMarketingCodes = "getMarketingCodes",
|
|
33
33
|
GetTransactionByNrAndKind = "getTransactionByNrAndKind",
|
|
34
|
+
GetTransactionById = "getTransactionId",
|
|
34
35
|
GetDomainValues = "getDomainValue",
|
|
35
36
|
GetTransactionArticleWarehouses = "getTransactionArticleWarehouses",
|
|
36
37
|
CreateTransaction = "createTransaction",
|
|
37
38
|
SaveTransaction = "saveTransaction",
|
|
38
39
|
SetTransactionDeliveryOptions = "setTransactionDeliveryOptions",
|
|
39
40
|
AddTransactionLine = "addTransactionLine",
|
|
41
|
+
AddTextLineToTransaction = "addTextLineToTransaction",
|
|
42
|
+
ChangeLineSequence = "changeLineSequence",
|
|
40
43
|
CancelAddTransactionLine = "cancelAddTransactionLine",
|
|
41
44
|
DeleteTransactionLine = "deleteTransactionLine",
|
|
42
45
|
ChangeTransactionLineQuantity = "changeTransactionLineQuantity",
|
|
@@ -46,5 +49,6 @@ export declare enum PublicServiceMethod {
|
|
|
46
49
|
PostalCodeRetrieval = "postalCodeRetrieval",
|
|
47
50
|
GetDeliveryMethods = "getDeliveryMethods",
|
|
48
51
|
GetDeliveryOptions = "getDeliveryMethods",
|
|
49
|
-
GetRelationListObjects = "getRelationListObjects"
|
|
52
|
+
GetRelationListObjects = "getRelationListObjects",
|
|
53
|
+
GetStandardTextsNoHeadOrFeet = "getStandardTextsNoHeadOrFeet"
|
|
50
54
|
}
|
|
@@ -32,12 +32,15 @@ export var PublicServiceMethod;
|
|
|
32
32
|
PublicServiceMethod["GetPrivacySettings"] = "getPrivacySettings";
|
|
33
33
|
PublicServiceMethod["GetMarketingCodes"] = "getMarketingCodes";
|
|
34
34
|
PublicServiceMethod["GetTransactionByNrAndKind"] = "getTransactionByNrAndKind";
|
|
35
|
+
PublicServiceMethod["GetTransactionById"] = "getTransactionId";
|
|
35
36
|
PublicServiceMethod["GetDomainValues"] = "getDomainValue";
|
|
36
37
|
PublicServiceMethod["GetTransactionArticleWarehouses"] = "getTransactionArticleWarehouses";
|
|
37
38
|
PublicServiceMethod["CreateTransaction"] = "createTransaction";
|
|
38
39
|
PublicServiceMethod["SaveTransaction"] = "saveTransaction";
|
|
39
40
|
PublicServiceMethod["SetTransactionDeliveryOptions"] = "setTransactionDeliveryOptions";
|
|
40
41
|
PublicServiceMethod["AddTransactionLine"] = "addTransactionLine";
|
|
42
|
+
PublicServiceMethod["AddTextLineToTransaction"] = "addTextLineToTransaction";
|
|
43
|
+
PublicServiceMethod["ChangeLineSequence"] = "changeLineSequence";
|
|
41
44
|
PublicServiceMethod["CancelAddTransactionLine"] = "cancelAddTransactionLine";
|
|
42
45
|
PublicServiceMethod["DeleteTransactionLine"] = "deleteTransactionLine";
|
|
43
46
|
PublicServiceMethod["ChangeTransactionLineQuantity"] = "changeTransactionLineQuantity";
|
|
@@ -48,4 +51,5 @@ export var PublicServiceMethod;
|
|
|
48
51
|
PublicServiceMethod["GetDeliveryMethods"] = "getDeliveryMethods";
|
|
49
52
|
PublicServiceMethod["GetDeliveryOptions"] = "getDeliveryMethods";
|
|
50
53
|
PublicServiceMethod["GetRelationListObjects"] = "getRelationListObjects";
|
|
54
|
+
PublicServiceMethod["GetStandardTextsNoHeadOrFeet"] = "getStandardTextsNoHeadOrFeet";
|
|
51
55
|
})(PublicServiceMethod || (PublicServiceMethod = {}));
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export declare enum TransactionMethod {
|
|
2
2
|
AddTransactionLine = "addTransactionLine",
|
|
3
|
+
AddTextLineToTransaction = "addTextLineToTransaction",
|
|
4
|
+
ChangeLineSequence = "changeLineSequence",
|
|
3
5
|
DeleteTransactionLine = "deleteTransactionLine",
|
|
4
6
|
CancelAddTransactionLine = "cancelAddTransactionLine",
|
|
5
7
|
CreateTransaction = "createTransaction",
|
|
6
8
|
GetTransactionByNrAndKind = "getTransactionByNrAndKind",
|
|
9
|
+
GetTransactionById = "getTransactionById",
|
|
7
10
|
SaveTransaction = "saveTransaction",
|
|
8
11
|
SetRelationByUser = "setRelationByUser",
|
|
9
12
|
SetTransactionDeliveryOptions = "setTransactionDeliveryOptions",
|
|
10
13
|
SetTransactionRelation = "setTransactionRelation",
|
|
11
14
|
ChangeTransactionLineQuantity = "changeTransactionLineQuantity",
|
|
12
|
-
ResolvePendingLineReason = "resolvePendingLineReason"
|
|
15
|
+
ResolvePendingLineReason = "resolvePendingLineReason",
|
|
16
|
+
GetStandardTextsNoHeadOrFeet = "getStandardTextsNoHeadOrFeet"
|
|
13
17
|
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
export var TransactionMethod;
|
|
2
2
|
(function (TransactionMethod) {
|
|
3
3
|
TransactionMethod["AddTransactionLine"] = "addTransactionLine";
|
|
4
|
+
TransactionMethod["AddTextLineToTransaction"] = "addTextLineToTransaction";
|
|
5
|
+
TransactionMethod["ChangeLineSequence"] = "changeLineSequence";
|
|
4
6
|
TransactionMethod["DeleteTransactionLine"] = "deleteTransactionLine";
|
|
5
7
|
TransactionMethod["CancelAddTransactionLine"] = "cancelAddTransactionLine";
|
|
6
8
|
TransactionMethod["CreateTransaction"] = "createTransaction";
|
|
7
9
|
TransactionMethod["GetTransactionByNrAndKind"] = "getTransactionByNrAndKind";
|
|
10
|
+
TransactionMethod["GetTransactionById"] = "getTransactionById";
|
|
8
11
|
TransactionMethod["SaveTransaction"] = "saveTransaction";
|
|
9
12
|
TransactionMethod["SetRelationByUser"] = "setRelationByUser";
|
|
10
13
|
TransactionMethod["SetTransactionDeliveryOptions"] = "setTransactionDeliveryOptions";
|
|
11
14
|
TransactionMethod["SetTransactionRelation"] = "setTransactionRelation";
|
|
12
15
|
TransactionMethod["ChangeTransactionLineQuantity"] = "changeTransactionLineQuantity";
|
|
13
16
|
TransactionMethod["ResolvePendingLineReason"] = "resolvePendingLineReason";
|
|
17
|
+
TransactionMethod["GetStandardTextsNoHeadOrFeet"] = "getStandardTextsNoHeadOrFeet";
|
|
14
18
|
})(TransactionMethod || (TransactionMethod = {}));
|
|
@@ -26,13 +26,18 @@ export declare abstract class IoneApiTransaction {
|
|
|
26
26
|
abstract getMarketingCodes(): Promise<DataServiceResponseData>;
|
|
27
27
|
abstract getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
|
|
28
28
|
abstract getInOutCollection(languageCode: string): Promise<DataServiceResponseData>;
|
|
29
|
+
abstract getTextTypes(languageCode: string): Promise<DataServiceResponseData>;
|
|
30
|
+
abstract getStandardTexts(languageCode: any): Promise<DataServiceResponseData>;
|
|
29
31
|
abstract getTransactionArticleWarehouses(goodId: number, branchNr?: string): Promise<DataServiceResponseData>;
|
|
30
32
|
abstract createTransaction(kind: TransactionKind, branchNr: string): Promise<DataServiceResponseData>;
|
|
31
33
|
abstract getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
|
|
34
|
+
abstract getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
32
35
|
abstract addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
33
36
|
abstract saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
34
37
|
abstract setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
|
35
|
-
abstract addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean): Promise<DataServiceResponseData>;
|
|
38
|
+
abstract addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
39
|
+
abstract addTextLineToTransaction(uuid: string, showOnDocuments: number, text: string, amount: number, articleBound: boolean, refArticleLineNr: number, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
40
|
+
abstract changeLineSequence(uuid: string, lineUuid: string, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
36
41
|
abstract cancelAddTransactionLine(lineUuid: string): Promise<DataServiceResponseData>;
|
|
37
42
|
abstract deleteTransactionLine(uuid: string, lineUuid: string): Promise<DataServiceResponseData>;
|
|
38
43
|
abstract changeTransactionLineQuantity(uuid: string, lineUuid: string, newQuantity: number): Promise<DataServiceResponseData>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { RelationAnyType } from "./relation-any-type";
|
|
2
2
|
import { RelationListObject } from "./relation-list-object.bo";
|
|
3
|
+
import { CustomerFullObject } from "./customer-full-object.bo";
|
|
3
4
|
export declare const NULL_RELATION_OBJECT: RelationAnyType;
|
|
4
5
|
export declare const NULL_RELATION_LIST_OBJECT: RelationListObject;
|
|
6
|
+
export declare const NULL_CUSTOMER_FULL_OBJECT: CustomerFullObject;
|
|
@@ -2,3 +2,4 @@ import { RelationListObject } from "./relation-list-object.bo";
|
|
|
2
2
|
import { CustomerFullObject } from "./customer-full-object.bo";
|
|
3
3
|
export var NULL_RELATION_OBJECT = new CustomerFullObject();
|
|
4
4
|
export var NULL_RELATION_LIST_OBJECT = new RelationListObject();
|
|
5
|
+
export var NULL_CUSTOMER_FULL_OBJECT = new CustomerFullObject();
|
|
@@ -55,6 +55,7 @@ export declare class RelationListObject extends BusinessObject {
|
|
|
55
55
|
get displayName(): string;
|
|
56
56
|
get displayInitials(): string;
|
|
57
57
|
get displayAddress(): string;
|
|
58
|
+
get hasAddressFull(): boolean;
|
|
58
59
|
get displayPostalcodeCity(): string;
|
|
59
60
|
get displayAddressFull(): string;
|
|
60
61
|
constructor();
|
|
@@ -30,6 +30,7 @@ import { StringUtils } from "../utils/string-utils";
|
|
|
30
30
|
import { RelationContactLink } from "./relation-contact-link.bo";
|
|
31
31
|
import { Address } from "./address.bo";
|
|
32
32
|
import { NumberUtils } from "../utils/number-utils";
|
|
33
|
+
import { isNill } from "../utils/function/is-nill.function";
|
|
33
34
|
var RelationListObject = (function (_super) {
|
|
34
35
|
__extends(RelationListObject, _super);
|
|
35
36
|
function RelationListObject() {
|
|
@@ -85,6 +86,13 @@ var RelationListObject = (function (_super) {
|
|
|
85
86
|
enumerable: true,
|
|
86
87
|
configurable: true
|
|
87
88
|
});
|
|
89
|
+
Object.defineProperty(RelationListObject.prototype, "hasAddressFull", {
|
|
90
|
+
get: function () {
|
|
91
|
+
return !(isNill(this.street) && isNill(this.houseNr) && isNill(this.postalCode) && isNill(this.city));
|
|
92
|
+
},
|
|
93
|
+
enumerable: true,
|
|
94
|
+
configurable: true
|
|
95
|
+
});
|
|
88
96
|
Object.defineProperty(RelationListObject.prototype, "displayPostalcodeCity", {
|
|
89
97
|
get: function () {
|
|
90
98
|
return StringUtils.Format("{0}, {1}", [this.postalCode, this.city]);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BusinessObject } from "./business-object";
|
|
2
|
+
import { ProductKind } from "../enum/product-kind.enum";
|
|
3
|
+
import { CoDocument } from "./co-document";
|
|
4
|
+
import { RelationContract } from "./relation-contract.bo";
|
|
5
|
+
import { SlaPublication } from "../enum/sla-publication.enum";
|
|
6
|
+
export declare class SlaProduct extends BusinessObject {
|
|
7
|
+
product: string;
|
|
8
|
+
description: string;
|
|
9
|
+
productReference: string;
|
|
10
|
+
serialNo: string;
|
|
11
|
+
stateId: number;
|
|
12
|
+
productKind: ProductKind;
|
|
13
|
+
charge: boolean;
|
|
14
|
+
publicationCode: SlaPublication;
|
|
15
|
+
image: CoDocument;
|
|
16
|
+
imageAsDataUri: string;
|
|
17
|
+
relationContracts: RelationContract[];
|
|
18
|
+
constructor();
|
|
19
|
+
getId(): string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
21
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
|
+
};
|
|
23
|
+
import { BusinessObject } from "./business-object";
|
|
24
|
+
import { BooleanText } from "../factory/decorators/boolean.decorator";
|
|
25
|
+
import { CoDocument } from "./co-document";
|
|
26
|
+
import { ComplexField } from "../factory/decorators/complex-field.decorator";
|
|
27
|
+
import { NoDbField } from "../factory/decorators/no-db-field.decorator";
|
|
28
|
+
var SlaProduct = (function (_super) {
|
|
29
|
+
__extends(SlaProduct, _super);
|
|
30
|
+
function SlaProduct() {
|
|
31
|
+
var _this = _super.call(this) || this;
|
|
32
|
+
_this.relationContracts = [];
|
|
33
|
+
return _this;
|
|
34
|
+
}
|
|
35
|
+
SlaProduct.prototype.getId = function () {
|
|
36
|
+
return this.product;
|
|
37
|
+
};
|
|
38
|
+
__decorate([
|
|
39
|
+
BooleanText("T"),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], SlaProduct.prototype, "charge", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
ComplexField(CoDocument),
|
|
44
|
+
__metadata("design:type", CoDocument)
|
|
45
|
+
], SlaProduct.prototype, "image", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
NoDbField(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], SlaProduct.prototype, "imageAsDataUri", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
NoDbField(),
|
|
52
|
+
__metadata("design:type", Array)
|
|
53
|
+
], SlaProduct.prototype, "relationContracts", void 0);
|
|
54
|
+
return SlaProduct;
|
|
55
|
+
}(BusinessObject));
|
|
56
|
+
export { SlaProduct };
|
|
@@ -18,15 +18,20 @@ export declare class TransactionAuth extends IoneApiTransaction {
|
|
|
18
18
|
getRelationPrivacySettings(): Promise<DataServiceResponseData>;
|
|
19
19
|
getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
|
|
20
20
|
getInOutCollection(languageCode: string): Promise<DataServiceResponseData>;
|
|
21
|
+
getTextTypes(languageCode: string): Promise<DataServiceResponseData>;
|
|
21
22
|
private _getDomainCollection;
|
|
23
|
+
getStandardTexts(languageCode: any): Promise<DataServiceResponseData>;
|
|
22
24
|
getTransactionArticleWarehouses(goodId: number, branchNr?: string): Promise<DataServiceResponseData>;
|
|
23
25
|
getMarketingCodes(): Promise<DataServiceResponseData>;
|
|
24
26
|
createTransaction(kind: TransactionKind, branchNr: string): Promise<DataServiceResponseData>;
|
|
25
27
|
getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
|
|
28
|
+
getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
26
29
|
addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
27
30
|
saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
28
31
|
setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
|
29
|
-
addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean): Promise<DataServiceResponseData>;
|
|
32
|
+
addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
33
|
+
addTextLineToTransaction(uuid: string, showOnDocuments: number, text: string, amount: number, articleBound: boolean, refArticleLineNr: number, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
34
|
+
changeLineSequence(uuid: string, lineUuid: string, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
30
35
|
cancelAddTransactionLine(lineUuid: string): Promise<DataServiceResponseData>;
|
|
31
36
|
deleteTransactionLine(transactionUuid: string, lineUuid: string): Promise<DataServiceResponseData>;
|
|
32
37
|
changeTransactionLineQuantity(transactionUuid: string, lineUuid: string, quantity: number): Promise<DataServiceResponseData>;
|
|
@@ -161,6 +161,13 @@ var TransactionAuth = (function (_super) {
|
|
|
161
161
|
});
|
|
162
162
|
});
|
|
163
163
|
};
|
|
164
|
+
TransactionAuth.prototype.getTextTypes = function (languageCode) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
166
|
+
return __generator(this, function (_a) {
|
|
167
|
+
return [2, this._getDomainCollection(languageCode, DomainName.TextType)];
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
};
|
|
164
171
|
TransactionAuth.prototype._getDomainCollection = function (languageCode, domainName) {
|
|
165
172
|
return __awaiter(this, void 0, void 0, function () {
|
|
166
173
|
var params;
|
|
@@ -173,6 +180,23 @@ var TransactionAuth = (function (_super) {
|
|
|
173
180
|
});
|
|
174
181
|
});
|
|
175
182
|
};
|
|
183
|
+
TransactionAuth.prototype.getStandardTexts = function (languageCode) {
|
|
184
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
185
|
+
var params, data;
|
|
186
|
+
return __generator(this, function (_a) {
|
|
187
|
+
params = {
|
|
188
|
+
language: languageCode
|
|
189
|
+
};
|
|
190
|
+
data = {
|
|
191
|
+
moduleName: ModuleName.Transaction,
|
|
192
|
+
methodName: TransactionMethod.GetStandardTextsNoHeadOrFeet,
|
|
193
|
+
parameterValues: params,
|
|
194
|
+
refCursorAsArray: true
|
|
195
|
+
};
|
|
196
|
+
return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
};
|
|
176
200
|
TransactionAuth.prototype.getTransactionArticleWarehouses = function (goodId, branchNr) {
|
|
177
201
|
return __awaiter(this, void 0, void 0, function () {
|
|
178
202
|
var params;
|
|
@@ -228,6 +252,23 @@ var TransactionAuth = (function (_super) {
|
|
|
228
252
|
});
|
|
229
253
|
});
|
|
230
254
|
};
|
|
255
|
+
TransactionAuth.prototype.getTransactionById = function (transactionId) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
257
|
+
var params, data;
|
|
258
|
+
return __generator(this, function (_a) {
|
|
259
|
+
params = {
|
|
260
|
+
transactionId: transactionId
|
|
261
|
+
};
|
|
262
|
+
data = {
|
|
263
|
+
moduleName: ModuleName.Transaction,
|
|
264
|
+
methodName: TransactionMethod.GetTransactionById,
|
|
265
|
+
parameterValues: params,
|
|
266
|
+
refCursorAsArray: true
|
|
267
|
+
};
|
|
268
|
+
return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
};
|
|
231
272
|
TransactionAuth.prototype.addRelationToTransaction = function (uuid, relationId) {
|
|
232
273
|
return __awaiter(this, void 0, void 0, function () {
|
|
233
274
|
var params, data;
|
|
@@ -292,7 +333,7 @@ var TransactionAuth = (function (_super) {
|
|
|
292
333
|
});
|
|
293
334
|
});
|
|
294
335
|
};
|
|
295
|
-
TransactionAuth.prototype.addTransactionLine = function (uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn) {
|
|
336
|
+
TransactionAuth.prototype.addTransactionLine = function (uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn, aboveLineNr, belowLineNr) {
|
|
296
337
|
return __awaiter(this, void 0, void 0, function () {
|
|
297
338
|
var params, data;
|
|
298
339
|
return __generator(this, function (_a) {
|
|
@@ -303,7 +344,9 @@ var TransactionAuth = (function (_super) {
|
|
|
303
344
|
amount: amount,
|
|
304
345
|
warehouseNr: warehouseNr,
|
|
305
346
|
commissionCode: commissionCode,
|
|
306
|
-
isReturn: isReturn
|
|
347
|
+
isReturn: isReturn,
|
|
348
|
+
aboveLineNr: aboveLineNr,
|
|
349
|
+
belowLineNr: belowLineNr
|
|
307
350
|
};
|
|
308
351
|
data = {
|
|
309
352
|
moduleName: ModuleName.Transaction,
|
|
@@ -315,6 +358,49 @@ var TransactionAuth = (function (_super) {
|
|
|
315
358
|
});
|
|
316
359
|
});
|
|
317
360
|
};
|
|
361
|
+
TransactionAuth.prototype.addTextLineToTransaction = function (uuid, showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr) {
|
|
362
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
363
|
+
var params, data;
|
|
364
|
+
return __generator(this, function (_a) {
|
|
365
|
+
params = {
|
|
366
|
+
transactionUuid: uuid,
|
|
367
|
+
showOnDocuments: showOnDocuments,
|
|
368
|
+
text: text,
|
|
369
|
+
articleBound: articleBound,
|
|
370
|
+
refArticleLineNr: refArticleLineNr,
|
|
371
|
+
aboveLineNr: aboveLineNr,
|
|
372
|
+
belowLineNr: belowLineNr
|
|
373
|
+
};
|
|
374
|
+
data = {
|
|
375
|
+
moduleName: ModuleName.Transaction,
|
|
376
|
+
methodName: TransactionMethod.AddTextLineToTransaction,
|
|
377
|
+
parameterValues: params,
|
|
378
|
+
refCursorAsArray: true,
|
|
379
|
+
};
|
|
380
|
+
return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
};
|
|
384
|
+
TransactionAuth.prototype.changeLineSequence = function (uuid, lineUuid, aboveLineNr, belowLineNr) {
|
|
385
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
386
|
+
var params, data;
|
|
387
|
+
return __generator(this, function (_a) {
|
|
388
|
+
params = {
|
|
389
|
+
lineUuid: lineUuid,
|
|
390
|
+
transactionUuid: uuid,
|
|
391
|
+
aboveLineNr: aboveLineNr,
|
|
392
|
+
belowLineNr: belowLineNr
|
|
393
|
+
};
|
|
394
|
+
data = {
|
|
395
|
+
moduleName: ModuleName.Transaction,
|
|
396
|
+
methodName: TransactionMethod.ChangeLineSequence,
|
|
397
|
+
parameterValues: params,
|
|
398
|
+
refCursorAsArray: true,
|
|
399
|
+
};
|
|
400
|
+
return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
|
|
401
|
+
});
|
|
402
|
+
});
|
|
403
|
+
};
|
|
318
404
|
TransactionAuth.prototype.cancelAddTransactionLine = function (lineUuid) {
|
|
319
405
|
return __awaiter(this, void 0, void 0, function () {
|
|
320
406
|
var params, data;
|
|
@@ -20,13 +20,18 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
20
20
|
getMarketingCodes(): Promise<DataServiceResponseData>;
|
|
21
21
|
getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
|
|
22
22
|
getInOutCollection(languageCode: string): Promise<DataServiceResponseData>;
|
|
23
|
+
getTextTypes(languageCode: string): Promise<DataServiceResponseData>;
|
|
24
|
+
getStandardTexts(languageCode: any): Promise<DataServiceResponseData>;
|
|
23
25
|
getTransactionArticleWarehouses(goodId: number, branchNr?: string): Promise<DataServiceResponseData>;
|
|
24
26
|
createTransaction(kind: TransactionKind, branchNr: string): Promise<DataServiceResponseData>;
|
|
25
27
|
getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
|
|
28
|
+
getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
26
29
|
addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
27
30
|
saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
28
31
|
setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
|
29
|
-
addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean): Promise<DataServiceResponseData>;
|
|
32
|
+
addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
33
|
+
addTextLineToTransaction(uuid: string, showOnDocuments: number, text: string, amount: number, articleBound: boolean, refArticleLineNr: number, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
34
|
+
changeLineSequence(uuid: string, lineUuid: string, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
30
35
|
cancelAddTransactionLine(lineUuid: string): Promise<DataServiceResponseData>;
|
|
31
36
|
deleteTransactionLine(transactionUuid: string, lineUuid: string): Promise<DataServiceResponseData>;
|
|
32
37
|
changeTransactionLineQuantity(transactionUuid: string, lineUuid: string, quantity: number): Promise<DataServiceResponseData>;
|
|
@@ -189,6 +189,25 @@ var TransactionPublic = (function (_super) {
|
|
|
189
189
|
TransactionPublic.prototype.getInOutCollection = function (languageCode) {
|
|
190
190
|
return this._getDomainCollection(languageCode, DomainName.InOutCollection);
|
|
191
191
|
};
|
|
192
|
+
TransactionPublic.prototype.getTextTypes = function (languageCode) {
|
|
193
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
194
|
+
return __generator(this, function (_a) {
|
|
195
|
+
return [2, this._getDomainCollection(languageCode, DomainName.TextType)];
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
TransactionPublic.prototype.getStandardTexts = function (languageCode) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
201
|
+
var params, data;
|
|
202
|
+
return __generator(this, function (_a) {
|
|
203
|
+
params = {
|
|
204
|
+
language: languageCode
|
|
205
|
+
};
|
|
206
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
207
|
+
return [2, this._call(PublicServiceMethod.GetStandardTextsNoHeadOrFeet, data)];
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
};
|
|
192
211
|
TransactionPublic.prototype.getTransactionArticleWarehouses = function (goodId, branchNr) {
|
|
193
212
|
return __awaiter(this, void 0, void 0, function () {
|
|
194
213
|
var params, data;
|
|
@@ -228,6 +247,18 @@ var TransactionPublic = (function (_super) {
|
|
|
228
247
|
});
|
|
229
248
|
});
|
|
230
249
|
};
|
|
250
|
+
TransactionPublic.prototype.getTransactionById = function (transactionId) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
252
|
+
var params, data;
|
|
253
|
+
return __generator(this, function (_a) {
|
|
254
|
+
params = {
|
|
255
|
+
transactionId: transactionId,
|
|
256
|
+
};
|
|
257
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
258
|
+
return [2, this._call(PublicServiceMethod.GetTransactionById, data)];
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
};
|
|
231
262
|
TransactionPublic.prototype.addRelationToTransaction = function (uuid, relationId) {
|
|
232
263
|
return __awaiter(this, void 0, void 0, function () {
|
|
233
264
|
return __generator(this, function (_a) {
|
|
@@ -271,7 +302,7 @@ var TransactionPublic = (function (_super) {
|
|
|
271
302
|
});
|
|
272
303
|
});
|
|
273
304
|
};
|
|
274
|
-
TransactionPublic.prototype.addTransactionLine = function (uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn) {
|
|
305
|
+
TransactionPublic.prototype.addTransactionLine = function (uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn, aboveLineNr, belowLineNr) {
|
|
275
306
|
return __awaiter(this, void 0, void 0, function () {
|
|
276
307
|
var params, data;
|
|
277
308
|
return __generator(this, function (_a) {
|
|
@@ -282,13 +313,48 @@ var TransactionPublic = (function (_super) {
|
|
|
282
313
|
amount: amount,
|
|
283
314
|
warehouseNr: warehouseNr,
|
|
284
315
|
commissionCode: commissionCode,
|
|
285
|
-
isReturn: isReturn
|
|
316
|
+
isReturn: isReturn,
|
|
317
|
+
aboveLineNr: aboveLineNr,
|
|
318
|
+
belowLineNr: belowLineNr
|
|
286
319
|
};
|
|
287
320
|
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
288
321
|
return [2, this._call(PublicServiceMethod.AddTransactionLine, data)];
|
|
289
322
|
});
|
|
290
323
|
});
|
|
291
324
|
};
|
|
325
|
+
TransactionPublic.prototype.addTextLineToTransaction = function (uuid, showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr) {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
327
|
+
var params, data;
|
|
328
|
+
return __generator(this, function (_a) {
|
|
329
|
+
params = {
|
|
330
|
+
transactionUuid: uuid,
|
|
331
|
+
showOnDocuments: showOnDocuments,
|
|
332
|
+
text: text,
|
|
333
|
+
articleBound: articleBound,
|
|
334
|
+
refArticleLineNr: refArticleLineNr,
|
|
335
|
+
aboveLineNr: aboveLineNr,
|
|
336
|
+
belowLineNr: belowLineNr
|
|
337
|
+
};
|
|
338
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
339
|
+
return [2, this._call(PublicServiceMethod.AddTextLineToTransaction, data)];
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
TransactionPublic.prototype.changeLineSequence = function (uuid, lineUuid, aboveLineNr, belowLineNr) {
|
|
344
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
345
|
+
var params, data;
|
|
346
|
+
return __generator(this, function (_a) {
|
|
347
|
+
params = {
|
|
348
|
+
transactionUuid: uuid,
|
|
349
|
+
lineUuid: lineUuid,
|
|
350
|
+
aboveLineNr: aboveLineNr,
|
|
351
|
+
belowLineNr: belowLineNr
|
|
352
|
+
};
|
|
353
|
+
data = __assign(__assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
354
|
+
return [2, this._call(PublicServiceMethod.ChangeLineSequence, data)];
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
};
|
|
292
358
|
TransactionPublic.prototype.cancelAddTransactionLine = function (lineUuid) {
|
|
293
359
|
return __awaiter(this, void 0, void 0, function () {
|
|
294
360
|
var params, data;
|
package/build/transaction.d.ts
CHANGED
|
@@ -37,13 +37,18 @@ export declare class Transaction {
|
|
|
37
37
|
getMarketingCodes(): Promise<DataServiceResponseData>;
|
|
38
38
|
getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
|
|
39
39
|
getInOutCollection(languageCode: string): Promise<DataServiceResponseData>;
|
|
40
|
+
getTextTypes(languageCode: string): Promise<DataServiceResponseData>;
|
|
41
|
+
getStandardTexts(languageCode: string): Promise<DataServiceResponseData>;
|
|
40
42
|
getTransactionArticleWarehouses(goodId: number, branchNr?: string): Promise<DataServiceResponseData>;
|
|
41
43
|
createTransaction(kind: TransactionKind, branchNr: string): Promise<DataServiceResponseData>;
|
|
42
44
|
getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
|
|
45
|
+
getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
43
46
|
addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
44
47
|
saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
45
48
|
setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
|
46
|
-
addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean): Promise<DataServiceResponseData>;
|
|
49
|
+
addTransactionLine(uuid: string, lineType: TransactionLineType, articleNumber: string, amount: number, warehouseNr?: number, commissionCode?: string, isReturn?: boolean, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
50
|
+
addTextLineToTransaction(uuid: string, showOnDocuments: number, text: string, amount: number, articleBound: boolean, refArticleLineNr: number, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
51
|
+
changeLineSequence(uuid: string, lineUuid: string, aboveLineNr?: number, belowLineNr?: number): Promise<DataServiceResponseData>;
|
|
47
52
|
cancelAddTransactionLine(lineUuid: string): Promise<DataServiceResponseData>;
|
|
48
53
|
deleteTransactionLine(uuid: string, lineUuid: string): Promise<DataServiceResponseData>;
|
|
49
54
|
changeTransactionLineQuantity(uuid: string, lineUuid: string, newQuantity: number): Promise<DataServiceResponseData>;
|
package/build/transaction.js
CHANGED
|
@@ -97,6 +97,12 @@ var Transaction = (function () {
|
|
|
97
97
|
Transaction.prototype.getInOutCollection = function (languageCode) {
|
|
98
98
|
return this.transaction.getInOutCollection(languageCode);
|
|
99
99
|
};
|
|
100
|
+
Transaction.prototype.getTextTypes = function (languageCode) {
|
|
101
|
+
return this.transaction.getTextTypes(languageCode);
|
|
102
|
+
};
|
|
103
|
+
Transaction.prototype.getStandardTexts = function (languageCode) {
|
|
104
|
+
return this.transaction.getStandardTexts(languageCode);
|
|
105
|
+
};
|
|
100
106
|
Transaction.prototype.getTransactionArticleWarehouses = function (goodId, branchNr) {
|
|
101
107
|
return this.transaction.getTransactionArticleWarehouses(goodId, branchNr);
|
|
102
108
|
};
|
|
@@ -106,6 +112,9 @@ var Transaction = (function () {
|
|
|
106
112
|
Transaction.prototype.getTransactionByNrAndKind = function (kind, transactionNo) {
|
|
107
113
|
return this.transaction.getTransactionByNrAndKind(kind, transactionNo);
|
|
108
114
|
};
|
|
115
|
+
Transaction.prototype.getTransactionById = function (transactionId) {
|
|
116
|
+
return this.transaction.getTransactionById(transactionId);
|
|
117
|
+
};
|
|
109
118
|
Transaction.prototype.addRelationToTransaction = function (uuid, relationId) {
|
|
110
119
|
return this.transaction.addRelationToTransaction(uuid, relationId);
|
|
111
120
|
};
|
|
@@ -115,8 +124,14 @@ var Transaction = (function () {
|
|
|
115
124
|
Transaction.prototype.setTransactionDeliveryOptions = function (request) {
|
|
116
125
|
return this.transaction.setTransactionDeliveryOptions(request);
|
|
117
126
|
};
|
|
118
|
-
Transaction.prototype.addTransactionLine = function (uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn) {
|
|
119
|
-
return this.transaction.addTransactionLine(uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn);
|
|
127
|
+
Transaction.prototype.addTransactionLine = function (uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn, aboveLineNr, belowLineNr) {
|
|
128
|
+
return this.transaction.addTransactionLine(uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn, aboveLineNr, belowLineNr);
|
|
129
|
+
};
|
|
130
|
+
Transaction.prototype.addTextLineToTransaction = function (uuid, showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr) {
|
|
131
|
+
return this.transaction.addTextLineToTransaction(uuid, showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr);
|
|
132
|
+
};
|
|
133
|
+
Transaction.prototype.changeLineSequence = function (uuid, lineUuid, aboveLineNr, belowLineNr) {
|
|
134
|
+
return this.transaction.changeLineSequence(uuid, lineUuid, aboveLineNr, belowLineNr);
|
|
120
135
|
};
|
|
121
136
|
Transaction.prototype.cancelAddTransactionLine = function (lineUuid) {
|
|
122
137
|
return this.transaction.cancelAddTransactionLine(lineUuid);
|
|
@@ -133,6 +133,18 @@ describe("TransactionAPI", function () {
|
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
}); });
|
|
136
|
+
it('getTextTypes_NL', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
137
|
+
var result;
|
|
138
|
+
return __generator(this, function (_a) {
|
|
139
|
+
switch (_a.label) {
|
|
140
|
+
case 0: return [4, transaction.getTextTypes("NL")];
|
|
141
|
+
case 1:
|
|
142
|
+
result = _a.sent();
|
|
143
|
+
expect(result.resultObjects.length).toBe(10);
|
|
144
|
+
return [2];
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}); });
|
|
136
148
|
it('getTransactionArticleWareHouses_688443', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
137
149
|
var result;
|
|
138
150
|
return __generator(this, function (_a) {
|