@colijnit/transactionapi 1.1.8 → 1.1.9

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.
@@ -9,5 +9,6 @@ export declare enum DataServiceMethod {
9
9
  UnlockObject = "unlockObject",
10
10
  UpdateMultipleObjects = "updateMultipleObjects",
11
11
  InsertMultipleObjects = "insertMultipleObjects",
12
- DeleteMultipleObjects = "deleteMultipleObjects"
12
+ DeleteMultipleObjects = "deleteMultipleObjects",
13
+ Commit = "commit"
13
14
  }
@@ -11,4 +11,5 @@ export var DataServiceMethod;
11
11
  DataServiceMethod["UpdateMultipleObjects"] = "updateMultipleObjects";
12
12
  DataServiceMethod["InsertMultipleObjects"] = "insertMultipleObjects";
13
13
  DataServiceMethod["DeleteMultipleObjects"] = "deleteMultipleObjects";
14
+ DataServiceMethod["Commit"] = "commit";
14
15
  })(DataServiceMethod || (DataServiceMethod = {}));
@@ -9,5 +9,6 @@ export declare enum MasterDataObjectName {
9
9
  MarketingCode = "MarketingCode",
10
10
  PrivacySettingDTO = "PrivacySettingDTO",
11
11
  CoDomainValue = "CoDomainValue",
12
- WareHouse = "WareHouse"
12
+ WareHouse = "WareHouse",
13
+ CustomerGroup = "CustomerGroup"
13
14
  }
@@ -11,4 +11,5 @@ export var MasterDataObjectName;
11
11
  MasterDataObjectName["PrivacySettingDTO"] = "PrivacySettingDTO";
12
12
  MasterDataObjectName["CoDomainValue"] = "CoDomainValue";
13
13
  MasterDataObjectName["WareHouse"] = "WareHouse";
14
+ MasterDataObjectName["CustomerGroup"] = "CustomerGroup";
14
15
  })(MasterDataObjectName || (MasterDataObjectName = {}));
@@ -50,5 +50,7 @@ export declare enum PublicServiceMethod {
50
50
  GetDeliveryMethods = "getDeliveryMethods",
51
51
  GetDeliveryOptions = "getDeliveryMethods",
52
52
  GetRelationListObjects = "getRelationListObjects",
53
- GetStandardTextsNoHeadOrFeet = "getStandardTextsNoHeadOrFeet"
53
+ GetStandardTextsNoHeadOrFeet = "getStandardTextsNoHeadOrFeet",
54
+ GetCustomerGroups = "getCustomerGroups",
55
+ Commit = "commit"
54
56
  }
@@ -52,4 +52,6 @@ export var PublicServiceMethod;
52
52
  PublicServiceMethod["GetDeliveryOptions"] = "getDeliveryMethods";
53
53
  PublicServiceMethod["GetRelationListObjects"] = "getRelationListObjects";
54
54
  PublicServiceMethod["GetStandardTextsNoHeadOrFeet"] = "getStandardTextsNoHeadOrFeet";
55
+ PublicServiceMethod["GetCustomerGroups"] = "getCustomerGroups";
56
+ PublicServiceMethod["Commit"] = "commit";
55
57
  })(PublicServiceMethod || (PublicServiceMethod = {}));
