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.
Files changed (102) hide show
  1. package/js/Yaveon.ECM.d3d.Utility.d.ts +1 -0
  2. package/js/Yaveon.ECM.d3d.Utility.js +3 -0
  3. package/js/Yaveon.ECM.d3d.Webhook.Constants.d.ts +61 -55
  4. package/js/Yaveon.ECM.d3d.Webhook.Constants.js +78 -73
  5. package/js/Yaveon.ECM.d3d.Webhook.Handler.js +14 -11
  6. package/js/Yaveon.ECM.d3d.Webhook.Interfaces.d.ts +7 -2
  7. package/js/clients/Yaveon.ECM.af.Client.d.ts +12 -1
  8. package/js/clients/Yaveon.ECM.af.Client.js +77 -1
  9. package/js/clients/Yaveon.ECM.af.Client.js.map +1 -1
  10. package/js/clients/Yaveon.ECM.af.Contracts.Client.d.ts +2 -0
  11. package/js/clients/Yaveon.ECM.af.Contracts.Client.js +10 -7
  12. package/js/clients/Yaveon.ECM.af.Contracts.Client.js.map +1 -1
  13. package/js/clients/Yaveon.ECM.af.QM.Client.d.ts +15 -0
  14. package/js/clients/Yaveon.ECM.af.QM.Client.js +37 -0
  15. package/js/clients/Yaveon.ECM.af.QM.Client.js.map +1 -0
  16. package/js/clients/Yaveon.ECM.d3d.Client.d.ts +6 -1
  17. package/js/clients/Yaveon.ECM.d3d.Client.js +26 -30
  18. package/js/clients/Yaveon.ECM.d3d.Client.js.map +1 -1
  19. package/js/clients/Yaveon.ECM.d3d.Webhook.Client.d.ts +2 -0
  20. package/js/clients/Yaveon.ECM.d3d.Webhook.Client.js +17 -36
  21. package/js/clients/Yaveon.ECM.d3d.Webhook.Client.js.map +1 -1
  22. package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Constants.d.ts +8 -6
  23. package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Constants.js +12 -32
  24. package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Constants.js.map +1 -1
  25. package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Handler.js +5 -5
  26. package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Handler.js.map +1 -1
  27. package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Interfaces.d.ts +2 -2
  28. package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Utility.js +3 -26
  29. package/js/features/Enrich/Yaveon.ECM.d3d.Webhook.Enrich.Utility.js.map +1 -1
  30. package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Constants.d.ts +3 -3
  31. package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Constants.js +5 -27
  32. package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Constants.js.map +1 -1
  33. package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Handler.js.map +1 -1
  34. package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Logic.js.map +1 -1
  35. package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Utility.js +1 -1
  36. package/js/features/Inherit/Yaveon.ECM.d3d.Webhook.Inherit.Utility.js.map +1 -1
  37. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Constants.d.ts +5 -5
  38. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Constants.js +7 -29
  39. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Constants.js.map +1 -1
  40. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Handler.js +5 -5
  41. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Handler.js.map +1 -1
  42. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Logic.js +3 -3
  43. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Logic.js.map +1 -1
  44. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Utility.js +2 -25
  45. package/js/features/Move/Yaveon.ECM.d3d.Webhook.Move.Utility.js.map +1 -1
  46. package/js/features/NumberRanges/Yaveon.ECM.d3d.Webhook.NumberRanges.Handler.js +5 -5
  47. package/js/features/NumberRanges/Yaveon.ECM.d3d.Webhook.NumberRanges.Handler.js.map +1 -1
  48. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Constants.d.ts +4 -4
  49. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Constants.js +6 -28
  50. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Constants.js.map +1 -1
  51. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Handler.js +5 -5
  52. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Handler.js.map +1 -1
  53. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Logic.js +4 -4
  54. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Logic.js.map +1 -1
  55. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Utility.js +5 -28
  56. package/js/features/Sync/Yaveon.ECM.d3d.Webhook.Sync.Utility.js.map +1 -1
  57. package/js/features/UpdateBucket/Yaveon.ECM.d3d.Webhook.UpdateBucket.Handler.js +5 -5
  58. package/js/features/UpdateBucket/Yaveon.ECM.d3d.Webhook.UpdateBucket.Handler.js.map +1 -1
  59. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Constants.d.ts +61 -58
  60. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Constants.js +74 -70
  61. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Constants.js.map +1 -1
  62. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Handler.js +5 -5
  63. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Handler.js.map +1 -1
  64. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Interfaces.d.ts +7 -7
  65. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Interfaces.js.map +1 -1
  66. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Logic.js +4 -2
  67. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Logic.js.map +1 -1
  68. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Utility.d.ts +0 -1
  69. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Utility.js +22 -30
  70. package/js/features/alphaflow/Contract/Yaveon.ECM.d3d.Webhook.af.Contract.Utility.js.map +1 -1
  71. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Constants.d.ts +14 -0
  72. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Constants.js +22 -0
  73. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Constants.js.map +1 -0
  74. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Handler.d.ts +2 -0
  75. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Handler.js +28 -0
  76. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Handler.js.map +1 -0
  77. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Interfaces.d.ts +36 -0
  78. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Interfaces.js +3 -0
  79. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Interfaces.js.map +1 -0
  80. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Logic.d.ts +3 -0
  81. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Logic.js +106 -0
  82. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Logic.js.map +1 -0
  83. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Utility.d.ts +6 -0
  84. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Utility.js +35 -0
  85. package/js/features/alphaflow/QM/ReadReceipt/Yaveon.ECM.d3d.Webhook.af.ReadReceipt.Utility.js.map +1 -0
  86. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Constants.d.ts +31 -0
  87. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Constants.js +40 -0
  88. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Constants.js.map +1 -0
  89. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Interfaces.d.ts +61 -0
  90. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Interfaces.js +3 -0
  91. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Interfaces.js.map +1 -0
  92. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Utility.d.ts +7 -0
  93. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Utility.js +31 -0
  94. package/js/features/alphaflow/QM/Yaveon.ECM.d3d.Webhook.af.QM.Utility.js.map +1 -0
  95. package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Constants.d.ts +22 -6
  96. package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Constants.js +33 -36
  97. package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Constants.js.map +1 -1
  98. package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Interfaces.d.ts +64 -0
  99. package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Utility.d.ts +3 -0
  100. package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Utility.js +41 -0
  101. package/js/features/alphaflow/Yaveon.ECM.d3d.Webhook.af.Utility.js.map +1 -1
  102. package/package.json +1 -1
