@bluealba/pae-bootstrap-lib 1.7.2-develop-1171

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 (115) hide show
  1. package/LICENSE +134 -0
  2. package/README.md +43 -0
  3. package/dist/src/bootstrap/bootstrap-platform.d.ts +32 -0
  4. package/dist/src/bootstrap/bootstrap-platform.d.ts.map +1 -0
  5. package/dist/src/bootstrap/bootstrap-platform.js +75 -0
  6. package/dist/src/bootstrap/bootstrap-platform.js.map +1 -0
  7. package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.d.ts +37 -0
  8. package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.d.ts.map +1 -0
  9. package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.js +3 -0
  10. package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.js.map +1 -0
  11. package/dist/src/bootstrap/domain/domain-validation.test.d.ts +2 -0
  12. package/dist/src/bootstrap/domain/domain-validation.test.d.ts.map +1 -0
  13. package/dist/src/bootstrap/domain/domain-validation.test.js +1872 -0
  14. package/dist/src/bootstrap/domain/domain-validation.test.js.map +1 -0
  15. package/dist/src/bootstrap/entity-synchronizer.d.ts +53 -0
  16. package/dist/src/bootstrap/entity-synchronizer.d.ts.map +1 -0
  17. package/dist/src/bootstrap/entity-synchronizer.js +69 -0
  18. package/dist/src/bootstrap/entity-synchronizer.js.map +1 -0
  19. package/dist/src/bootstrap/entity-synchronizer.test.d.ts +2 -0
  20. package/dist/src/bootstrap/entity-synchronizer.test.d.ts.map +1 -0
  21. package/dist/src/bootstrap/entity-synchronizer.test.js +270 -0
  22. package/dist/src/bootstrap/entity-synchronizer.test.js.map +1 -0
  23. package/dist/src/bootstrap/fix-created-by.d.ts +10 -0
  24. package/dist/src/bootstrap/fix-created-by.d.ts.map +1 -0
  25. package/dist/src/bootstrap/fix-created-by.js +36 -0
  26. package/dist/src/bootstrap/fix-created-by.js.map +1 -0
  27. package/dist/src/bootstrap/initialize-pae-client.d.ts +7 -0
  28. package/dist/src/bootstrap/initialize-pae-client.d.ts.map +1 -0
  29. package/dist/src/bootstrap/initialize-pae-client.js +24 -0
  30. package/dist/src/bootstrap/initialize-pae-client.js.map +1 -0
  31. package/dist/src/bootstrap/read-bootstrap-applications.d.ts +10 -0
  32. package/dist/src/bootstrap/read-bootstrap-applications.d.ts.map +1 -0
  33. package/dist/src/bootstrap/read-bootstrap-applications.js +650 -0
  34. package/dist/src/bootstrap/read-bootstrap-applications.js.map +1 -0
  35. package/dist/src/bootstrap/run-bootstrap-sync.service.d.ts +4 -0
  36. package/dist/src/bootstrap/run-bootstrap-sync.service.d.ts.map +1 -0
  37. package/dist/src/bootstrap/run-bootstrap-sync.service.js +27 -0
  38. package/dist/src/bootstrap/run-bootstrap-sync.service.js.map +1 -0
  39. package/dist/src/bootstrap/synchronizers/sync-applications.d.ts +4 -0
  40. package/dist/src/bootstrap/synchronizers/sync-applications.d.ts.map +1 -0
  41. package/dist/src/bootstrap/synchronizers/sync-applications.js +53 -0
  42. package/dist/src/bootstrap/synchronizers/sync-applications.js.map +1 -0
  43. package/dist/src/bootstrap/synchronizers/sync-authz-entities.d.ts +11 -0
  44. package/dist/src/bootstrap/synchronizers/sync-authz-entities.d.ts.map +1 -0
  45. package/dist/src/bootstrap/synchronizers/sync-authz-entities.js +58 -0
  46. package/dist/src/bootstrap/synchronizers/sync-authz-entities.js.map +1 -0
  47. package/dist/src/bootstrap/synchronizers/sync-catalog.d.ts +5 -0
  48. package/dist/src/bootstrap/synchronizers/sync-catalog.d.ts.map +1 -0
  49. package/dist/src/bootstrap/synchronizers/sync-catalog.js +73 -0
  50. package/dist/src/bootstrap/synchronizers/sync-catalog.js.map +1 -0
  51. package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.d.ts +11 -0
  52. package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.d.ts.map +1 -0
  53. package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.js +38 -0
  54. package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.js.map +1 -0
  55. package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.d.ts +12 -0
  56. package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.d.ts.map +1 -0
  57. package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.js +43 -0
  58. package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.js.map +1 -0
  59. package/dist/src/bootstrap/synchronizers/sync-entities.d.ts +19 -0
  60. package/dist/src/bootstrap/synchronizers/sync-entities.d.ts.map +1 -0
  61. package/dist/src/bootstrap/synchronizers/sync-entities.js +59 -0
  62. package/dist/src/bootstrap/synchronizers/sync-entities.js.map +1 -0
  63. package/dist/src/bootstrap/synchronizers/sync-entities.test.d.ts +2 -0
  64. package/dist/src/bootstrap/synchronizers/sync-entities.test.d.ts.map +1 -0
  65. package/dist/src/bootstrap/synchronizers/sync-entities.test.js +158 -0
  66. package/dist/src/bootstrap/synchronizers/sync-entities.test.js.map +1 -0
  67. package/dist/src/bootstrap/synchronizers/sync-entity-options.d.ts +11 -0
  68. package/dist/src/bootstrap/synchronizers/sync-entity-options.d.ts.map +1 -0
  69. package/dist/src/bootstrap/synchronizers/sync-entity-options.js +3 -0
  70. package/dist/src/bootstrap/synchronizers/sync-entity-options.js.map +1 -0
  71. package/dist/src/bootstrap/synchronizers/sync-modules-config.d.ts +4 -0
  72. package/dist/src/bootstrap/synchronizers/sync-modules-config.d.ts.map +1 -0
  73. package/dist/src/bootstrap/synchronizers/sync-modules-config.js +28 -0
  74. package/dist/src/bootstrap/synchronizers/sync-modules-config.js.map +1 -0
  75. package/dist/src/bootstrap/synchronizers/sync-operations.d.ts +5 -0
  76. package/dist/src/bootstrap/synchronizers/sync-operations.d.ts.map +1 -0
  77. package/dist/src/bootstrap/synchronizers/sync-operations.js +41 -0
  78. package/dist/src/bootstrap/synchronizers/sync-operations.js.map +1 -0
  79. package/dist/src/bootstrap/synchronizers/sync-role-operations.d.ts +8 -0
  80. package/dist/src/bootstrap/synchronizers/sync-role-operations.d.ts.map +1 -0
  81. package/dist/src/bootstrap/synchronizers/sync-role-operations.js +74 -0
  82. package/dist/src/bootstrap/synchronizers/sync-role-operations.js.map +1 -0
  83. package/dist/src/bootstrap/synchronizers/sync-roles.d.ts +5 -0
  84. package/dist/src/bootstrap/synchronizers/sync-roles.d.ts.map +1 -0
  85. package/dist/src/bootstrap/synchronizers/sync-roles.js +41 -0
  86. package/dist/src/bootstrap/synchronizers/sync-roles.js.map +1 -0
  87. package/dist/src/bootstrap/synchronizers/sync-shared-libraries.d.ts +4 -0
  88. package/dist/src/bootstrap/synchronizers/sync-shared-libraries.d.ts.map +1 -0
  89. package/dist/src/bootstrap/synchronizers/sync-shared-libraries.js +32 -0
  90. package/dist/src/bootstrap/synchronizers/sync-shared-libraries.js.map +1 -0
  91. package/dist/src/index.d.ts +3 -0
  92. package/dist/src/index.d.ts.map +1 -0
  93. package/dist/src/index.js +19 -0
  94. package/dist/src/index.js.map +1 -0
  95. package/dist/src/utils/compare-lists-by.d.ts +23 -0
  96. package/dist/src/utils/compare-lists-by.d.ts.map +1 -0
  97. package/dist/src/utils/compare-lists-by.js +34 -0
  98. package/dist/src/utils/compare-lists-by.js.map +1 -0
  99. package/dist/src/utils/format-diff.d.ts +106 -0
  100. package/dist/src/utils/format-diff.d.ts.map +1 -0
  101. package/dist/src/utils/format-diff.js +166 -0
  102. package/dist/src/utils/format-diff.js.map +1 -0
  103. package/dist/src/utils/format-diff.test.d.ts +2 -0
  104. package/dist/src/utils/format-diff.test.d.ts.map +1 -0
  105. package/dist/src/utils/format-diff.test.js +242 -0
  106. package/dist/src/utils/format-diff.test.js.map +1 -0
  107. package/dist/src/utils/get-common-keys.d.ts +6 -0
  108. package/dist/src/utils/get-common-keys.d.ts.map +1 -0
  109. package/dist/src/utils/get-common-keys.js +9 -0
  110. package/dist/src/utils/get-common-keys.js.map +1 -0
  111. package/dist/src/utils/io.d.ts +3 -0
  112. package/dist/src/utils/io.d.ts.map +1 -0
  113. package/dist/src/utils/io.js +13 -0
  114. package/dist/src/utils/io.js.map +1 -0
  115. package/package.json +34 -0