@@ -22,6 +22,8 @@ export declare abstract class IoneApiTransaction {
22
22
  abstract getSingleImage(nodeId: number | string, publication: number, includeMimetype: boolean, thumb: boolean): Promise<DataServiceResponseData>;
23
23
  abstract getDocumentContent(id: number, thumbnail: boolean): Promise<DataServiceResponseData>;
24
24
  abstract getCountries(): Promise<DataServiceResponseData>;
25
+ abstract getCustomerGroups(): Promise<DataServiceResponseData>;
26
+ abstract commit(): Promise<DataServiceResponseData>;
25
27
  abstract getPrivacySettings(): Promise<DataServiceResponseData>;
26
28
  abstract getMarketingCodes(): Promise<DataServiceResponseData>;
27
29
  abstract getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
@@ -20,12 +20,13 @@ import { InsuredInterest } from "./insuredInterest.bo";
20
20
  import { Department } from "./department.bo";
21
21
  import { RelationEventLink } from "./relation-event-link.bo";
22
22
  import { RelationPrivacySetting } from "./relation-privacy-setting.bo";
23
+ import { CustomerGroup } from "./customer-group.bo";
23
24
  export declare class CustomerFullObject extends Relation {
24
25
  memberNr: string;
25
26
  relationStatus: RelationStatus;
26
27
  vatPayment: boolean;
27
28
  mainDebtor: number;
28
- customerGroup: string;
29
+ customerGroup: CustomerGroup;
29
30
  invoiceFrequency: string;
30
31
  numberInvoices: number;
31
32
  financialCustomerGroup: string;
@@ -50,6 +50,8 @@ import { BoSerializerStep } from "../utils/bo-serializer-step.utils";
50
50
  import { RelationEventLink } from "./relation-event-link.bo";
51
51
  import { RelationPrivacySetting } from "./relation-privacy-setting.bo";
52
52
  import { BoFactoryStep } from "../utils/bo-factory-step.utils";
53
+ import { CustomerGroup } from "./customer-group.bo";
54
+ import { ComplexField } from "../factory/decorators/complex-field.decorator";
53
55
  var CustomerFullObject = (function (_super) {
54
56
  __extends(CustomerFullObject, _super);
55
57
  function CustomerFullObject() {
@@ -176,6 +178,10 @@ var CustomerFullObject = (function (_super) {
176
178
  BooleanText(),
177
179
  __metadata("design:type", Boolean)
178
180
  ], CustomerFullObject.prototype, "vatPayment", void 0);
181
+ __decorate([
182
+ ComplexField(CustomerGroup),
183
+ __metadata("design:type", CustomerGroup)
184
+ ], CustomerFullObject.prototype, "customerGroup", void 0);
179
185
  __decorate([
180
186
  BooleanText(),
181
187
  __metadata("design:type", Boolean)
@@ -0,0 +1,6 @@
1
+ import { BusinessObject } from "./business-object";
2
+ export declare class CustomerGroup extends BusinessObject {
3
+ groepsnummer: string;
4
+ naam: string;
5
+ description: string;
6
+ }
@@ -0,0 +1,36 @@
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
+ import { BusinessObjectData } from "../factory/decorators/business-object-data.decorator";
21
+ import { DataMapping } from "../enum/data-mapping.enum";
22
+ import { BusinessObject } from "./business-object";
23
+ var CustomerGroup = (function (_super) {
24
+ __extends(CustomerGroup, _super);
25
+ function CustomerGroup() {
26
+ return _super !== null && _super.apply(this, arguments) || this;
27
+ }
28
+ CustomerGroup = __decorate([
29
+ BusinessObjectData({
30
+ name: "CustomerGroup",
31
+ mapping: DataMapping.RelMan
32
+ })
33
+ ], CustomerGroup);
34
+ return CustomerGroup;
35
+ }(BusinessObject));
36
+ export { CustomerGroup };
@@ -14,6 +14,8 @@ export declare class TransactionAuth extends IoneApiTransaction {
14
14
  getSingleImage(nodeId: number | string, publication?: number, includeMimetype?: boolean, thumb?: boolean): Promise<DataServiceResponseData>;
15
15
  getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
16
16
  getCountries(): Promise<DataServiceResponseData>;
17
+ getCustomerGroups(): Promise<DataServiceResponseData>;
18
+ commit(): Promise<DataServiceResponseData>;
17
19
  getPrivacySettings(): Promise<DataServiceResponseData>;
18
20
  getRelationPrivacySettings(): Promise<DataServiceResponseData>;
19
21
  getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
@@ -127,395 +127,295 @@ var TransactionAuth = (function (_super) {
127
127
  return this._call(DataServiceMethod.ExecuteMethod, data);
128
128
  };
129
129
  TransactionAuth.prototype.getCountries = function () {
130
- return __awaiter(this, void 0, void 0, function () {
131
- return __generator(this, function (_a) {
132
- return [2, this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.Country)];
133
- });
134
- });
130
+ return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.Country);
131
+ };
132
+ TransactionAuth.prototype.getCustomerGroups = function () {
133
+ return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.CustomerGroup);
134
+ };
135
+ TransactionAuth.prototype.commit = function () {
136
+ return this._call(DataServiceMethod.Commit, {}, BackendServiceName.DatasessionService);
135
137
  };
136
138
  TransactionAuth.prototype.getPrivacySettings = function () {
137
- return __awaiter(this, void 0, void 0, function () {
138
- return __generator(this, function (_a) {
139
- return [2, this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.PrivacySettingDTO)];
140
- });
141
- });
139
+ return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.PrivacySettingDTO);
142
140
  };
143
141
  TransactionAuth.prototype.getRelationPrivacySettings = function () {
144
- return __awaiter(this, void 0, void 0, function () {
145
- return __generator(this, function (_a) {
146
- return [2, this.getPrivacySettings()];
147
- });
148
- });
142
+ return this.getPrivacySettings();
149
143
  };
150
144
  TransactionAuth.prototype.getCommissionCodes = function (languageCode) {
151
- return __awaiter(this, void 0, void 0, function () {
152
- return __generator(this, function (_a) {
153
- return [2, this._getDomainCollection(languageCode, DomainName.CommissionCode)];
154
- });
155
- });
145
+ return this._getDomainCollection(languageCode, DomainName.CommissionCode);
156
146
  };
157
147
  TransactionAuth.prototype.getInOutCollection = function (languageCode) {
158
- return __awaiter(this, void 0, void 0, function () {
159
- return __generator(this, function (_a) {
160
- return [2, this._getDomainCollection(languageCode, DomainName.InOutCollection)];
161
- });
162
- });
148
+ return this._getDomainCollection(languageCode, DomainName.InOutCollection);
163
149
  };
164
150
  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
- });
151
+ return this._getDomainCollection(languageCode, DomainName.TextType);
170
152
  };
171
153
  TransactionAuth.prototype._getDomainCollection = function (languageCode, domainName) {
172
- return __awaiter(this, void 0, void 0, function () {
173
- var params;
174
- return __generator(this, function (_a) {
175
- params = {
176
- domainName: domainName,
177
- language: languageCode
178
- };
179
- return [2, this.selectMultiple(ModuleName.General, MasterDataObjectName.CoDomainValue, "", params)];
180
- });
181
- });
154
+ var params = {
155
+ domainName: domainName,
156
+ language: languageCode
157
+ };
158
+ return this.selectMultiple(ModuleName.General, MasterDataObjectName.CoDomainValue, "", params);
182
159
  };
183
160
  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
- });
161
+ var params = {
162
+ language: languageCode
163
+ };
164
+ var data = {
165
+ moduleName: ModuleName.Transaction,
166
+ methodName: TransactionMethod.GetStandardTextsNoHeadOrFeet,
167
+ parameterValues: params,
168
+ refCursorAsArray: true
169
+ };
170
+ return this._call(DataServiceMethod.ExecuteMethod, data);
199
171
  };