@@ -1,61 +1,64 @@
1
- import { Constants } from '../Yaveon.ECM.d3d.Webhook.af.Constants';
2
- export { AlphaflowObjectIdField } from '../Yaveon.ECM.d3d.Webhook.af.Constants';
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 enum OwnRole {
15
- Active = "ACTIVE",
16
- Passive = "PASSIVE",
17
- Coop = "COOPERATION"
18
- }
19
- export declare enum AutomaticRenewal {
20
- Auto = "AUTOMATIC",
21
- None = "NONE"
22
- }
23
- export declare enum TerminationUnit {
24
- Days = "DAYS",
25
- Weeks = "WEEKS",
26
- Months = "MONTHS",
27
- Years = "YEARS"
28
- }
29
- export declare enum TerminationCalendarEvent {
30
- Any = "ANYTIME",
31
- ExactDay = "EXACTDAY",
32
- EndOfMonth = "ENDOFMONTH",
33
- EndOfQuarter = "ENDOFQUARTER",
34
- EndOfSemester = "ENDOFSEMESTER",
35
- EndOfYear = "ENDOFYEAR",
36
- Termination = "TERMINATION"
37
- }
38
- export declare enum ToType {
39
- boolean = "boolean",
40
- Date = "date",
41
- IAfAutomaticRenewalProperty = "IAfAutomaticRenewalProperty",
42
- IAfContractStatusProperty = "IAfContractStatusProperty",
43
- IAfCustomFieldProperty = "IAfCustomFieldProperty",
44
- IAfGenericIdProperty = "IAfGenericIdProperty",
45
- IAfOwnRoleProperty = "IAfOwnRoleProperty",
46
- IAfTerminationCalendarEventProperty = "IAfTerminationCalendarEventProperty",
47
- IAfTerminationUnitProperty = "IAfTerminationUnitProperty",
48
- number = "number",
49
- string = "string"
50
- }
51
- export declare namespace Config {
52
- enum Property {
53
- Default = "default",
54
- Id = "id",
55
- Static = "static",
56
- ToCustomPropertyId = "toCustomPropertyId",
57
- ToPropertyName = "toPropertyName",
58
- Translation = "translation",
59
- Value = "value"
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.Config = exports.ToType = exports.TerminationCalendarEvent = exports.TerminationUnit = exports.AutomaticRenewal = exports.OwnRole = exports.ContractStatus = exports.serviceEndPoint = exports.UrlParameters = exports.d3Defaults = exports.AlphaflowObjectIdField = void 0;
3
+ exports.Constants = void 0;
4
4
  const Yaveon_ECM_d3d_Webhook_af_Constants_1 = require("../Yaveon.ECM.d3d.Webhook.af.Constants");
5
- var Yaveon_ECM_d3d_Webhook_af_Constants_2 = require("../Yaveon.ECM.d3d.Webhook.af.Constants");
6
- Object.defineProperty(exports, "AlphaflowObjectIdField", { enumerable: true, get: function () { return Yaveon_ECM_d3d_Webhook_af_Constants_2.AlphaflowObjectIdField; } });
7
- exports.d3Defaults = Yaveon_ECM_d3d_Webhook_af_Constants_1.Constants.d3Defaults;
8
- exports.UrlParameters = Yaveon_ECM_d3d_Webhook_af_Constants_1.Constants.UrlParameters;
9
- exports.serviceEndPoint = '/alphaflow-contract/contractservice/contracts';
10
- var ContractStatus;
11
- (function (ContractStatus) {
12
- ContractStatus["Concept"] = "CONCEPT";
13
- ContractStatus["Negotiation"] = "NEGOTIATION";
14
- ContractStatus["Valid"] = "VALID";
15
- ContractStatus["Canceled"] = "CANCELED";
16
- ContractStatus["Suspended"] = "SUSPENDED";
17
- ContractStatus["Expired"] = "EXPIRED";
18
- })(ContractStatus || (exports.ContractStatus = ContractStatus = {}));
19
- var OwnRole;
20
- (function (OwnRole) {
21
- OwnRole["Active"] = "ACTIVE";
22
- OwnRole["Passive"] = "PASSIVE";
23
- OwnRole["Coop"] = "COOPERATION";
24
- })(OwnRole || (exports.OwnRole = OwnRole = {}));
25
- var AutomaticRenewal;
26
- (function (AutomaticRenewal) {
27
- AutomaticRenewal["Auto"] = "AUTOMATIC";
28
- AutomaticRenewal["None"] = "NONE";
29
- })(AutomaticRenewal || (exports.AutomaticRenewal = AutomaticRenewal = {}));
30
- var TerminationUnit;
31
- (function (TerminationUnit) {
32
- TerminationUnit["Days"] = "DAYS";
33
- TerminationUnit["Weeks"] = "WEEKS";
34
- TerminationUnit["Months"] = "MONTHS";
35
- TerminationUnit["Years"] = "YEARS";
36
- })(TerminationUnit || (exports.TerminationUnit = TerminationUnit = {}));
37
- var TerminationCalendarEvent;
38
- (function (TerminationCalendarEvent) {
39
- TerminationCalendarEvent["Any"] = "ANYTIME";
40
- TerminationCalendarEvent["ExactDay"] = "EXACTDAY";
41
- TerminationCalendarEvent["EndOfMonth"] = "ENDOFMONTH";
42
- TerminationCalendarEvent["EndOfQuarter"] = "ENDOFQUARTER";
43
- TerminationCalendarEvent["EndOfSemester"] = "ENDOFSEMESTER";
44
- TerminationCalendarEvent["EndOfYear"] = "ENDOFYEAR";
45
- TerminationCalendarEvent["Termination"] = "TERMINATION";
46
- })(TerminationCalendarEvent || (exports.TerminationCalendarEvent = TerminationCalendarEvent = {}));
47
- var ToType;
48
- (function (ToType) {
49
- ToType["boolean"] = "boolean";
50
- ToType["Date"] = "date";
51
- ToType["IAfAutomaticRenewalProperty"] = "IAfAutomaticRenewalProperty";
52
- ToType["IAfContractStatusProperty"] = "IAfContractStatusProperty";
53
- ToType["IAfCustomFieldProperty"] = "IAfCustomFieldProperty";
54
- ToType["IAfGenericIdProperty"] = "IAfGenericIdProperty";
55
- ToType["IAfOwnRoleProperty"] = "IAfOwnRoleProperty";
56
- ToType["IAfTerminationCalendarEventProperty"] = "IAfTerminationCalendarEventProperty";
57
- ToType["IAfTerminationUnitProperty"] = "IAfTerminationUnitProperty";
58
- ToType["number"] = "number";
59
- ToType["string"] = "string";
60
- })(ToType || (exports.ToType = ToType = {}));
61
- var Config;
62
- (function (Config) {
63
- let Property;
64
- (function (Property) {
65
- Property["Default"] = "default";
66
- Property["Id"] = "id";
67
- Property["Static"] = "static";
68
- Property["ToCustomPropertyId"] = "toCustomPropertyId";
69
- Property["ToPropertyName"] = "toPropertyName";
70
- Property["Translation"] = "translation";
71
- Property["Value"] = "value";
72
- })(Property = Config.Property || (Config.Property = {}));
73
- })(Config || (exports.Config = Config = {}));
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,gGAAiE;AACjE,8FAA8E;AAAtE,6IAAA,sBAAsB,OAAA;AAEjB,QAAA,UAAU,GAAG,+CAAS,CAAC,UAAU,CAAC;AAClC,QAAA,aAAa,GAAG,+CAAS,CAAC,aAAa,CAAC;AAExC,QAAA,eAAe,GAAG,+CAA+C,CAAC;AAE/E,IAAY,cAOX;AAPD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,6CAA2B,CAAA;IAC3B,iCAAe,CAAA;IACf,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;AACvB,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AAED,IAAY,OAIX;AAJD,WAAY,OAAO;IACf,4BAAiB,CAAA;IACjB,8BAAmB,CAAA;IACnB,+BAAoB,CAAA;AACxB,CAAC,EAJW,OAAO,uBAAP,OAAO,QAIlB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,sCAAkB,CAAA;IAClB,iCAAa,CAAA;AACjB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACnB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAED,IAAY,wBAQX;AARD,WAAY,wBAAwB;IAChC,2CAAe,CAAA;IACf,iDAAqB,CAAA;IACrB,qDAAyB,CAAA;IACzB,yDAA6B,CAAA;IAC7B,2DAA+B,CAAA;IAC/B,mDAAuB,CAAA;IACvB,uDAA2B,CAAA;AAC/B,CAAC,EARW,wBAAwB,wCAAxB,wBAAwB,QAQnC;AAED,IAAY,MAYX;AAZD,WAAY,MAAM;IACd,6BAAmB,CAAA;IACnB,uBAAa,CAAA;IACb,qEAA2D,CAAA;IAC3D,iEAAuD,CAAA;IACvD,2DAAiD,CAAA;IACjD,uDAA6C,CAAA;IAC7C,mDAAyC,CAAA;IACzC,qFAA2E,CAAA;IAC3E,mEAAyD,CAAA;IACzD,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;AACrB,CAAC,EAZW,MAAM,sBAAN,MAAM,QAYjB;AAED,IAAiB,MAAM,CAUtB;AAVD,WAAiB,MAAM;IACnB,IAAY,QAQX;IARD,WAAY,QAAQ;QAChB,+BAAmB,CAAA;QACnB,qBAAS,CAAA;QACT,6BAAiB,CAAA;QACjB,qDAAyC,CAAA;QACzC,6CAAiC,CAAA;QACjC,uCAA2B,CAAA;QAC3B,2BAAe,CAAA;IACnB,CAAC,EARW,QAAQ,GAAR,eAAQ,KAAR,eAAQ,QAQnB;AACL,CAAC,EAVgB,MAAM,sBAAN,MAAM,QAUtB"}
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,WAA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,CAAA;YACjD,uDAA6C,CAAA;YAC7C,mDAAyC,CAAA;YACzC,qFAA2E,CAAA;YAC3E,mEAAyD,CAAA;YACzD,2BAAiB,CAAA;YACjB,2BAAiB,CAAA;QACrB,CAAC,EAZW,MAAM,GAAN,gBAAM,KAAN,gBAAM,QAYjB;QAED,IAAY,cAQX;QARD,WAAY,cAAc;YACtB,qCAAmB,CAAA;YACnB,2BAAS,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,iHAA+E;AAC/E,yGAGmD;AAE5C,IAAI,aAAa,GAAG,KAAK,EAAE,GAAQ,EAA6B,EAAE;IAErE,IAAI,KAAK,GAAW,GAAG,CAAC,MAAM,CAAC,4DAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAE9D,QAAQ,KAAK,EAAC;QACV,KAAK,4DAAa,CAAC,UAAU,CAAC,GAAG;YACzB,OAAO,IAAA,8CAAG,EAAC,GAAG,CAAC,CAAC;QACxB,KAAK,4DAAa,CAAC,UAAU,CAAC,MAAM;YAC5B,OAAO,IAAA,iDAAM,EAAC,GAAG,CAAC,CAAC;QAC3B,KAAK,4DAAa,CAAC,UAAU,CAAC,MAAM;YAChC,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,4DAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAE,GAAG;gBAClI,WAAW,EAAE,GAAG;aACnB,CAAC;KACT;AACL,CAAC,CAAA;AAtBU,QAAA,aAAa,iBAsBvB"}
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 { AutomaticRenewal, ContractStatus, OwnRole, TerminationCalendarEvent, TerminationUnit, ToType } from './Yaveon.ECM.d3d.Webhook.af.Contract.Constants';
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":";;AAoDC,CAAC"}
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 Yaveon_ECM_d3d_Webhook_af_Constants_1 = require("../Yaveon.ECM.d3d.Webhook.af.Constants");
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 === Yaveon_ECM_d3d_Webhook_af_Constants_1.AlphaflowObjectIdField.guid).value = contractId;
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;AAE/E,gGAAgF;AAGhF,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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,CAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,4DAAsB,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC;SACnI;KACJ;IACD,OAAM,EAAO,EAAC;QACV,eAAe,CAAC,WAAW,GAAG,GAAG,CAAC;QAClC,eAAe,CAAC,SAAS,IAAI,WAAW,CAAC;QAEzC,IAAG,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,EAAC;YAC7B,IAAI,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"}
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,CA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UAAU,CAAC,CAAC;gBACjE,eAAe,CAAC,SAAS,IAAI,WAAW,CAAC;gBAEzC,UAAU,GAAI,QAAwB,CAAC,EAAE,CAAC;aAC7C;iBACG;gBACA,UAAU,GAAI,QAAwB,CAAC,EAAE,CAAC;aAC7C;YAWD,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC;SACjH;KACJ;IACD,OAAM,EAAO,EAAC;QACV,eAAe,CAAC,WAAW,GAAG,GAAG,CAAC;QAClC,eAAe,CAAC,SAAS,IAAI,WAAW,CAAC;QAEzC,IAAG,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,EAAC;YAC7B,IAAI,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.Config.Property.ToPropertyName)).filter(m => {
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.Config.Property.ToCustomPropertyId)).filter(m => {
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.Config.Property.ToPropertyName)) {
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.Config.Property.ToCustomPropertyId)) {
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.Config.Property.Static) ? propertyMapping.static : (Yaveon_ECM_d3d_Webhook_af_Utility_1.AfUtility.getDocPropertyValues(doc, propertyMapping.fromPropertyGuid))[0];
87
- if ((value === null || value === undefined || value === '') && propertyMapping.hasOwnProperty(Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Config.Property.Default)) {
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.Config.Property.Translation)) {
91
- const translationId = propertyMapping[Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Config.Property.Translation];
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.Date:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.IAfAutomaticRenewalProperty:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.IAfContractStatusProperty:
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 = Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ContractStatus.Concept;
124
+ updateBody[pm.toPropertyName].value = Yaveon_ECM_d3d_Webhook_af_Contract_Constants_1.Constants.Contracts.ContractStatus.Concept;
126
125
  }
127
126
  break;
128
- case Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.IAfCustomFieldProperty:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.IAfGenericIdProperty:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.IAfOwnRoleProperty:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.IAfTerminationCalendarEventProperty:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.IAfTerminationUnitProperty:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.boolean:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.number:
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 Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ToType.string:
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: Yaveon_ECM_d3d_Webhook_af_Contract_Constants_2.ContractStatus.Concept },
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