@@ -0,0 +1,1872 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString.js"));
40
+ const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
41
+ const typia_1 = __importDefault(require("typia"));
42
+ describe('BootstrapSyncMetadata - type validations', () => {
43
+ it('should validate a correct object', () => {
44
+ const validObject = {
45
+ syncConfig: {
46
+ scopedTo: 'blah'
47
+ },
48
+ };
49
+ const result = (() => { const _io0 = input => "object" === typeof input.syncConfig && null !== input.syncConfig && _io1(input.syncConfig) && (undefined === input.sharedLibraries || Array.isArray(input.sharedLibraries) && input.sharedLibraries.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (undefined === input.catalog || Array.isArray(input.catalog) && input.catalog.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (undefined === input.applicationsAuthz || Array.isArray(input.applicationsAuthz) && input.applicationsAuthz.every(elem => "object" === typeof elem && null !== elem && _io11(elem))) && (undefined === input.rolesAuthz || Array.isArray(input.rolesAuthz) && input.rolesAuthz.every(elem => "object" === typeof elem && null !== elem && _io12(elem))) && (undefined === input.operationsAuthz || Array.isArray(input.operationsAuthz) && input.operationsAuthz.every(elem => "object" === typeof elem && null !== elem && _io13(elem))) && (undefined === input.modulesConfig || Array.isArray(input.modulesConfig) && input.modulesConfig.every(elem => "object" === typeof elem && null !== elem && _io14(elem))); const _io1 = input => "string" === typeof input.scopedTo; const _io2 = input => "string" === typeof input.name && "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description); const _io3 = input => "string" === typeof input.name && "string" === typeof input.displayName && ("service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type) && "string" === typeof input.baseUrl && ("object" === typeof input.service && null !== input.service && _io4(input.service)) && (Array.isArray(input.dependsOn) && input.dependsOn.every(elem => "string" === typeof elem)) && (undefined === input.commonPaths || "object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) && _io5(input.commonPaths)) && (undefined === input.ui || "object" === typeof input.ui && null !== input.ui && _io6(input.ui)) && (undefined === input.cloudFunction || "object" === typeof input.cloudFunction && null !== input.cloudFunction && _io8(input.cloudFunction)) && (undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) && _io9(input.authorization)) && (undefined === input.application || "string" === typeof input.application) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.isPublic || "boolean" === typeof input.isPublic) && (undefined === input.id || "number" === typeof input.id); const _io4 = input => "string" === typeof input.host && "number" === typeof input.port && (undefined === input.protocol || "string" === typeof input.protocol) && (undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL); const _io5 = input => (undefined === input.apiDocs || "string" === typeof input.apiDocs) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.health || "string" === typeof input.health) && (undefined === input.changelog || "string" === typeof input.changelog); const _io6 = input => "string" === typeof input.route && (null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector) && "string" === typeof input.bundleFile && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io7(input.customProps)) && (undefined === input.shell || "boolean" === typeof input.shell) && (undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization); const _io7 = input => Object.keys(input).every(key => {
50
+ const value = input[key];
51
+ if (undefined === value)
52
+ return true;
53
+ return true;
54
+ }); const _io8 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io9 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io10(elem))); const _io10 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "GET" === elem || "POST" === elem || "PUT" === elem || "DELETE" === elem || "PATCH" === elem || "OPTIONS" === elem || "HEAD" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _io11 = input => "string" === typeof input.name && (undefined === input.displayName || "string" === typeof input.displayName) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault); const _io12 = input => (undefined === input.applicationName || "string" === typeof input.applicationName) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _io13 = input => (undefined === input.roles || Array.isArray(input.roles) && input.roles.every(elem => "string" === typeof elem)) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.applicationName || "string" === typeof input.applicationName); const _io14 = input => "string" === typeof input.moduleName && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io15(input.customProps)); const _io15 = input => Object.keys(input).every(key => {
55
+ const value = input[key];
56
+ if (undefined === value)
57
+ return true;
58
+ return true;
59
+ }); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.syncConfig && null !== input.syncConfig || _report(_exceptionable, {
60
+ path: _path + ".syncConfig",
61
+ expected: "__type",
62
+ value: input.syncConfig
63
+ })) && _vo1(input.syncConfig, _path + ".syncConfig", true && _exceptionable) || _report(_exceptionable, {
64
+ path: _path + ".syncConfig",
65
+ expected: "__type",
66
+ value: input.syncConfig
67
+ }), undefined === input.sharedLibraries || (Array.isArray(input.sharedLibraries) || _report(_exceptionable, {
68
+ path: _path + ".sharedLibraries",
69
+ expected: "(Array<CreateSharedLibraryDTO> | undefined)",
70
+ value: input.sharedLibraries
71
+ })) && input.sharedLibraries.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
72
+ path: _path + ".sharedLibraries[" + _index13 + "]",
73
+ expected: "CreateSharedLibraryDTO",
74
+ value: elem
75
+ })) && _vo2(elem, _path + ".sharedLibraries[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
76
+ path: _path + ".sharedLibraries[" + _index13 + "]",
77
+ expected: "CreateSharedLibraryDTO",
78
+ value: elem
79
+ })).every(flag => flag) || _report(_exceptionable, {
80
+ path: _path + ".sharedLibraries",
81
+ expected: "(Array<CreateSharedLibraryDTO> | undefined)",
82
+ value: input.sharedLibraries
83
+ }), undefined === input.catalog || (Array.isArray(input.catalog) || _report(_exceptionable, {
84
+ path: _path + ".catalog",
85
+ expected: "(Array<CreateOrUpdateModule> | undefined)",
86
+ value: input.catalog
87
+ })) && input.catalog.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
88
+ path: _path + ".catalog[" + _index14 + "]",
89
+ expected: "CreateOrUpdateModule",
90
+ value: elem
91
+ })) && _vo3(elem, _path + ".catalog[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
92
+ path: _path + ".catalog[" + _index14 + "]",
93
+ expected: "CreateOrUpdateModule",
94
+ value: elem
95
+ })).every(flag => flag) || _report(_exceptionable, {
96
+ path: _path + ".catalog",
97
+ expected: "(Array<CreateOrUpdateModule> | undefined)",
98
+ value: input.catalog
99
+ }), undefined === input.applicationsAuthz || (Array.isArray(input.applicationsAuthz) || _report(_exceptionable, {
100
+ path: _path + ".applicationsAuthz",
101
+ expected: "(Array<CreateApplicationDTO> | undefined)",
102
+ value: input.applicationsAuthz
103
+ })) && input.applicationsAuthz.map((elem, _index15) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
104
+ path: _path + ".applicationsAuthz[" + _index15 + "]",
105
+ expected: "CreateApplicationDTO",
106
+ value: elem
107
+ })) && _vo11(elem, _path + ".applicationsAuthz[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
108
+ path: _path + ".applicationsAuthz[" + _index15 + "]",
109
+ expected: "CreateApplicationDTO",
110
+ value: elem
111
+ })).every(flag => flag) || _report(_exceptionable, {
112
+ path: _path + ".applicationsAuthz",
113
+ expected: "(Array<CreateApplicationDTO> | undefined)",
114
+ value: input.applicationsAuthz
115
+ }), undefined === input.rolesAuthz || (Array.isArray(input.rolesAuthz) || _report(_exceptionable, {
116
+ path: _path + ".rolesAuthz",
117
+ expected: "(Array<CreateRoleDTO> | undefined)",
118
+ value: input.rolesAuthz
119
+ })) && input.rolesAuthz.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
120
+ path: _path + ".rolesAuthz[" + _index16 + "]",
121
+ expected: "CreateRoleDTO",
122
+ value: elem
123
+ })) && _vo12(elem, _path + ".rolesAuthz[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
124
+ path: _path + ".rolesAuthz[" + _index16 + "]",
125
+ expected: "CreateRoleDTO",
126
+ value: elem
127
+ })).every(flag => flag) || _report(_exceptionable, {
128
+ path: _path + ".rolesAuthz",
129
+ expected: "(Array<CreateRoleDTO> | undefined)",
130
+ value: input.rolesAuthz
131
+ }), undefined === input.operationsAuthz || (Array.isArray(input.operationsAuthz) || _report(_exceptionable, {
132
+ path: _path + ".operationsAuthz",
133
+ expected: "(Array<OperationAuthzBootstrap> | undefined)",
134
+ value: input.operationsAuthz
135
+ })) && input.operationsAuthz.map((elem, _index17) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
136
+ path: _path + ".operationsAuthz[" + _index17 + "]",
137
+ expected: "OperationAuthzBootstrap",
138
+ value: elem
139
+ })) && _vo13(elem, _path + ".operationsAuthz[" + _index17 + "]", true && _exceptionable) || _report(_exceptionable, {
140
+ path: _path + ".operationsAuthz[" + _index17 + "]",
141
+ expected: "OperationAuthzBootstrap",
142
+ value: elem
143
+ })).every(flag => flag) || _report(_exceptionable, {
144
+ path: _path + ".operationsAuthz",
145
+ expected: "(Array<OperationAuthzBootstrap> | undefined)",
146
+ value: input.operationsAuthz
147
+ }), undefined === input.modulesConfig || (Array.isArray(input.modulesConfig) || _report(_exceptionable, {
148
+ path: _path + ".modulesConfig",
149
+ expected: "(Array<UpdateModuleUIConfigDTO> | undefined)",
150
+ value: input.modulesConfig
151
+ })) && input.modulesConfig.map((elem, _index18) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
152
+ path: _path + ".modulesConfig[" + _index18 + "]",
153
+ expected: "UpdateModuleUIConfigDTO",
154
+ value: elem
155
+ })) && _vo14(elem, _path + ".modulesConfig[" + _index18 + "]", true && _exceptionable) || _report(_exceptionable, {
156
+ path: _path + ".modulesConfig[" + _index18 + "]",
157
+ expected: "UpdateModuleUIConfigDTO",
158
+ value: elem
159
+ })).every(flag => flag) || _report(_exceptionable, {
160
+ path: _path + ".modulesConfig",
161
+ expected: "(Array<UpdateModuleUIConfigDTO> | undefined)",
162
+ value: input.modulesConfig
163
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.scopedTo || _report(_exceptionable, {
164
+ path: _path + ".scopedTo",
165
+ expected: "string",
166
+ value: input.scopedTo
167
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
168
+ path: _path + ".name",
169
+ expected: "string",
170
+ value: input.name
171
+ }), "string" === typeof input.url || _report(_exceptionable, {
172
+ path: _path + ".url",
173
+ expected: "string",
174
+ value: input.url
175
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
176
+ path: _path + ".description",
177
+ expected: "(string | undefined)",
178
+ value: input.description
179
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
180
+ path: _path + ".name",
181
+ expected: "string",
182
+ value: input.name
183
+ }), "string" === typeof input.displayName || _report(_exceptionable, {
184
+ path: _path + ".displayName",
185
+ expected: "string",
186
+ value: input.displayName
187
+ }), "service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type || _report(_exceptionable, {
188
+ path: _path + ".type",
189
+ expected: "(\"app\" | \"cloud-function\" | \"service\" | \"utility\")",
190
+ value: input.type
191
+ }), "string" === typeof input.baseUrl || _report(_exceptionable, {
192
+ path: _path + ".baseUrl",
193
+ expected: "string",
194
+ value: input.baseUrl
195
+ }), ("object" === typeof input.service && null !== input.service || _report(_exceptionable, {
196
+ path: _path + ".service",
197
+ expected: "ServiceConfig",
198
+ value: input.service
199
+ })) && _vo4(input.service, _path + ".service", true && _exceptionable) || _report(_exceptionable, {
200
+ path: _path + ".service",
201
+ expected: "ServiceConfig",
202
+ value: input.service
203
+ }), (Array.isArray(input.dependsOn) || _report(_exceptionable, {
204
+ path: _path + ".dependsOn",
205
+ expected: "Array<string>",
206
+ value: input.dependsOn
207
+ })) && input.dependsOn.map((elem, _index19) => "string" === typeof elem || _report(_exceptionable, {
208
+ path: _path + ".dependsOn[" + _index19 + "]",
209
+ expected: "string",
210
+ value: elem
211
+ })).every(flag => flag) || _report(_exceptionable, {
212
+ path: _path + ".dependsOn",
213
+ expected: "Array<string>",
214
+ value: input.dependsOn
215
+ }), undefined === input.commonPaths || ("object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) || _report(_exceptionable, {
216
+ path: _path + ".commonPaths",
217
+ expected: "(CommonPathsMetadata | undefined)",
218
+ value: input.commonPaths
219
+ })) && _vo5(input.commonPaths, _path + ".commonPaths", true && _exceptionable) || _report(_exceptionable, {
220
+ path: _path + ".commonPaths",
221
+ expected: "(CommonPathsMetadata | undefined)",
222
+ value: input.commonPaths
223
+ }), undefined === input.ui || ("object" === typeof input.ui && null !== input.ui || _report(_exceptionable, {
224
+ path: _path + ".ui",
225
+ expected: "(UIConfig | undefined)",
226
+ value: input.ui
227
+ })) && _vo6(input.ui, _path + ".ui", true && _exceptionable) || _report(_exceptionable, {
228
+ path: _path + ".ui",
229
+ expected: "(UIConfig | undefined)",
230
+ value: input.ui
231
+ }), undefined === input.cloudFunction || ("object" === typeof input.cloudFunction && null !== input.cloudFunction || _report(_exceptionable, {
232
+ path: _path + ".cloudFunction",
233
+ expected: "(CloudFunctionConfig | undefined)",
234
+ value: input.cloudFunction
235
+ })) && _vo8(input.cloudFunction, _path + ".cloudFunction", true && _exceptionable) || _report(_exceptionable, {
236
+ path: _path + ".cloudFunction",
237
+ expected: "(CloudFunctionConfig | undefined)",
238
+ value: input.cloudFunction
239
+ }), undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) || _report(_exceptionable, {
240
+ path: _path + ".authorization",
241
+ expected: "(AuthorizationMetadata | undefined)",
242
+ value: input.authorization
243
+ })) && _vo9(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
244
+ path: _path + ".authorization",
245
+ expected: "(AuthorizationMetadata | undefined)",
246
+ value: input.authorization
247
+ }), undefined === input.application || "string" === typeof input.application || _report(_exceptionable, {
248
+ path: _path + ".application",
249
+ expected: "(string | undefined)",
250
+ value: input.application
251
+ }), undefined === input.version || "string" === typeof input.version || _report(_exceptionable, {
252
+ path: _path + ".version",
253
+ expected: "(string | undefined)",
254
+ value: input.version
255
+ }), undefined === input.isPublic || "boolean" === typeof input.isPublic || _report(_exceptionable, {
256
+ path: _path + ".isPublic",
257
+ expected: "(boolean | undefined)",
258
+ value: input.isPublic
259
+ }), undefined === input.id || "number" === typeof input.id || _report(_exceptionable, {
260
+ path: _path + ".id",
261
+ expected: "(number | undefined)",
262
+ value: input.id
263
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.host || _report(_exceptionable, {
264
+ path: _path + ".host",
265
+ expected: "string",
266
+ value: input.host
267
+ }), "number" === typeof input.port || _report(_exceptionable, {
268
+ path: _path + ".port",
269
+ expected: "number",
270
+ value: input.port
271
+ }), undefined === input.protocol || "string" === typeof input.protocol || _report(_exceptionable, {
272
+ path: _path + ".protocol",
273
+ expected: "(string | undefined)",
274
+ value: input.protocol
275
+ }), undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL || _report(_exceptionable, {
276
+ path: _path + ".includeBaseURL",
277
+ expected: "(boolean | undefined)",
278
+ value: input.includeBaseURL
279
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.apiDocs || "string" === typeof input.apiDocs || _report(_exceptionable, {
280
+ path: _path + ".apiDocs",
281
+ expected: "(string | undefined)",
282
+ value: input.apiDocs
283
+ }), undefined === input.version || "string" === typeof input.version || _report(_exceptionable, {
284
+ path: _path + ".version",
285
+ expected: "(string | undefined)",
286
+ value: input.version
287
+ }), undefined === input.health || "string" === typeof input.health || _report(_exceptionable, {
288
+ path: _path + ".health",
289
+ expected: "(string | undefined)",
290
+ value: input.health
291
+ }), undefined === input.changelog || "string" === typeof input.changelog || _report(_exceptionable, {
292
+ path: _path + ".changelog",
293
+ expected: "(string | undefined)",
294
+ value: input.changelog
295
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.route || _report(_exceptionable, {
296
+ path: _path + ".route",
297
+ expected: "string",
298
+ value: input.route
299
+ }), null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector || _report(_exceptionable, {
300
+ path: _path + ".mountAtSelector",
301
+ expected: "(null | string | undefined)",
302
+ value: input.mountAtSelector
303
+ }), "string" === typeof input.bundleFile || _report(_exceptionable, {
304
+ path: _path + ".bundleFile",
305
+ expected: "string",
306
+ value: input.bundleFile
307
+ }), ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) || _report(_exceptionable, {
308
+ path: _path + ".customProps",
309
+ expected: "ModuleProps",
310
+ value: input.customProps
311
+ })) && _vo7(input.customProps, _path + ".customProps", true && _exceptionable) || _report(_exceptionable, {
312
+ path: _path + ".customProps",
313
+ expected: "ModuleProps",
314
+ value: input.customProps
315
+ }), undefined === input.shell || "boolean" === typeof input.shell || _report(_exceptionable, {
316
+ path: _path + ".shell",
317
+ expected: "(boolean | undefined)",
318
+ value: input.shell
319
+ }), undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization || _report(_exceptionable, {
320
+ path: _path + ".isPlatformCustomization",
321
+ expected: "(boolean | undefined)",
322
+ value: input.isPlatformCustomization
323
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
324
+ const value = input[key];
325
+ if (undefined === value)
326
+ return true;
327
+ return true;
328
+ }).every(flag => flag)].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["aws" === input.provider || _report(_exceptionable, {
329
+ path: _path + ".provider",
330
+ expected: "\"aws\"",
331
+ value: input.provider
332
+ }), "boolean" === typeof input.requiresSignature || _report(_exceptionable, {
333
+ path: _path + ".requiresSignature",
334
+ expected: "boolean",
335
+ value: input.requiresSignature
336
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [undefined === input.operations || (Array.isArray(input.operations) || _report(_exceptionable, {
337
+ path: _path + ".operations",
338
+ expected: "(Array<string> | undefined)",
339
+ value: input.operations
340
+ })) && input.operations.map((elem, _index20) => "string" === typeof elem || _report(_exceptionable, {
341
+ path: _path + ".operations[" + _index20 + "]",
342
+ expected: "string",
343
+ value: elem
344
+ })).every(flag => flag) || _report(_exceptionable, {
345
+ path: _path + ".operations",
346
+ expected: "(Array<string> | undefined)",
347
+ value: input.operations
348
+ }), undefined === input.routes || (Array.isArray(input.routes) || _report(_exceptionable, {
349
+ path: _path + ".routes",
350
+ expected: "(Array<RouteAuthorization> | undefined)",
351
+ value: input.routes
352
+ })) && input.routes.map((elem, _index21) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
353
+ path: _path + ".routes[" + _index21 + "]",
354
+ expected: "RouteAuthorization",
355
+ value: elem
356
+ })) && _vo10(elem, _path + ".routes[" + _index21 + "]", true && _exceptionable) || _report(_exceptionable, {
357
+ path: _path + ".routes[" + _index21 + "]",
358
+ expected: "RouteAuthorization",
359
+ value: elem
360
+ })).every(flag => flag) || _report(_exceptionable, {
361
+ path: _path + ".routes",
362
+ expected: "(Array<RouteAuthorization> | undefined)",
363
+ value: input.routes
364
+ })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => [undefined === input.methods || (Array.isArray(input.methods) || _report(_exceptionable, {
365
+ path: _path + ".methods",
366
+ expected: "(Array<HttpMethod> | undefined)",
367
+ value: input.methods
368
+ })) && input.methods.map((elem, _index22) => "GET" === elem || "POST" === elem || "PUT" === elem || "DELETE" === elem || "PATCH" === elem || "OPTIONS" === elem || "HEAD" === elem || "CONNECT" === elem || "TRACE" === elem || _report(_exceptionable, {
369
+ path: _path + ".methods[" + _index22 + "]",
370
+ expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
371
+ value: elem
372
+ })).every(flag => flag) || _report(_exceptionable, {
373
+ path: _path + ".methods",
374
+ expected: "(Array<HttpMethod> | undefined)",
375
+ value: input.methods
376
+ }), "string" === typeof input.pattern || _report(_exceptionable, {
377
+ path: _path + ".pattern",
378
+ expected: "string",
379
+ value: input.pattern
380
+ }), (Array.isArray(input.operations) || _report(_exceptionable, {
381
+ path: _path + ".operations",
382
+ expected: "Array<string>",
383
+ value: input.operations
384
+ })) && input.operations.map((elem, _index23) => "string" === typeof elem || _report(_exceptionable, {
385
+ path: _path + ".operations[" + _index23 + "]",
386
+ expected: "string",
387
+ value: elem
388
+ })).every(flag => flag) || _report(_exceptionable, {
389
+ path: _path + ".operations",
390
+ expected: "Array<string>",
391
+ value: input.operations
392
+ })].every(flag => flag); const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
393
+ path: _path + ".name",
394
+ expected: "string",
395
+ value: input.name
396
+ }), undefined === input.displayName || "string" === typeof input.displayName || _report(_exceptionable, {
397
+ path: _path + ".displayName",
398
+ expected: "(string | undefined)",
399
+ value: input.displayName
400
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
401
+ path: _path + ".description",
402
+ expected: "(string | undefined)",
403
+ value: input.description
404
+ }), undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault || _report(_exceptionable, {
405
+ path: _path + ".allowedByDefault",
406
+ expected: "(boolean | undefined)",
407
+ value: input.allowedByDefault
408
+ })].every(flag => flag); const _vo12 = (input, _path, _exceptionable = true) => [undefined === input.applicationName || "string" === typeof input.applicationName || _report(_exceptionable, {
409
+ path: _path + ".applicationName",
410
+ expected: "(string | undefined)",
411
+ value: input.applicationName
412
+ }), "string" === typeof input.name || _report(_exceptionable, {
413
+ path: _path + ".name",
414
+ expected: "string",
415
+ value: input.name
416
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
417
+ path: _path + ".description",
418
+ expected: "(string | undefined)",
419
+ value: input.description
420
+ })].every(flag => flag); const _vo13 = (input, _path, _exceptionable = true) => [undefined === input.roles || (Array.isArray(input.roles) || _report(_exceptionable, {
421
+ path: _path + ".roles",
422
+ expected: "(Array<string> | undefined)",
423
+ value: input.roles
424
+ })) && input.roles.map((elem, _index24) => "string" === typeof elem || _report(_exceptionable, {
425
+ path: _path + ".roles[" + _index24 + "]",
426
+ expected: "string",
427
+ value: elem
428
+ })).every(flag => flag) || _report(_exceptionable, {
429
+ path: _path + ".roles",
430
+ expected: "(Array<string> | undefined)",
431
+ value: input.roles
432
+ }), "string" === typeof input.name || _report(_exceptionable, {
433
+ path: _path + ".name",
434
+ expected: "string",
435
+ value: input.name
436
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
437
+ path: _path + ".description",
438
+ expected: "(string | undefined)",
439
+ value: input.description
440
+ }), undefined === input.applicationName || "string" === typeof input.applicationName || _report(_exceptionable, {
441
+ path: _path + ".applicationName",
442
+ expected: "(string | undefined)",
443
+ value: input.applicationName
444
+ })].every(flag => flag); const _vo14 = (input, _path, _exceptionable = true) => ["string" === typeof input.moduleName || _report(_exceptionable, {
445
+ path: _path + ".moduleName",
446
+ expected: "string",
447
+ value: input.moduleName
448
+ }), ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) || _report(_exceptionable, {
449
+ path: _path + ".customProps",
450
+ expected: "Record<string, any>",
451
+ value: input.customProps
452
+ })) && _vo15(input.customProps, _path + ".customProps", true && _exceptionable) || _report(_exceptionable, {
453
+ path: _path + ".customProps",
454
+ expected: "Record<string, any>",
455
+ value: input.customProps
456
+ })].every(flag => flag); const _vo15 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
457
+ const value = input[key];
458
+ if (undefined === value)
459
+ return true;
460
+ return true;
461
+ }).every(flag => flag)].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
462
+ if (false === __is(input)) {
463
+ errors = [];
464
+ _report = __typia_transform__validateReport._validateReport(errors);
465
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
466
+ path: _path + "",
467
+ expected: "BootstrapSyncMetadata",
468
+ value: input
469
+ })) && _vo0(input, _path + "", true) || _report(true, {
470
+ path: _path + "",
471
+ expected: "BootstrapSyncMetadata",
472
+ value: input
473
+ }))(input, "$input", true);
474
+ const success = 0 === errors.length;
475
+ return success ? {
476
+ success,
477
+ data: input
478
+ } : {
479
+ success,
480
+ errors,
481
+ data: input
482
+ };
483
+ }
484
+ return {
485
+ success: true,
486
+ data: input
487
+ };
488
+ }; })()(validObject);
489
+ expect(result.success).toBe(true);
490
+ });
491
+ it('should invalidate an incorrect object', () => {
492
+ const invalidObject = {
493
+ invalidField: 'invalidValue',
494
+ };
495
+ const result = (() => { const _io0 = input => "object" === typeof input.syncConfig && null !== input.syncConfig && _io1(input.syncConfig) && (undefined === input.sharedLibraries || Array.isArray(input.sharedLibraries) && input.sharedLibraries.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (undefined === input.catalog || Array.isArray(input.catalog) && input.catalog.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (undefined === input.applicationsAuthz || Array.isArray(input.applicationsAuthz) && input.applicationsAuthz.every(elem => "object" === typeof elem && null !== elem && _io11(elem))) && (undefined === input.rolesAuthz || Array.isArray(input.rolesAuthz) && input.rolesAuthz.every(elem => "object" === typeof elem && null !== elem && _io12(elem))) && (undefined === input.operationsAuthz || Array.isArray(input.operationsAuthz) && input.operationsAuthz.every(elem => "object" === typeof elem && null !== elem && _io13(elem))) && (undefined === input.modulesConfig || Array.isArray(input.modulesConfig) && input.modulesConfig.every(elem => "object" === typeof elem && null !== elem && _io14(elem))); const _io1 = input => "string" === typeof input.scopedTo; const _io2 = input => "string" === typeof input.name && "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description); const _io3 = input => "string" === typeof input.name && "string" === typeof input.displayName && ("service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type) && "string" === typeof input.baseUrl && ("object" === typeof input.service && null !== input.service && _io4(input.service)) && (Array.isArray(input.dependsOn) && input.dependsOn.every(elem => "string" === typeof elem)) && (undefined === input.commonPaths || "object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) && _io5(input.commonPaths)) && (undefined === input.ui || "object" === typeof input.ui && null !== input.ui && _io6(input.ui)) && (undefined === input.cloudFunction || "object" === typeof input.cloudFunction && null !== input.cloudFunction && _io8(input.cloudFunction)) && (undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) && _io9(input.authorization)) && (undefined === input.application || "string" === typeof input.application) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.isPublic || "boolean" === typeof input.isPublic) && (undefined === input.id || "number" === typeof input.id); const _io4 = input => "string" === typeof input.host && "number" === typeof input.port && (undefined === input.protocol || "string" === typeof input.protocol) && (undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL); const _io5 = input => (undefined === input.apiDocs || "string" === typeof input.apiDocs) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.health || "string" === typeof input.health) && (undefined === input.changelog || "string" === typeof input.changelog); const _io6 = input => "string" === typeof input.route && (null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector) && "string" === typeof input.bundleFile && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io7(input.customProps)) && (undefined === input.shell || "boolean" === typeof input.shell) && (undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization); const _io7 = input => Object.keys(input).every(key => {
496
+ const value = input[key];
497
+ if (undefined === value)
498
+ return true;
499
+ return true;
500
+ }); const _io8 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io9 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io10(elem))); const _io10 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "GET" === elem || "POST" === elem || "PUT" === elem || "DELETE" === elem || "PATCH" === elem || "OPTIONS" === elem || "HEAD" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _io11 = input => "string" === typeof input.name && (undefined === input.displayName || "string" === typeof input.displayName) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault); const _io12 = input => (undefined === input.applicationName || "string" === typeof input.applicationName) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _io13 = input => (undefined === input.roles || Array.isArray(input.roles) && input.roles.every(elem => "string" === typeof elem)) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.applicationName || "string" === typeof input.applicationName); const _io14 = input => "string" === typeof input.moduleName && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io15(input.customProps)); const _io15 = input => Object.keys(input).every(key => {
501
+ const value = input[key];
502
+ if (undefined === value)
503
+ return true;
504
+ return true;
505
+ }); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.syncConfig && null !== input.syncConfig || _report(_exceptionable, {
506
+ path: _path + ".syncConfig",
507
+ expected: "__type",
508
+ value: input.syncConfig
509
+ })) && _vo1(input.syncConfig, _path + ".syncConfig", true && _exceptionable) || _report(_exceptionable, {
510
+ path: _path + ".syncConfig",
511
+ expected: "__type",
512
+ value: input.syncConfig
513
+ }), undefined === input.sharedLibraries || (Array.isArray(input.sharedLibraries) || _report(_exceptionable, {
514
+ path: _path + ".sharedLibraries",
515
+ expected: "(Array<CreateSharedLibraryDTO> | undefined)",
516
+ value: input.sharedLibraries
517
+ })) && input.sharedLibraries.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
518
+ path: _path + ".sharedLibraries[" + _index13 + "]",
519
+ expected: "CreateSharedLibraryDTO",
520
+ value: elem
521
+ })) && _vo2(elem, _path + ".sharedLibraries[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
522
+ path: _path + ".sharedLibraries[" + _index13 + "]",
523
+ expected: "CreateSharedLibraryDTO",
524
+ value: elem
525
+ })).every(flag => flag) || _report(_exceptionable, {
526
+ path: _path + ".sharedLibraries",
527
+ expected: "(Array<CreateSharedLibraryDTO> | undefined)",
528
+ value: input.sharedLibraries
529
+ }), undefined === input.catalog || (Array.isArray(input.catalog) || _report(_exceptionable, {
530
+ path: _path + ".catalog",
531
+ expected: "(Array<CreateOrUpdateModule> | undefined)",
532
+ value: input.catalog
533
+ })) && input.catalog.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
534
+ path: _path + ".catalog[" + _index14 + "]",
535
+ expected: "CreateOrUpdateModule",
536
+ value: elem
537
+ })) && _vo3(elem, _path + ".catalog[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
538
+ path: _path + ".catalog[" + _index14 + "]",
539
+ expected: "CreateOrUpdateModule",
540
+ value: elem
541
+ })).every(flag => flag) || _report(_exceptionable, {
542
+ path: _path + ".catalog",
543
+ expected: "(Array<CreateOrUpdateModule> | undefined)",
544
+ value: input.catalog
545
+ }), undefined === input.applicationsAuthz || (Array.isArray(input.applicationsAuthz) || _report(_exceptionable, {
546
+ path: _path + ".applicationsAuthz",
547
+ expected: "(Array<CreateApplicationDTO> | undefined)",
548
+ value: input.applicationsAuthz
549
+ })) && input.applicationsAuthz.map((elem, _index15) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
550
+ path: _path + ".applicationsAuthz[" + _index15 + "]",
551
+ expected: "CreateApplicationDTO",
552
+ value: elem
553
+ })) && _vo11(elem, _path + ".applicationsAuthz[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
554
+ path: _path + ".applicationsAuthz[" + _index15 + "]",
555
+ expected: "CreateApplicationDTO",
556
+ value: elem
557
+ })).every(flag => flag) || _report(_exceptionable, {
558
+ path: _path + ".applicationsAuthz",
559
+ expected: "(Array<CreateApplicationDTO> | undefined)",
560
+ value: input.applicationsAuthz
561
+ }), undefined === input.rolesAuthz || (Array.isArray(input.rolesAuthz) || _report(_exceptionable, {
562
+ path: _path + ".rolesAuthz",
563
+ expected: "(Array<CreateRoleDTO> | undefined)",
564
+ value: input.rolesAuthz
565
+ })) && input.rolesAuthz.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
566
+ path: _path + ".rolesAuthz[" + _index16 + "]",
567
+ expected: "CreateRoleDTO",
568
+ value: elem
569
+ })) && _vo12(elem, _path + ".rolesAuthz[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
570
+ path: _path + ".rolesAuthz[" + _index16 + "]",
571
+ expected: "CreateRoleDTO",
572
+ value: elem
573
+ })).every(flag => flag) || _report(_exceptionable, {
574
+ path: _path + ".rolesAuthz",
575
+ expected: "(Array<CreateRoleDTO> | undefined)",
576
+ value: input.rolesAuthz
577
+ }), undefined === input.operationsAuthz || (Array.isArray(input.operationsAuthz) || _report(_exceptionable, {
578
+ path: _path + ".operationsAuthz",
579
+ expected: "(Array<OperationAuthzBootstrap> | undefined)",
580
+ value: input.operationsAuthz
581
+ })) && input.operationsAuthz.map((elem, _index17) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
582
+ path: _path + ".operationsAuthz[" + _index17 + "]",
583
+ expected: "OperationAuthzBootstrap",
584
+ value: elem
585
+ })) && _vo13(elem, _path + ".operationsAuthz[" + _index17 + "]", true && _exceptionable) || _report(_exceptionable, {
586
+ path: _path + ".operationsAuthz[" + _index17 + "]",
587
+ expected: "OperationAuthzBootstrap",
588
+ value: elem
589
+ })).every(flag => flag) || _report(_exceptionable, {
590
+ path: _path + ".operationsAuthz",
591
+ expected: "(Array<OperationAuthzBootstrap> | undefined)",
592
+ value: input.operationsAuthz
593
+ }), undefined === input.modulesConfig || (Array.isArray(input.modulesConfig) || _report(_exceptionable, {
594
+ path: _path + ".modulesConfig",
595
+ expected: "(Array<UpdateModuleUIConfigDTO> | undefined)",
596
+ value: input.modulesConfig
597
+ })) && input.modulesConfig.map((elem, _index18) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
598
+ path: _path + ".modulesConfig[" + _index18 + "]",
599
+ expected: "UpdateModuleUIConfigDTO",
600
+ value: elem
601
+ })) && _vo14(elem, _path + ".modulesConfig[" + _index18 + "]", true && _exceptionable) || _report(_exceptionable, {
602
+ path: _path + ".modulesConfig[" + _index18 + "]",
603
+ expected: "UpdateModuleUIConfigDTO",
604
+ value: elem
605
+ })).every(flag => flag) || _report(_exceptionable, {
606
+ path: _path + ".modulesConfig",
607
+ expected: "(Array<UpdateModuleUIConfigDTO> | undefined)",
608
+ value: input.modulesConfig
609
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.scopedTo || _report(_exceptionable, {
610
+ path: _path + ".scopedTo",
611
+ expected: "string",
612
+ value: input.scopedTo
613
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
614
+ path: _path + ".name",
615
+ expected: "string",
616
+ value: input.name
617
+ }), "string" === typeof input.url || _report(_exceptionable, {
618
+ path: _path + ".url",
619
+ expected: "string",
620
+ value: input.url
621
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
622
+ path: _path + ".description",
623
+ expected: "(string | undefined)",
624
+ value: input.description
625
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
626
+ path: _path + ".name",
627
+ expected: "string",
628
+ value: input.name
629
+ }), "string" === typeof input.displayName || _report(_exceptionable, {
630
+ path: _path + ".displayName",
631
+ expected: "string",
632
+ value: input.displayName
633
+ }), "service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type || _report(_exceptionable, {
634
+ path: _path + ".type",
635
+ expected: "(\"app\" | \"cloud-function\" | \"service\" | \"utility\")",
636
+ value: input.type
637
+ }), "string" === typeof input.baseUrl || _report(_exceptionable, {
638
+ path: _path + ".baseUrl",
639
+ expected: "string",
640
+ value: input.baseUrl
641
+ }), ("object" === typeof input.service && null !== input.service || _report(_exceptionable, {
642
+ path: _path + ".service",
643
+ expected: "ServiceConfig",
644
+ value: input.service
645
+ })) && _vo4(input.service, _path + ".service", true && _exceptionable) || _report(_exceptionable, {
646
+ path: _path + ".service",
647
+ expected: "ServiceConfig",
648
+ value: input.service
649
+ }), (Array.isArray(input.dependsOn) || _report(_exceptionable, {
650
+ path: _path + ".dependsOn",
651
+ expected: "Array<string>",
652
+ value: input.dependsOn
653
+ })) && input.dependsOn.map((elem, _index19) => "string" === typeof elem || _report(_exceptionable, {
654
+ path: _path + ".dependsOn[" + _index19 + "]",
655
+ expected: "string",
656
+ value: elem
657
+ })).every(flag => flag) || _report(_exceptionable, {
658
+ path: _path + ".dependsOn",
659
+ expected: "Array<string>",
660
+ value: input.dependsOn
661
+ }), undefined === input.commonPaths || ("object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) || _report(_exceptionable, {
662
+ path: _path + ".commonPaths",
663
+ expected: "(CommonPathsMetadata | undefined)",
664
+ value: input.commonPaths
665
+ })) && _vo5(input.commonPaths, _path + ".commonPaths", true && _exceptionable) || _report(_exceptionable, {
666
+ path: _path + ".commonPaths",
667
+ expected: "(CommonPathsMetadata | undefined)",
668
+ value: input.commonPaths
669
+ }), undefined === input.ui || ("object" === typeof input.ui && null !== input.ui || _report(_exceptionable, {
670
+ path: _path + ".ui",
671
+ expected: "(UIConfig | undefined)",
672
+ value: input.ui
673
+ })) && _vo6(input.ui, _path + ".ui", true && _exceptionable) || _report(_exceptionable, {
674
+ path: _path + ".ui",
675
+ expected: "(UIConfig | undefined)",
676
+ value: input.ui
677
+ }), undefined === input.cloudFunction || ("object" === typeof input.cloudFunction && null !== input.cloudFunction || _report(_exceptionable, {
678
+ path: _path + ".cloudFunction",
679
+ expected: "(CloudFunctionConfig | undefined)",
680
+ value: input.cloudFunction
681
+ })) && _vo8(input.cloudFunction, _path + ".cloudFunction", true && _exceptionable) || _report(_exceptionable, {
682
+ path: _path + ".cloudFunction",
683
+ expected: "(CloudFunctionConfig | undefined)",
684
+ value: input.cloudFunction
685
+ }), undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) || _report(_exceptionable, {
686
+ path: _path + ".authorization",
687
+ expected: "(AuthorizationMetadata | undefined)",
688
+ value: input.authorization
689
+ })) && _vo9(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
690
+ path: _path + ".authorization",
691
+ expected: "(AuthorizationMetadata | undefined)",
692
+ value: input.authorization
693
+ }), undefined === input.application || "string" === typeof input.application || _report(_exceptionable, {
694
+ path: _path + ".application",
695
+ expected: "(string | undefined)",
696
+ value: input.application
697
+ }), undefined === input.version || "string" === typeof input.version || _report(_exceptionable, {
698
+ path: _path + ".version",
699
+ expected: "(string | undefined)",
700
+ value: input.version
701
+ }), undefined === input.isPublic || "boolean" === typeof input.isPublic || _report(_exceptionable, {
702
+ path: _path + ".isPublic",
703
+ expected: "(boolean | undefined)",
704
+ value: input.isPublic
705
+ }), undefined === input.id || "number" === typeof input.id || _report(_exceptionable, {
706
+ path: _path + ".id",
707
+ expected: "(number | undefined)",
708
+ value: input.id
709
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.host || _report(_exceptionable, {
710
+ path: _path + ".host",
711
+ expected: "string",
712
+ value: input.host
713
+ }), "number" === typeof input.port || _report(_exceptionable, {
714
+ path: _path + ".port",
715
+ expected: "number",
716
+ value: input.port
717
+ }), undefined === input.protocol || "string" === typeof input.protocol || _report(_exceptionable, {
718
+ path: _path + ".protocol",
719
+ expected: "(string | undefined)",
720
+ value: input.protocol
721
+ }), undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL || _report(_exceptionable, {
722
+ path: _path + ".includeBaseURL",
723
+ expected: "(boolean | undefined)",
724
+ value: input.includeBaseURL
725
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.apiDocs || "string" === typeof input.apiDocs || _report(_exceptionable, {
726
+ path: _path + ".apiDocs",
727
+ expected: "(string | undefined)",
728
+ value: input.apiDocs
729
+ }), undefined === input.version || "string" === typeof input.version || _report(_exceptionable, {
730
+ path: _path + ".version",
731
+ expected: "(string | undefined)",
732
+ value: input.version
733
+ }), undefined === input.health || "string" === typeof input.health || _report(_exceptionable, {
734
+ path: _path + ".health",
735
+ expected: "(string | undefined)",
736
+ value: input.health
737
+ }), undefined === input.changelog || "string" === typeof input.changelog || _report(_exceptionable, {
738
+ path: _path + ".changelog",
739
+ expected: "(string | undefined)",
740
+ value: input.changelog
741
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.route || _report(_exceptionable, {
742
+ path: _path + ".route",
743
+ expected: "string",
744
+ value: input.route
745
+ }), null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector || _report(_exceptionable, {
746
+ path: _path + ".mountAtSelector",
747
+ expected: "(null | string | undefined)",
748
+ value: input.mountAtSelector
749
+ }), "string" === typeof input.bundleFile || _report(_exceptionable, {
750
+ path: _path + ".bundleFile",
751
+ expected: "string",
752
+ value: input.bundleFile
753
+ }), ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) || _report(_exceptionable, {
754
+ path: _path + ".customProps",
755
+ expected: "ModuleProps",
756
+ value: input.customProps
757
+ })) && _vo7(input.customProps, _path + ".customProps", true && _exceptionable) || _report(_exceptionable, {
758
+ path: _path + ".customProps",
759
+ expected: "ModuleProps",
760
+ value: input.customProps
761
+ }), undefined === input.shell || "boolean" === typeof input.shell || _report(_exceptionable, {
762
+ path: _path + ".shell",
763
+ expected: "(boolean | undefined)",
764
+ value: input.shell
765
+ }), undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization || _report(_exceptionable, {
766
+ path: _path + ".isPlatformCustomization",
767
+ expected: "(boolean | undefined)",
768
+ value: input.isPlatformCustomization
769
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
770
+ const value = input[key];
771
+ if (undefined === value)
772
+ return true;
773
+ return true;
774
+ }).every(flag => flag)].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["aws" === input.provider || _report(_exceptionable, {
775
+ path: _path + ".provider",
776
+ expected: "\"aws\"",
777
+ value: input.provider
778
+ }), "boolean" === typeof input.requiresSignature || _report(_exceptionable, {
779
+ path: _path + ".requiresSignature",
780
+ expected: "boolean",
781
+ value: input.requiresSignature
782
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [undefined === input.operations || (Array.isArray(input.operations) || _report(_exceptionable, {
783
+ path: _path + ".operations",
784
+ expected: "(Array<string> | undefined)",
785
+ value: input.operations
786
+ })) && input.operations.map((elem, _index20) => "string" === typeof elem || _report(_exceptionable, {
787
+ path: _path + ".operations[" + _index20 + "]",
788
+ expected: "string",
789
+ value: elem
790
+ })).every(flag => flag) || _report(_exceptionable, {
791
+ path: _path + ".operations",
792
+ expected: "(Array<string> | undefined)",
793
+ value: input.operations
794
+ }), undefined === input.routes || (Array.isArray(input.routes) || _report(_exceptionable, {
795
+ path: _path + ".routes",
796
+ expected: "(Array<RouteAuthorization> | undefined)",
797
+ value: input.routes
798
+ })) && input.routes.map((elem, _index21) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
799
+ path: _path + ".routes[" + _index21 + "]",
800
+ expected: "RouteAuthorization",
801
+ value: elem
802
+ })) && _vo10(elem, _path + ".routes[" + _index21 + "]", true && _exceptionable) || _report(_exceptionable, {
803
+ path: _path + ".routes[" + _index21 + "]",
804
+ expected: "RouteAuthorization",
805
+ value: elem
806
+ })).every(flag => flag) || _report(_exceptionable, {
807
+ path: _path + ".routes",
808
+ expected: "(Array<RouteAuthorization> | undefined)",
809
+ value: input.routes
810
+ })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => [undefined === input.methods || (Array.isArray(input.methods) || _report(_exceptionable, {
811
+ path: _path + ".methods",
812
+ expected: "(Array<HttpMethod> | undefined)",
813
+ value: input.methods
814
+ })) && input.methods.map((elem, _index22) => "GET" === elem || "POST" === elem || "PUT" === elem || "DELETE" === elem || "PATCH" === elem || "OPTIONS" === elem || "HEAD" === elem || "CONNECT" === elem || "TRACE" === elem || _report(_exceptionable, {
815
+ path: _path + ".methods[" + _index22 + "]",
816
+ expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
817
+ value: elem
818
+ })).every(flag => flag) || _report(_exceptionable, {
819
+ path: _path + ".methods",
820
+ expected: "(Array<HttpMethod> | undefined)",
821
+ value: input.methods
822
+ }), "string" === typeof input.pattern || _report(_exceptionable, {
823
+ path: _path + ".pattern",
824
+ expected: "string",
825
+ value: input.pattern
826
+ }), (Array.isArray(input.operations) || _report(_exceptionable, {
827
+ path: _path + ".operations",
828
+ expected: "Array<string>",
829
+ value: input.operations
830
+ })) && input.operations.map((elem, _index23) => "string" === typeof elem || _report(_exceptionable, {
831
+ path: _path + ".operations[" + _index23 + "]",
832
+ expected: "string",
833
+ value: elem
834
+ })).every(flag => flag) || _report(_exceptionable, {
835
+ path: _path + ".operations",
836
+ expected: "Array<string>",
837
+ value: input.operations
838
+ })].every(flag => flag); const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
839
+ path: _path + ".name",
840
+ expected: "string",
841
+ value: input.name
842
+ }), undefined === input.displayName || "string" === typeof input.displayName || _report(_exceptionable, {
843
+ path: _path + ".displayName",
844
+ expected: "(string | undefined)",
845
+ value: input.displayName
846
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
847
+ path: _path + ".description",
848
+ expected: "(string | undefined)",
849
+ value: input.description
850
+ }), undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault || _report(_exceptionable, {
851
+ path: _path + ".allowedByDefault",
852
+ expected: "(boolean | undefined)",
853
+ value: input.allowedByDefault
854
+ })].every(flag => flag); const _vo12 = (input, _path, _exceptionable = true) => [undefined === input.applicationName || "string" === typeof input.applicationName || _report(_exceptionable, {
855
+ path: _path + ".applicationName",
856
+ expected: "(string | undefined)",
857
+ value: input.applicationName
858
+ }), "string" === typeof input.name || _report(_exceptionable, {
859
+ path: _path + ".name",
860
+ expected: "string",
861
+ value: input.name
862
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
863
+ path: _path + ".description",
864
+ expected: "(string | undefined)",
865
+ value: input.description
866
+ })].every(flag => flag); const _vo13 = (input, _path, _exceptionable = true) => [undefined === input.roles || (Array.isArray(input.roles) || _report(_exceptionable, {
867
+ path: _path + ".roles",
868
+ expected: "(Array<string> | undefined)",
869
+ value: input.roles
870
+ })) && input.roles.map((elem, _index24) => "string" === typeof elem || _report(_exceptionable, {
871
+ path: _path + ".roles[" + _index24 + "]",
872
+ expected: "string",
873
+ value: elem
874
+ })).every(flag => flag) || _report(_exceptionable, {
875
+ path: _path + ".roles",
876
+ expected: "(Array<string> | undefined)",
877
+ value: input.roles
878
+ }), "string" === typeof input.name || _report(_exceptionable, {
879
+ path: _path + ".name",
880
+ expected: "string",
881
+ value: input.name
882
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
883
+ path: _path + ".description",
884
+ expected: "(string | undefined)",
885
+ value: input.description
886
+ }), undefined === input.applicationName || "string" === typeof input.applicationName || _report(_exceptionable, {
887
+ path: _path + ".applicationName",
888
+ expected: "(string | undefined)",
889
+ value: input.applicationName
890
+ })].every(flag => flag); const _vo14 = (input, _path, _exceptionable = true) => ["string" === typeof input.moduleName || _report(_exceptionable, {
891
+ path: _path + ".moduleName",
892
+ expected: "string",
893
+ value: input.moduleName
894
+ }), ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) || _report(_exceptionable, {
895
+ path: _path + ".customProps",
896
+ expected: "Record<string, any>",
897
+ value: input.customProps
898
+ })) && _vo15(input.customProps, _path + ".customProps", true && _exceptionable) || _report(_exceptionable, {
899
+ path: _path + ".customProps",
900
+ expected: "Record<string, any>",
901
+ value: input.customProps
902
+ })].every(flag => flag); const _vo15 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
903
+ const value = input[key];
904
+ if (undefined === value)
905
+ return true;
906
+ return true;
907
+ }).every(flag => flag)].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
908
+ if (false === __is(input)) {
909
+ errors = [];
910
+ _report = __typia_transform__validateReport._validateReport(errors);
911
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
912
+ path: _path + "",
913
+ expected: "BootstrapSyncMetadata",
914
+ value: input
915
+ })) && _vo0(input, _path + "", true) || _report(true, {
916
+ path: _path + "",
917
+ expected: "BootstrapSyncMetadata",
918
+ value: input
919
+ }))(input, "$input", true);
920
+ const success = 0 === errors.length;
921
+ return success ? {
922
+ success,
923
+ data: input
924
+ } : {
925
+ success,
926
+ errors,
927
+ data: input
928
+ };
929
+ }
930
+ return {
931
+ success: true,
932
+ data: input
933
+ };
934
+ }; })()(invalidObject);
935
+ expect(result.success).toBe(false);
936
+ });
937
+ it('should validate an object with optional fields', () => {
938
+ const validObjectWithOptionalFields = {
939
+ catalog: [
940
+ {
941
+ name: "Catalog1",
942
+ baseUrl: "http://example.com",
943
+ dependsOn: ["Catalog2"],
944
+ displayName: "Catalog 1",
945
+ service: {
946
+ host: "localhost",
947
+ port: 8080,
948
+ protocol: "http",
949
+ },
950
+ type: "app"
951
+ },
952
+ ],
953
+ sharedLibraries: [],
954
+ applicationsAuthz: [],
955
+ rolesAuthz: [],
956
+ operationsAuthz: [],
957
+ modulesConfig: [],
958
+ syncConfig: {
959
+ scopedTo: "any"
960
+ },
961
+ };
962
+ const result = (() => { const _io0 = input => "object" === typeof input.syncConfig && null !== input.syncConfig && _io1(input.syncConfig) && (undefined === input.sharedLibraries || Array.isArray(input.sharedLibraries) && input.sharedLibraries.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (undefined === input.catalog || Array.isArray(input.catalog) && input.catalog.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (undefined === input.applicationsAuthz || Array.isArray(input.applicationsAuthz) && input.applicationsAuthz.every(elem => "object" === typeof elem && null !== elem && _io11(elem))) && (undefined === input.rolesAuthz || Array.isArray(input.rolesAuthz) && input.rolesAuthz.every(elem => "object" === typeof elem && null !== elem && _io12(elem))) && (undefined === input.operationsAuthz || Array.isArray(input.operationsAuthz) && input.operationsAuthz.every(elem => "object" === typeof elem && null !== elem && _io13(elem))) && (undefined === input.modulesConfig || Array.isArray(input.modulesConfig) && input.modulesConfig.every(elem => "object" === typeof elem && null !== elem && _io14(elem))); const _io1 = input => "string" === typeof input.scopedTo; const _io2 = input => "string" === typeof input.name && "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description); const _io3 = input => "string" === typeof input.name && "string" === typeof input.displayName && ("service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type) && "string" === typeof input.baseUrl && ("object" === typeof input.service && null !== input.service && _io4(input.service)) && (Array.isArray(input.dependsOn) && input.dependsOn.every(elem => "string" === typeof elem)) && (undefined === input.commonPaths || "object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) && _io5(input.commonPaths)) && (undefined === input.ui || "object" === typeof input.ui && null !== input.ui && _io6(input.ui)) && (undefined === input.cloudFunction || "object" === typeof input.cloudFunction && null !== input.cloudFunction && _io8(input.cloudFunction)) && (undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) && _io9(input.authorization)) && (undefined === input.application || "string" === typeof input.application) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.isPublic || "boolean" === typeof input.isPublic) && (undefined === input.id || "number" === typeof input.id); const _io4 = input => "string" === typeof input.host && "number" === typeof input.port && (undefined === input.protocol || "string" === typeof input.protocol) && (undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL); const _io5 = input => (undefined === input.apiDocs || "string" === typeof input.apiDocs) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.health || "string" === typeof input.health) && (undefined === input.changelog || "string" === typeof input.changelog); const _io6 = input => "string" === typeof input.route && (null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector) && "string" === typeof input.bundleFile && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io7(input.customProps)) && (undefined === input.shell || "boolean" === typeof input.shell) && (undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization); const _io7 = input => Object.keys(input).every(key => {
963
+ const value = input[key];
964
+ if (undefined === value)
965
+ return true;
966
+ return true;
967
+ }); const _io8 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io9 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io10(elem))); const _io10 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "GET" === elem || "POST" === elem || "PUT" === elem || "DELETE" === elem || "PATCH" === elem || "OPTIONS" === elem || "HEAD" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _io11 = input => "string" === typeof input.name && (undefined === input.displayName || "string" === typeof input.displayName) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault); const _io12 = input => (undefined === input.applicationName || "string" === typeof input.applicationName) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _io13 = input => (undefined === input.roles || Array.isArray(input.roles) && input.roles.every(elem => "string" === typeof elem)) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.applicationName || "string" === typeof input.applicationName); const _io14 = input => "string" === typeof input.moduleName && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io15(input.customProps)); const _io15 = input => Object.keys(input).every(key => {
968
+ const value = input[key];
969
+ if (undefined === value)
970
+ return true;
971
+ return true;
972
+ }); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.syncConfig && null !== input.syncConfig || _report(_exceptionable, {
973
+ path: _path + ".syncConfig",
974
+ expected: "__type",
975
+ value: input.syncConfig
976
+ })) && _vo1(input.syncConfig, _path + ".syncConfig", true && _exceptionable) || _report(_exceptionable, {
977
+ path: _path + ".syncConfig",
978
+ expected: "__type",
979
+ value: input.syncConfig
980
+ }), undefined === input.sharedLibraries || (Array.isArray(input.sharedLibraries) || _report(_exceptionable, {
981
+ path: _path + ".sharedLibraries",
982
+ expected: "(Array<CreateSharedLibraryDTO> | undefined)",
983
+ value: input.sharedLibraries
984
+ })) && input.sharedLibraries.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
985
+ path: _path + ".sharedLibraries[" + _index13 + "]",
986
+ expected: "CreateSharedLibraryDTO",
987
+ value: elem
988
+ })) && _vo2(elem, _path + ".sharedLibraries[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
989
+ path: _path + ".sharedLibraries[" + _index13 + "]",
990
+ expected: "CreateSharedLibraryDTO",
991
+ value: elem
992
+ })).every(flag => flag) || _report(_exceptionable, {
993
+ path: _path + ".sharedLibraries",
994
+ expected: "(Array<CreateSharedLibraryDTO> | undefined)",
995
+ value: input.sharedLibraries
996
+ }), undefined === input.catalog || (Array.isArray(input.catalog) || _report(_exceptionable, {
997
+ path: _path + ".catalog",
998
+ expected: "(Array<CreateOrUpdateModule> | undefined)",
999
+ value: input.catalog
1000
+ })) && input.catalog.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1001
+ path: _path + ".catalog[" + _index14 + "]",
1002
+ expected: "CreateOrUpdateModule",
1003
+ value: elem
1004
+ })) && _vo3(elem, _path + ".catalog[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1005
+ path: _path + ".catalog[" + _index14 + "]",
1006
+ expected: "CreateOrUpdateModule",
1007
+ value: elem
1008
+ })).every(flag => flag) || _report(_exceptionable, {
1009
+ path: _path + ".catalog",
1010
+ expected: "(Array<CreateOrUpdateModule> | undefined)",
1011
+ value: input.catalog
1012
+ }), undefined === input.applicationsAuthz || (Array.isArray(input.applicationsAuthz) || _report(_exceptionable, {
1013
+ path: _path + ".applicationsAuthz",
1014
+ expected: "(Array<CreateApplicationDTO> | undefined)",
1015
+ value: input.applicationsAuthz
1016
+ })) && input.applicationsAuthz.map((elem, _index15) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1017
+ path: _path + ".applicationsAuthz[" + _index15 + "]",
1018
+ expected: "CreateApplicationDTO",
1019
+ value: elem
1020
+ })) && _vo11(elem, _path + ".applicationsAuthz[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
1021
+ path: _path + ".applicationsAuthz[" + _index15 + "]",
1022
+ expected: "CreateApplicationDTO",
1023
+ value: elem
1024
+ })).every(flag => flag) || _report(_exceptionable, {
1025
+ path: _path + ".applicationsAuthz",
1026
+ expected: "(Array<CreateApplicationDTO> | undefined)",
1027
+ value: input.applicationsAuthz
1028
+ }), undefined === input.rolesAuthz || (Array.isArray(input.rolesAuthz) || _report(_exceptionable, {
1029
+ path: _path + ".rolesAuthz",
1030
+ expected: "(Array<CreateRoleDTO> | undefined)",
1031
+ value: input.rolesAuthz
1032
+ })) && input.rolesAuthz.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1033
+ path: _path + ".rolesAuthz[" + _index16 + "]",
1034
+ expected: "CreateRoleDTO",
1035
+ value: elem
1036
+ })) && _vo12(elem, _path + ".rolesAuthz[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
1037
+ path: _path + ".rolesAuthz[" + _index16 + "]",
1038
+ expected: "CreateRoleDTO",
1039
+ value: elem
1040
+ })).every(flag => flag) || _report(_exceptionable, {
1041
+ path: _path + ".rolesAuthz",
1042
+ expected: "(Array<CreateRoleDTO> | undefined)",
1043
+ value: input.rolesAuthz
1044
+ }), undefined === input.operationsAuthz || (Array.isArray(input.operationsAuthz) || _report(_exceptionable, {
1045
+ path: _path + ".operationsAuthz",
1046
+ expected: "(Array<OperationAuthzBootstrap> | undefined)",
1047
+ value: input.operationsAuthz
1048
+ })) && input.operationsAuthz.map((elem, _index17) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1049
+ path: _path + ".operationsAuthz[" + _index17 + "]",
1050
+ expected: "OperationAuthzBootstrap",
1051
+ value: elem
1052
+ })) && _vo13(elem, _path + ".operationsAuthz[" + _index17 + "]", true && _exceptionable) || _report(_exceptionable, {
1053
+ path: _path + ".operationsAuthz[" + _index17 + "]",
1054
+ expected: "OperationAuthzBootstrap",
1055
+ value: elem
1056
+ })).every(flag => flag) || _report(_exceptionable, {
1057
+ path: _path + ".operationsAuthz",
1058
+ expected: "(Array<OperationAuthzBootstrap> | undefined)",
1059
+ value: input.operationsAuthz
1060
+ }), undefined === input.modulesConfig || (Array.isArray(input.modulesConfig) || _report(_exceptionable, {
1061
+ path: _path + ".modulesConfig",
1062
+ expected: "(Array<UpdateModuleUIConfigDTO> | undefined)",
1063
+ value: input.modulesConfig
1064
+ })) && input.modulesConfig.map((elem, _index18) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1065
+ path: _path + ".modulesConfig[" + _index18 + "]",
1066
+ expected: "UpdateModuleUIConfigDTO",
1067
+ value: elem
1068
+ })) && _vo14(elem, _path + ".modulesConfig[" + _index18 + "]", true && _exceptionable) || _report(_exceptionable, {
1069
+ path: _path + ".modulesConfig[" + _index18 + "]",
1070
+ expected: "UpdateModuleUIConfigDTO",
1071
+ value: elem
1072
+ })).every(flag => flag) || _report(_exceptionable, {
1073
+ path: _path + ".modulesConfig",
1074
+ expected: "(Array<UpdateModuleUIConfigDTO> | undefined)",
1075
+ value: input.modulesConfig
1076
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.scopedTo || _report(_exceptionable, {
1077
+ path: _path + ".scopedTo",
1078
+ expected: "string",
1079
+ value: input.scopedTo
1080
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
1081
+ path: _path + ".name",
1082
+ expected: "string",
1083
+ value: input.name
1084
+ }), "string" === typeof input.url || _report(_exceptionable, {
1085
+ path: _path + ".url",
1086
+ expected: "string",
1087
+ value: input.url
1088
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1089
+ path: _path + ".description",
1090
+ expected: "(string | undefined)",
1091
+ value: input.description
1092
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
1093
+ path: _path + ".name",
1094
+ expected: "string",
1095
+ value: input.name
1096
+ }), "string" === typeof input.displayName || _report(_exceptionable, {
1097
+ path: _path + ".displayName",
1098
+ expected: "string",
1099
+ value: input.displayName
1100
+ }), "service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type || _report(_exceptionable, {
1101
+ path: _path + ".type",
1102
+ expected: "(\"app\" | \"cloud-function\" | \"service\" | \"utility\")",
1103
+ value: input.type
1104
+ }), "string" === typeof input.baseUrl || _report(_exceptionable, {
1105
+ path: _path + ".baseUrl",
1106
+ expected: "string",
1107
+ value: input.baseUrl
1108
+ }), ("object" === typeof input.service && null !== input.service || _report(_exceptionable, {
1109
+ path: _path + ".service",
1110
+ expected: "ServiceConfig",
1111
+ value: input.service
1112
+ })) && _vo4(input.service, _path + ".service", true && _exceptionable) || _report(_exceptionable, {
1113
+ path: _path + ".service",
1114
+ expected: "ServiceConfig",
1115
+ value: input.service
1116
+ }), (Array.isArray(input.dependsOn) || _report(_exceptionable, {
1117
+ path: _path + ".dependsOn",
1118
+ expected: "Array<string>",
1119
+ value: input.dependsOn
1120
+ })) && input.dependsOn.map((elem, _index19) => "string" === typeof elem || _report(_exceptionable, {
1121
+ path: _path + ".dependsOn[" + _index19 + "]",
1122
+ expected: "string",
1123
+ value: elem
1124
+ })).every(flag => flag) || _report(_exceptionable, {
1125
+ path: _path + ".dependsOn",
1126
+ expected: "Array<string>",
1127
+ value: input.dependsOn
1128
+ }), undefined === input.commonPaths || ("object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) || _report(_exceptionable, {
1129
+ path: _path + ".commonPaths",
1130
+ expected: "(CommonPathsMetadata | undefined)",
1131
+ value: input.commonPaths
1132
+ })) && _vo5(input.commonPaths, _path + ".commonPaths", true && _exceptionable) || _report(_exceptionable, {
1133
+ path: _path + ".commonPaths",
1134
+ expected: "(CommonPathsMetadata | undefined)",
1135
+ value: input.commonPaths
1136
+ }), undefined === input.ui || ("object" === typeof input.ui && null !== input.ui || _report(_exceptionable, {
1137
+ path: _path + ".ui",
1138
+ expected: "(UIConfig | undefined)",
1139
+ value: input.ui
1140
+ })) && _vo6(input.ui, _path + ".ui", true && _exceptionable) || _report(_exceptionable, {
1141
+ path: _path + ".ui",
1142
+ expected: "(UIConfig | undefined)",
1143
+ value: input.ui
1144
+ }), undefined === input.cloudFunction || ("object" === typeof input.cloudFunction && null !== input.cloudFunction || _report(_exceptionable, {
1145
+ path: _path + ".cloudFunction",
1146
+ expected: "(CloudFunctionConfig | undefined)",
1147
+ value: input.cloudFunction
1148
+ })) && _vo8(input.cloudFunction, _path + ".cloudFunction", true && _exceptionable) || _report(_exceptionable, {
1149
+ path: _path + ".cloudFunction",
1150
+ expected: "(CloudFunctionConfig | undefined)",
1151
+ value: input.cloudFunction
1152
+ }), undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) || _report(_exceptionable, {
1153
+ path: _path + ".authorization",
1154
+ expected: "(AuthorizationMetadata | undefined)",
1155
+ value: input.authorization
1156
+ })) && _vo9(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
1157
+ path: _path + ".authorization",
1158
+ expected: "(AuthorizationMetadata | undefined)",
1159
+ value: input.authorization
1160
+ }), undefined === input.application || "string" === typeof input.application || _report(_exceptionable, {
1161
+ path: _path + ".application",
1162
+ expected: "(string | undefined)",
1163
+ value: input.application
1164
+ }), undefined === input.version || "string" === typeof input.version || _report(_exceptionable, {
1165
+ path: _path + ".version",
1166
+ expected: "(string | undefined)",
1167
+ value: input.version
1168
+ }), undefined === input.isPublic || "boolean" === typeof input.isPublic || _report(_exceptionable, {
1169
+ path: _path + ".isPublic",
1170
+ expected: "(boolean | undefined)",
1171
+ value: input.isPublic
1172
+ }), undefined === input.id || "number" === typeof input.id || _report(_exceptionable, {
1173
+ path: _path + ".id",
1174
+ expected: "(number | undefined)",
1175
+ value: input.id
1176
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.host || _report(_exceptionable, {
1177
+ path: _path + ".host",
1178
+ expected: "string",
1179
+ value: input.host
1180
+ }), "number" === typeof input.port || _report(_exceptionable, {
1181
+ path: _path + ".port",
1182
+ expected: "number",
1183
+ value: input.port
1184
+ }), undefined === input.protocol || "string" === typeof input.protocol || _report(_exceptionable, {
1185
+ path: _path + ".protocol",
1186
+ expected: "(string | undefined)",
1187
+ value: input.protocol
1188
+ }), undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL || _report(_exceptionable, {
1189
+ path: _path + ".includeBaseURL",
1190
+ expected: "(boolean | undefined)",
1191
+ value: input.includeBaseURL
1192
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.apiDocs || "string" === typeof input.apiDocs || _report(_exceptionable, {
1193
+ path: _path + ".apiDocs",
1194
+ expected: "(string | undefined)",
1195
+ value: input.apiDocs
1196
+ }), undefined === input.version || "string" === typeof input.version || _report(_exceptionable, {
1197
+ path: _path + ".version",
1198
+ expected: "(string | undefined)",
1199
+ value: input.version
1200
+ }), undefined === input.health || "string" === typeof input.health || _report(_exceptionable, {
1201
+ path: _path + ".health",
1202
+ expected: "(string | undefined)",
1203
+ value: input.health
1204
+ }), undefined === input.changelog || "string" === typeof input.changelog || _report(_exceptionable, {
1205
+ path: _path + ".changelog",
1206
+ expected: "(string | undefined)",
1207
+ value: input.changelog
1208
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.route || _report(_exceptionable, {
1209
+ path: _path + ".route",
1210
+ expected: "string",
1211
+ value: input.route
1212
+ }), null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector || _report(_exceptionable, {
1213
+ path: _path + ".mountAtSelector",
1214
+ expected: "(null | string | undefined)",
1215
+ value: input.mountAtSelector
1216
+ }), "string" === typeof input.bundleFile || _report(_exceptionable, {
1217
+ path: _path + ".bundleFile",
1218
+ expected: "string",
1219
+ value: input.bundleFile
1220
+ }), ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) || _report(_exceptionable, {
1221
+ path: _path + ".customProps",
1222
+ expected: "ModuleProps",
1223
+ value: input.customProps
1224
+ })) && _vo7(input.customProps, _path + ".customProps", true && _exceptionable) || _report(_exceptionable, {
1225
+ path: _path + ".customProps",
1226
+ expected: "ModuleProps",
1227
+ value: input.customProps
1228
+ }), undefined === input.shell || "boolean" === typeof input.shell || _report(_exceptionable, {
1229
+ path: _path + ".shell",
1230
+ expected: "(boolean | undefined)",
1231
+ value: input.shell
1232
+ }), undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization || _report(_exceptionable, {
1233
+ path: _path + ".isPlatformCustomization",
1234
+ expected: "(boolean | undefined)",
1235
+ value: input.isPlatformCustomization
1236
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
1237
+ const value = input[key];
1238
+ if (undefined === value)
1239
+ return true;
1240
+ return true;
1241
+ }).every(flag => flag)].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["aws" === input.provider || _report(_exceptionable, {
1242
+ path: _path + ".provider",
1243
+ expected: "\"aws\"",
1244
+ value: input.provider
1245
+ }), "boolean" === typeof input.requiresSignature || _report(_exceptionable, {
1246
+ path: _path + ".requiresSignature",
1247
+ expected: "boolean",
1248
+ value: input.requiresSignature
1249
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [undefined === input.operations || (Array.isArray(input.operations) || _report(_exceptionable, {
1250
+ path: _path + ".operations",
1251
+ expected: "(Array<string> | undefined)",
1252
+ value: input.operations
1253
+ })) && input.operations.map((elem, _index20) => "string" === typeof elem || _report(_exceptionable, {
1254
+ path: _path + ".operations[" + _index20 + "]",
1255
+ expected: "string",
1256
+ value: elem
1257
+ })).every(flag => flag) || _report(_exceptionable, {
1258
+ path: _path + ".operations",
1259
+ expected: "(Array<string> | undefined)",
1260
+ value: input.operations
1261
+ }), undefined === input.routes || (Array.isArray(input.routes) || _report(_exceptionable, {
1262
+ path: _path + ".routes",
1263
+ expected: "(Array<RouteAuthorization> | undefined)",
1264
+ value: input.routes
1265
+ })) && input.routes.map((elem, _index21) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1266
+ path: _path + ".routes[" + _index21 + "]",
1267
+ expected: "RouteAuthorization",
1268
+ value: elem
1269
+ })) && _vo10(elem, _path + ".routes[" + _index21 + "]", true && _exceptionable) || _report(_exceptionable, {
1270
+ path: _path + ".routes[" + _index21 + "]",
1271
+ expected: "RouteAuthorization",
1272
+ value: elem
1273
+ })).every(flag => flag) || _report(_exceptionable, {
1274
+ path: _path + ".routes",
1275
+ expected: "(Array<RouteAuthorization> | undefined)",
1276
+ value: input.routes
1277
+ })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => [undefined === input.methods || (Array.isArray(input.methods) || _report(_exceptionable, {
1278
+ path: _path + ".methods",
1279
+ expected: "(Array<HttpMethod> | undefined)",
1280
+ value: input.methods
1281
+ })) && input.methods.map((elem, _index22) => "GET" === elem || "POST" === elem || "PUT" === elem || "DELETE" === elem || "PATCH" === elem || "OPTIONS" === elem || "HEAD" === elem || "CONNECT" === elem || "TRACE" === elem || _report(_exceptionable, {
1282
+ path: _path + ".methods[" + _index22 + "]",
1283
+ expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
1284
+ value: elem
1285
+ })).every(flag => flag) || _report(_exceptionable, {
1286
+ path: _path + ".methods",
1287
+ expected: "(Array<HttpMethod> | undefined)",
1288
+ value: input.methods
1289
+ }), "string" === typeof input.pattern || _report(_exceptionable, {
1290
+ path: _path + ".pattern",
1291
+ expected: "string",
1292
+ value: input.pattern
1293
+ }), (Array.isArray(input.operations) || _report(_exceptionable, {
1294
+ path: _path + ".operations",
1295
+ expected: "Array<string>",
1296
+ value: input.operations
1297
+ })) && input.operations.map((elem, _index23) => "string" === typeof elem || _report(_exceptionable, {
1298
+ path: _path + ".operations[" + _index23 + "]",
1299
+ expected: "string",
1300
+ value: elem
1301
+ })).every(flag => flag) || _report(_exceptionable, {
1302
+ path: _path + ".operations",
1303
+ expected: "Array<string>",
1304
+ value: input.operations
1305
+ })].every(flag => flag); const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
1306
+ path: _path + ".name",
1307
+ expected: "string",
1308
+ value: input.name
1309
+ }), undefined === input.displayName || "string" === typeof input.displayName || _report(_exceptionable, {
1310
+ path: _path + ".displayName",
1311
+ expected: "(string | undefined)",
1312
+ value: input.displayName
1313
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1314
+ path: _path + ".description",
1315
+ expected: "(string | undefined)",
1316
+ value: input.description
1317
+ }), undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault || _report(_exceptionable, {
1318
+ path: _path + ".allowedByDefault",
1319
+ expected: "(boolean | undefined)",
1320
+ value: input.allowedByDefault
1321
+ })].every(flag => flag); const _vo12 = (input, _path, _exceptionable = true) => [undefined === input.applicationName || "string" === typeof input.applicationName || _report(_exceptionable, {
1322
+ path: _path + ".applicationName",
1323
+ expected: "(string | undefined)",
1324
+ value: input.applicationName
1325
+ }), "string" === typeof input.name || _report(_exceptionable, {
1326
+ path: _path + ".name",
1327
+ expected: "string",
1328
+ value: input.name
1329
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1330
+ path: _path + ".description",
1331
+ expected: "(string | undefined)",
1332
+ value: input.description
1333
+ })].every(flag => flag); const _vo13 = (input, _path, _exceptionable = true) => [undefined === input.roles || (Array.isArray(input.roles) || _report(_exceptionable, {
1334
+ path: _path + ".roles",
1335
+ expected: "(Array<string> | undefined)",
1336
+ value: input.roles
1337
+ })) && input.roles.map((elem, _index24) => "string" === typeof elem || _report(_exceptionable, {
1338
+ path: _path + ".roles[" + _index24 + "]",
1339
+ expected: "string",
1340
+ value: elem
1341
+ })).every(flag => flag) || _report(_exceptionable, {
1342
+ path: _path + ".roles",
1343
+ expected: "(Array<string> | undefined)",
1344
+ value: input.roles
1345
+ }), "string" === typeof input.name || _report(_exceptionable, {
1346
+ path: _path + ".name",
1347
+ expected: "string",
1348
+ value: input.name
1349
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1350
+ path: _path + ".description",
1351
+ expected: "(string | undefined)",
1352
+ value: input.description
1353
+ }), undefined === input.applicationName || "string" === typeof input.applicationName || _report(_exceptionable, {
1354
+ path: _path + ".applicationName",
1355
+ expected: "(string | undefined)",
1356
+ value: input.applicationName
1357
+ })].every(flag => flag); const _vo14 = (input, _path, _exceptionable = true) => ["string" === typeof input.moduleName || _report(_exceptionable, {
1358
+ path: _path + ".moduleName",
1359
+ expected: "string",
1360
+ value: input.moduleName
1361
+ }), ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) || _report(_exceptionable, {
1362
+ path: _path + ".customProps",
1363
+ expected: "Record<string, any>",
1364
+ value: input.customProps
1365
+ })) && _vo15(input.customProps, _path + ".customProps", true && _exceptionable) || _report(_exceptionable, {
1366
+ path: _path + ".customProps",
1367
+ expected: "Record<string, any>",
1368
+ value: input.customProps
1369
+ })].every(flag => flag); const _vo15 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
1370
+ const value = input[key];
1371
+ if (undefined === value)
1372
+ return true;
1373
+ return true;
1374
+ }).every(flag => flag)].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1375
+ if (false === __is(input)) {
1376
+ errors = [];
1377
+ _report = __typia_transform__validateReport._validateReport(errors);
1378
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1379
+ path: _path + "",
1380
+ expected: "BootstrapSyncMetadata",
1381
+ value: input
1382
+ })) && _vo0(input, _path + "", true) || _report(true, {
1383
+ path: _path + "",
1384
+ expected: "BootstrapSyncMetadata",
1385
+ value: input
1386
+ }))(input, "$input", true);
1387
+ const success = 0 === errors.length;
1388
+ return success ? {
1389
+ success,
1390
+ data: input
1391
+ } : {
1392
+ success,
1393
+ errors,
1394
+ data: input
1395
+ };
1396
+ }
1397
+ return {
1398
+ success: true,
1399
+ data: input
1400
+ };
1401
+ }; })()(validObjectWithOptionalFields);
1402
+ expect(result.success).toBe(true);
1403
+ });
1404
+ it('should invalidate an object with incorrect optional fields', () => {
1405
+ const invalidObjectWithOptionalFields = {
1406
+ catalog: [
1407
+ {
1408
+ name: "Catalog1",
1409
+ baseUrl: "http://example.com",
1410
+ dependsOn: ["Catalog2"],
1411
+ displayName: "Catalog 1",
1412
+ service: {
1413
+ host: "localhost",
1414
+ port: 8080,
1415
+ protocol: "http",
1416
+ },
1417
+ type: "invalidType" // Invalid type
1418
+ },
1419
+ ],
1420
+ sharedLibraries: [],
1421
+ applicationsAuthz: [],
1422
+ rolesAuthz: [],
1423
+ operationsAuthz: [],
1424
+ modulesConfig: [],
1425
+ syncConfig: {
1426
+ scopedTo: "any"
1427
+ },
1428
+ };
1429
+ const result = (() => { const _io0 = input => "object" === typeof input.syncConfig && null !== input.syncConfig && _io1(input.syncConfig) && (undefined === input.sharedLibraries || Array.isArray(input.sharedLibraries) && input.sharedLibraries.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (undefined === input.catalog || Array.isArray(input.catalog) && input.catalog.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (undefined === input.applicationsAuthz || Array.isArray(input.applicationsAuthz) && input.applicationsAuthz.every(elem => "object" === typeof elem && null !== elem && _io11(elem))) && (undefined === input.rolesAuthz || Array.isArray(input.rolesAuthz) && input.rolesAuthz.every(elem => "object" === typeof elem && null !== elem && _io12(elem))) && (undefined === input.operationsAuthz || Array.isArray(input.operationsAuthz) && input.operationsAuthz.every(elem => "object" === typeof elem && null !== elem && _io13(elem))) && (undefined === input.modulesConfig || Array.isArray(input.modulesConfig) && input.modulesConfig.every(elem => "object" === typeof elem && null !== elem && _io14(elem))); const _io1 = input => "string" === typeof input.scopedTo; const _io2 = input => "string" === typeof input.name && "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description); const _io3 = input => "string" === typeof input.name && "string" === typeof input.displayName && ("service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type) && "string" === typeof input.baseUrl && ("object" === typeof input.service && null !== input.service && _io4(input.service)) && (Array.isArray(input.dependsOn) && input.dependsOn.every(elem => "string" === typeof elem)) && (undefined === input.commonPaths || "object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) && _io5(input.commonPaths)) && (undefined === input.ui || "object" === typeof input.ui && null !== input.ui && _io6(input.ui)) && (undefined === input.cloudFunction || "object" === typeof input.cloudFunction && null !== input.cloudFunction && _io8(input.cloudFunction)) && (undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) && _io9(input.authorization)) && (undefined === input.application || "string" === typeof input.application) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.isPublic || "boolean" === typeof input.isPublic) && (undefined === input.id || "number" === typeof input.id); const _io4 = input => "string" === typeof input.host && "number" === typeof input.port && (undefined === input.protocol || "string" === typeof input.protocol) && (undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL); const _io5 = input => (undefined === input.apiDocs || "string" === typeof input.apiDocs) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.health || "string" === typeof input.health) && (undefined === input.changelog || "string" === typeof input.changelog); const _io6 = input => "string" === typeof input.route && (null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector) && "string" === typeof input.bundleFile && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io7(input.customProps)) && (undefined === input.shell || "boolean" === typeof input.shell) && (undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization); const _io7 = input => Object.keys(input).every(key => {
1430
+ const value = input[key];
1431
+ if (undefined === value)
1432
+ return true;
1433
+ return true;
1434
+ }); const _io8 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io9 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io10(elem))); const _io10 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "GET" === elem || "POST" === elem || "PUT" === elem || "DELETE" === elem || "PATCH" === elem || "OPTIONS" === elem || "HEAD" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _io11 = input => "string" === typeof input.name && (undefined === input.displayName || "string" === typeof input.displayName) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault); const _io12 = input => (undefined === input.applicationName || "string" === typeof input.applicationName) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _io13 = input => (undefined === input.roles || Array.isArray(input.roles) && input.roles.every(elem => "string" === typeof elem)) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.applicationName || "string" === typeof input.applicationName); const _io14 = input => "string" === typeof input.moduleName && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io15(input.customProps)); const _io15 = input => Object.keys(input).every(key => {
1435
+ const value = input[key];
1436
+ if (undefined === value)
1437
+ return true;
1438
+ return true;
1439
+ }); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.syncConfig && null !== input.syncConfig || _report(_exceptionable, {
1440
+ path: _path + ".syncConfig",
1441
+ expected: "__type",
1442
+ value: input.syncConfig
1443
+ })) && _vo1(input.syncConfig, _path + ".syncConfig", true && _exceptionable) || _report(_exceptionable, {
1444
+ path: _path + ".syncConfig",
1445
+ expected: "__type",
1446
+ value: input.syncConfig
1447
+ }), undefined === input.sharedLibraries || (Array.isArray(input.sharedLibraries) || _report(_exceptionable, {
1448
+ path: _path + ".sharedLibraries",
1449
+ expected: "(Array<CreateSharedLibraryDTO> | undefined)",
1450
+ value: input.sharedLibraries
1451
+ })) && input.sharedLibraries.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1452
+ path: _path + ".sharedLibraries[" + _index13 + "]",
1453
+ expected: "CreateSharedLibraryDTO",
1454
+ value: elem
1455
+ })) && _vo2(elem, _path + ".sharedLibraries[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
1456
+ path: _path + ".sharedLibraries[" + _index13 + "]",
1457
+ expected: "CreateSharedLibraryDTO",
1458
+ value: elem
1459
+ })).every(flag => flag) || _report(_exceptionable, {
1460
+ path: _path + ".sharedLibraries",
1461
+ expected: "(Array<CreateSharedLibraryDTO> | undefined)",
1462
+ value: input.sharedLibraries
1463
+ }), undefined === input.catalog || (Array.isArray(input.catalog) || _report(_exceptionable, {
1464
+ path: _path + ".catalog",
1465
+ expected: "(Array<CreateOrUpdateModule> | undefined)",
1466
+ value: input.catalog
1467
+ })) && input.catalog.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1468
+ path: _path + ".catalog[" + _index14 + "]",
1469
+ expected: "CreateOrUpdateModule",
1470
+ value: elem
1471
+ })) && _vo3(elem, _path + ".catalog[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1472
+ path: _path + ".catalog[" + _index14 + "]",
1473
+ expected: "CreateOrUpdateModule",
1474
+ value: elem
1475
+ })).every(flag => flag) || _report(_exceptionable, {
1476
+ path: _path + ".catalog",
1477
+ expected: "(Array<CreateOrUpdateModule> | undefined)",
1478
+ value: input.catalog
1479
+ }), undefined === input.applicationsAuthz || (Array.isArray(input.applicationsAuthz) || _report(_exceptionable, {
1480
+ path: _path + ".applicationsAuthz",
1481
+ expected: "(Array<CreateApplicationDTO> | undefined)",
1482
+ value: input.applicationsAuthz
1483
+ })) && input.applicationsAuthz.map((elem, _index15) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1484
+ path: _path + ".applicationsAuthz[" + _index15 + "]",
1485
+ expected: "CreateApplicationDTO",
1486
+ value: elem
1487
+ })) && _vo11(elem, _path + ".applicationsAuthz[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
1488
+ path: _path + ".applicationsAuthz[" + _index15 + "]",
1489
+ expected: "CreateApplicationDTO",
1490
+ value: elem
1491
+ })).every(flag => flag) || _report(_exceptionable, {
1492
+ path: _path + ".applicationsAuthz",
1493
+ expected: "(Array<CreateApplicationDTO> | undefined)",
1494
+ value: input.applicationsAuthz
1495
+ }), undefined === input.rolesAuthz || (Array.isArray(input.rolesAuthz) || _report(_exceptionable, {
1496
+ path: _path + ".rolesAuthz",
1497
+ expected: "(Array<CreateRoleDTO> | undefined)",
1498
+ value: input.rolesAuthz
1499
+ })) && input.rolesAuthz.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1500
+ path: _path + ".rolesAuthz[" + _index16 + "]",
1501
+ expected: "CreateRoleDTO",
1502
+ value: elem
1503
+ })) && _vo12(elem, _path + ".rolesAuthz[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
1504
+ path: _path + ".rolesAuthz[" + _index16 + "]",
1505
+ expected: "CreateRoleDTO",
1506
+ value: elem
1507
+ })).every(flag => flag) || _report(_exceptionable, {
1508
+ path: _path + ".rolesAuthz",
1509
+ expected: "(Array<CreateRoleDTO> | undefined)",
1510
+ value: input.rolesAuthz
1511
+ }), undefined === input.operationsAuthz || (Array.isArray(input.operationsAuthz) || _report(_exceptionable, {
1512
+ path: _path + ".operationsAuthz",
1513
+ expected: "(Array<OperationAuthzBootstrap> | undefined)",
1514
+ value: input.operationsAuthz
1515
+ })) && input.operationsAuthz.map((elem, _index17) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1516
+ path: _path + ".operationsAuthz[" + _index17 + "]",
1517
+ expected: "OperationAuthzBootstrap",
1518
+ value: elem
1519
+ })) && _vo13(elem, _path + ".operationsAuthz[" + _index17 + "]", true && _exceptionable) || _report(_exceptionable, {
1520
+ path: _path + ".operationsAuthz[" + _index17 + "]",
1521
+ expected: "OperationAuthzBootstrap",
1522
+ value: elem
1523
+ })).every(flag => flag) || _report(_exceptionable, {
1524
+ path: _path + ".operationsAuthz",
1525
+ expected: "(Array<OperationAuthzBootstrap> | undefined)",
1526
+ value: input.operationsAuthz
1527
+ }), undefined === input.modulesConfig || (Array.isArray(input.modulesConfig) || _report(_exceptionable, {
1528
+ path: _path + ".modulesConfig",
1529
+ expected: "(Array<UpdateModuleUIConfigDTO> | undefined)",
1530
+ value: input.modulesConfig
1531
+ })) && input.modulesConfig.map((elem, _index18) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1532
+ path: _path + ".modulesConfig[" + _index18 + "]",
1533
+ expected: "UpdateModuleUIConfigDTO",
1534
+ value: elem
1535
+ })) && _vo14(elem, _path + ".modulesConfig[" + _index18 + "]", true && _exceptionable) || _report(_exceptionable, {
1536
+ path: _path + ".modulesConfig[" + _index18 + "]",
1537
+ expected: "UpdateModuleUIConfigDTO",
1538
+ value: elem
1539
+ })).every(flag => flag) || _report(_exceptionable, {
1540
+ path: _path + ".modulesConfig",
1541
+ expected: "(Array<UpdateModuleUIConfigDTO> | undefined)",
1542
+ value: input.modulesConfig
1543
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.scopedTo || _report(_exceptionable, {
1544
+ path: _path + ".scopedTo",
1545
+ expected: "string",
1546
+ value: input.scopedTo
1547
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
1548
+ path: _path + ".name",
1549
+ expected: "string",
1550
+ value: input.name
1551
+ }), "string" === typeof input.url || _report(_exceptionable, {
1552
+ path: _path + ".url",
1553
+ expected: "string",
1554
+ value: input.url
1555
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1556
+ path: _path + ".description",
1557
+ expected: "(string | undefined)",
1558
+ value: input.description
1559
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
1560
+ path: _path + ".name",
1561
+ expected: "string",
1562
+ value: input.name
1563
+ }), "string" === typeof input.displayName || _report(_exceptionable, {
1564
+ path: _path + ".displayName",
1565
+ expected: "string",
1566
+ value: input.displayName
1567
+ }), "service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type || _report(_exceptionable, {
1568
+ path: _path + ".type",
1569
+ expected: "(\"app\" | \"cloud-function\" | \"service\" | \"utility\")",
1570
+ value: input.type
1571
+ }), "string" === typeof input.baseUrl || _report(_exceptionable, {
1572
+ path: _path + ".baseUrl",
1573
+ expected: "string",
1574
+ value: input.baseUrl
1575
+ }), ("object" === typeof input.service && null !== input.service || _report(_exceptionable, {
1576
+ path: _path + ".service",
1577
+ expected: "ServiceConfig",
1578
+ value: input.service
1579
+ })) && _vo4(input.service, _path + ".service", true && _exceptionable) || _report(_exceptionable, {
1580
+ path: _path + ".service",
1581
+ expected: "ServiceConfig",
1582
+ value: input.service
1583
+ }), (Array.isArray(input.dependsOn) || _report(_exceptionable, {
1584
+ path: _path + ".dependsOn",
1585
+ expected: "Array<string>",
1586
+ value: input.dependsOn
1587
+ })) && input.dependsOn.map((elem, _index19) => "string" === typeof elem || _report(_exceptionable, {
1588
+ path: _path + ".dependsOn[" + _index19 + "]",
1589
+ expected: "string",
1590
+ value: elem
1591
+ })).every(flag => flag) || _report(_exceptionable, {
1592
+ path: _path + ".dependsOn",
1593
+ expected: "Array<string>",
1594
+ value: input.dependsOn
1595
+ }), undefined === input.commonPaths || ("object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) || _report(_exceptionable, {
1596
+ path: _path + ".commonPaths",
1597
+ expected: "(CommonPathsMetadata | undefined)",
1598
+ value: input.commonPaths
1599
+ })) && _vo5(input.commonPaths, _path + ".commonPaths", true && _exceptionable) || _report(_exceptionable, {
1600
+ path: _path + ".commonPaths",
1601
+ expected: "(CommonPathsMetadata | undefined)",
1602
+ value: input.commonPaths
1603
+ }), undefined === input.ui || ("object" === typeof input.ui && null !== input.ui || _report(_exceptionable, {
1604
+ path: _path + ".ui",
1605
+ expected: "(UIConfig | undefined)",
1606
+ value: input.ui
1607
+ })) && _vo6(input.ui, _path + ".ui", true && _exceptionable) || _report(_exceptionable, {
1608
+ path: _path + ".ui",
1609
+ expected: "(UIConfig | undefined)",
1610
+ value: input.ui
1611
+ }), undefined === input.cloudFunction || ("object" === typeof input.cloudFunction && null !== input.cloudFunction || _report(_exceptionable, {
1612
+ path: _path + ".cloudFunction",
1613
+ expected: "(CloudFunctionConfig | undefined)",
1614
+ value: input.cloudFunction
1615
+ })) && _vo8(input.cloudFunction, _path + ".cloudFunction", true && _exceptionable) || _report(_exceptionable, {
1616
+ path: _path + ".cloudFunction",
1617
+ expected: "(CloudFunctionConfig | undefined)",
1618
+ value: input.cloudFunction
1619
+ }), undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) || _report(_exceptionable, {
1620
+ path: _path + ".authorization",
1621
+ expected: "(AuthorizationMetadata | undefined)",
1622
+ value: input.authorization
1623
+ })) && _vo9(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
1624
+ path: _path + ".authorization",
1625
+ expected: "(AuthorizationMetadata | undefined)",
1626
+ value: input.authorization
1627
+ }), undefined === input.application || "string" === typeof input.application || _report(_exceptionable, {
1628
+ path: _path + ".application",
1629
+ expected: "(string | undefined)",
1630
+ value: input.application
1631
+ }), undefined === input.version || "string" === typeof input.version || _report(_exceptionable, {
1632
+ path: _path + ".version",
1633
+ expected: "(string | undefined)",
1634
+ value: input.version
1635
+ }), undefined === input.isPublic || "boolean" === typeof input.isPublic || _report(_exceptionable, {
1636
+ path: _path + ".isPublic",
1637
+ expected: "(boolean | undefined)",
1638
+ value: input.isPublic
1639
+ }), undefined === input.id || "number" === typeof input.id || _report(_exceptionable, {
1640
+ path: _path + ".id",
1641
+ expected: "(number | undefined)",
1642
+ value: input.id
1643
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.host || _report(_exceptionable, {
1644
+ path: _path + ".host",
1645
+ expected: "string",
1646
+ value: input.host
1647
+ }), "number" === typeof input.port || _report(_exceptionable, {
1648
+ path: _path + ".port",
1649
+ expected: "number",
1650
+ value: input.port
1651
+ }), undefined === input.protocol || "string" === typeof input.protocol || _report(_exceptionable, {
1652
+ path: _path + ".protocol",
1653
+ expected: "(string | undefined)",
1654
+ value: input.protocol
1655
+ }), undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL || _report(_exceptionable, {
1656
+ path: _path + ".includeBaseURL",
1657
+ expected: "(boolean | undefined)",
1658
+ value: input.includeBaseURL
1659
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.apiDocs || "string" === typeof input.apiDocs || _report(_exceptionable, {
1660
+ path: _path + ".apiDocs",
1661
+ expected: "(string | undefined)",
1662
+ value: input.apiDocs
1663
+ }), undefined === input.version || "string" === typeof input.version || _report(_exceptionable, {
1664
+ path: _path + ".version",
1665
+ expected: "(string | undefined)",
1666
+ value: input.version
1667
+ }), undefined === input.health || "string" === typeof input.health || _report(_exceptionable, {
1668
+ path: _path + ".health",
1669
+ expected: "(string | undefined)",
1670
+ value: input.health
1671
+ }), undefined === input.changelog || "string" === typeof input.changelog || _report(_exceptionable, {
1672
+ path: _path + ".changelog",
1673
+ expected: "(string | undefined)",
1674
+ value: input.changelog
1675
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.route || _report(_exceptionable, {
1676
+ path: _path + ".route",
1677
+ expected: "string",
1678
+ value: input.route
1679
+ }), null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector || _report(_exceptionable, {
1680
+ path: _path + ".mountAtSelector",
1681
+ expected: "(null | string | undefined)",
1682
+ value: input.mountAtSelector
1683
+ }), "string" === typeof input.bundleFile || _report(_exceptionable, {
1684
+ path: _path + ".bundleFile",
1685
+ expected: "string",
1686
+ value: input.bundleFile
1687
+ }), ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) || _report(_exceptionable, {
1688
+ path: _path + ".customProps",
1689
+ expected: "ModuleProps",
1690
+ value: input.customProps
1691
+ })) && _vo7(input.customProps, _path + ".customProps", true && _exceptionable) || _report(_exceptionable, {
1692
+ path: _path + ".customProps",
1693
+ expected: "ModuleProps",
1694
+ value: input.customProps
1695
+ }), undefined === input.shell || "boolean" === typeof input.shell || _report(_exceptionable, {
1696
+ path: _path + ".shell",
1697
+ expected: "(boolean | undefined)",
1698
+ value: input.shell
1699
+ }), undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization || _report(_exceptionable, {
1700
+ path: _path + ".isPlatformCustomization",
1701
+ expected: "(boolean | undefined)",
1702
+ value: input.isPlatformCustomization
1703
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
1704
+ const value = input[key];
1705
+ if (undefined === value)
1706
+ return true;
1707
+ return true;
1708
+ }).every(flag => flag)].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["aws" === input.provider || _report(_exceptionable, {
1709
+ path: _path + ".provider",
1710
+ expected: "\"aws\"",
1711
+ value: input.provider
1712
+ }), "boolean" === typeof input.requiresSignature || _report(_exceptionable, {
1713
+ path: _path + ".requiresSignature",
1714
+ expected: "boolean",
1715
+ value: input.requiresSignature
1716
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [undefined === input.operations || (Array.isArray(input.operations) || _report(_exceptionable, {
1717
+ path: _path + ".operations",
1718
+ expected: "(Array<string> | undefined)",
1719
+ value: input.operations
1720
+ })) && input.operations.map((elem, _index20) => "string" === typeof elem || _report(_exceptionable, {
1721
+ path: _path + ".operations[" + _index20 + "]",
1722
+ expected: "string",
1723
+ value: elem
1724
+ })).every(flag => flag) || _report(_exceptionable, {
1725
+ path: _path + ".operations",
1726
+ expected: "(Array<string> | undefined)",
1727
+ value: input.operations
1728
+ }), undefined === input.routes || (Array.isArray(input.routes) || _report(_exceptionable, {
1729
+ path: _path + ".routes",
1730
+ expected: "(Array<RouteAuthorization> | undefined)",
1731
+ value: input.routes
1732
+ })) && input.routes.map((elem, _index21) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1733
+ path: _path + ".routes[" + _index21 + "]",
1734
+ expected: "RouteAuthorization",
1735
+ value: elem
1736
+ })) && _vo10(elem, _path + ".routes[" + _index21 + "]", true && _exceptionable) || _report(_exceptionable, {
1737
+ path: _path + ".routes[" + _index21 + "]",
1738
+ expected: "RouteAuthorization",
1739
+ value: elem
1740
+ })).every(flag => flag) || _report(_exceptionable, {
1741
+ path: _path + ".routes",
1742
+ expected: "(Array<RouteAuthorization> | undefined)",
1743
+ value: input.routes
1744
+ })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => [undefined === input.methods || (Array.isArray(input.methods) || _report(_exceptionable, {
1745
+ path: _path + ".methods",
1746
+ expected: "(Array<HttpMethod> | undefined)",
1747
+ value: input.methods
1748
+ })) && input.methods.map((elem, _index22) => "GET" === elem || "POST" === elem || "PUT" === elem || "DELETE" === elem || "PATCH" === elem || "OPTIONS" === elem || "HEAD" === elem || "CONNECT" === elem || "TRACE" === elem || _report(_exceptionable, {
1749
+ path: _path + ".methods[" + _index22 + "]",
1750
+ expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
1751
+ value: elem
1752
+ })).every(flag => flag) || _report(_exceptionable, {
1753
+ path: _path + ".methods",
1754
+ expected: "(Array<HttpMethod> | undefined)",
1755
+ value: input.methods
1756
+ }), "string" === typeof input.pattern || _report(_exceptionable, {
1757
+ path: _path + ".pattern",
1758
+ expected: "string",
1759
+ value: input.pattern
1760
+ }), (Array.isArray(input.operations) || _report(_exceptionable, {
1761
+ path: _path + ".operations",
1762
+ expected: "Array<string>",
1763
+ value: input.operations
1764
+ })) && input.operations.map((elem, _index23) => "string" === typeof elem || _report(_exceptionable, {
1765
+ path: _path + ".operations[" + _index23 + "]",
1766
+ expected: "string",
1767
+ value: elem
1768
+ })).every(flag => flag) || _report(_exceptionable, {
1769
+ path: _path + ".operations",
1770
+ expected: "Array<string>",
1771
+ value: input.operations
1772
+ })].every(flag => flag); const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
1773
+ path: _path + ".name",
1774
+ expected: "string",
1775
+ value: input.name
1776
+ }), undefined === input.displayName || "string" === typeof input.displayName || _report(_exceptionable, {
1777
+ path: _path + ".displayName",
1778
+ expected: "(string | undefined)",
1779
+ value: input.displayName
1780
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1781
+ path: _path + ".description",
1782
+ expected: "(string | undefined)",
1783
+ value: input.description
1784
+ }), undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault || _report(_exceptionable, {
1785
+ path: _path + ".allowedByDefault",
1786
+ expected: "(boolean | undefined)",
1787
+ value: input.allowedByDefault
1788
+ })].every(flag => flag); const _vo12 = (input, _path, _exceptionable = true) => [undefined === input.applicationName || "string" === typeof input.applicationName || _report(_exceptionable, {
1789
+ path: _path + ".applicationName",
1790
+ expected: "(string | undefined)",
1791
+ value: input.applicationName
1792
+ }), "string" === typeof input.name || _report(_exceptionable, {
1793
+ path: _path + ".name",
1794
+ expected: "string",
1795
+ value: input.name
1796
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1797
+ path: _path + ".description",
1798
+ expected: "(string | undefined)",
1799
+ value: input.description
1800
+ })].every(flag => flag); const _vo13 = (input, _path, _exceptionable = true) => [undefined === input.roles || (Array.isArray(input.roles) || _report(_exceptionable, {
1801
+ path: _path + ".roles",
1802
+ expected: "(Array<string> | undefined)",
1803
+ value: input.roles
1804
+ })) && input.roles.map((elem, _index24) => "string" === typeof elem || _report(_exceptionable, {
1805
+ path: _path + ".roles[" + _index24 + "]",
1806
+ expected: "string",
1807
+ value: elem
1808
+ })).every(flag => flag) || _report(_exceptionable, {
1809
+ path: _path + ".roles",
1810
+ expected: "(Array<string> | undefined)",
1811
+ value: input.roles
1812
+ }), "string" === typeof input.name || _report(_exceptionable, {
1813
+ path: _path + ".name",
1814
+ expected: "string",
1815
+ value: input.name
1816
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1817
+ path: _path + ".description",
1818
+ expected: "(string | undefined)",
1819
+ value: input.description
1820
+ }), undefined === input.applicationName || "string" === typeof input.applicationName || _report(_exceptionable, {
1821
+ path: _path + ".applicationName",
1822
+ expected: "(string | undefined)",
1823
+ value: input.applicationName
1824
+ })].every(flag => flag); const _vo14 = (input, _path, _exceptionable = true) => ["string" === typeof input.moduleName || _report(_exceptionable, {
1825
+ path: _path + ".moduleName",
1826
+ expected: "string",
1827
+ value: input.moduleName
1828
+ }), ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) || _report(_exceptionable, {
1829
+ path: _path + ".customProps",
1830
+ expected: "Record<string, any>",
1831
+ value: input.customProps
1832
+ })) && _vo15(input.customProps, _path + ".customProps", true && _exceptionable) || _report(_exceptionable, {
1833
+ path: _path + ".customProps",
1834
+ expected: "Record<string, any>",
1835
+ value: input.customProps
1836
+ })].every(flag => flag); const _vo15 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
1837
+ const value = input[key];
1838
+ if (undefined === value)
1839
+ return true;
1840
+ return true;
1841
+ }).every(flag => flag)].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1842
+ if (false === __is(input)) {
1843
+ errors = [];
1844
+ _report = __typia_transform__validateReport._validateReport(errors);
1845
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1846
+ path: _path + "",
1847
+ expected: "BootstrapSyncMetadata",
1848
+ value: input
1849
+ })) && _vo0(input, _path + "", true) || _report(true, {
1850
+ path: _path + "",
1851
+ expected: "BootstrapSyncMetadata",
1852
+ value: input
1853
+ }))(input, "$input", true);
1854
+ const success = 0 === errors.length;
1855
+ return success ? {
1856
+ success,
1857
+ data: input
1858
+ } : {
1859
+ success,
1860
+ errors,
1861
+ data: input
1862
+ };
1863
+ }
1864
+ return {
1865
+ success: true,
1866
+ data: input
1867
+ };
1868
+ }; })()(invalidObjectWithOptionalFields);
1869
+ expect(result.success).toBe(false);
1870
+ });
1871
+ });
1872
+ //# sourceMappingURL=domain-validation.test.js.map