200
172
  TransactionAuth.prototype.getTransactionArticleWarehouses = function (goodId, branchNr) {
201
- return __awaiter(this, void 0, void 0, function () {
202
- var params;
203
- return __generator(this, function (_a) {
204
- params = {
205
- branchNr: branchNr,
206
- goodId: goodId
207
- };
208
- return [2, this.selectMultiple(ModuleName.Transaction, MasterDataObjectName.WareHouse, "", params)];
209
- });
210
- });
173
+ var params = {
174
+ branchNr: branchNr,
175
+ goodId: goodId
176
+ };
177
+ return this.selectMultiple(ModuleName.Transaction, MasterDataObjectName.WareHouse, "", params);
211
178
  };
212
179
  TransactionAuth.prototype.getMarketingCodes = function () {
213
- return __awaiter(this, void 0, void 0, function () {
214
- return __generator(this, function (_a) {
215
- return [2, this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.MarketingCode)];
216
- });
217
- });
180
+ return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.MarketingCode);
218
181
  };
219
182
  TransactionAuth.prototype.createTransaction = function (kind, branchNr) {
220
- return __awaiter(this, void 0, void 0, function () {
221
- var params, data;
222
- return __generator(this, function (_a) {
223
- params = {
224
- transactionKind: kind,
225
- branchNr: branchNr
226
- };
227
- data = {
228
- moduleName: ModuleName.Transaction,
229
- methodName: TransactionMethod.CreateTransaction,
230
- parameterValues: params,
231
- refCursorAsArray: true
232
- };
233
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
234
- });
235
- });
183
+ var params = {
184
+ transactionKind: kind,
185
+ branchNr: branchNr
186
+ };
187
+ var data = {
188
+ moduleName: ModuleName.Transaction,
189
+ methodName: TransactionMethod.CreateTransaction,
190
+ parameterValues: params,
191
+ refCursorAsArray: true
192
+ };
193
+ return this._call(DataServiceMethod.ExecuteMethod, data);
236
194
  };
237
195
  TransactionAuth.prototype.getTransactionByNrAndKind = function (kind, transactionNo) {
238
- return __awaiter(this, void 0, void 0, function () {
239
- var params, data;
240
- return __generator(this, function (_a) {
241
- params = {
242
- transactionNr: transactionNo,
243
- transactionKind: kind
244
- };
245
- data = {
246
- moduleName: ModuleName.Transaction,
247
- methodName: TransactionMethod.GetTransactionByNrAndKind,
248
- parameterValues: params,
249
- refCursorAsArray: true
250
- };
251
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
252
- });
253
- });
196
+ var params = {
197
+ transactionNr: transactionNo,
198
+ transactionKind: kind
199
+ };
200
+ var data = {
201
+ moduleName: ModuleName.Transaction,
202
+ methodName: TransactionMethod.GetTransactionByNrAndKind,
203
+ parameterValues: params,
204
+ refCursorAsArray: true
205
+ };
206
+ return this._call(DataServiceMethod.ExecuteMethod, data);
254
207
  };
255
208
  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
- });
209
+ var params = {
210
+ transactionId: transactionId
211
+ };
212
+ var data = {
213
+ moduleName: ModuleName.Transaction,
214
+ methodName: TransactionMethod.GetTransactionById,
215
+ parameterValues: params,
216
+ refCursorAsArray: true
217
+ };
218
+ return this._call(DataServiceMethod.ExecuteMethod, data);
271
219
  };
