yaveon.ecm.d3dwebhooks 0.9.14 → 0.9.16
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/js/Yaveon.ECM.d3d.Utility.d.ts +1 -0
- package/js/Yaveon.ECM.d3d.Utility.js +3 -0
- package/js/Yaveon.ECM.d3d.Webhook.Constants.d.ts +61 -55
- package/js/Yaveon.ECM.d3d.Webhook.Constants.js +78 -73
- package/js/Yaveon.ECM.d3d.Webhook.Handler.js +14 -11
- package/js/Yaveon.ECM.d3d.Webhook.Interfaces.d.ts +7 -2
- package/js/clients/Yaveon.ECM.af.Client.d.ts +12 -1
- package/js/clients/Yaveon.ECM.af.Client.js +77 -1
- package/js/clients/Yaveon.ECM.af.Client.js.map +1 -1
- package/js/clients/Yaveon.ECM.af.Contracts.Client.d.ts +2 -0
- package/js/clients/Yaveon.ECM.af.Contracts.Client.js +10 -7
- package/js/clients/Yaveon.ECM.af.Contracts.Client.js.map +1 -1
- package/js/clients/Yaveon.ECM.af.QM.Client.d.ts +15 -0
- package/js/clients/Yaveon.ECM.af.QM.Client.js +37 -0
- package/js/clients/Yaveon.ECM.af.QM.Client.js.map +1 -0
- package/js/clients/Yaveon.ECM.d3d.Client.d.ts +6 -1
- package/js/clients/Yaveon.ECM.d3d.Client.js +26 -30
- package/js/clients/Yaveon.ECM.d3d.Client.js.map +1 -1
- package/js/clients/Yaveon.ECM.d3d.Webhook.Client.d.ts +2 -0
- package/js/clients/Yaveon.ECM.d3d.Webhook.Client.js +17 -36
- package/js/clients/Yaveon.ECM.d3d.Webhook.Client.js.map +1 -1
- package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Constants.d.ts +8 -6
- package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Constants.js +12 -32
- package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Constants.js.map +1 -1
- package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Handler.js +5 -5
- package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Handler.js.map +1 -1
- package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Interfaces.d.ts +2 -2
- package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Utility.js +3 -26
- package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Utility.js.map +1 -1
- package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Constants.d.ts +3 -3
- package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Constants.js +5 -27
- package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Constants.js.map +1 -1
- package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Handler.js.map +1 -1
- package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Logic.js.map +1 -1
- package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Utility.js +1 -1
- package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Utility.js.map +1 -1
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Constants.d.ts +5 -5
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Constants.js +7 -29
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Constants.js.map +1 -1
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Handler.js +5 -5
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Handler.js.map +1 -1
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Logic.js +3 -3
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Logic.js.map +1 -1
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Utility.js +2 -25
- package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Utility.js.map +1 -1
- package/js/features/NumberRanges/Yaveon.ECM.d3d.Webhook.NumberRanges.Handler.js +5 -5
- package/js/features/NumberRanges/Yaveon.ECM.d3d.Webhook.NumberRanges.Handler.js.map +1 -1
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Constants.d.ts +4 -4
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Constants.js +6 -28
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Constants.js.map +1 -1
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Handler.js +5 -5
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Handler.js.map +1 -1
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Logic.js +4 -4
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Logic.js.map +1 -1
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Utility.js +5 -28
- package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Utility.js.map +1 -1
- package/js/features/UpdateBucket/Yaveon.ECM.d3d.Webhook.UpdateBucket.Handler.js +5 -5
- package/js/features/UpdateBucket/Yaveon.ECM.d3d.Webhook.UpdateBucket.Handler.js.map +1 -1
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Constants.d.ts +61 -58
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Constants.js +74 -70
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Constants.js.map +1 -1
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Handler.js +5 -5
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Handler.js.map +1 -1
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Interfaces.d.ts +7 -7
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Interfaces.js.map +1 -1
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Logic.js +4 -2
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Logic.js.map +1 -1
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Utility.d.ts +0 -1
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Utility.js +22 -30
- package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Utility.js.map +1 -1
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Constants.d.ts +14 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Constants.js +22 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Constants.js.map +1 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Handler.d.ts +2 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Handler.js +28 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Handler.js.map +1 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Interfaces.d.ts +36 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Interfaces.js +3 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Interfaces.js.map +1 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Logic.d.ts +3 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Logic.js +106 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Logic.js.map +1 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Utility.d.ts +6 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Utility.js +35 -0
- package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Utility.js.map +1 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Constants.d.ts +31 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Constants.js +40 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Constants.js.map +1 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Interfaces.d.ts +61 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Interfaces.js +3 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Interfaces.js.map +1 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Utility.d.ts +7 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Utility.js +31 -0
- package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Utility.js.map +1 -0
- package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Constants.d.ts +22 -6
- package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Constants.js +33 -36
- package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Constants.js.map +1 -1
- package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Interfaces.d.ts +64 -0
- package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Utility.d.ts +3 -0
- package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Utility.js +41 -0
- package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Utility.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,61 +1,64 @@
|
|
|
1
|
-
import { Constants } from '../Yaveon.ECM.d3d.Webhook.af.Constants';
|
|
2
|
-
export
|
|
3
|
-
export declare const d3Defaults: typeof Constants.d3Defaults;
|
|
4
|
-
export declare const UrlParameters: typeof Constants.UrlParameters;
|
|
5
|
-
export declare const serviceEndPoint = "/alphaflow-contract/contractservice/contracts";
|
|
6
|
-
export declare enum ContractStatus {
|
|
7
|
-
Concept = "CONCEPT",
|
|
8
|
-
Negotiation = "NEGOTIATION",
|
|
9
|
-
Valid = "VALID",
|
|
10
|
-
Canceled = "CANCELED",
|
|
11
|
-
Suspended = "SUSPENDED",
|
|
12
|
-
Expired = "EXPIRED"
|
|
1
|
+
import { Constants as _constants } from '../Yaveon.ECM.d3d.Webhook.af.Constants';
|
|
2
|
+
export declare class Constants extends _constants {
|
|
13
3
|
}
|
|
14
|
-
export declare
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
4
|
+
export declare namespace Constants {
|
|
5
|
+
namespace Contracts {
|
|
6
|
+
enum ContractStatus {
|
|
7
|
+
Concept = "CONCEPT",
|
|
8
|
+
Negotiation = "NEGOTIATION",
|
|
9
|
+
Valid = "VALID",
|
|
10
|
+
Canceled = "CANCELED",
|
|
11
|
+
Suspended = "SUSPENDED",
|
|
12
|
+
Expired = "EXPIRED"
|
|
13
|
+
}
|
|
14
|
+
enum ServiceEndpoints {
|
|
15
|
+
Contracts = "/alphaflow-contract/contractservice/contracts"
|
|
16
|
+
}
|
|
17
|
+
enum OwnRole {
|
|
18
|
+
Active = "ACTIVE",
|
|
19
|
+
Passive = "PASSIVE",
|
|
20
|
+
Coop = "COOPERATION"
|
|
21
|
+
}
|
|
22
|
+
enum AutomaticRenewal {
|
|
23
|
+
Auto = "AUTOMATIC",
|
|
24
|
+
None = "NONE"
|
|
25
|
+
}
|
|
26
|
+
enum TerminationUnit {
|
|
27
|
+
Days = "DAYS",
|
|
28
|
+
Weeks = "WEEKS",
|
|
29
|
+
Months = "MONTHS",
|
|
30
|
+
Years = "YEARS"
|
|
31
|
+
}
|
|
32
|
+
enum TerminationCalendarEvent {
|
|
33
|
+
Any = "ANYTIME",
|
|
34
|
+
ExactDay = "EXACTDAY",
|
|
35
|
+
EndOfMonth = "ENDOFMONTH",
|
|
36
|
+
EndOfQuarter = "ENDOFQUARTER",
|
|
37
|
+
EndOfSemester = "ENDOFSEMESTER",
|
|
38
|
+
EndOfYear = "ENDOFYEAR",
|
|
39
|
+
Termination = "TERMINATION"
|
|
40
|
+
}
|
|
41
|
+
enum ToType {
|
|
42
|
+
boolean = "boolean",
|
|
43
|
+
Date = "date",
|
|
44
|
+
IAfAutomaticRenewalProperty = "IAfAutomaticRenewalProperty",
|
|
45
|
+
IAfContractStatusProperty = "IAfContractStatusProperty",
|
|
46
|
+
IAfCustomFieldProperty = "IAfCustomFieldProperty",
|
|
47
|
+
IAfGenericIdProperty = "IAfGenericIdProperty",
|
|
48
|
+
IAfOwnRoleProperty = "IAfOwnRoleProperty",
|
|
49
|
+
IAfTerminationCalendarEventProperty = "IAfTerminationCalendarEventProperty",
|
|
50
|
+
IAfTerminationUnitProperty = "IAfTerminationUnitProperty",
|
|
51
|
+
number = "number",
|
|
52
|
+
string = "string"
|
|
53
|
+
}
|
|
54
|
+
enum ConfigProperty {
|
|
55
|
+
Default = "default",
|
|
56
|
+
Id = "id",
|
|
57
|
+
Static = "static",
|
|
58
|
+
ToCustomPropertyId = "toCustomPropertyId",
|
|
59
|
+
ToPropertyName = "toPropertyName",
|
|
60
|
+
Translation = "translation",
|
|
61
|
+
Value = "value"
|
|
62
|
+
}
|
|
60
63
|
}
|
|
61
64
|
}
|
|
@@ -1,74 +1,78 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Constants = void 0;
|
|
4
4
|
const Yaveon_ECM_d3d_Webhook_af_Constants_1 = require("../Yaveon.ECM.d3d.Webhook.af.Constants");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})(
|
|
30
|
-
|
|
31
|
-
(function (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
5
|
+
class Constants extends Yaveon_ECM_d3d_Webhook_af_Constants_1.Constants {
|
|
6
|
+
}
|
|
7
|
+
exports.Constants = Constants;
|
|
8
|
+
(function (Constants) {
|
|
9
|
+
let Contracts;
|
|
10
|
+
(function (Contracts) {
|
|
11
|
+
let ContractStatus;
|
|
12
|
+
(function (ContractStatus) {
|
|
13
|
+
ContractStatus["Concept"] = "CONCEPT";
|
|
14
|
+
ContractStatus["Negotiation"] = "NEGOTIATION";
|
|
15
|
+
ContractStatus["Valid"] = "VALID";
|
|
16
|
+
ContractStatus["Canceled"] = "CANCELED";
|
|
17
|
+
ContractStatus["Suspended"] = "SUSPENDED";
|
|
18
|
+
ContractStatus["Expired"] = "EXPIRED";
|
|
19
|
+
})(ContractStatus = Contracts.ContractStatus || (Contracts.ContractStatus = {}));
|
|
20
|
+
let ServiceEndpoints;
|
|
21
|
+
(function (ServiceEndpoints) {
|
|
22
|
+
ServiceEndpoints["Contracts"] = "/alphaflow-contract/contractservice/contracts";
|
|
23
|
+
})(ServiceEndpoints = Contracts.ServiceEndpoints || (Contracts.ServiceEndpoints = {}));
|
|
24
|
+
let OwnRole;
|
|
25
|
+
(function (OwnRole) {
|
|
26
|
+
OwnRole["Active"] = "ACTIVE";
|
|
27
|
+
OwnRole["Passive"] = "PASSIVE";
|
|
28
|
+
OwnRole["Coop"] = "COOPERATION";
|
|
29
|
+
})(OwnRole = Contracts.OwnRole || (Contracts.OwnRole = {}));
|
|
30
|
+
let AutomaticRenewal;
|
|
31
|
+
(function (AutomaticRenewal) {
|
|
32
|
+
AutomaticRenewal["Auto"] = "AUTOMATIC";
|
|
33
|
+
AutomaticRenewal["None"] = "NONE";
|
|
34
|
+
})(AutomaticRenewal = Contracts.AutomaticRenewal || (Contracts.AutomaticRenewal = {}));
|
|
35
|
+
let TerminationUnit;
|
|
36
|
+
(function (TerminationUnit) {
|
|
37
|
+
TerminationUnit["Days"] = "DAYS";
|
|
38
|
+
TerminationUnit["Weeks"] = "WEEKS";
|
|
39
|
+
TerminationUnit["Months"] = "MONTHS";
|
|
40
|
+
TerminationUnit["Years"] = "YEARS";
|
|
41
|
+
})(TerminationUnit = Contracts.TerminationUnit || (Contracts.TerminationUnit = {}));
|
|
42
|
+
let TerminationCalendarEvent;
|
|
43
|
+
(function (TerminationCalendarEvent) {
|
|
44
|
+
TerminationCalendarEvent["Any"] = "ANYTIME";
|
|
45
|
+
TerminationCalendarEvent["ExactDay"] = "EXACTDAY";
|
|
46
|
+
TerminationCalendarEvent["EndOfMonth"] = "ENDOFMONTH";
|
|
47
|
+
TerminationCalendarEvent["EndOfQuarter"] = "ENDOFQUARTER";
|
|
48
|
+
TerminationCalendarEvent["EndOfSemester"] = "ENDOFSEMESTER";
|
|
49
|
+
TerminationCalendarEvent["EndOfYear"] = "ENDOFYEAR";
|
|
50
|
+
TerminationCalendarEvent["Termination"] = "TERMINATION";
|
|
51
|
+
})(TerminationCalendarEvent = Contracts.TerminationCalendarEvent || (Contracts.TerminationCalendarEvent = {}));
|
|
52
|
+
let ToType;
|
|
53
|
+
(function (ToType) {
|
|
54
|
+
ToType["boolean"] = "boolean";
|
|
55
|
+
ToType["Date"] = "date";
|
|
56
|
+
ToType["IAfAutomaticRenewalProperty"] = "IAfAutomaticRenewalProperty";
|
|
57
|
+
ToType["IAfContractStatusProperty"] = "IAfContractStatusProperty";
|
|
58
|
+
ToType["IAfCustomFieldProperty"] = "IAfCustomFieldProperty";
|
|
59
|
+
ToType["IAfGenericIdProperty"] = "IAfGenericIdProperty";
|
|
60
|
+
ToType["IAfOwnRoleProperty"] = "IAfOwnRoleProperty";
|
|
61
|
+
ToType["IAfTerminationCalendarEventProperty"] = "IAfTerminationCalendarEventProperty";
|
|
62
|
+
ToType["IAfTerminationUnitProperty"] = "IAfTerminationUnitProperty";
|
|
63
|
+
ToType["number"] = "number";
|
|
64
|
+
ToType["string"] = "string";
|
|
65
|
+
})(ToType = Contracts.ToType || (Contracts.ToType = {}));
|
|
66
|
+
let ConfigProperty;
|
|
67
|
+
(function (ConfigProperty) {
|
|
68
|
+
ConfigProperty["Default"] = "default";
|
|
69
|
+
ConfigProperty["Id"] = "id";
|
|
70
|
+
ConfigProperty["Static"] = "static";
|
|
71
|
+
ConfigProperty["ToCustomPropertyId"] = "toCustomPropertyId";
|
|
72
|
+
ConfigProperty["ToPropertyName"] = "toPropertyName";
|
|
73
|
+
ConfigProperty["Translation"] = "translation";
|
|
74
|
+
ConfigProperty["Value"] = "value";
|
|
75
|
+
})(ConfigProperty = Contracts.ConfigProperty || (Contracts.ConfigProperty = {}));
|
|
76
|
+
})(Contracts = Constants.Contracts || (Constants.Contracts = {}));
|
|
77
|
+
})(Constants || (exports.Constants = Constants = {}));
|
|
74
78
|
//# sourceMappingURL=Yaveon.ECM.d3d.Webhook.af.Contract.Constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Yaveon.ECM.d3d.Webhook.af.Contract.Constants.js","sourceRoot":"","sources":["../../../../source/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Constants.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Yaveon.ECM.d3d.Webhook.af.Contract.Constants.js","sourceRoot":"","sources":["../../../../source/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Constants.ts"],"names":[],"mappings":";;;AAAA,gGAAgF;AAEhF,MAAa,SAAU,SAAQ,+CAAU;CACxC;AADD,8BACC;AAED,WAAiB,SAAS;IACtB,IAAiB,SAAS,CAiEzB;IAjED,WAAiB,SAAS;QACtB,IAAY,cAOX;QAPD,WAAY,cAAc;YACtB,qCAAmB,CAAA;YACnB,6CAA2B,CAAA;YAC3B,iCAAe,CAAA;YACf,uCAAqB,CAAA;YACrB,yCAAuB,CAAA;YACvB,qCAAmB,CAAA;QACvB,CAAC,EAPW,cAAc,GAAd,wBAAc,KAAd,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CAAA;YACT,mCAAiB,CAAA;YACjB,2DAAyC,CAAA;YACzC,mDAAiC,CAAA;YACjC,6CAA2B,CAAA;YAC3B,iCAAe,CAAA;QACnB,CAAC,EARW,cAAc,GAAd,wBAAc,KAAd,wBAAc,QAQzB;IACL,CAAC,EAjEgB,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAiEzB;AACL,CAAC,EAnEgB,SAAS,yBAAT,SAAS,QAmEzB"}
|
|
@@ -4,13 +4,13 @@ exports.handleRequest = void 0;
|
|
|
4
4
|
const Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1 = require("./Yaveon.ECM.d3d.Webhook.af.Contract.Constants");
|
|
5
5
|
const Yaveon_ECM_d3d_Webhook_af_Contract_Logic_1 = require("./Yaveon.ECM.d3d.Webhook.af.Contract.Logic");
|
|
6
6
|
let handleRequest = async (req) => {
|
|
7
|
-
let event = req.params[Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.UrlParameters.ParamNames.Event];
|
|
7
|
+
let event = req.params[Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.UrlParameters.ParamNames.Event];
|
|
8
8
|
switch (event) {
|
|
9
|
-
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.UrlParameters.EventNames.Add:
|
|
9
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.UrlParameters.EventNames.Add:
|
|
10
10
|
return (0, Yaveon_ECM_d3d_Webhook_af_Contract_Logic_1.add)(req);
|
|
11
|
-
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.UrlParameters.EventNames.Update:
|
|
11
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.UrlParameters.EventNames.Update:
|
|
12
12
|
return (0, Yaveon_ECM_d3d_Webhook_af_Contract_Logic_1.update)(req);
|
|
13
|
-
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.UrlParameters.EventNames.Delete:
|
|
13
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.UrlParameters.EventNames.Delete:
|
|
14
14
|
return {
|
|
15
15
|
reqBody: req.json(),
|
|
16
16
|
resultMsg: 'Event "' + event + '" does not require any custom logic.',
|
|
@@ -19,7 +19,7 @@ let handleRequest = async (req) => {
|
|
|
19
19
|
default:
|
|
20
20
|
return {
|
|
21
21
|
reqBody: req.json(),
|
|
22
|
-
resultMsg: 'Event "' + event + '" unknown or not supported. Valid events: ' + Object.values(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.UrlParameters.EventNames).join(", ") + '"',
|
|
22
|
+
resultMsg: 'Event "' + event + '" unknown or not supported. Valid events: ' + Object.values(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.UrlParameters.EventNames).join(", ") + '"',
|
|
23
23
|
resultState: 400
|
|
24
24
|
};
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Yaveon.ECM.d3d.Webhook.af.Contract.Handler.js","sourceRoot":"","sources":["../../../../source/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Handler.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"Yaveon.ECM.d3d.Webhook.af.Contract.Handler.js","sourceRoot":"","sources":["../../../../source/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Handler.ts"],"names":[],"mappings":";;;AACA,iHAA2E;AAC3E,yGAGmD;AAE5C,IAAI,aAAa,GAAG,KAAK,EAAE,GAAQ,EAA6B,EAAE;IAErE,IAAI,KAAK,GAAW,GAAG,CAAC,MAAM,CAAC,wDAAS,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAExE,QAAQ,KAAK,EAAC;QACV,KAAK,wDAAS,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG;YACnC,OAAO,IAAA,8CAAG,EAAC,GAAG,CAAC,CAAC;QACxB,KAAK,wDAAS,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM;YACtC,OAAO,IAAA,iDAAM,EAAC,GAAG,CAAC,CAAC;QAC3B,KAAK,wDAAS,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM;YAC1C,OAAO;gBACH,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE;gBACnB,SAAS,EAAE,SAAS,GAAE,KAAK,GAAE,sCAAsC;gBACnE,WAAW,EAAE,GAAG;aACnB,CAAC;QACN;YACI,OAAO;gBACH,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE;gBACnB,SAAS,EAAE,SAAS,GAAE,KAAK,GAAE,4CAA4C,GAAE,MAAM,CAAC,MAAM,CAAC,wDAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAE,GAAG;gBAC5I,WAAW,EAAE,GAAG;aACnB,CAAC;KACT;AACL,CAAC,CAAA;AAtBU,QAAA,aAAa,iBAsBvB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAfGenericIdProperty } from '../Yaveon.ECM.d3d.Webhook.af.Interfaces';
|
|
2
|
-
import {
|
|
2
|
+
import { Constants } from './Yaveon.ECM.d3d.Webhook.af.Contract.Constants';
|
|
3
3
|
export { IAfGenericIdProperty } from '../Yaveon.ECM.d3d.Webhook.af.Interfaces';
|
|
4
4
|
export interface IAfNewContract {
|
|
5
5
|
[key: string]: any;
|
|
@@ -39,19 +39,19 @@ export interface IAfContract extends IAfNewContract {
|
|
|
39
39
|
internalNumber: string;
|
|
40
40
|
}
|
|
41
41
|
export interface IAfContractStatusProperty {
|
|
42
|
-
value: ContractStatus;
|
|
42
|
+
value: Constants.Contracts.ContractStatus;
|
|
43
43
|
}
|
|
44
44
|
export interface IAfOwnRoleProperty {
|
|
45
|
-
value: OwnRole;
|
|
45
|
+
value: Constants.Contracts.OwnRole;
|
|
46
46
|
}
|
|
47
47
|
export interface IAfAutomaticRenewalProperty {
|
|
48
|
-
value: AutomaticRenewal;
|
|
48
|
+
value: Constants.Contracts.AutomaticRenewal;
|
|
49
49
|
}
|
|
50
50
|
export interface IAfTerminationUnitProperty {
|
|
51
|
-
value: TerminationUnit;
|
|
51
|
+
value: Constants.Contracts.TerminationUnit;
|
|
52
52
|
}
|
|
53
53
|
export interface IAfTerminationCalendarEventProperty {
|
|
54
|
-
value: TerminationCalendarEvent;
|
|
54
|
+
value: Constants.Contracts.TerminationCalendarEvent;
|
|
55
55
|
}
|
|
56
56
|
export interface IAfCustomFieldProperty {
|
|
57
57
|
value: string;
|
|
@@ -80,7 +80,7 @@ interface IWebhookConfigAfContractPropertyMappingBase {
|
|
|
80
80
|
fromPropertyGuid: string;
|
|
81
81
|
fromPropertyId?: string;
|
|
82
82
|
fromPropertyName: string;
|
|
83
|
-
toType: ToType;
|
|
83
|
+
toType: Constants.Contracts.ToType;
|
|
84
84
|
default?: any;
|
|
85
85
|
mandatory?: boolean;
|
|
86
86
|
static?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Yaveon.ECM.d3d.Webhook.af.Contract.Interfaces.js","sourceRoot":"","sources":["../../../../source/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Interfaces.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Yaveon.ECM.d3d.Webhook.af.Contract.Interfaces.js","sourceRoot":"","sources":["../../../../source/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Interfaces.ts"],"names":[],"mappings":";;AA6CC,CAAC"}
|
|
@@ -4,13 +4,14 @@ exports.update = exports.add = void 0;
|
|
|
4
4
|
const Yaveon_ECM_af_Contracts_Client_1 = require("../../../clients/Yaveon.ECM.af.Contracts.Client");
|
|
5
5
|
const Yaveon_ECM_d3d_Webhook_Client_1 = require("../../../clients/Yaveon.ECM.d3d.Webhook.Client");
|
|
6
6
|
const Yaveon_ECM_d3d_Webhook_af_Contract_Utility_1 = require("./Yaveon.ECM.d3d.Webhook.af.Contract.Utility");
|
|
7
|
-
const
|
|
7
|
+
const Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1 = require("./Yaveon.ECM.d3d.Webhook.af.Contract.Constants");
|
|
8
8
|
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '1';
|
|
9
9
|
let add = async (req) => { return runWebHook(req); };
|
|
10
10
|
exports.add = add;
|
|
11
11
|
let update = async (req) => { return runWebHook(req); };
|
|
12
12
|
exports.update = update;
|
|
13
13
|
let runWebHook = async (req) => {
|
|
14
|
+
var _a;
|
|
14
15
|
let webHookResponse = {
|
|
15
16
|
reqBody: req.json(),
|
|
16
17
|
resultMsg: '',
|
|
@@ -30,6 +31,7 @@ let runWebHook = async (req) => {
|
|
|
30
31
|
webHookResponse.resultMsg += 'Selecting contract definition... ';
|
|
31
32
|
const contractDefinitions = Yaveon_ECM_d3d_Webhook_af_Contract_Utility_1.ContractUtility.getContractDefinitions(doc, config);
|
|
32
33
|
webHookResponse.resultMsg += ' done\r\n';
|
|
34
|
+
const afFieldId = (_a = (await whClient.getFieldDefinitionByName(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Af.AlphaflowObjectIdField.name))) === null || _a === void 0 ? void 0 : _a.key;
|
|
33
35
|
for (const contractMapping of contractDefinitions.mappings) {
|
|
34
36
|
const contracts = await Yaveon_ECM_d3d_Webhook_af_Contract_Utility_1.ContractUtility.getContract(afContractsClient, doc, contractMapping);
|
|
35
37
|
const contract = contracts.length > 0 ? contracts[0] : Yaveon_ECM_d3d_Webhook_af_Contract_Utility_1.ContractUtility.getEmptyContractBody();
|
|
@@ -52,7 +54,7 @@ let runWebHook = async (req) => {
|
|
|
52
54
|
else {
|
|
53
55
|
contractId = contract.id;
|
|
54
56
|
}
|
|
55
|
-
webHookResponse.reqBody.doc.properties.find((p) => p.id ===
|
|
57
|
+
webHookResponse.reqBody.doc.properties.find((p) => p.id === afFieldId).value = contractId;
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
catch (ex) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Yaveon.ECM.d3d.Webhook.af.Contract.Logic.js","sourceRoot":"","sources":["../../../../source/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Logic.ts"],"names":[],"mappings":";;;AAAA,oGAAoF;AACpF,kGAAkF;AAGlF,6GAA+E;
|
|
1
|
+
{"version":3,"file":"Yaveon.ECM.d3d.Webhook.af.Contract.Logic.js","sourceRoot":"","sources":["../../../../source/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Logic.ts"],"names":[],"mappings":";;;AAAA,oGAAoF;AACpF,kGAAkF;AAGlF,6GAA+E;AAC/E,iHAA2E;AAG3E,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,GAAG,GAAG,CAAC;AAE3C,IAAI,GAAG,GAAG,KAAK,EAAE,GAAQ,EAA6B,EAAE,GAAG,OAAO,UAAU,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC,CAAA;AAA/E,QAAA,GAAG,OAA4E;AACnF,IAAI,MAAM,GAAG,KAAK,EAAE,GAAQ,EAA6B,EAAE,GAAG,OAAO,UAAU,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC,CAAA;AAAlF,QAAA,MAAM,UAA4E;AAE7F,IAAI,UAAU,GAAG,KAAK,EAAE,GAAQ,EAA6B,EAAE;;IAE3D,IAAI,eAAe,GAAqB;QACpC,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE;QACnB,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,GAAG;KACnB,CAAC;IAEF,IAAI,GAAG,GAAiB,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;IAEpD,IAAG;QACC,eAAe,CAAC,SAAS,IAAI,sCAAsC,CAAC;QACpE,MAAM,QAAQ,GAAqB,IAAI,gDAAgB,CACnD,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,EACvB,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAC7B,SAAS,GAAC,GAAG,CAAC,GAAG,CAAC,eAA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EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,EAAC;gBACnC,eAAe,CAAC,SAAS,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;aACjD;iBACG;gBACA,eAAe,CAAC,SAAS,IAAI,EAAE,CAAC,QAAQ,CAAC;aAC5C;SACJ;aACI,IAAG,EAAE,CAAC,OAAO,EAAC;YACf,eAAe,CAAC,SAAS,IAAI,EAAE,CAAC,OAAO,CAAC;SAC3C;aACG;YACA,eAAe,CAAC,SAAS,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;SAC9C;KACJ;IAED,OAAO,eAAe,CAAC;AAC3B,CAAC,CAAA"}
|
|
@@ -11,5 +11,4 @@ export declare class ContractUtility extends AfUtility {
|
|
|
11
11
|
static getPreparedUpdateBody(propertyMappings: (IWebhookConfigAfContractPropertyMapping | IWebhookConfigAfContractCustomPropertyMapping)[], translations: IWebhookConfigAfContractTranslation[], doc: IWhDocObject, body: IAfContract | IAfNewContract): IAfContract | IAfNewContract;
|
|
12
12
|
static getEmptyContractBody(): IAfNewContract;
|
|
13
13
|
static getBodyPropertiesFromContractObject(contract: IAfContract, returnMappings: IWebhookConfigAfContractReturnMapping[]): IDocUpdateBodyObject;
|
|
14
|
-
static convertDateToString(date: Date): string;
|
|
15
14
|
}
|
|
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ContractUtility = void 0;
|
|
4
4
|
const Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1 = require("./Yaveon.ECM.d3d.Webhook.af.Contract.Constants");
|
|
5
5
|
const Yaveon_ECM_d3d_Webhook_af_Utility_1 = require("../Yaveon.ECM.d3d.Webhook.af.Utility");
|
|
6
|
-
const Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2 = require("./Yaveon.ECM.d3d.Webhook.af.Contract.Constants");
|
|
7
6
|
class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
8
7
|
static async getContract(afContractsClient, doc, contractMapping) {
|
|
9
8
|
var _a, _b;
|
|
10
9
|
let contracts;
|
|
11
|
-
const contractRefFieldId = (_a = contractMapping.returnMapping.find(rp => rp.toPropertyGuid === Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.AlphaflowObjectIdField.name || rp.toPropertyName === Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.AlphaflowObjectIdField.name)) === null || _a === void 0 ? void 0 : _a.toPropertyGuid;
|
|
10
|
+
const contractRefFieldId = (_a = contractMapping.returnMapping.find(rp => rp.toPropertyGuid === Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Af.AlphaflowObjectIdField.name || rp.toPropertyName === Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Af.AlphaflowObjectIdField.name)) === null || _a === void 0 ? void 0 : _a.toPropertyGuid;
|
|
12
11
|
if (contractRefFieldId != undefined) {
|
|
13
12
|
const contractRef = (_b = doc.properties.find(p => p.id === contractRefFieldId)) === null || _b === void 0 ? void 0 : _b.value;
|
|
14
13
|
if (contractRef != '' && contractRef != null && contractRef != undefined) {
|
|
@@ -27,11 +26,11 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
27
26
|
missing: []
|
|
28
27
|
};
|
|
29
28
|
const mandatoryProperties = propertyMapping.filter(p => p.mandatory === true);
|
|
30
|
-
result.missing = result.missing.concat(mandatoryProperties.filter(m => m.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.
|
|
29
|
+
result.missing = result.missing.concat(mandatoryProperties.filter(m => m.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ConfigProperty.ToPropertyName)).filter(m => {
|
|
31
30
|
let uVal = this.getValue(updateBody, m.toPropertyName);
|
|
32
31
|
return (uVal === null || uVal === undefined || uVal === '');
|
|
33
32
|
}).map(m => m.fromPropertyName + ' (' + m.toPropertyName + ')'));
|
|
34
|
-
result.missing = result.missing.concat(mandatoryProperties.filter(m => m.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.
|
|
33
|
+
result.missing = result.missing.concat(mandatoryProperties.filter(m => m.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ConfigProperty.ToCustomPropertyId)).filter(m => {
|
|
35
34
|
let uVal = this.getValue(updateBody, m.toCustomPropertyId);
|
|
36
35
|
return (uVal === null || uVal === undefined);
|
|
37
36
|
}).map(m => m.fromPropertyName + ' (' + m.toCustomPropertyId + ')'));
|
|
@@ -48,10 +47,10 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
48
47
|
let keyProperties = contractMapping.toContractKeys;
|
|
49
48
|
for (const keyProperty of keyProperties) {
|
|
50
49
|
let mappedProperty = contractMapping.propertyMapping.find(m => {
|
|
51
|
-
if (m.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.
|
|
50
|
+
if (m.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ConfigProperty.ToPropertyName)) {
|
|
52
51
|
return m.toPropertyName === keyProperty.toPropertyName;
|
|
53
52
|
}
|
|
54
|
-
if (m.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.
|
|
53
|
+
if (m.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ConfigProperty.ToCustomPropertyId)) {
|
|
55
54
|
return m.toCustomPropertyId === keyProperty.toPropertyName;
|
|
56
55
|
}
|
|
57
56
|
});
|
|
@@ -83,19 +82,19 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
83
82
|
var _a;
|
|
84
83
|
const updateBody = JSON.parse(JSON.stringify(body));
|
|
85
84
|
for (const propertyMapping of propertyMappings) {
|
|
86
|
-
let value = propertyMapping.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.
|
|
87
|
-
if ((value === null || value === undefined || value === '') && propertyMapping.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.
|
|
85
|
+
let value = propertyMapping.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ConfigProperty.Static) ? propertyMapping.static : (Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility.getDocPropertyValues(doc, propertyMapping.fromPropertyGuid))[0];
|
|
86
|
+
if ((value === null || value === undefined || value === '') && propertyMapping.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ConfigProperty.Default)) {
|
|
88
87
|
value = propertyMapping.default;
|
|
89
88
|
}
|
|
90
|
-
if ((value !== null || value !== undefined || value !== '') && propertyMapping.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.
|
|
91
|
-
const translationId = propertyMapping[Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.
|
|
89
|
+
if ((value !== null || value !== undefined || value !== '') && propertyMapping.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ConfigProperty.Translation)) {
|
|
90
|
+
const translationId = propertyMapping[Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ConfigProperty.Translation];
|
|
92
91
|
if (translationId !== undefined && translationId !== '') {
|
|
93
92
|
value = this.getTranslation(translationId, value, translations);
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
const pm = propertyMapping;
|
|
97
96
|
switch (propertyMapping.toType) {
|
|
98
|
-
case
|
|
97
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.Date:
|
|
99
98
|
try {
|
|
100
99
|
if (value === undefined || value === null) {
|
|
101
100
|
updateBody[pm.toPropertyName] = null;
|
|
@@ -109,7 +108,7 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
109
108
|
updateBody[pm.toPropertyName] = null;
|
|
110
109
|
}
|
|
111
110
|
break;
|
|
112
|
-
case
|
|
111
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.IAfAutomaticRenewalProperty:
|
|
113
112
|
try {
|
|
114
113
|
updateBody[pm.toPropertyName] = { 'value': value };
|
|
115
114
|
}
|
|
@@ -117,26 +116,26 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
117
116
|
updateBody[pm.toPropertyName] = null;
|
|
118
117
|
}
|
|
119
118
|
break;
|
|
120
|
-
case
|
|
119
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.IAfContractStatusProperty:
|
|
121
120
|
try {
|
|
122
121
|
updateBody[pm.toPropertyName] = { 'value': value };
|
|
123
122
|
}
|
|
124
123
|
catch (ex) {
|
|
125
|
-
updateBody[pm.toPropertyName].value =
|
|
124
|
+
updateBody[pm.toPropertyName].value = Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ContractStatus.Concept;
|
|
126
125
|
}
|
|
127
126
|
break;
|
|
128
|
-
case
|
|
127
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.IAfCustomFieldProperty:
|
|
129
128
|
const cpId = propertyMapping.toCustomPropertyId;
|
|
130
129
|
updateBody[cpId] = { 'value': value, configID: cpId };
|
|
131
130
|
break;
|
|
132
|
-
case
|
|
131
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.IAfGenericIdProperty:
|
|
133
132
|
if (value === null || value === undefined || value === '') {
|
|
134
133
|
updateBody[pm.toPropertyName] = null;
|
|
135
134
|
break;
|
|
136
135
|
}
|
|
137
136
|
updateBody[pm.toPropertyName] = { 'id': value };
|
|
138
137
|
break;
|
|
139
|
-
case
|
|
138
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.IAfOwnRoleProperty:
|
|
140
139
|
try {
|
|
141
140
|
updateBody[pm.toPropertyName] = { 'value': value };
|
|
142
141
|
}
|
|
@@ -144,7 +143,7 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
144
143
|
updateBody[pm.toPropertyName] = null;
|
|
145
144
|
}
|
|
146
145
|
break;
|
|
147
|
-
case
|
|
146
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.IAfTerminationCalendarEventProperty:
|
|
148
147
|
try {
|
|
149
148
|
updateBody[pm.toPropertyName] = { 'value': value };
|
|
150
149
|
}
|
|
@@ -152,7 +151,7 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
152
151
|
updateBody[pm.toPropertyName] = null;
|
|
153
152
|
}
|
|
154
153
|
break;
|
|
155
|
-
case
|
|
154
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.IAfTerminationUnitProperty:
|
|
156
155
|
try {
|
|
157
156
|
updateBody[pm.toPropertyName] = { 'value': value };
|
|
158
157
|
}
|
|
@@ -160,21 +159,21 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
160
159
|
updateBody[pm.toPropertyName] = null;
|
|
161
160
|
}
|
|
162
161
|
break;
|
|
163
|
-
case
|
|
162
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.boolean:
|
|
164
163
|
if (value === null || value === undefined) {
|
|
165
164
|
updateBody[pm.toPropertyName] = false;
|
|
166
165
|
break;
|
|
167
166
|
}
|
|
168
167
|
updateBody[pm.toPropertyName] = value.toLowerCase() === 'true' ? true : false;
|
|
169
168
|
break;
|
|
170
|
-
case
|
|
169
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.number:
|
|
171
170
|
updateBody[pm.toPropertyName] = null;
|
|
172
171
|
const numberStr = (_a = (/\d+/).exec(value)) === null || _a === void 0 ? void 0 : _a[0];
|
|
173
172
|
if (numberStr !== undefined) {
|
|
174
173
|
updateBody[pm.toPropertyName] = Number.parseInt(numberStr);
|
|
175
174
|
}
|
|
176
175
|
break;
|
|
177
|
-
case
|
|
176
|
+
case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ToType.string:
|
|
178
177
|
if (value === null || value === undefined) {
|
|
179
178
|
updateBody[pm.toPropertyName] = '';
|
|
180
179
|
break;
|
|
@@ -191,7 +190,7 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
191
190
|
return {
|
|
192
191
|
automaticRenewal: null,
|
|
193
192
|
contact: null,
|
|
194
|
-
contractStatus: { value:
|
|
193
|
+
contractStatus: { value: Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ContractStatus.Concept },
|
|
195
194
|
contractType: null,
|
|
196
195
|
customFields: {},
|
|
197
196
|
duration: 0,
|
|
@@ -235,13 +234,6 @@ class ContractUtility extends Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility {
|
|
|
235
234
|
}
|
|
236
235
|
return updateProperties;
|
|
237
236
|
}
|
|
238
|
-
static convertDateToString(date) {
|
|
239
|
-
let returnString = '';
|
|
240
|
-
returnString += date.getFullYear();
|
|
241
|
-
returnString += '-' + (date.getMonth() + 1).toString().padStart(2, '0');
|
|
242
|
-
returnString += '-' + (date.getDate()).toString().padStart(2, '0');
|
|
243
|
-
return returnString;
|
|
244
|
-
}
|
|
245
237
|
}
|
|
246
238
|
exports.ContractUtility = ContractUtility;
|
|
247
239
|
//# sourceMappingURL=Yaveon.ECM.d3d.Webhook.af.Contract.Utility.js.map
|