272
220
  TransactionAuth.prototype.addRelationToTransaction = function (uuid, relationId) {
273
- return __awaiter(this, void 0, void 0, function () {
274
- var params, data;
275
- return __generator(this, function (_a) {
276
- params = {
277
- transactionUuid: uuid,
278
- relationId: relationId
279
- };
280
- data = {
281
- moduleName: ModuleName.Transaction,
282
- methodName: TransactionMethod.SetTransactionRelation,
283
- parameterValues: params,
284
- refCursorAsArray: true,
285
- };
286
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
287
- });
288
- });
221
+ var params = {
222
+ transactionUuid: uuid,
223
+ relationId: relationId
224
+ };
225
+ var data = {
226
+ moduleName: ModuleName.Transaction,
227
+ methodName: TransactionMethod.SetTransactionRelation,
228
+ parameterValues: params,
229
+ refCursorAsArray: true,
230
+ };
231
+ return this._call(DataServiceMethod.ExecuteMethod, data);
289
232
  };
290
233
  TransactionAuth.prototype.saveTransaction = function (uuid) {
291
- return __awaiter(this, void 0, void 0, function () {
292
- var params, data;
293
- return __generator(this, function (_a) {
294
- params = {
295
- uuid: uuid
296
- };
297
- data = {
298
- moduleName: ModuleName.Transaction,
299
- methodName: TransactionMethod.SaveTransaction,
300
- parameterValues: params,
301
- refCursorAsArray: true,
302
- };
303
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
304
- });
305
- });
234
+ var params = {
235
+ uuid: uuid
236
+ };
237
+ var data = {
238
+ moduleName: ModuleName.Transaction,
239
+ methodName: TransactionMethod.SaveTransaction,
240
+ parameterValues: params,
241
+ refCursorAsArray: true,
242
+ };
243
+ return this._call(DataServiceMethod.ExecuteMethod, data);
306
244
  };
307
245
  TransactionAuth.prototype.setTransactionDeliveryOptions = function (request) {
308
- return __awaiter(this, void 0, void 0, function () {
309
- var params, data;
310
- return __generator(this, function (_a) {
311
- params = {
312
- transactionUuid: request.transactionUuid,
313
- deliveryMethod: request.deliveryMethod,
314
- deliveryOptions: request.deliveryOptions,
315
- deliveryDate: request.deliveryDate,
316
- allowPartialDelivery: request.allowPartialDelivery,
317
- preferredDeliveryDate: request.preferredDeliveryDate,
318
- preferredDeliveryDate2: request.preferredDeliveryDate2,
319
- remark: request.remark,
320
- marketingCode: request.marketingCode,
321
- relationReference: request.relationReference,
322
- ownReference: request.ownReference,
323
- transactionAddress: request.transactionAddress,
324
- invoiceAddress: request.invoiceAddress,
325
- };
326
- data = {
327
- moduleName: ModuleName.Transaction,
328
- methodName: TransactionMethod.SetTransactionDeliveryOptions,
329
- parameterValues: params,
330
- refCursorAsArray: true,
331
- };
332
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
333
- });
334
- });
246
+ var params = {
247
+ transactionUuid: request.transactionUuid,
248
+ deliveryMethod: request.deliveryMethod,
249
+ deliveryOptions: request.deliveryOptions,
250
+ deliveryDate: request.deliveryDate,
251
+ allowPartialDelivery: request.allowPartialDelivery,
252
+ preferredDeliveryDate: request.preferredDeliveryDate,
253
+ preferredDeliveryDate2: request.preferredDeliveryDate2,
254
+ remark: request.remark,
255
+ marketingCode: request.marketingCode,
256
+ relationReference: request.relationReference,
257
+ ownReference: request.ownReference,
258
+ transactionAddress: request.transactionAddress,
259
+ invoiceAddress: request.invoiceAddress,
260
+ };
261
+ var data = {
262
+ moduleName: ModuleName.Transaction,
263
+ methodName: TransactionMethod.SetTransactionDeliveryOptions,
264
+ parameterValues: params,
265
+ refCursorAsArray: true,
266
+ };
267
+ return this._call(DataServiceMethod.ExecuteMethod, data);
335
268
  };
336
269
  TransactionAuth.prototype.addTransactionLine = function (uuid, lineType, articleNumber, amount, warehouseNr, commissionCode, isReturn, aboveLineNr, belowLineNr) {
337
- return __awaiter(this, void 0, void 0, function () {
338
- var params, data;
339
- return __generator(this, function (_a) {
340
- params = {
341
- transactionUuid: uuid,
342
- articleNumber: articleNumber,
343
- lineType: lineType,
344
- amount: amount,
345
- warehouseNr: warehouseNr,
346
- commissionCode: commissionCode,
347
- isReturn: isReturn,
348
- aboveLineNr: aboveLineNr,
349
- belowLineNr: belowLineNr
350
- };
351
- data = {
352
- moduleName: ModuleName.Transaction,
353
- methodName: TransactionMethod.AddTransactionLine,
354
- parameterValues: params,
355
- refCursorAsArray: true,
356
- };
357
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
358
- });
359
- });
270
+ var params = {
271
+ transactionUuid: uuid,
272
+ articleNumber: articleNumber,
273
+ lineType: lineType,
274
+ amount: amount,
275
+ warehouseNr: warehouseNr,
276
+ commissionCode: commissionCode,
277
+ isReturn: isReturn,
278
+ aboveLineNr: aboveLineNr,
279
+ belowLineNr: belowLineNr
280
+ };
281
+ var data = {
282
+ moduleName: ModuleName.Transaction,
283
+ methodName: TransactionMethod.AddTransactionLine,
284
+ parameterValues: params,
285
+ refCursorAsArray: true,
286
+ };
287
+ return this._call(DataServiceMethod.ExecuteMethod, data);
360
288
  };
361
289
  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
- });
290
+ var params = {
291
+ transactionUuid: uuid,
292
+ showOnDocuments: showOnDocuments,
293
+ text: text,
294
+ articleBound: articleBound,
295
+ refArticleLineNr: refArticleLineNr,
296
+ aboveLineNr: aboveLineNr,
297
+ belowLineNr: belowLineNr
298
+ };
299
+ var data = {
300
+ moduleName: ModuleName.Transaction,
301
+ methodName: TransactionMethod.AddTextLineToTransaction,
302
+ parameterValues: params,
303
+ refCursorAsArray: true,
304
+ };
305
+ return this._call(DataServiceMethod.ExecuteMethod, data);
383
306
  };
384
307
  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
- });
308
+ var params = {
309
+ lineUuid: lineUuid,
310
+ transactionUuid: uuid,
311
+ aboveLineNr: aboveLineNr,
312
+ belowLineNr: belowLineNr
313
+ };
314
+ var data = {
315
+ moduleName: ModuleName.Transaction,
316
+ methodName: TransactionMethod.ChangeLineSequence,
317
+ parameterValues: params,
318
+ refCursorAsArray: true,
319
+ };
320
+ return this._call(DataServiceMethod.ExecuteMethod, data);
403
321
  };
404
322
  TransactionAuth.prototype.cancelAddTransactionLine = function (lineUuid) {
405
- return __awaiter(this, void 0, void 0, function () {
406
- var params, data;
407
- return __generator(this, function (_a) {
408
- params = {
409
- lineUuid: lineUuid
410
- };
411
- data = {
412
- moduleName: ModuleName.Transaction,
413
- methodName: TransactionMethod.CancelAddTransactionLine,
414
- parameterValues: params,
415
- refCursorAsArray: true,
416
- };
417
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
418
- });
419
- });
323
+ var params = {
324
+ lineUuid: lineUuid
325
+ };
326
+ var data = {
327
+ moduleName: ModuleName.Transaction,
328
+ methodName: TransactionMethod.CancelAddTransactionLine,
329
+ parameterValues: params,
330
+ refCursorAsArray: true,
331
+ };
332
+ return this._call(DataServiceMethod.ExecuteMethod, data);
420
333
  };
421
334
  TransactionAuth.prototype.deleteTransactionLine = function (transactionUuid, lineUuid) {
422
- return __awaiter(this, void 0, void 0, function () {
423
- var params, data;
424
- return __generator(this, function (_a) {
425
- params = {
426
- transactionUuid: transactionUuid,
427
- transactionLineUuid: lineUuid,
428
- };
429
- data = {
430
- moduleName: ModuleName.Transaction,
431
- methodName: TransactionMethod.DeleteTransactionLine,
432
- parameterValues: params,
433
- refCursorAsArray: true,
434
- };
435
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
436
- });
437
- });
335
+ var params = {
336
+ transactionUuid: transactionUuid,
337
+ transactionLineUuid: lineUuid,
338
+ };
339
+ var data = {
340
+ moduleName: ModuleName.Transaction,
341
+ methodName: TransactionMethod.DeleteTransactionLine,
342
+ parameterValues: params,
343
+ refCursorAsArray: true,
344
+ };
345
+ return this._call(DataServiceMethod.ExecuteMethod, data);
438
346
  };
439
347
  TransactionAuth.prototype.changeTransactionLineQuantity = function (transactionUuid, lineUuid, quantity) {
440
- return __awaiter(this, void 0, void 0, function () {
441
- var params, data;
442
- return __generator(this, function (_a) {
443
- params = {
444
- transactionUuid: transactionUuid,
445
- transactionLineUuid: lineUuid,
446
- newQuantity: quantity
447
- };
448
- data = {
449
- moduleName: ModuleName.Transaction,
450
- methodName: TransactionMethod.ChangeTransactionLineQuantity,
451
- parameterValues: params,
452
- refCursorAsArray: true,
453
- };
454
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
455
- });
456
- });
348
+ var params = {
349
+ transactionUuid: transactionUuid,
350
+ transactionLineUuid: lineUuid,
351
+ newQuantity: quantity
352
+ };
353
+ var data = {
354
+ moduleName: ModuleName.Transaction,
355
+ methodName: TransactionMethod.ChangeTransactionLineQuantity,
356
+ parameterValues: params,
357
+ refCursorAsArray: true,
358
+ };
359
+ return this._call(DataServiceMethod.ExecuteMethod, data);
457
360
  };
458
361
  TransactionAuth.prototype.resolvePendingLineReason = function (pendingLineValues) {
459
- return __awaiter(this, void 0, void 0, function () {
460
- var data;
461
- return __generator(this, function (_a) {
462
- data = {
463
- moduleName: ModuleName.Transaction,
464
- methodName: TransactionMethod.ResolvePendingLineReason,
465
- parameterValues: pendingLineValues,
466
- refCursorAsArray: true,
467
- };
468
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
469
- });
470
- });
362
+ var data = {
363
+ moduleName: ModuleName.Transaction,
364
+ methodName: TransactionMethod.ResolvePendingLineReason,
365
+ parameterValues: pendingLineValues,
366
+ refCursorAsArray: true,
367
+ };
368
+ return this._call(DataServiceMethod.ExecuteMethod, data);
471
369
  };
472
370
  TransactionAuth.prototype.getCustomerFullObject = function (relationNo) {
473
- return __awaiter(this, void 0, void 0, function () {
474
- var data;
475
- return __generator(this, function (_a) {
476
- data = {
477
- moduleName: ModuleName.Relation,
478
- objectName: RelationObjectName.CustomerFullObject,
479
- refCursorAsArray: true,
480
- objectId: relationNo
481
- };
482
- return [2, this._call(DataServiceMethod.SelectSingleObject, data)];
483
- });
484
- });
371
+ var data = {
372
+ moduleName: ModuleName.Relation,
373
+ objectName: RelationObjectName.CustomerFullObject,
374
+ refCursorAsArray: true,
375
+ objectId: relationNo
376
+ };
377
+ return this._call(DataServiceMethod.SelectSingleObject, data);
485
378
  };
486
379
  TransactionAuth.prototype.getRelationNumber = function (relationId) {
487
- return __awaiter(this, void 0, void 0, function () {
488
- var params, data;
489
- return __generator(this, function (_a) {
490
- params = {
491
- relationId: relationId
492
- };
493
- data = {
494
- moduleName: ModuleName.Relation,
495
- methodName: RelationObjectName.GetRelationNumber,
496
- parameterValues: params,
497
- refCursorAsArray: true
498
- };
499
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
500
- });
501
- });
380
+ var params = {
381
+ relationId: relationId
382
+ };
383
+ var data = {
384
+ moduleName: ModuleName.Relation,
385
+ methodName: RelationObjectName.GetRelationNumber,
386
+ parameterValues: params,
387
+ refCursorAsArray: true
388
+ };
389
+ return this._call(DataServiceMethod.ExecuteMethod, data);
502
390
  };
503
391
  TransactionAuth.prototype.getSequenceValue = function (sequenceName, noSequence) {
504
392
  if (noSequence === void 0) { noSequence = false; }
505
393
  return __awaiter(this, void 0, void 0, function () {
506
- var params, data;
394
+ var params, data, response;
507
395
  return __generator(this, function (_a) {
508
- params = {
509
- seqName: sequenceName,
510
- noSequence: noSequence
511
- };
512
- data = {
513
- moduleName: ModuleName.General,
514
- methodName: GeneralMethod.GetSequenceValue,
515
- parameterValues: params,
516
- refCursorAsArray: true
517
- };
518
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
396
+ switch (_a.label) {
397
+ case 0:
398
+ params = {
399
+ seqName: sequenceName,
400
+ noSequence: noSequence
401
+ };
402
+ data = {
403
+ moduleName: ModuleName.General,
404
+ methodName: GeneralMethod.GetSequenceValue,
405
+ parameterValues: params,
406
+ refCursorAsArray: true
407
+ };
408
+ return [4, this._call(DataServiceMethod.ExecuteMethod, data)];
409
+ case 1:
410
+ response = _a.sent();
411
+ if (response && response.validationResult && response.validationResult.success) {
412
+ return [2, response.resultObject];
413
+ }
414
+ else {
415
+ return [2, null];
416
+ }
417
+ return [2];
418
+ }
519
419
  });
520
420
  });
521
421
  };
@@ -542,76 +442,49 @@ var TransactionAuth = (function (_super) {
542
442
  });
543
443
  };
544
444
  TransactionAuth.prototype.updateCustomer = function (customer) {
545
- return __awaiter(this, void 0, void 0, function () {
546
- var data;
547
- return __generator(this, function (_a) {
548
- data = {
549
- moduleName: ModuleName.Relation,
550
- objectName: RelationObjectName.CustomerFullObject,
551
- methodName: DataServiceMethod.UpdateObject,
552
- object: this._boSerializer.prepareBusinessObjectForSend(customer),
553
- };
554
- return [2, this._call(DataServiceMethod.UpdateObject, data)];
555
- });
556
- });
445
+ var data = {
446
+ moduleName: ModuleName.Relation,
447
+ objectName: RelationObjectName.CustomerFullObject,
448
+ methodName: DataServiceMethod.UpdateObject,
449
+ object: this._boSerializer.prepareBusinessObjectForSend(customer),
450
+ };
451
+ return this._call(DataServiceMethod.UpdateObject, data);
557
452
  };
558
453
  TransactionAuth.prototype.getDeliveryMethods = function () {
559
- return __awaiter(this, void 0, void 0, function () {
560
- return __generator(this, function (_a) {
561
- return [2, this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.DeliveryMethod, OperationName.GetAll)];
562
- });
563
- });
454
+ return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.DeliveryMethod, OperationName.GetAll);
564
455
  };
565
456
  TransactionAuth.prototype.getDeliveryOptions = function () {
566
- return __awaiter(this, void 0, void 0, function () {
567
- return __generator(this, function (_a) {
568
- return [2, this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.DeliveryOption)];
569
- });
570
- });
457
+ return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.DeliveryOption);
571
458
  };
572
459
  TransactionAuth.prototype.getPostalCodeRetrieval = function (postalCode, houseNumber) {
573
- return __awaiter(this, void 0, void 0, function () {
574
- var params, data;
575
- return __generator(this, function (_a) {
576
- params = {
577
- postalCode: postalCode,
578
- houseNumber: houseNumber
579
- };
580
- data = {
581
- moduleName: ModuleName.Relation,
582
- methodName: GeneralMethod.PostalCodeRetrieval,
583
- parameterValues: params,
584
- refCursorAsArray: true
585
- };
586
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
587
- });
588
- });
460
+ var params = {
461
+ postalCode: postalCode,
462
+ houseNumber: houseNumber
463
+ };
464
+ var data = {
465
+ moduleName: ModuleName.Relation,
466
+ methodName: GeneralMethod.PostalCodeRetrieval,
467
+ parameterValues: params,
468
+ refCursorAsArray: true
469
+ };
470
+ return this._call(DataServiceMethod.ExecuteMethod, data);
589
471
  };
590
472
  TransactionAuth.prototype.getRelationListObjects = function (relationRequest) {
591
- return __awaiter(this, void 0, void 0, function () {
592
- return __generator(this, function (_a) {
593
- return [2, this.selectMultiple(ModuleName.Relation, "RelationListObject", undefined, relationRequest)];
594
- });
595
- });
473
+ return this.selectMultiple(ModuleName.Relation, "RelationListObject", undefined, relationRequest);
596
474
  };
597
475
  TransactionAuth.prototype.setRelationByUser = function (uuid, username, password) {
598
- return __awaiter(this, void 0, void 0, function () {
599
- var paramValues, data;
600
- return __generator(this, function (_a) {
601
- paramValues = {
602
- uuid: uuid,
603
- username: username,
604
- password: password
605
- };
606
- data = {
607
- moduleName: ModuleName.Transaction,
608
- methodName: TransactionMethod.SetRelationByUser,
609
- parameterValues: paramValues,
610
- refCursorAsArray: true
611
- };
612
- return [2, this._call(DataServiceMethod.ExecuteMethod, data)];
613
- });
614
- });
476
+ var paramValues = {
477
+ uuid: uuid,
478
+ username: username,
479
+ password: password
480
+ };
481
+ var data = {
482
+ moduleName: ModuleName.Transaction,
483
+ methodName: TransactionMethod.SetRelationByUser,
484
+ parameterValues: paramValues,
485
+ refCursorAsArray: true
486
+ };
487
+ return this._call(DataServiceMethod.ExecuteMethod, data);
615
488
  };
616
489
  TransactionAuth.prototype.callGetNodeData = function (params) {
617
490
  var data = {
@@ -651,29 +524,25 @@ var TransactionAuth = (function (_super) {
651
524
  return response && response.data && response.data.validationResult && response.data.validationResult.success === true;
652
525
  };
653
526
  TransactionAuth.prototype.selectMultiple = function (moduleName, objectName, operationName, parameterValues) {
654
- return __awaiter(this, void 0, void 0, function () {
655
- var stronglyTypedResults, data;
656
- return __generator(this, function (_a) {
657
- stronglyTypedResults = [];
658
- data = {
659
- moduleName: moduleName,
660
- objectName: objectName
661
- };
662
- if (operationName) {
663
- data.operationName = operationName;
664
- }
665
- if (parameterValues) {
666
- data.parameterValues = parameterValues;
667
- }
668
- return [2, this._call(DataServiceMethod.SelectMultipleObjects, data)];
669
- });
670
- });
671
- };
672
- TransactionAuth.prototype._call = function (method, data, showLoader) {
527
+ var stronglyTypedResults = [];
528
+ var data = {
529
+ moduleName: moduleName,
530
+ objectName: objectName
531
+ };
532
+ if (operationName) {
533
+ data.operationName = operationName;
534
+ }
535
+ if (parameterValues) {
536
+ data.parameterValues = parameterValues;
537
+ }
538
+ return this._call(DataServiceMethod.SelectMultipleObjects, data);
539
+ };
540
+ TransactionAuth.prototype._call = function (method, data, service, showLoader) {
541
+ if (service === void 0) { service = BackendServiceName.DataService; }
673
542
  if (showLoader === void 0) { showLoader = false; }
674
543
  return __awaiter(this, void 0, void 0, function () {
675
544
  return __generator(this, function (_a) {
676
- return [2, this.connector.call(method, data, showLoader, BackendServiceName.DataService, this.endPoint)];
545
+ return [2, this.connector.call(method, data, showLoader, service, this.endPoint)];
677
546
  });
678
547
  });
679
548
  };
@@ -16,6 +16,8 @@ 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
+ getCustomerGroups(): Promise<DataServiceResponseData>;
20
+ commit(): Promise<DataServiceResponseData>;
19
21
  getPrivacySettings(): Promise<DataServiceResponseData>;
20
22
  getMarketingCodes(): Promise<DataServiceResponseData>;
21
23
  getCommissionCodes(languageCode: string): Promise<DataServiceResponseData>;
@@ -165,6 +165,24 @@ var TransactionPublic = (function (_super) {
165
165
  });
166
166
  });
167
167
  };
168
+ TransactionPublic.prototype.getCustomerGroups = function () {
169
+ return __awaiter(this, void 0, void 0, function () {
170
+ var data;
171
+ return __generator(this, function (_a) {
172
+ data = __assign({}, this.createServiceRequestData());
173
+ return [2, this._call(PublicServiceMethod.GetCustomerGroups, data)];
174
+ });
175
+ });
176
+ };
177
+ TransactionPublic.prototype.commit = function () {
178
+ return __awaiter(this, void 0, void 0, function () {
179
+ var data;
180
+ return __generator(this, function (_a) {
181
+ data = __assign({}, this.createServiceRequestData());
182
+ return [2, this._call(PublicServiceMethod.Commit, data)];
183
+ });
184
+ });
185
+ };
168
186
  TransactionPublic.prototype.getPrivacySettings = function () {
169
187
  return __awaiter(this, void 0, void 0, function () {
170
188
  var data;
@@ -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>;
@@ -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
  };
@@ -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://127.0.0.1:8080/ione",
46
- ajaxUrl: "http://127.0.0.1:8080/ione",
46
+ url: "http://localhost:8080/ione",
47
+ ajaxUrl: "http://localhost:8080/ione",
47
48
  schema: "815",
48
49
  version: "251",
49
50
  useLoginEncryption: true,
50
- username: "sjaak",
51
- password: "sjaak1"
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: "sjaak",
60
- password: "sjaak1"
60
+ username: "patrick",
61
+ password: "patrick"
61
62
  };
62
63
  var publicOptions = {
63
64
  url: "http://130.62.7.180:8082/ione",
@@ -193,4 +194,28 @@ describe("TransactionAPI", function () {
193
194
  }
194
195
  });
195
196
  }); });
197
+ it('getSequenceValue', function () { return __awaiter(void 0, void 0, void 0, function () {
198
+ var result;
199
+ return __generator(this, function (_a) {
200
+ switch (_a.label) {
201
+ case 0: return [4, transaction.getSequenceValue(SequenceName.RelationId)];
202
+ case 1:
203
+ result = _a.sent();
204
+ expect(result).toBeDefined();
205
+ return [2];
206
+ }
207
+ });
208
+ }); });
209
+ it('getCustomerGroups', function () { return __awaiter(void 0, void 0, void 0, function () {
210
+ var result;
211
+ return __generator(this, function (_a) {
212
+ switch (_a.label) {
213
+ case 0: return [4, transaction.getCustomerGroups()];
214
+ case 1:
215
+ result = _a.sent();
216
+ expect(result.validationResult.success).toBeTruthy();
217
+ return [2];
218
+ }
219
+ });
220
+ }); });
196
221
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/transactionapi",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
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.19.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.3"
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
  }