@3sixty/auditable-item-graph-models 0.0.0-stage → 0.20.0-next.0

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 (201) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +26 -2
  3. package/dist/es/compiled/validators.js +1885 -0
  4. package/dist/es/compiled/validators.js.map +1 -0
  5. package/dist/es/dataTypes/auditableItemGraphDataTypes.js +103 -0
  6. package/dist/es/dataTypes/auditableItemGraphDataTypes.js.map +1 -0
  7. package/dist/es/index.js +43 -0
  8. package/dist/es/index.js.map +1 -0
  9. package/dist/es/models/IAuditableItemGraphAlias.js +2 -0
  10. package/dist/es/models/IAuditableItemGraphAlias.js.map +1 -0
  11. package/dist/es/models/IAuditableItemGraphAuditedElement.js +4 -0
  12. package/dist/es/models/IAuditableItemGraphAuditedElement.js.map +1 -0
  13. package/dist/es/models/IAuditableItemGraphChangeset.js +2 -0
  14. package/dist/es/models/IAuditableItemGraphChangeset.js.map +1 -0
  15. package/dist/es/models/IAuditableItemGraphChangesetList.js +2 -0
  16. package/dist/es/models/IAuditableItemGraphChangesetList.js.map +1 -0
  17. package/dist/es/models/IAuditableItemGraphComponent.js +2 -0
  18. package/dist/es/models/IAuditableItemGraphComponent.js.map +1 -0
  19. package/dist/es/models/IAuditableItemGraphEdge.js +2 -0
  20. package/dist/es/models/IAuditableItemGraphEdge.js.map +1 -0
  21. package/dist/es/models/IAuditableItemGraphListPatch.js +2 -0
  22. package/dist/es/models/IAuditableItemGraphListPatch.js.map +1 -0
  23. package/dist/es/models/IAuditableItemGraphPartialVertex.js +2 -0
  24. package/dist/es/models/IAuditableItemGraphPartialVertex.js.map +1 -0
  25. package/dist/es/models/IAuditableItemGraphPatchOperation.js +2 -0
  26. package/dist/es/models/IAuditableItemGraphPatchOperation.js.map +1 -0
  27. package/dist/es/models/IAuditableItemGraphResource.js +2 -0
  28. package/dist/es/models/IAuditableItemGraphResource.js.map +1 -0
  29. package/dist/es/models/IAuditableItemGraphVertex.js +2 -0
  30. package/dist/es/models/IAuditableItemGraphVertex.js.map +1 -0
  31. package/dist/es/models/IAuditableItemGraphVertexList.js +2 -0
  32. package/dist/es/models/IAuditableItemGraphVertexList.js.map +1 -0
  33. package/dist/es/models/IAuditableItemGraphVertexVersionList.js +2 -0
  34. package/dist/es/models/IAuditableItemGraphVertexVersionList.js.map +1 -0
  35. package/dist/es/models/api/IAuditableItemGraphChangesetGetRequest.js +2 -0
  36. package/dist/es/models/api/IAuditableItemGraphChangesetGetRequest.js.map +1 -0
  37. package/dist/es/models/api/IAuditableItemGraphChangesetGetResponse.js +2 -0
  38. package/dist/es/models/api/IAuditableItemGraphChangesetGetResponse.js.map +1 -0
  39. package/dist/es/models/api/IAuditableItemGraphChangesetListRequest.js +2 -0
  40. package/dist/es/models/api/IAuditableItemGraphChangesetListRequest.js.map +1 -0
  41. package/dist/es/models/api/IAuditableItemGraphChangesetListResponse.js +2 -0
  42. package/dist/es/models/api/IAuditableItemGraphChangesetListResponse.js.map +1 -0
  43. package/dist/es/models/api/IAuditableItemGraphCreateRequest.js +2 -0
  44. package/dist/es/models/api/IAuditableItemGraphCreateRequest.js.map +1 -0
  45. package/dist/es/models/api/IAuditableItemGraphGetRequest.js +2 -0
  46. package/dist/es/models/api/IAuditableItemGraphGetRequest.js.map +1 -0
  47. package/dist/es/models/api/IAuditableItemGraphGetResponse.js +2 -0
  48. package/dist/es/models/api/IAuditableItemGraphGetResponse.js.map +1 -0
  49. package/dist/es/models/api/IAuditableItemGraphListRequest.js +2 -0
  50. package/dist/es/models/api/IAuditableItemGraphListRequest.js.map +1 -0
  51. package/dist/es/models/api/IAuditableItemGraphListResponse.js +2 -0
  52. package/dist/es/models/api/IAuditableItemGraphListResponse.js.map +1 -0
  53. package/dist/es/models/api/IAuditableItemGraphRemoveProofRequest.js +4 -0
  54. package/dist/es/models/api/IAuditableItemGraphRemoveProofRequest.js.map +1 -0
  55. package/dist/es/models/api/IAuditableItemGraphUpdatePartialRequest.js +2 -0
  56. package/dist/es/models/api/IAuditableItemGraphUpdatePartialRequest.js.map +1 -0
  57. package/dist/es/models/api/IAuditableItemGraphUpdateRequest.js +2 -0
  58. package/dist/es/models/api/IAuditableItemGraphUpdateRequest.js.map +1 -0
  59. package/dist/es/models/api/IAuditableItemGraphVersionGetRequest.js +2 -0
  60. package/dist/es/models/api/IAuditableItemGraphVersionGetRequest.js.map +1 -0
  61. package/dist/es/models/api/IAuditableItemGraphVersionGetResponse.js +2 -0
  62. package/dist/es/models/api/IAuditableItemGraphVersionGetResponse.js.map +1 -0
  63. package/dist/es/models/api/IAuditableItemGraphVersionListRequest.js +2 -0
  64. package/dist/es/models/api/IAuditableItemGraphVersionListRequest.js.map +1 -0
  65. package/dist/es/models/api/IAuditableItemGraphVersionListResponse.js +2 -0
  66. package/dist/es/models/api/IAuditableItemGraphVersionListResponse.js.map +1 -0
  67. package/dist/es/models/auditableItemGraphAuditMode.js +17 -0
  68. package/dist/es/models/auditableItemGraphAuditMode.js.map +1 -0
  69. package/dist/es/models/auditableItemGraphContexts.js +33 -0
  70. package/dist/es/models/auditableItemGraphContexts.js.map +1 -0
  71. package/dist/es/models/auditableItemGraphMetricIds.js +69 -0
  72. package/dist/es/models/auditableItemGraphMetricIds.js.map +1 -0
  73. package/dist/es/models/auditableItemGraphMetrics.js +82 -0
  74. package/dist/es/models/auditableItemGraphMetrics.js.map +1 -0
  75. package/dist/es/models/auditableItemGraphTopics.js +17 -0
  76. package/dist/es/models/auditableItemGraphTopics.js.map +1 -0
  77. package/dist/es/models/auditableItemGraphTypes.js +57 -0
  78. package/dist/es/models/auditableItemGraphTypes.js.map +1 -0
  79. package/dist/es/models/eventBus/IAuditableItemGraphEventBusVertexCreated.js +4 -0
  80. package/dist/es/models/eventBus/IAuditableItemGraphEventBusVertexCreated.js.map +1 -0
  81. package/dist/es/models/eventBus/IAuditableItemGraphEventBusVertexUpdated.js +2 -0
  82. package/dist/es/models/eventBus/IAuditableItemGraphEventBusVertexUpdated.js.map +1 -0
  83. package/dist/es/models/verifyDepth.js +21 -0
  84. package/dist/es/models/verifyDepth.js.map +1 -0
  85. package/dist/es/schemas/AuditableItemGraphAlias.json +58 -0
  86. package/dist/es/schemas/AuditableItemGraphAuditMode.json +16 -0
  87. package/dist/es/schemas/AuditableItemGraphAuditedElement.json +25 -0
  88. package/dist/es/schemas/AuditableItemGraphChangeset.json +66 -0
  89. package/dist/es/schemas/AuditableItemGraphChangesetList.json +52 -0
  90. package/dist/es/schemas/AuditableItemGraphEdge.json +62 -0
  91. package/dist/es/schemas/AuditableItemGraphListPatch.json +33 -0
  92. package/dist/es/schemas/AuditableItemGraphPartialVertex.json +115 -0
  93. package/dist/es/schemas/AuditableItemGraphPatchOperation.json +72 -0
  94. package/dist/es/schemas/AuditableItemGraphResource.json +45 -0
  95. package/dist/es/schemas/AuditableItemGraphVertex.json +100 -0
  96. package/dist/es/schemas/AuditableItemGraphVertexList.json +52 -0
  97. package/dist/es/schemas/AuditableItemGraphVertexVersionList.json +64 -0
  98. package/dist/types/compiled/validators.d.ts +53 -0
  99. package/dist/types/dataTypes/auditableItemGraphDataTypes.d.ts +9 -0
  100. package/dist/types/index.d.ts +40 -0
  101. package/dist/types/models/IAuditableItemGraphAlias.d.ts +36 -0
  102. package/dist/types/models/IAuditableItemGraphAuditedElement.d.ts +24 -0
  103. package/dist/types/models/IAuditableItemGraphChangeset.d.ts +57 -0
  104. package/dist/types/models/IAuditableItemGraphChangesetList.d.ts +27 -0
  105. package/dist/types/models/IAuditableItemGraphComponent.d.ts +143 -0
  106. package/dist/types/models/IAuditableItemGraphEdge.d.ts +36 -0
  107. package/dist/types/models/IAuditableItemGraphListPatch.d.ts +18 -0
  108. package/dist/types/models/IAuditableItemGraphPartialVertex.d.ts +45 -0
  109. package/dist/types/models/IAuditableItemGraphPatchOperation.d.ts +36 -0
  110. package/dist/types/models/IAuditableItemGraphResource.d.ts +22 -0
  111. package/dist/types/models/IAuditableItemGraphVertex.d.ts +73 -0
  112. package/dist/types/models/IAuditableItemGraphVertexList.d.ts +27 -0
  113. package/dist/types/models/IAuditableItemGraphVertexVersionList.d.ts +29 -0
  114. package/dist/types/models/api/IAuditableItemGraphChangesetGetRequest.d.ts +35 -0
  115. package/dist/types/models/api/IAuditableItemGraphChangesetGetResponse.d.ts +17 -0
  116. package/dist/types/models/api/IAuditableItemGraphChangesetListRequest.d.ts +39 -0
  117. package/dist/types/models/api/IAuditableItemGraphChangesetListResponse.d.ts +18 -0
  118. package/dist/types/models/api/IAuditableItemGraphCreateRequest.d.ts +10 -0
  119. package/dist/types/models/api/IAuditableItemGraphGetRequest.d.ts +35 -0
  120. package/dist/types/models/api/IAuditableItemGraphGetResponse.d.ts +17 -0
  121. package/dist/types/models/api/IAuditableItemGraphListRequest.d.ts +60 -0
  122. package/dist/types/models/api/IAuditableItemGraphListResponse.d.ts +18 -0
  123. package/dist/types/models/api/IAuditableItemGraphRemoveProofRequest.d.ts +14 -0
  124. package/dist/types/models/api/IAuditableItemGraphUpdatePartialRequest.d.ts +20 -0
  125. package/dist/types/models/api/IAuditableItemGraphUpdateRequest.d.ts +19 -0
  126. package/dist/types/models/api/IAuditableItemGraphVersionGetRequest.d.ts +25 -0
  127. package/dist/types/models/api/IAuditableItemGraphVersionGetResponse.d.ts +17 -0
  128. package/dist/types/models/api/IAuditableItemGraphVersionListRequest.d.ts +34 -0
  129. package/dist/types/models/api/IAuditableItemGraphVersionListResponse.d.ts +17 -0
  130. package/dist/types/models/auditableItemGraphAuditMode.d.ts +17 -0
  131. package/dist/types/models/auditableItemGraphContexts.d.ts +33 -0
  132. package/dist/types/models/auditableItemGraphMetricIds.d.ts +69 -0
  133. package/dist/types/models/auditableItemGraphMetrics.d.ts +5 -0
  134. package/dist/types/models/auditableItemGraphTopics.d.ts +17 -0
  135. package/dist/types/models/auditableItemGraphTypes.d.ts +57 -0
  136. package/dist/types/models/eventBus/IAuditableItemGraphEventBusVertexCreated.d.ts +9 -0
  137. package/dist/types/models/eventBus/IAuditableItemGraphEventBusVertexUpdated.d.ts +14 -0
  138. package/dist/types/models/verifyDepth.d.ts +21 -0
  139. package/docs/changelog.md +0 -0
  140. package/docs/examples.md +22 -0
  141. package/docs/reference/classes/AuditableItemGraphDataTypes.md +25 -0
  142. package/docs/reference/index.md +71 -0
  143. package/docs/reference/interfaces/IAuditableItemGraphAlias.md +95 -0
  144. package/docs/reference/interfaces/IAuditableItemGraphAuditedElement.md +41 -0
  145. package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +76 -0
  146. package/docs/reference/interfaces/IAuditableItemGraphChangesetGetRequest.md +49 -0
  147. package/docs/reference/interfaces/IAuditableItemGraphChangesetGetResponse.md +23 -0
  148. package/docs/reference/interfaces/IAuditableItemGraphChangesetList.md +27 -0
  149. package/docs/reference/interfaces/IAuditableItemGraphChangesetListRequest.md +55 -0
  150. package/docs/reference/interfaces/IAuditableItemGraphChangesetListResponse.md +27 -0
  151. package/docs/reference/interfaces/IAuditableItemGraphComponent.md +393 -0
  152. package/docs/reference/interfaces/IAuditableItemGraphCreateRequest.md +11 -0
  153. package/docs/reference/interfaces/IAuditableItemGraphEdge.md +95 -0
  154. package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexCreated.md +11 -0
  155. package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexUpdated.md +19 -0
  156. package/docs/reference/interfaces/IAuditableItemGraphGetRequest.md +49 -0
  157. package/docs/reference/interfaces/IAuditableItemGraphGetResponse.md +23 -0
  158. package/docs/reference/interfaces/IAuditableItemGraphListPatch.md +25 -0
  159. package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +84 -0
  160. package/docs/reference/interfaces/IAuditableItemGraphListResponse.md +27 -0
  161. package/docs/reference/interfaces/IAuditableItemGraphPartialVertex.md +164 -0
  162. package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +51 -0
  163. package/docs/reference/interfaces/IAuditableItemGraphRemoveProofRequest.md +17 -0
  164. package/docs/reference/interfaces/IAuditableItemGraphResource.md +79 -0
  165. package/docs/reference/interfaces/IAuditableItemGraphUpdatePartialRequest.md +26 -0
  166. package/docs/reference/interfaces/IAuditableItemGraphUpdateRequest.md +25 -0
  167. package/docs/reference/interfaces/IAuditableItemGraphVersionGetRequest.md +35 -0
  168. package/docs/reference/interfaces/IAuditableItemGraphVersionGetResponse.md +23 -0
  169. package/docs/reference/interfaces/IAuditableItemGraphVersionListRequest.md +49 -0
  170. package/docs/reference/interfaces/IAuditableItemGraphVersionListResponse.md +23 -0
  171. package/docs/reference/interfaces/IAuditableItemGraphVertex.md +139 -0
  172. package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +27 -0
  173. package/docs/reference/interfaces/IAuditableItemGraphVertexVersionList.md +35 -0
  174. package/docs/reference/type-aliases/AuditableItemGraphAuditMode.md +5 -0
  175. package/docs/reference/type-aliases/AuditableItemGraphContexts.md +5 -0
  176. package/docs/reference/type-aliases/AuditableItemGraphMetricIds.md +5 -0
  177. package/docs/reference/type-aliases/AuditableItemGraphTopics.md +5 -0
  178. package/docs/reference/type-aliases/AuditableItemGraphTypes.md +5 -0
  179. package/docs/reference/type-aliases/VerifyDepth.md +5 -0
  180. package/docs/reference/variables/AuditableItemGraphAuditMode.md +19 -0
  181. package/docs/reference/variables/AuditableItemGraphContexts.md +43 -0
  182. package/docs/reference/variables/AuditableItemGraphMetricIds.md +97 -0
  183. package/docs/reference/variables/AuditableItemGraphMetrics.md +5 -0
  184. package/docs/reference/variables/AuditableItemGraphTopics.md +19 -0
  185. package/docs/reference/variables/AuditableItemGraphTypes.md +79 -0
  186. package/docs/reference/variables/CompiledAuditableItemGraphAlias.md +5 -0
  187. package/docs/reference/variables/CompiledAuditableItemGraphAuditMode.md +5 -0
  188. package/docs/reference/variables/CompiledAuditableItemGraphAuditedElement.md +5 -0
  189. package/docs/reference/variables/CompiledAuditableItemGraphChangeset.md +5 -0
  190. package/docs/reference/variables/CompiledAuditableItemGraphChangesetList.md +5 -0
  191. package/docs/reference/variables/CompiledAuditableItemGraphEdge.md +5 -0
  192. package/docs/reference/variables/CompiledAuditableItemGraphListPatch.md +5 -0
  193. package/docs/reference/variables/CompiledAuditableItemGraphPartialVertex.md +5 -0
  194. package/docs/reference/variables/CompiledAuditableItemGraphPatchOperation.md +5 -0
  195. package/docs/reference/variables/CompiledAuditableItemGraphResource.md +5 -0
  196. package/docs/reference/variables/CompiledAuditableItemGraphVertex.md +5 -0
  197. package/docs/reference/variables/CompiledAuditableItemGraphVertexList.md +5 -0
  198. package/docs/reference/variables/CompiledAuditableItemGraphVertexVersionList.md +5 -0
  199. package/docs/reference/variables/VerifyDepth.md +25 -0
  200. package/locales/en.json +3 -0
  201. package/package.json +57 -5
@@ -0,0 +1,1885 @@
1
+ import * as external0 from "../models/auditableItemGraphAuditMode.js";
2
+ import * as external1 from "@3sixty/data-json-ld";
3
+ import * as external2 from "@3sixty/immutable-proof-models";
4
+ const MESSAGES = ["must be string", "must be object", "must be equal to constant", "must NOT have fewer than 1 items", "must be array", "must match a schema in anyOf", "must be boolean", "must NOT have fewer than 2 items", "must be number", "must NOT have more than 2 items", "must match exactly one schema in oneOf"];
5
+ function createError(instancePath, schemaPath, keyword, params, message) {
6
+ return { instancePath, schemaPath, keyword, params, ["message"]: typeof message === "number" ? MESSAGES[message] : message };
7
+ }
8
+ function pushError(errors, error) {
9
+ if (errors === null) {
10
+ return [error];
11
+ }
12
+ errors.push(error);
13
+ return errors;
14
+ }
15
+ /**
16
+ * Compiled validator for the AuditableItemGraphAuditMode schema.
17
+ */
18
+ export const CompiledAuditableItemGraphAuditMode = validate52;
19
+ const keyword0 = Object.values(external0["AuditableItemGraphAuditMode"]);
20
+ function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
21
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphAuditMode" */ ;
22
+ let vErrors = null;
23
+ let errors = 0;
24
+ const evaluated0 = validate52.evaluated;
25
+ if (evaluated0.dynamicProps) {
26
+ evaluated0.props = undefined;
27
+ }
28
+ if (evaluated0.dynamicItems) {
29
+ evaluated0.items = undefined;
30
+ }
31
+ if (!keyword0.includes(data)) {
32
+ for (let i0 = 0; i0 < keyword0.length; i0++) {
33
+ vErrors = pushError(vErrors, createError(instancePath, "#/anyOf" + "/" + i0 + "/const", "const", { allowedValue: keyword0[i0] }, "must be equal to constant"));
34
+ errors++;
35
+ }
36
+ vErrors = pushError(vErrors, createError(instancePath, "#/anyOf", "anyOf", {}, "must match a schema in anyOf"));
37
+ errors++;
38
+ }
39
+ validate52.errors = vErrors;
40
+ return errors === 0;
41
+ }
42
+ validate52.evaluated = { "dynamicProps": false, "dynamicItems": false };
43
+ /**
44
+ * Compiled validator for the AuditableItemGraphAlias schema.
45
+ */
46
+ export const CompiledAuditableItemGraphAlias = validate53;
47
+ function validate54(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
48
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphAuditedElement" */ ;
49
+ let vErrors = null;
50
+ let errors = 0;
51
+ const evaluated0 = validate54.evaluated;
52
+ if (evaluated0.dynamicProps) {
53
+ evaluated0.props = undefined;
54
+ }
55
+ if (evaluated0.dynamicItems) {
56
+ evaluated0.items = undefined;
57
+ }
58
+ if (data && typeof data == "object" && !Array.isArray(data)) {
59
+ if (data.id !== undefined) {
60
+ if (typeof data.id !== "string") {
61
+ const err0 = createError(instancePath + "/id", "#/properties/id/type", "type", { type: "string" }, 0);
62
+ vErrors = pushError(vErrors, err0);
63
+ errors++;
64
+ }
65
+ }
66
+ if (data.dateCreated !== undefined) {
67
+ if (typeof data.dateCreated !== "string") {
68
+ const err1 = createError(instancePath + "/dateCreated", "#/properties/dateCreated/type", "type", { type: "string" }, 0);
69
+ vErrors = pushError(vErrors, err1);
70
+ errors++;
71
+ }
72
+ }
73
+ if (data.dateModified !== undefined) {
74
+ if (typeof data.dateModified !== "string") {
75
+ const err2 = createError(instancePath + "/dateModified", "#/properties/dateModified/type", "type", { type: "string" }, 0);
76
+ vErrors = pushError(vErrors, err2);
77
+ errors++;
78
+ }
79
+ }
80
+ if (data.dateDeleted !== undefined) {
81
+ if (typeof data.dateDeleted !== "string") {
82
+ const err3 = createError(instancePath + "/dateDeleted", "#/properties/dateDeleted/type", "type", { type: "string" }, 0);
83
+ vErrors = pushError(vErrors, err3);
84
+ errors++;
85
+ }
86
+ }
87
+ }
88
+ else {
89
+ const err4 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
90
+ vErrors = pushError(vErrors, err4);
91
+ errors++;
92
+ }
93
+ validate54.errors = vErrors;
94
+ return errors === 0;
95
+ }
96
+ validate54.evaluated = { "props": { "id": true, "dateCreated": true, "dateModified": true, "dateDeleted": true }, "dynamicProps": false, "dynamicItems": false };
97
+ const keyword1 = external1["CompiledJsonLdContextDefinitionElement"];
98
+ const keyword2 = external1["CompiledJsonLdNodeObject"];
99
+ function validate53(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
100
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphAlias" */ ;
101
+ let vErrors = null;
102
+ let errors = 0;
103
+ const evaluated0 = validate53.evaluated;
104
+ if (evaluated0.dynamicProps) {
105
+ evaluated0.props = undefined;
106
+ }
107
+ if (evaluated0.dynamicItems) {
108
+ evaluated0.items = undefined;
109
+ }
110
+ if (!(validate54(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
111
+ vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);
112
+ errors = vErrors.length;
113
+ }
114
+ if (data && typeof data == "object" && !Array.isArray(data)) {
115
+ if (data.id === undefined) {
116
+ const err0 = createError(instancePath, "#/required", "required", { missingProperty: "id" }, "must have required property '" + "id" + "'");
117
+ vErrors = pushError(vErrors, err0);
118
+ errors++;
119
+ }
120
+ if (data.type === undefined) {
121
+ const err1 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
122
+ vErrors = pushError(vErrors, err1);
123
+ errors++;
124
+ }
125
+ if (data["@context"] !== undefined) {
126
+ let data0 = data["@context"];
127
+ const _errs3 = errors;
128
+ let valid2 = false;
129
+ const _errs4 = errors;
130
+ if ("https://schema.3sixty.global/aig/" !== data0) {
131
+ const err2 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
132
+ vErrors = pushError(vErrors, err2);
133
+ errors++;
134
+ }
135
+ var _valid0 = _errs4 === errors;
136
+ valid2 = valid2 || _valid0;
137
+ const _errs5 = errors;
138
+ if (Array.isArray(data0)) {
139
+ if (data0.length < 1) {
140
+ const err3 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/minItems", "minItems", { limit: 1 }, 3);
141
+ vErrors = pushError(vErrors, err3);
142
+ errors++;
143
+ }
144
+ const len0 = data0.length;
145
+ if (len0 > 0) {
146
+ if ("https://schema.3sixty.global/aig/" !== data0[0]) {
147
+ const err4 = createError(instancePath + "/@context/0", "#/properties/%40context/anyOf/1/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
148
+ vErrors = pushError(vErrors, err4);
149
+ errors++;
150
+ }
151
+ }
152
+ const len1 = data0.length;
153
+ var valid4 = len1 <= 1;
154
+ if (!valid4) {
155
+ for (let i0 = 1; i0 < len1; i0++) {
156
+ const _errs8 = errors;
157
+ if (!(keyword1(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
158
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
159
+ errors = vErrors.length;
160
+ }
161
+ var valid4 = _errs8 === errors;
162
+ }
163
+ }
164
+ }
165
+ else {
166
+ const err5 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/type", "type", { type: "array" }, 4);
167
+ vErrors = pushError(vErrors, err5);
168
+ errors++;
169
+ }
170
+ var _valid0 = _errs5 === errors;
171
+ valid2 = valid2 || _valid0;
172
+ if (!valid2) {
173
+ const err6 = createError(instancePath + "/@context", "#/properties/%40context/anyOf", "anyOf", {}, 5);
174
+ vErrors = pushError(vErrors, err6);
175
+ errors++;
176
+ }
177
+ else {
178
+ errors = _errs3;
179
+ if (vErrors !== null) {
180
+ if (_errs3) {
181
+ vErrors.length = _errs3;
182
+ }
183
+ else {
184
+ vErrors = null;
185
+ }
186
+ }
187
+ }
188
+ }
189
+ if (data.id !== undefined) {
190
+ if (typeof data.id !== "string") {
191
+ const err7 = createError(instancePath + "/id", "#/properties/id/type", "type", { type: "string" }, 0);
192
+ vErrors = pushError(vErrors, err7);
193
+ errors++;
194
+ }
195
+ }
196
+ if (data.type !== undefined) {
197
+ if ("AuditableItemGraphAlias" !== data.type) {
198
+ const err8 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "AuditableItemGraphAlias" }, 2);
199
+ vErrors = pushError(vErrors, err8);
200
+ errors++;
201
+ }
202
+ }
203
+ if (data.annotationObject !== undefined) {
204
+ if (!(keyword2(data.annotationObject, { instancePath: instancePath + "/annotationObject", parentData: data, parentDataProperty: "annotationObject", rootData, dynamicAnchors }))) {
205
+ vErrors = vErrors === null ? keyword2.errors : vErrors.concat(keyword2.errors);
206
+ errors = vErrors.length;
207
+ }
208
+ }
209
+ if (data.aliasFormat !== undefined) {
210
+ if (typeof data.aliasFormat !== "string") {
211
+ const err9 = createError(instancePath + "/aliasFormat", "#/properties/aliasFormat/type", "type", { type: "string" }, 0);
212
+ vErrors = pushError(vErrors, err9);
213
+ errors++;
214
+ }
215
+ }
216
+ if (data.unique !== undefined) {
217
+ if (typeof data.unique !== "boolean") {
218
+ const err10 = createError(instancePath + "/unique", "#/properties/unique/type", "type", { type: "boolean" }, 6);
219
+ vErrors = pushError(vErrors, err10);
220
+ errors++;
221
+ }
222
+ }
223
+ }
224
+ else {
225
+ const err11 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
226
+ vErrors = pushError(vErrors, err11);
227
+ errors++;
228
+ }
229
+ validate53.errors = vErrors;
230
+ return errors === 0;
231
+ }
232
+ validate53.evaluated = { "props": { "@context": true, "id": true, "type": true, "annotationObject": true, "aliasFormat": true, "unique": true, "dateCreated": true, "dateModified": true, "dateDeleted": true }, "dynamicProps": false, "dynamicItems": false };
233
+ /**
234
+ * Compiled validator for the AuditableItemGraphAuditedElement schema.
235
+ */
236
+ export const CompiledAuditableItemGraphAuditedElement = validate54;
237
+ /**
238
+ * Compiled validator for the AuditableItemGraphChangeset schema.
239
+ */
240
+ export const CompiledAuditableItemGraphChangeset = validate56;
241
+ const keyword5 = external2["CompiledImmutableProofVerification"];
242
+ function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
243
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphPatchOperation" */ ;
244
+ let vErrors = null;
245
+ let errors = 0;
246
+ const evaluated0 = validate57.evaluated;
247
+ if (evaluated0.dynamicProps) {
248
+ evaluated0.props = undefined;
249
+ }
250
+ if (evaluated0.dynamicItems) {
251
+ evaluated0.items = undefined;
252
+ }
253
+ if (data && typeof data == "object" && !Array.isArray(data)) {
254
+ if (data.type === undefined) {
255
+ const err0 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
256
+ vErrors = pushError(vErrors, err0);
257
+ errors++;
258
+ }
259
+ if (data.patchOperation === undefined) {
260
+ const err1 = createError(instancePath, "#/required", "required", { missingProperty: "patchOperation" }, "must have required property '" + "patchOperation" + "'");
261
+ vErrors = pushError(vErrors, err1);
262
+ errors++;
263
+ }
264
+ if (data.patchPath === undefined) {
265
+ const err2 = createError(instancePath, "#/required", "required", { missingProperty: "patchPath" }, "must have required property '" + "patchPath" + "'");
266
+ vErrors = pushError(vErrors, err2);
267
+ errors++;
268
+ }
269
+ if (data["@context"] !== undefined) {
270
+ let data0 = data["@context"];
271
+ const _errs2 = errors;
272
+ let valid1 = false;
273
+ const _errs3 = errors;
274
+ if ("https://schema.3sixty.global/aig/" !== data0) {
275
+ const err3 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
276
+ vErrors = pushError(vErrors, err3);
277
+ errors++;
278
+ }
279
+ var _valid0 = _errs3 === errors;
280
+ valid1 = valid1 || _valid0;
281
+ const _errs4 = errors;
282
+ if (Array.isArray(data0)) {
283
+ if (data0.length < 1) {
284
+ const err4 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/minItems", "minItems", { limit: 1 }, 3);
285
+ vErrors = pushError(vErrors, err4);
286
+ errors++;
287
+ }
288
+ const len0 = data0.length;
289
+ if (len0 > 0) {
290
+ if ("https://schema.3sixty.global/aig/" !== data0[0]) {
291
+ const err5 = createError(instancePath + "/@context/0", "#/properties/%40context/anyOf/1/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
292
+ vErrors = pushError(vErrors, err5);
293
+ errors++;
294
+ }
295
+ }
296
+ const len1 = data0.length;
297
+ var valid3 = len1 <= 1;
298
+ if (!valid3) {
299
+ for (let i0 = 1; i0 < len1; i0++) {
300
+ const _errs7 = errors;
301
+ if (!(keyword1(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
302
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
303
+ errors = vErrors.length;
304
+ }
305
+ var valid3 = _errs7 === errors;
306
+ }
307
+ }
308
+ }
309
+ else {
310
+ const err6 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/type", "type", { type: "array" }, 4);
311
+ vErrors = pushError(vErrors, err6);
312
+ errors++;
313
+ }
314
+ var _valid0 = _errs4 === errors;
315
+ valid1 = valid1 || _valid0;
316
+ if (!valid1) {
317
+ const err7 = createError(instancePath + "/@context", "#/properties/%40context/anyOf", "anyOf", {}, 5);
318
+ vErrors = pushError(vErrors, err7);
319
+ errors++;
320
+ }
321
+ else {
322
+ errors = _errs2;
323
+ if (vErrors !== null) {
324
+ if (_errs2) {
325
+ vErrors.length = _errs2;
326
+ }
327
+ else {
328
+ vErrors = null;
329
+ }
330
+ }
331
+ }
332
+ }
333
+ if (data.type !== undefined) {
334
+ if ("AuditableItemGraphPatchOperation" !== data.type) {
335
+ const err8 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "AuditableItemGraphPatchOperation" }, 2);
336
+ vErrors = pushError(vErrors, err8);
337
+ errors++;
338
+ }
339
+ }
340
+ if (data.patchOperation !== undefined) {
341
+ let data4 = data.patchOperation;
342
+ const _errs10 = errors;
343
+ let valid4 = false;
344
+ const _errs11 = errors;
345
+ if ("add" !== data4) {
346
+ const err9 = createError(instancePath + "/patchOperation", "#/properties/patchOperation/anyOf/0/const", "const", { allowedValue: "add" }, 2);
347
+ vErrors = pushError(vErrors, err9);
348
+ errors++;
349
+ }
350
+ var _valid1 = _errs11 === errors;
351
+ valid4 = valid4 || _valid1;
352
+ const _errs12 = errors;
353
+ if ("remove" !== data4) {
354
+ const err10 = createError(instancePath + "/patchOperation", "#/properties/patchOperation/anyOf/1/const", "const", { allowedValue: "remove" }, 2);
355
+ vErrors = pushError(vErrors, err10);
356
+ errors++;
357
+ }
358
+ var _valid1 = _errs12 === errors;
359
+ valid4 = valid4 || _valid1;
360
+ const _errs13 = errors;
361
+ if ("replace" !== data4) {
362
+ const err11 = createError(instancePath + "/patchOperation", "#/properties/patchOperation/anyOf/2/const", "const", { allowedValue: "replace" }, 2);
363
+ vErrors = pushError(vErrors, err11);
364
+ errors++;
365
+ }
366
+ var _valid1 = _errs13 === errors;
367
+ valid4 = valid4 || _valid1;
368
+ const _errs14 = errors;
369
+ if ("move" !== data4) {
370
+ const err12 = createError(instancePath + "/patchOperation", "#/properties/patchOperation/anyOf/3/const", "const", { allowedValue: "move" }, 2);
371
+ vErrors = pushError(vErrors, err12);
372
+ errors++;
373
+ }
374
+ var _valid1 = _errs14 === errors;
375
+ valid4 = valid4 || _valid1;
376
+ const _errs15 = errors;
377
+ if ("copy" !== data4) {
378
+ const err13 = createError(instancePath + "/patchOperation", "#/properties/patchOperation/anyOf/4/const", "const", { allowedValue: "copy" }, 2);
379
+ vErrors = pushError(vErrors, err13);
380
+ errors++;
381
+ }
382
+ var _valid1 = _errs15 === errors;
383
+ valid4 = valid4 || _valid1;
384
+ const _errs16 = errors;
385
+ if ("test" !== data4) {
386
+ const err14 = createError(instancePath + "/patchOperation", "#/properties/patchOperation/anyOf/5/const", "const", { allowedValue: "test" }, 2);
387
+ vErrors = pushError(vErrors, err14);
388
+ errors++;
389
+ }
390
+ var _valid1 = _errs16 === errors;
391
+ valid4 = valid4 || _valid1;
392
+ if (!valid4) {
393
+ const err15 = createError(instancePath + "/patchOperation", "#/properties/patchOperation/anyOf", "anyOf", {}, 5);
394
+ vErrors = pushError(vErrors, err15);
395
+ errors++;
396
+ }
397
+ else {
398
+ errors = _errs10;
399
+ if (vErrors !== null) {
400
+ if (_errs10) {
401
+ vErrors.length = _errs10;
402
+ }
403
+ else {
404
+ vErrors = null;
405
+ }
406
+ }
407
+ }
408
+ }
409
+ if (data.patchPath !== undefined) {
410
+ if (typeof data.patchPath !== "string") {
411
+ const err16 = createError(instancePath + "/patchPath", "#/properties/patchPath/type", "type", { type: "string" }, 0);
412
+ vErrors = pushError(vErrors, err16);
413
+ errors++;
414
+ }
415
+ }
416
+ if (data.patchFrom !== undefined) {
417
+ if (typeof data.patchFrom !== "string") {
418
+ const err17 = createError(instancePath + "/patchFrom", "#/properties/patchFrom/type", "type", { type: "string" }, 0);
419
+ vErrors = pushError(vErrors, err17);
420
+ errors++;
421
+ }
422
+ }
423
+ }
424
+ else {
425
+ const err18 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
426
+ vErrors = pushError(vErrors, err18);
427
+ errors++;
428
+ }
429
+ validate57.errors = vErrors;
430
+ return errors === 0;
431
+ }
432
+ validate57.evaluated = { "props": { "@context": true, "type": true, "patchOperation": true, "patchPath": true, "patchFrom": true, "patchValue": true }, "dynamicProps": false, "dynamicItems": false };
433
+ function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
434
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphChangeset" */ ;
435
+ let vErrors = null;
436
+ let errors = 0;
437
+ const evaluated0 = validate56.evaluated;
438
+ if (evaluated0.dynamicProps) {
439
+ evaluated0.props = undefined;
440
+ }
441
+ if (evaluated0.dynamicItems) {
442
+ evaluated0.items = undefined;
443
+ }
444
+ if (data && typeof data == "object" && !Array.isArray(data)) {
445
+ if (data.type === undefined) {
446
+ const err0 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
447
+ vErrors = pushError(vErrors, err0);
448
+ errors++;
449
+ }
450
+ if (data.id === undefined) {
451
+ const err1 = createError(instancePath, "#/required", "required", { missingProperty: "id" }, "must have required property '" + "id" + "'");
452
+ vErrors = pushError(vErrors, err1);
453
+ errors++;
454
+ }
455
+ if (data.dateCreated === undefined) {
456
+ const err2 = createError(instancePath, "#/required", "required", { missingProperty: "dateCreated" }, "must have required property '" + "dateCreated" + "'");
457
+ vErrors = pushError(vErrors, err2);
458
+ errors++;
459
+ }
460
+ if (data.patches === undefined) {
461
+ const err3 = createError(instancePath, "#/required", "required", { missingProperty: "patches" }, "must have required property '" + "patches" + "'");
462
+ vErrors = pushError(vErrors, err3);
463
+ errors++;
464
+ }
465
+ if (data["@context"] !== undefined) {
466
+ let data0 = data["@context"];
467
+ if (Array.isArray(data0)) {
468
+ if (data0.length < 2) {
469
+ const err4 = createError(instancePath + "/@context", "#/properties/%40context/minItems", "minItems", { limit: 2 }, 7);
470
+ vErrors = pushError(vErrors, err4);
471
+ errors++;
472
+ }
473
+ const len0 = data0.length;
474
+ if (len0 > 0) {
475
+ if ("https://schema.3sixty.global/aig/" !== data0[0]) {
476
+ const err5 = createError(instancePath + "/@context/0", "#/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
477
+ vErrors = pushError(vErrors, err5);
478
+ errors++;
479
+ }
480
+ }
481
+ if (len0 > 1) {
482
+ if ("https://schema.3sixty.global/common/" !== data0[1]) {
483
+ const err6 = createError(instancePath + "/@context/1", "#/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.3sixty.global/common/" }, 2);
484
+ vErrors = pushError(vErrors, err6);
485
+ errors++;
486
+ }
487
+ }
488
+ const len1 = data0.length;
489
+ var valid2 = len1 <= 2;
490
+ if (!valid2) {
491
+ for (let i0 = 2; i0 < len1; i0++) {
492
+ const _errs5 = errors;
493
+ if (!(keyword1(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
494
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
495
+ errors = vErrors.length;
496
+ }
497
+ var valid2 = _errs5 === errors;
498
+ }
499
+ }
500
+ }
501
+ else {
502
+ const err7 = createError(instancePath + "/@context", "#/properties/%40context/type", "type", { type: "array" }, 4);
503
+ vErrors = pushError(vErrors, err7);
504
+ errors++;
505
+ }
506
+ }
507
+ if (data.type !== undefined) {
508
+ if ("AuditableItemGraphChangeset" !== data.type) {
509
+ const err8 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "AuditableItemGraphChangeset" }, 2);
510
+ vErrors = pushError(vErrors, err8);
511
+ errors++;
512
+ }
513
+ }
514
+ if (data.id !== undefined) {
515
+ if (typeof data.id !== "string") {
516
+ const err9 = createError(instancePath + "/id", "#/properties/id/type", "type", { type: "string" }, 0);
517
+ vErrors = pushError(vErrors, err9);
518
+ errors++;
519
+ }
520
+ }
521
+ if (data.dateCreated !== undefined) {
522
+ if (typeof data.dateCreated !== "string") {
523
+ const err10 = createError(instancePath + "/dateCreated", "#/properties/dateCreated/type", "type", { type: "string" }, 0);
524
+ vErrors = pushError(vErrors, err10);
525
+ errors++;
526
+ }
527
+ }
528
+ if (data.userIdentity !== undefined) {
529
+ if (typeof data.userIdentity !== "string") {
530
+ const err11 = createError(instancePath + "/userIdentity", "#/properties/userIdentity/type", "type", { type: "string" }, 0);
531
+ vErrors = pushError(vErrors, err11);
532
+ errors++;
533
+ }
534
+ }
535
+ if (data.patches !== undefined) {
536
+ let data8 = data.patches;
537
+ if (Array.isArray(data8)) {
538
+ const len2 = data8.length;
539
+ for (let i1 = 0; i1 < len2; i1++) {
540
+ if (!(validate57(data8[i1], { instancePath: instancePath + "/patches/" + i1, parentData: data8, parentDataProperty: i1, rootData, dynamicAnchors }))) {
541
+ vErrors = vErrors === null ? validate57.errors : vErrors.concat(validate57.errors);
542
+ errors = vErrors.length;
543
+ }
544
+ }
545
+ }
546
+ else {
547
+ const err12 = createError(instancePath + "/patches", "#/properties/patches/type", "type", { type: "array" }, 4);
548
+ vErrors = pushError(vErrors, err12);
549
+ errors++;
550
+ }
551
+ }
552
+ if (data.proofId !== undefined) {
553
+ if (typeof data.proofId !== "string") {
554
+ const err13 = createError(instancePath + "/proofId", "#/properties/proofId/type", "type", { type: "string" }, 0);
555
+ vErrors = pushError(vErrors, err13);
556
+ errors++;
557
+ }
558
+ }
559
+ if (data.verification !== undefined) {
560
+ if (!(keyword5(data.verification, { instancePath: instancePath + "/verification", parentData: data, parentDataProperty: "verification", rootData, dynamicAnchors }))) {
561
+ vErrors = vErrors === null ? keyword5.errors : vErrors.concat(keyword5.errors);
562
+ errors = vErrors.length;
563
+ }
564
+ }
565
+ if (data.version !== undefined) {
566
+ let data12 = data.version;
567
+ if (!((typeof data12 == "number") && (isFinite(data12)))) {
568
+ const err14 = createError(instancePath + "/version", "#/properties/version/type", "type", { type: "number" }, 8);
569
+ vErrors = pushError(vErrors, err14);
570
+ errors++;
571
+ }
572
+ }
573
+ }
574
+ else {
575
+ const err15 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
576
+ vErrors = pushError(vErrors, err15);
577
+ errors++;
578
+ }
579
+ validate56.errors = vErrors;
580
+ return errors === 0;
581
+ }
582
+ validate56.evaluated = { "props": { "@context": true, "type": true, "id": true, "dateCreated": true, "userIdentity": true, "patches": true, "proofId": true, "verification": true, "version": true }, "dynamicProps": false, "dynamicItems": false };
583
+ /**
584
+ * Compiled validator for the AuditableItemGraphChangesetList schema.
585
+ */
586
+ export const CompiledAuditableItemGraphChangesetList = validate59;
587
+ function validate59(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
588
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphChangesetList" */ ;
589
+ let vErrors = null;
590
+ let errors = 0;
591
+ const evaluated0 = validate59.evaluated;
592
+ if (evaluated0.dynamicProps) {
593
+ evaluated0.props = undefined;
594
+ }
595
+ if (evaluated0.dynamicItems) {
596
+ evaluated0.items = undefined;
597
+ }
598
+ if (data && typeof data == "object" && !Array.isArray(data)) {
599
+ if (data["@context"] === undefined) {
600
+ const err0 = createError(instancePath, "#/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
601
+ vErrors = pushError(vErrors, err0);
602
+ errors++;
603
+ }
604
+ if (data.type === undefined) {
605
+ const err1 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
606
+ vErrors = pushError(vErrors, err1);
607
+ errors++;
608
+ }
609
+ if (data.itemListElement === undefined) {
610
+ const err2 = createError(instancePath, "#/required", "required", { missingProperty: "itemListElement" }, "must have required property '" + "itemListElement" + "'");
611
+ vErrors = pushError(vErrors, err2);
612
+ errors++;
613
+ }
614
+ if (data["@context"] !== undefined) {
615
+ let data0 = data["@context"];
616
+ if (Array.isArray(data0)) {
617
+ if (data0.length < 2) {
618
+ const err3 = createError(instancePath + "/@context", "#/properties/%40context/minItems", "minItems", { limit: 2 }, 7);
619
+ vErrors = pushError(vErrors, err3);
620
+ errors++;
621
+ }
622
+ const len0 = data0.length;
623
+ if (len0 > 0) {
624
+ if ("https://schema.org" !== data0[0]) {
625
+ const err4 = createError(instancePath + "/@context/0", "#/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.org" }, 2);
626
+ vErrors = pushError(vErrors, err4);
627
+ errors++;
628
+ }
629
+ }
630
+ if (len0 > 1) {
631
+ if ("https://schema.3sixty.global/aig/" !== data0[1]) {
632
+ const err5 = createError(instancePath + "/@context/1", "#/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
633
+ vErrors = pushError(vErrors, err5);
634
+ errors++;
635
+ }
636
+ }
637
+ const len1 = data0.length;
638
+ var valid2 = len1 <= 2;
639
+ if (!valid2) {
640
+ for (let i0 = 2; i0 < len1; i0++) {
641
+ const _errs5 = errors;
642
+ if (!(keyword1(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
643
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
644
+ errors = vErrors.length;
645
+ }
646
+ var valid2 = _errs5 === errors;
647
+ }
648
+ }
649
+ }
650
+ else {
651
+ const err6 = createError(instancePath + "/@context", "#/properties/%40context/type", "type", { type: "array" }, 4);
652
+ vErrors = pushError(vErrors, err6);
653
+ errors++;
654
+ }
655
+ }
656
+ if (data.type !== undefined) {
657
+ let data4 = data.type;
658
+ if (Array.isArray(data4)) {
659
+ if (data4.length > 2) {
660
+ const err7 = createError(instancePath + "/type", "#/properties/type/maxItems", "maxItems", { limit: 2 }, 9);
661
+ vErrors = pushError(vErrors, err7);
662
+ errors++;
663
+ }
664
+ if (data4.length < 2) {
665
+ const err8 = createError(instancePath + "/type", "#/properties/type/minItems", "minItems", { limit: 2 }, 7);
666
+ vErrors = pushError(vErrors, err8);
667
+ errors++;
668
+ }
669
+ const len2 = data4.length;
670
+ if (len2 > 0) {
671
+ if ("ItemList" !== data4[0]) {
672
+ const err9 = createError(instancePath + "/type/0", "#/properties/type/prefixItems/0/const", "const", { allowedValue: "ItemList" }, 2);
673
+ vErrors = pushError(vErrors, err9);
674
+ errors++;
675
+ }
676
+ }
677
+ if (len2 > 1) {
678
+ if ("AuditableItemGraphChangesetList" !== data4[1]) {
679
+ const err10 = createError(instancePath + "/type/1", "#/properties/type/prefixItems/1/const", "const", { allowedValue: "AuditableItemGraphChangesetList" }, 2);
680
+ vErrors = pushError(vErrors, err10);
681
+ errors++;
682
+ }
683
+ }
684
+ const len3 = data4.length;
685
+ if (!(len3 <= 2)) {
686
+ const err11 = createError(instancePath + "/type", "#/properties/type/items", "items", { limit: 2 }, 9);
687
+ vErrors = pushError(vErrors, err11);
688
+ errors++;
689
+ }
690
+ }
691
+ else {
692
+ const err12 = createError(instancePath + "/type", "#/properties/type/type", "type", { type: "array" }, 4);
693
+ vErrors = pushError(vErrors, err12);
694
+ errors++;
695
+ }
696
+ }
697
+ if (data.itemListElement !== undefined) {
698
+ let data7 = data.itemListElement;
699
+ if (Array.isArray(data7)) {
700
+ const len4 = data7.length;
701
+ for (let i1 = 0; i1 < len4; i1++) {
702
+ if (!(validate56(data7[i1], { instancePath: instancePath + "/itemListElement/" + i1, parentData: data7, parentDataProperty: i1, rootData, dynamicAnchors }))) {
703
+ vErrors = vErrors === null ? validate56.errors : vErrors.concat(validate56.errors);
704
+ errors = vErrors.length;
705
+ }
706
+ }
707
+ }
708
+ else {
709
+ const err13 = createError(instancePath + "/itemListElement", "#/properties/itemListElement/type", "type", { type: "array" }, 4);
710
+ vErrors = pushError(vErrors, err13);
711
+ errors++;
712
+ }
713
+ }
714
+ }
715
+ else {
716
+ const err14 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
717
+ vErrors = pushError(vErrors, err14);
718
+ errors++;
719
+ }
720
+ validate59.errors = vErrors;
721
+ return errors === 0;
722
+ }
723
+ validate59.evaluated = { "props": { "@context": true, "type": true, "itemListElement": true }, "dynamicProps": false, "dynamicItems": false };
724
+ /**
725
+ * Compiled validator for the AuditableItemGraphEdge schema.
726
+ */
727
+ export const CompiledAuditableItemGraphEdge = validate61;
728
+ function validate61(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
729
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphEdge" */ ;
730
+ let vErrors = null;
731
+ let errors = 0;
732
+ const evaluated0 = validate61.evaluated;
733
+ if (evaluated0.dynamicProps) {
734
+ evaluated0.props = undefined;
735
+ }
736
+ if (evaluated0.dynamicItems) {
737
+ evaluated0.items = undefined;
738
+ }
739
+ if (!(validate54(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
740
+ vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);
741
+ errors = vErrors.length;
742
+ }
743
+ if (data && typeof data == "object" && !Array.isArray(data)) {
744
+ if (data.targetId === undefined) {
745
+ const err0 = createError(instancePath, "#/required", "required", { missingProperty: "targetId" }, "must have required property '" + "targetId" + "'");
746
+ vErrors = pushError(vErrors, err0);
747
+ errors++;
748
+ }
749
+ if (data.type === undefined) {
750
+ const err1 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
751
+ vErrors = pushError(vErrors, err1);
752
+ errors++;
753
+ }
754
+ if (data.edgeRelationships === undefined) {
755
+ const err2 = createError(instancePath, "#/required", "required", { missingProperty: "edgeRelationships" }, "must have required property '" + "edgeRelationships" + "'");
756
+ vErrors = pushError(vErrors, err2);
757
+ errors++;
758
+ }
759
+ if (data["@context"] !== undefined) {
760
+ let data0 = data["@context"];
761
+ const _errs3 = errors;
762
+ let valid2 = false;
763
+ const _errs4 = errors;
764
+ if ("https://schema.3sixty.global/aig/" !== data0) {
765
+ const err3 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
766
+ vErrors = pushError(vErrors, err3);
767
+ errors++;
768
+ }
769
+ var _valid0 = _errs4 === errors;
770
+ valid2 = valid2 || _valid0;
771
+ const _errs5 = errors;
772
+ if (Array.isArray(data0)) {
773
+ if (data0.length < 1) {
774
+ const err4 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/minItems", "minItems", { limit: 1 }, 3);
775
+ vErrors = pushError(vErrors, err4);
776
+ errors++;
777
+ }
778
+ const len0 = data0.length;
779
+ if (len0 > 0) {
780
+ if ("https://schema.3sixty.global/aig/" !== data0[0]) {
781
+ const err5 = createError(instancePath + "/@context/0", "#/properties/%40context/anyOf/1/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
782
+ vErrors = pushError(vErrors, err5);
783
+ errors++;
784
+ }
785
+ }
786
+ const len1 = data0.length;
787
+ var valid4 = len1 <= 1;
788
+ if (!valid4) {
789
+ for (let i0 = 1; i0 < len1; i0++) {
790
+ const _errs8 = errors;
791
+ if (!(keyword1(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
792
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
793
+ errors = vErrors.length;
794
+ }
795
+ var valid4 = _errs8 === errors;
796
+ }
797
+ }
798
+ }
799
+ else {
800
+ const err6 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/type", "type", { type: "array" }, 4);
801
+ vErrors = pushError(vErrors, err6);
802
+ errors++;
803
+ }
804
+ var _valid0 = _errs5 === errors;
805
+ valid2 = valid2 || _valid0;
806
+ if (!valid2) {
807
+ const err7 = createError(instancePath + "/@context", "#/properties/%40context/anyOf", "anyOf", {}, 5);
808
+ vErrors = pushError(vErrors, err7);
809
+ errors++;
810
+ }
811
+ else {
812
+ errors = _errs3;
813
+ if (vErrors !== null) {
814
+ if (_errs3) {
815
+ vErrors.length = _errs3;
816
+ }
817
+ else {
818
+ vErrors = null;
819
+ }
820
+ }
821
+ }
822
+ }
823
+ if (data.id !== undefined) {
824
+ if (typeof data.id !== "string") {
825
+ const err8 = createError(instancePath + "/id", "#/properties/id/type", "type", { type: "string" }, 0);
826
+ vErrors = pushError(vErrors, err8);
827
+ errors++;
828
+ }
829
+ }
830
+ if (data.targetId !== undefined) {
831
+ if (typeof data.targetId !== "string") {
832
+ const err9 = createError(instancePath + "/targetId", "#/properties/targetId/type", "type", { type: "string" }, 0);
833
+ vErrors = pushError(vErrors, err9);
834
+ errors++;
835
+ }
836
+ }
837
+ if (data.type !== undefined) {
838
+ if ("AuditableItemGraphEdge" !== data.type) {
839
+ const err10 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "AuditableItemGraphEdge" }, 2);
840
+ vErrors = pushError(vErrors, err10);
841
+ errors++;
842
+ }
843
+ }
844
+ if (data.annotationObject !== undefined) {
845
+ if (!(keyword2(data.annotationObject, { instancePath: instancePath + "/annotationObject", parentData: data, parentDataProperty: "annotationObject", rootData, dynamicAnchors }))) {
846
+ vErrors = vErrors === null ? keyword2.errors : vErrors.concat(keyword2.errors);
847
+ errors = vErrors.length;
848
+ }
849
+ }
850
+ if (data.edgeRelationships !== undefined) {
851
+ let data7 = data.edgeRelationships;
852
+ if (Array.isArray(data7)) {
853
+ const len2 = data7.length;
854
+ for (let i1 = 0; i1 < len2; i1++) {
855
+ if (typeof data7[i1] !== "string") {
856
+ const err11 = createError(instancePath + "/edgeRelationships/" + i1, "#/properties/edgeRelationships/items/type", "type", { type: "string" }, 0);
857
+ vErrors = pushError(vErrors, err11);
858
+ errors++;
859
+ }
860
+ }
861
+ }
862
+ else {
863
+ const err12 = createError(instancePath + "/edgeRelationships", "#/properties/edgeRelationships/type", "type", { type: "array" }, 4);
864
+ vErrors = pushError(vErrors, err12);
865
+ errors++;
866
+ }
867
+ }
868
+ }
869
+ else {
870
+ const err13 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
871
+ vErrors = pushError(vErrors, err13);
872
+ errors++;
873
+ }
874
+ validate61.errors = vErrors;
875
+ return errors === 0;
876
+ }
877
+ validate61.evaluated = { "props": { "@context": true, "id": true, "targetId": true, "type": true, "annotationObject": true, "edgeRelationships": true, "dateCreated": true, "dateModified": true, "dateDeleted": true }, "dynamicProps": false, "dynamicItems": false };
878
+ /**
879
+ * Compiled validator for the AuditableItemGraphListPatch schema.
880
+ */
881
+ export const CompiledAuditableItemGraphListPatch = validate63;
882
+ function validate66(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
883
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphResource" */ ;
884
+ let vErrors = null;
885
+ let errors = 0;
886
+ const evaluated0 = validate66.evaluated;
887
+ if (evaluated0.dynamicProps) {
888
+ evaluated0.props = undefined;
889
+ }
890
+ if (evaluated0.dynamicItems) {
891
+ evaluated0.items = undefined;
892
+ }
893
+ if (!(validate54(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
894
+ vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);
895
+ errors = vErrors.length;
896
+ }
897
+ if (data && typeof data == "object" && !Array.isArray(data)) {
898
+ if (data.type === undefined) {
899
+ const err0 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
900
+ vErrors = pushError(vErrors, err0);
901
+ errors++;
902
+ }
903
+ if (data["@context"] !== undefined) {
904
+ let data0 = data["@context"];
905
+ const _errs3 = errors;
906
+ let valid2 = false;
907
+ const _errs4 = errors;
908
+ if ("https://schema.3sixty.global/aig/" !== data0) {
909
+ const err1 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
910
+ vErrors = pushError(vErrors, err1);
911
+ errors++;
912
+ }
913
+ var _valid0 = _errs4 === errors;
914
+ valid2 = valid2 || _valid0;
915
+ const _errs5 = errors;
916
+ if (Array.isArray(data0)) {
917
+ if (data0.length < 1) {
918
+ const err2 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/minItems", "minItems", { limit: 1 }, 3);
919
+ vErrors = pushError(vErrors, err2);
920
+ errors++;
921
+ }
922
+ const len0 = data0.length;
923
+ if (len0 > 0) {
924
+ if ("https://schema.3sixty.global/aig/" !== data0[0]) {
925
+ const err3 = createError(instancePath + "/@context/0", "#/properties/%40context/anyOf/1/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
926
+ vErrors = pushError(vErrors, err3);
927
+ errors++;
928
+ }
929
+ }
930
+ const len1 = data0.length;
931
+ var valid4 = len1 <= 1;
932
+ if (!valid4) {
933
+ for (let i0 = 1; i0 < len1; i0++) {
934
+ const _errs8 = errors;
935
+ if (!(keyword1(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
936
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
937
+ errors = vErrors.length;
938
+ }
939
+ var valid4 = _errs8 === errors;
940
+ }
941
+ }
942
+ }
943
+ else {
944
+ const err4 = createError(instancePath + "/@context", "#/properties/%40context/anyOf/1/type", "type", { type: "array" }, 4);
945
+ vErrors = pushError(vErrors, err4);
946
+ errors++;
947
+ }
948
+ var _valid0 = _errs5 === errors;
949
+ valid2 = valid2 || _valid0;
950
+ if (!valid2) {
951
+ const err5 = createError(instancePath + "/@context", "#/properties/%40context/anyOf", "anyOf", {}, 5);
952
+ vErrors = pushError(vErrors, err5);
953
+ errors++;
954
+ }
955
+ else {
956
+ errors = _errs3;
957
+ if (vErrors !== null) {
958
+ if (_errs3) {
959
+ vErrors.length = _errs3;
960
+ }
961
+ else {
962
+ vErrors = null;
963
+ }
964
+ }
965
+ }
966
+ }
967
+ if (data.type !== undefined) {
968
+ if ("AuditableItemGraphResource" !== data.type) {
969
+ const err6 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "AuditableItemGraphResource" }, 2);
970
+ vErrors = pushError(vErrors, err6);
971
+ errors++;
972
+ }
973
+ }
974
+ if (data.resourceObject !== undefined) {
975
+ if (!(keyword2(data.resourceObject, { instancePath: instancePath + "/resourceObject", parentData: data, parentDataProperty: "resourceObject", rootData, dynamicAnchors }))) {
976
+ vErrors = vErrors === null ? keyword2.errors : vErrors.concat(keyword2.errors);
977
+ errors = vErrors.length;
978
+ }
979
+ }
980
+ }
981
+ else {
982
+ const err7 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
983
+ vErrors = pushError(vErrors, err7);
984
+ errors++;
985
+ }
986
+ validate66.errors = vErrors;
987
+ return errors === 0;
988
+ }
989
+ validate66.evaluated = { "props": { "@context": true, "type": true, "resourceObject": true, "id": true, "dateCreated": true, "dateModified": true, "dateDeleted": true }, "dynamicProps": false, "dynamicItems": false };
990
+ function validate63(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
991
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphListPatch" */ ;
992
+ let vErrors = null;
993
+ let errors = 0;
994
+ const evaluated0 = validate63.evaluated;
995
+ if (evaluated0.dynamicProps) {
996
+ evaluated0.props = undefined;
997
+ }
998
+ if (evaluated0.dynamicItems) {
999
+ evaluated0.items = undefined;
1000
+ }
1001
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1002
+ if (data.add !== undefined) {
1003
+ let data0 = data.add;
1004
+ if (Array.isArray(data0)) {
1005
+ const len0 = data0.length;
1006
+ for (let i0 = 0; i0 < len0; i0++) {
1007
+ let data1 = data0[i0];
1008
+ const _errs4 = errors;
1009
+ let valid3 = false;
1010
+ let passing0 = null;
1011
+ const _errs5 = errors;
1012
+ if (!(validate61(data1, { instancePath: instancePath + "/add/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
1013
+ vErrors = vErrors === null ? validate61.errors : vErrors.concat(validate61.errors);
1014
+ errors = vErrors.length;
1015
+ }
1016
+ var _valid0 = _errs5 === errors;
1017
+ if (_valid0) {
1018
+ valid3 = true;
1019
+ passing0 = 0;
1020
+ var props0 = {};
1021
+ props0["@context"] = true;
1022
+ props0.id = true;
1023
+ props0.targetId = true;
1024
+ props0.type = true;
1025
+ props0.annotationObject = true;
1026
+ props0.edgeRelationships = true;
1027
+ props0.dateCreated = true;
1028
+ props0.dateModified = true;
1029
+ props0.dateDeleted = true;
1030
+ }
1031
+ const _errs6 = errors;
1032
+ if (!(validate53(data1, { instancePath: instancePath + "/add/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
1033
+ vErrors = vErrors === null ? validate53.errors : vErrors.concat(validate53.errors);
1034
+ errors = vErrors.length;
1035
+ }
1036
+ var _valid0 = _errs6 === errors;
1037
+ if (_valid0 && valid3) {
1038
+ valid3 = false;
1039
+ passing0 = [passing0, 1];
1040
+ }
1041
+ else {
1042
+ if (_valid0) {
1043
+ valid3 = true;
1044
+ passing0 = 1;
1045
+ if (props0 !== true) {
1046
+ props0 = props0 || {};
1047
+ props0["@context"] = true;
1048
+ props0.id = true;
1049
+ props0.type = true;
1050
+ props0.annotationObject = true;
1051
+ props0.aliasFormat = true;
1052
+ props0.unique = true;
1053
+ props0.dateCreated = true;
1054
+ props0.dateModified = true;
1055
+ props0.dateDeleted = true;
1056
+ }
1057
+ }
1058
+ const _errs7 = errors;
1059
+ if (!(validate66(data1, { instancePath: instancePath + "/add/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
1060
+ vErrors = vErrors === null ? validate66.errors : vErrors.concat(validate66.errors);
1061
+ errors = vErrors.length;
1062
+ }
1063
+ var _valid0 = _errs7 === errors;
1064
+ if (_valid0 && valid3) {
1065
+ valid3 = false;
1066
+ passing0 = [passing0, 2];
1067
+ }
1068
+ else {
1069
+ if (_valid0) {
1070
+ valid3 = true;
1071
+ passing0 = 2;
1072
+ if (props0 !== true) {
1073
+ props0 = props0 || {};
1074
+ props0["@context"] = true;
1075
+ props0.type = true;
1076
+ props0.resourceObject = true;
1077
+ props0.id = true;
1078
+ props0.dateCreated = true;
1079
+ props0.dateModified = true;
1080
+ props0.dateDeleted = true;
1081
+ }
1082
+ }
1083
+ }
1084
+ }
1085
+ if (!valid3) {
1086
+ const err0 = createError(instancePath + "/add/" + i0, "#/properties/add/items/oneOf", "oneOf", { passingSchemas: passing0 }, 10);
1087
+ vErrors = pushError(vErrors, err0);
1088
+ errors++;
1089
+ }
1090
+ else {
1091
+ errors = _errs4;
1092
+ if (vErrors !== null) {
1093
+ if (_errs4) {
1094
+ vErrors.length = _errs4;
1095
+ }
1096
+ else {
1097
+ vErrors = null;
1098
+ }
1099
+ }
1100
+ }
1101
+ }
1102
+ }
1103
+ else {
1104
+ const err1 = createError(instancePath + "/add", "#/properties/add/type", "type", { type: "array" }, 4);
1105
+ vErrors = pushError(vErrors, err1);
1106
+ errors++;
1107
+ }
1108
+ }
1109
+ if (data.remove !== undefined) {
1110
+ let data2 = data.remove;
1111
+ if (Array.isArray(data2)) {
1112
+ const len1 = data2.length;
1113
+ for (let i1 = 0; i1 < len1; i1++) {
1114
+ if (typeof data2[i1] !== "string") {
1115
+ const err2 = createError(instancePath + "/remove/" + i1, "#/properties/remove/items/type", "type", { type: "string" }, 0);
1116
+ vErrors = pushError(vErrors, err2);
1117
+ errors++;
1118
+ }
1119
+ }
1120
+ }
1121
+ else {
1122
+ const err3 = createError(instancePath + "/remove", "#/properties/remove/type", "type", { type: "array" }, 4);
1123
+ vErrors = pushError(vErrors, err3);
1124
+ errors++;
1125
+ }
1126
+ }
1127
+ }
1128
+ else {
1129
+ const err4 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
1130
+ vErrors = pushError(vErrors, err4);
1131
+ errors++;
1132
+ }
1133
+ validate63.errors = vErrors;
1134
+ return errors === 0;
1135
+ }
1136
+ validate63.evaluated = { "props": { "add": true, "remove": true }, "dynamicProps": false, "dynamicItems": false };
1137
+ /**
1138
+ * Compiled validator for the AuditableItemGraphPartialVertex schema.
1139
+ */
1140
+ export const CompiledAuditableItemGraphPartialVertex = validate69;
1141
+ function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
1142
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphPartialVertex" */ ;
1143
+ let vErrors = null;
1144
+ let errors = 0;
1145
+ const evaluated0 = validate69.evaluated;
1146
+ if (evaluated0.dynamicProps) {
1147
+ evaluated0.props = undefined;
1148
+ }
1149
+ if (evaluated0.dynamicItems) {
1150
+ evaluated0.items = undefined;
1151
+ }
1152
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1153
+ if (data["@context"] === undefined) {
1154
+ const err0 = createError(instancePath, "#/allOf/0/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
1155
+ vErrors = pushError(vErrors, err0);
1156
+ errors++;
1157
+ }
1158
+ if (data.dateCreated !== undefined) {
1159
+ if (typeof data.dateCreated !== "string") {
1160
+ const err1 = createError(instancePath + "/dateCreated", "#/allOf/0/properties/dateCreated/type", "type", { type: "string" }, 0);
1161
+ vErrors = pushError(vErrors, err1);
1162
+ errors++;
1163
+ }
1164
+ }
1165
+ if (data.dateModified !== undefined) {
1166
+ if (typeof data.dateModified !== "string") {
1167
+ const err2 = createError(instancePath + "/dateModified", "#/allOf/0/properties/dateModified/type", "type", { type: "string" }, 0);
1168
+ vErrors = pushError(vErrors, err2);
1169
+ errors++;
1170
+ }
1171
+ }
1172
+ if (data.dateDeleted !== undefined) {
1173
+ if (typeof data.dateDeleted !== "string") {
1174
+ const err3 = createError(instancePath + "/dateDeleted", "#/allOf/0/properties/dateDeleted/type", "type", { type: "string" }, 0);
1175
+ vErrors = pushError(vErrors, err3);
1176
+ errors++;
1177
+ }
1178
+ }
1179
+ if (data["@context"] !== undefined) {
1180
+ let data3 = data["@context"];
1181
+ if (Array.isArray(data3)) {
1182
+ if (data3.length < 2) {
1183
+ const err4 = createError(instancePath + "/@context", "#/allOf/0/properties/%40context/minItems", "minItems", { limit: 2 }, 7);
1184
+ vErrors = pushError(vErrors, err4);
1185
+ errors++;
1186
+ }
1187
+ const len0 = data3.length;
1188
+ if (len0 > 0) {
1189
+ if ("https://schema.3sixty.global/aig/" !== data3[0]) {
1190
+ const err5 = createError(instancePath + "/@context/0", "#/allOf/0/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
1191
+ vErrors = pushError(vErrors, err5);
1192
+ errors++;
1193
+ }
1194
+ }
1195
+ if (len0 > 1) {
1196
+ if ("https://schema.3sixty.global/common/" !== data3[1]) {
1197
+ const err6 = createError(instancePath + "/@context/1", "#/allOf/0/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.3sixty.global/common/" }, 2);
1198
+ vErrors = pushError(vErrors, err6);
1199
+ errors++;
1200
+ }
1201
+ }
1202
+ const len1 = data3.length;
1203
+ var valid3 = len1 <= 2;
1204
+ if (!valid3) {
1205
+ for (let i0 = 2; i0 < len1; i0++) {
1206
+ const _errs15 = errors;
1207
+ if (!(keyword1(data3[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data3, parentDataProperty: i0, rootData, dynamicAnchors }))) {
1208
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
1209
+ errors = vErrors.length;
1210
+ }
1211
+ var valid3 = _errs15 === errors;
1212
+ }
1213
+ }
1214
+ }
1215
+ else {
1216
+ const err7 = createError(instancePath + "/@context", "#/allOf/0/properties/%40context/type", "type", { type: "array" }, 4);
1217
+ vErrors = pushError(vErrors, err7);
1218
+ errors++;
1219
+ }
1220
+ }
1221
+ if (data.organizationIdentity !== undefined) {
1222
+ if (typeof data.organizationIdentity !== "string") {
1223
+ const err8 = createError(instancePath + "/organizationIdentity", "#/allOf/0/properties/organizationIdentity/type", "type", { type: "string" }, 0);
1224
+ vErrors = pushError(vErrors, err8);
1225
+ errors++;
1226
+ }
1227
+ }
1228
+ if (data.auditMode !== undefined) {
1229
+ if (!(validate52(data.auditMode, { instancePath: instancePath + "/auditMode", parentData: data, parentDataProperty: "auditMode", rootData, dynamicAnchors }))) {
1230
+ vErrors = vErrors === null ? validate52.errors : vErrors.concat(validate52.errors);
1231
+ errors = vErrors.length;
1232
+ }
1233
+ }
1234
+ if (data.annotationObject !== undefined) {
1235
+ if (!(keyword2(data.annotationObject, { instancePath: instancePath + "/annotationObject", parentData: data, parentDataProperty: "annotationObject", rootData, dynamicAnchors }))) {
1236
+ vErrors = vErrors === null ? keyword2.errors : vErrors.concat(keyword2.errors);
1237
+ errors = vErrors.length;
1238
+ }
1239
+ }
1240
+ if (data.verified !== undefined) {
1241
+ if (typeof data.verified !== "boolean") {
1242
+ const err9 = createError(instancePath + "/verified", "#/allOf/0/properties/verified/type", "type", { type: "boolean" }, 6);
1243
+ vErrors = pushError(vErrors, err9);
1244
+ errors++;
1245
+ }
1246
+ }
1247
+ if (data.version !== undefined) {
1248
+ let data11 = data.version;
1249
+ if (!((typeof data11 == "number") && (isFinite(data11)))) {
1250
+ const err10 = createError(instancePath + "/version", "#/allOf/0/properties/version/type", "type", { type: "number" }, 8);
1251
+ vErrors = pushError(vErrors, err10);
1252
+ errors++;
1253
+ }
1254
+ }
1255
+ }
1256
+ else {
1257
+ const err11 = createError(instancePath, "#/allOf/0/type", "type", { type: "object" }, 1);
1258
+ vErrors = pushError(vErrors, err11);
1259
+ errors++;
1260
+ }
1261
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1262
+ if (data.id === undefined) {
1263
+ const err12 = createError(instancePath, "#/required", "required", { missingProperty: "id" }, "must have required property '" + "id" + "'");
1264
+ vErrors = pushError(vErrors, err12);
1265
+ errors++;
1266
+ }
1267
+ if (data["@context"] === undefined) {
1268
+ const err13 = createError(instancePath, "#/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
1269
+ vErrors = pushError(vErrors, err13);
1270
+ errors++;
1271
+ }
1272
+ if (data.id !== undefined) {
1273
+ if (typeof data.id !== "string") {
1274
+ const err14 = createError(instancePath + "/id", "#/properties/id/type", "type", { type: "string" }, 0);
1275
+ vErrors = pushError(vErrors, err14);
1276
+ errors++;
1277
+ }
1278
+ }
1279
+ if (data["@context"] !== undefined) {
1280
+ let data13 = data["@context"];
1281
+ if (Array.isArray(data13)) {
1282
+ if (data13.length < 2) {
1283
+ const err15 = createError(instancePath + "/@context", "#/properties/%40context/minItems", "minItems", { limit: 2 }, 7);
1284
+ vErrors = pushError(vErrors, err15);
1285
+ errors++;
1286
+ }
1287
+ const len2 = data13.length;
1288
+ if (len2 > 0) {
1289
+ if ("https://schema.3sixty.global/aig/" !== data13[0]) {
1290
+ const err16 = createError(instancePath + "/@context/0", "#/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
1291
+ vErrors = pushError(vErrors, err16);
1292
+ errors++;
1293
+ }
1294
+ }
1295
+ if (len2 > 1) {
1296
+ if ("https://schema.3sixty.global/common/" !== data13[1]) {
1297
+ const err17 = createError(instancePath + "/@context/1", "#/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.3sixty.global/common/" }, 2);
1298
+ vErrors = pushError(vErrors, err17);
1299
+ errors++;
1300
+ }
1301
+ }
1302
+ const len3 = data13.length;
1303
+ var valid6 = len3 <= 2;
1304
+ if (!valid6) {
1305
+ for (let i1 = 2; i1 < len3; i1++) {
1306
+ const _errs35 = errors;
1307
+ if (!(keyword1(data13[i1], { instancePath: instancePath + "/@context/" + i1, parentData: data13, parentDataProperty: i1, rootData, dynamicAnchors }))) {
1308
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
1309
+ errors = vErrors.length;
1310
+ }
1311
+ var valid6 = _errs35 === errors;
1312
+ }
1313
+ }
1314
+ }
1315
+ else {
1316
+ const err18 = createError(instancePath + "/@context", "#/properties/%40context/type", "type", { type: "array" }, 4);
1317
+ vErrors = pushError(vErrors, err18);
1318
+ errors++;
1319
+ }
1320
+ }
1321
+ if (data.type !== undefined) {
1322
+ if ("AuditableItemGraphVertex" !== data.type) {
1323
+ const err19 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "AuditableItemGraphVertex" }, 2);
1324
+ vErrors = pushError(vErrors, err19);
1325
+ errors++;
1326
+ }
1327
+ }
1328
+ if (data.aliasPatches !== undefined) {
1329
+ if (!(validate63(data.aliasPatches, { instancePath: instancePath + "/aliasPatches", parentData: data, parentDataProperty: "aliasPatches", rootData, dynamicAnchors }))) {
1330
+ vErrors = vErrors === null ? validate63.errors : vErrors.concat(validate63.errors);
1331
+ errors = vErrors.length;
1332
+ }
1333
+ }
1334
+ if (data.resourcePatches !== undefined) {
1335
+ if (!(validate63(data.resourcePatches, { instancePath: instancePath + "/resourcePatches", parentData: data, parentDataProperty: "resourcePatches", rootData, dynamicAnchors }))) {
1336
+ vErrors = vErrors === null ? validate63.errors : vErrors.concat(validate63.errors);
1337
+ errors = vErrors.length;
1338
+ }
1339
+ }
1340
+ if (data.edgePatches !== undefined) {
1341
+ if (!(validate63(data.edgePatches, { instancePath: instancePath + "/edgePatches", parentData: data, parentDataProperty: "edgePatches", rootData, dynamicAnchors }))) {
1342
+ vErrors = vErrors === null ? validate63.errors : vErrors.concat(validate63.errors);
1343
+ errors = vErrors.length;
1344
+ }
1345
+ }
1346
+ }
1347
+ else {
1348
+ const err20 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
1349
+ vErrors = pushError(vErrors, err20);
1350
+ errors++;
1351
+ }
1352
+ validate69.errors = vErrors;
1353
+ return errors === 0;
1354
+ }
1355
+ validate69.evaluated = { "props": { "id": true, "@context": true, "type": true, "aliasPatches": true, "resourcePatches": true, "edgePatches": true, "dateCreated": true, "dateModified": true, "dateDeleted": true, "organizationIdentity": true, "auditMode": true, "annotationObject": true, "verified": true, "version": true }, "dynamicProps": false, "dynamicItems": false };
1356
+ /**
1357
+ * Compiled validator for the AuditableItemGraphPatchOperation schema.
1358
+ */
1359
+ export const CompiledAuditableItemGraphPatchOperation = validate57;
1360
+ /**
1361
+ * Compiled validator for the AuditableItemGraphResource schema.
1362
+ */
1363
+ export const CompiledAuditableItemGraphResource = validate66;
1364
+ /**
1365
+ * Compiled validator for the AuditableItemGraphVertex schema.
1366
+ */
1367
+ export const CompiledAuditableItemGraphVertex = validate74;
1368
+ function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
1369
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphVertex" */ ;
1370
+ let vErrors = null;
1371
+ let errors = 0;
1372
+ const evaluated0 = validate74.evaluated;
1373
+ if (evaluated0.dynamicProps) {
1374
+ evaluated0.props = undefined;
1375
+ }
1376
+ if (evaluated0.dynamicItems) {
1377
+ evaluated0.items = undefined;
1378
+ }
1379
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1380
+ if (data.dateCreated !== undefined) {
1381
+ if (typeof data.dateCreated !== "string") {
1382
+ const err0 = createError(instancePath + "/dateCreated", "#/allOf/0/properties/dateCreated/type", "type", { type: "string" }, 0);
1383
+ vErrors = pushError(vErrors, err0);
1384
+ errors++;
1385
+ }
1386
+ }
1387
+ if (data.dateModified !== undefined) {
1388
+ if (typeof data.dateModified !== "string") {
1389
+ const err1 = createError(instancePath + "/dateModified", "#/allOf/0/properties/dateModified/type", "type", { type: "string" }, 0);
1390
+ vErrors = pushError(vErrors, err1);
1391
+ errors++;
1392
+ }
1393
+ }
1394
+ if (data.dateDeleted !== undefined) {
1395
+ if (typeof data.dateDeleted !== "string") {
1396
+ const err2 = createError(instancePath + "/dateDeleted", "#/allOf/0/properties/dateDeleted/type", "type", { type: "string" }, 0);
1397
+ vErrors = pushError(vErrors, err2);
1398
+ errors++;
1399
+ }
1400
+ }
1401
+ }
1402
+ else {
1403
+ const err3 = createError(instancePath, "#/allOf/0/type", "type", { type: "object" }, 1);
1404
+ vErrors = pushError(vErrors, err3);
1405
+ errors++;
1406
+ }
1407
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1408
+ if (data["@context"] === undefined) {
1409
+ const err4 = createError(instancePath, "#/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
1410
+ vErrors = pushError(vErrors, err4);
1411
+ errors++;
1412
+ }
1413
+ if (data.id === undefined) {
1414
+ const err5 = createError(instancePath, "#/required", "required", { missingProperty: "id" }, "must have required property '" + "id" + "'");
1415
+ vErrors = pushError(vErrors, err5);
1416
+ errors++;
1417
+ }
1418
+ if (data.type === undefined) {
1419
+ const err6 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
1420
+ vErrors = pushError(vErrors, err6);
1421
+ errors++;
1422
+ }
1423
+ if (data["@context"] !== undefined) {
1424
+ let data3 = data["@context"];
1425
+ if (Array.isArray(data3)) {
1426
+ if (data3.length < 2) {
1427
+ const err7 = createError(instancePath + "/@context", "#/properties/%40context/minItems", "minItems", { limit: 2 }, 7);
1428
+ vErrors = pushError(vErrors, err7);
1429
+ errors++;
1430
+ }
1431
+ const len0 = data3.length;
1432
+ if (len0 > 0) {
1433
+ if ("https://schema.3sixty.global/aig/" !== data3[0]) {
1434
+ const err8 = createError(instancePath + "/@context/0", "#/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
1435
+ vErrors = pushError(vErrors, err8);
1436
+ errors++;
1437
+ }
1438
+ }
1439
+ if (len0 > 1) {
1440
+ if ("https://schema.3sixty.global/common/" !== data3[1]) {
1441
+ const err9 = createError(instancePath + "/@context/1", "#/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.3sixty.global/common/" }, 2);
1442
+ vErrors = pushError(vErrors, err9);
1443
+ errors++;
1444
+ }
1445
+ }
1446
+ const len1 = data3.length;
1447
+ var valid4 = len1 <= 2;
1448
+ if (!valid4) {
1449
+ for (let i0 = 2; i0 < len1; i0++) {
1450
+ const _errs14 = errors;
1451
+ if (!(keyword1(data3[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data3, parentDataProperty: i0, rootData, dynamicAnchors }))) {
1452
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
1453
+ errors = vErrors.length;
1454
+ }
1455
+ var valid4 = _errs14 === errors;
1456
+ }
1457
+ }
1458
+ }
1459
+ else {
1460
+ const err10 = createError(instancePath + "/@context", "#/properties/%40context/type", "type", { type: "array" }, 4);
1461
+ vErrors = pushError(vErrors, err10);
1462
+ errors++;
1463
+ }
1464
+ }
1465
+ if (data.id !== undefined) {
1466
+ if (typeof data.id !== "string") {
1467
+ const err11 = createError(instancePath + "/id", "#/properties/id/type", "type", { type: "string" }, 0);
1468
+ vErrors = pushError(vErrors, err11);
1469
+ errors++;
1470
+ }
1471
+ }
1472
+ if (data.type !== undefined) {
1473
+ if ("AuditableItemGraphVertex" !== data.type) {
1474
+ const err12 = createError(instancePath + "/type", "#/properties/type/const", "const", { allowedValue: "AuditableItemGraphVertex" }, 2);
1475
+ vErrors = pushError(vErrors, err12);
1476
+ errors++;
1477
+ }
1478
+ }
1479
+ if (data.organizationIdentity !== undefined) {
1480
+ if (typeof data.organizationIdentity !== "string") {
1481
+ const err13 = createError(instancePath + "/organizationIdentity", "#/properties/organizationIdentity/type", "type", { type: "string" }, 0);
1482
+ vErrors = pushError(vErrors, err13);
1483
+ errors++;
1484
+ }
1485
+ }
1486
+ if (data.auditMode !== undefined) {
1487
+ if (!(validate52(data.auditMode, { instancePath: instancePath + "/auditMode", parentData: data, parentDataProperty: "auditMode", rootData, dynamicAnchors }))) {
1488
+ vErrors = vErrors === null ? validate52.errors : vErrors.concat(validate52.errors);
1489
+ errors = vErrors.length;
1490
+ }
1491
+ }
1492
+ if (data.annotationObject !== undefined) {
1493
+ if (!(keyword2(data.annotationObject, { instancePath: instancePath + "/annotationObject", parentData: data, parentDataProperty: "annotationObject", rootData, dynamicAnchors }))) {
1494
+ vErrors = vErrors === null ? keyword2.errors : vErrors.concat(keyword2.errors);
1495
+ errors = vErrors.length;
1496
+ }
1497
+ }
1498
+ if (data.aliases !== undefined) {
1499
+ let data12 = data.aliases;
1500
+ if (Array.isArray(data12)) {
1501
+ const len2 = data12.length;
1502
+ for (let i1 = 0; i1 < len2; i1++) {
1503
+ if (!(validate53(data12[i1], { instancePath: instancePath + "/aliases/" + i1, parentData: data12, parentDataProperty: i1, rootData, dynamicAnchors }))) {
1504
+ vErrors = vErrors === null ? validate53.errors : vErrors.concat(validate53.errors);
1505
+ errors = vErrors.length;
1506
+ }
1507
+ }
1508
+ }
1509
+ else {
1510
+ const err14 = createError(instancePath + "/aliases", "#/properties/aliases/type", "type", { type: "array" }, 4);
1511
+ vErrors = pushError(vErrors, err14);
1512
+ errors++;
1513
+ }
1514
+ }
1515
+ if (data.resources !== undefined) {
1516
+ let data14 = data.resources;
1517
+ if (Array.isArray(data14)) {
1518
+ const len3 = data14.length;
1519
+ for (let i2 = 0; i2 < len3; i2++) {
1520
+ if (!(validate66(data14[i2], { instancePath: instancePath + "/resources/" + i2, parentData: data14, parentDataProperty: i2, rootData, dynamicAnchors }))) {
1521
+ vErrors = vErrors === null ? validate66.errors : vErrors.concat(validate66.errors);
1522
+ errors = vErrors.length;
1523
+ }
1524
+ }
1525
+ }
1526
+ else {
1527
+ const err15 = createError(instancePath + "/resources", "#/properties/resources/type", "type", { type: "array" }, 4);
1528
+ vErrors = pushError(vErrors, err15);
1529
+ errors++;
1530
+ }
1531
+ }
1532
+ if (data.edges !== undefined) {
1533
+ let data16 = data.edges;
1534
+ if (Array.isArray(data16)) {
1535
+ const len4 = data16.length;
1536
+ for (let i3 = 0; i3 < len4; i3++) {
1537
+ if (!(validate61(data16[i3], { instancePath: instancePath + "/edges/" + i3, parentData: data16, parentDataProperty: i3, rootData, dynamicAnchors }))) {
1538
+ vErrors = vErrors === null ? validate61.errors : vErrors.concat(validate61.errors);
1539
+ errors = vErrors.length;
1540
+ }
1541
+ }
1542
+ }
1543
+ else {
1544
+ const err16 = createError(instancePath + "/edges", "#/properties/edges/type", "type", { type: "array" }, 4);
1545
+ vErrors = pushError(vErrors, err16);
1546
+ errors++;
1547
+ }
1548
+ }
1549
+ if (data.verified !== undefined) {
1550
+ if (typeof data.verified !== "boolean") {
1551
+ const err17 = createError(instancePath + "/verified", "#/properties/verified/type", "type", { type: "boolean" }, 6);
1552
+ vErrors = pushError(vErrors, err17);
1553
+ errors++;
1554
+ }
1555
+ }
1556
+ if (data.version !== undefined) {
1557
+ let data19 = data.version;
1558
+ if (!((typeof data19 == "number") && (isFinite(data19)))) {
1559
+ const err18 = createError(instancePath + "/version", "#/properties/version/type", "type", { type: "number" }, 8);
1560
+ vErrors = pushError(vErrors, err18);
1561
+ errors++;
1562
+ }
1563
+ }
1564
+ }
1565
+ else {
1566
+ const err19 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
1567
+ vErrors = pushError(vErrors, err19);
1568
+ errors++;
1569
+ }
1570
+ validate74.errors = vErrors;
1571
+ return errors === 0;
1572
+ }
1573
+ validate74.evaluated = { "props": { "@context": true, "id": true, "type": true, "organizationIdentity": true, "auditMode": true, "annotationObject": true, "aliases": true, "resources": true, "edges": true, "verified": true, "version": true, "dateCreated": true, "dateModified": true, "dateDeleted": true }, "dynamicProps": false, "dynamicItems": false };
1574
+ /**
1575
+ * Compiled validator for the AuditableItemGraphVertexList schema.
1576
+ */
1577
+ export const CompiledAuditableItemGraphVertexList = validate79;
1578
+ function validate79(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
1579
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphVertexList" */ ;
1580
+ let vErrors = null;
1581
+ let errors = 0;
1582
+ const evaluated0 = validate79.evaluated;
1583
+ if (evaluated0.dynamicProps) {
1584
+ evaluated0.props = undefined;
1585
+ }
1586
+ if (evaluated0.dynamicItems) {
1587
+ evaluated0.items = undefined;
1588
+ }
1589
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1590
+ if (data["@context"] === undefined) {
1591
+ const err0 = createError(instancePath, "#/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
1592
+ vErrors = pushError(vErrors, err0);
1593
+ errors++;
1594
+ }
1595
+ if (data.type === undefined) {
1596
+ const err1 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
1597
+ vErrors = pushError(vErrors, err1);
1598
+ errors++;
1599
+ }
1600
+ if (data.itemListElement === undefined) {
1601
+ const err2 = createError(instancePath, "#/required", "required", { missingProperty: "itemListElement" }, "must have required property '" + "itemListElement" + "'");
1602
+ vErrors = pushError(vErrors, err2);
1603
+ errors++;
1604
+ }
1605
+ if (data["@context"] !== undefined) {
1606
+ let data0 = data["@context"];
1607
+ if (Array.isArray(data0)) {
1608
+ if (data0.length < 2) {
1609
+ const err3 = createError(instancePath + "/@context", "#/properties/%40context/minItems", "minItems", { limit: 2 }, 7);
1610
+ vErrors = pushError(vErrors, err3);
1611
+ errors++;
1612
+ }
1613
+ const len0 = data0.length;
1614
+ if (len0 > 0) {
1615
+ if ("https://schema.org" !== data0[0]) {
1616
+ const err4 = createError(instancePath + "/@context/0", "#/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.org" }, 2);
1617
+ vErrors = pushError(vErrors, err4);
1618
+ errors++;
1619
+ }
1620
+ }
1621
+ if (len0 > 1) {
1622
+ if ("https://schema.3sixty.global/aig/" !== data0[1]) {
1623
+ const err5 = createError(instancePath + "/@context/1", "#/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
1624
+ vErrors = pushError(vErrors, err5);
1625
+ errors++;
1626
+ }
1627
+ }
1628
+ const len1 = data0.length;
1629
+ var valid2 = len1 <= 2;
1630
+ if (!valid2) {
1631
+ for (let i0 = 2; i0 < len1; i0++) {
1632
+ const _errs5 = errors;
1633
+ if (!(keyword1(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
1634
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
1635
+ errors = vErrors.length;
1636
+ }
1637
+ var valid2 = _errs5 === errors;
1638
+ }
1639
+ }
1640
+ }
1641
+ else {
1642
+ const err6 = createError(instancePath + "/@context", "#/properties/%40context/type", "type", { type: "array" }, 4);
1643
+ vErrors = pushError(vErrors, err6);
1644
+ errors++;
1645
+ }
1646
+ }
1647
+ if (data.type !== undefined) {
1648
+ let data4 = data.type;
1649
+ if (Array.isArray(data4)) {
1650
+ if (data4.length > 2) {
1651
+ const err7 = createError(instancePath + "/type", "#/properties/type/maxItems", "maxItems", { limit: 2 }, 9);
1652
+ vErrors = pushError(vErrors, err7);
1653
+ errors++;
1654
+ }
1655
+ if (data4.length < 2) {
1656
+ const err8 = createError(instancePath + "/type", "#/properties/type/minItems", "minItems", { limit: 2 }, 7);
1657
+ vErrors = pushError(vErrors, err8);
1658
+ errors++;
1659
+ }
1660
+ const len2 = data4.length;
1661
+ if (len2 > 0) {
1662
+ if ("ItemList" !== data4[0]) {
1663
+ const err9 = createError(instancePath + "/type/0", "#/properties/type/prefixItems/0/const", "const", { allowedValue: "ItemList" }, 2);
1664
+ vErrors = pushError(vErrors, err9);
1665
+ errors++;
1666
+ }
1667
+ }
1668
+ if (len2 > 1) {
1669
+ if ("AuditableItemGraphVertexList" !== data4[1]) {
1670
+ const err10 = createError(instancePath + "/type/1", "#/properties/type/prefixItems/1/const", "const", { allowedValue: "AuditableItemGraphVertexList" }, 2);
1671
+ vErrors = pushError(vErrors, err10);
1672
+ errors++;
1673
+ }
1674
+ }
1675
+ const len3 = data4.length;
1676
+ if (!(len3 <= 2)) {
1677
+ const err11 = createError(instancePath + "/type", "#/properties/type/items", "items", { limit: 2 }, 9);
1678
+ vErrors = pushError(vErrors, err11);
1679
+ errors++;
1680
+ }
1681
+ }
1682
+ else {
1683
+ const err12 = createError(instancePath + "/type", "#/properties/type/type", "type", { type: "array" }, 4);
1684
+ vErrors = pushError(vErrors, err12);
1685
+ errors++;
1686
+ }
1687
+ }
1688
+ if (data.itemListElement !== undefined) {
1689
+ let data7 = data.itemListElement;
1690
+ if (Array.isArray(data7)) {
1691
+ const len4 = data7.length;
1692
+ for (let i1 = 0; i1 < len4; i1++) {
1693
+ if (!(validate74(data7[i1], { instancePath: instancePath + "/itemListElement/" + i1, parentData: data7, parentDataProperty: i1, rootData, dynamicAnchors }))) {
1694
+ vErrors = vErrors === null ? validate74.errors : vErrors.concat(validate74.errors);
1695
+ errors = vErrors.length;
1696
+ }
1697
+ }
1698
+ }
1699
+ else {
1700
+ const err13 = createError(instancePath + "/itemListElement", "#/properties/itemListElement/type", "type", { type: "array" }, 4);
1701
+ vErrors = pushError(vErrors, err13);
1702
+ errors++;
1703
+ }
1704
+ }
1705
+ }
1706
+ else {
1707
+ const err14 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
1708
+ vErrors = pushError(vErrors, err14);
1709
+ errors++;
1710
+ }
1711
+ validate79.errors = vErrors;
1712
+ return errors === 0;
1713
+ }
1714
+ validate79.evaluated = { "props": { "@context": true, "type": true, "itemListElement": true }, "dynamicProps": false, "dynamicItems": false };
1715
+ /**
1716
+ * Compiled validator for the AuditableItemGraphVertexVersionList schema.
1717
+ */
1718
+ export const CompiledAuditableItemGraphVertexVersionList = validate81;
1719
+ function validate81(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
1720
+ /*# sourceURL="https://schema.3sixty.global/aig/AuditableItemGraphVertexVersionList" */ ;
1721
+ let vErrors = null;
1722
+ let errors = 0;
1723
+ const evaluated0 = validate81.evaluated;
1724
+ if (evaluated0.dynamicProps) {
1725
+ evaluated0.props = undefined;
1726
+ }
1727
+ if (evaluated0.dynamicItems) {
1728
+ evaluated0.items = undefined;
1729
+ }
1730
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1731
+ if (data["@context"] === undefined) {
1732
+ const err0 = createError(instancePath, "#/required", "required", { missingProperty: "@context" }, "must have required property '" + "@context" + "'");
1733
+ vErrors = pushError(vErrors, err0);
1734
+ errors++;
1735
+ }
1736
+ if (data.type === undefined) {
1737
+ const err1 = createError(instancePath, "#/required", "required", { missingProperty: "type" }, "must have required property '" + "type" + "'");
1738
+ vErrors = pushError(vErrors, err1);
1739
+ errors++;
1740
+ }
1741
+ if (data.itemListElement === undefined) {
1742
+ const err2 = createError(instancePath, "#/required", "required", { missingProperty: "itemListElement" }, "must have required property '" + "itemListElement" + "'");
1743
+ vErrors = pushError(vErrors, err2);
1744
+ errors++;
1745
+ }
1746
+ if (data["@context"] !== undefined) {
1747
+ let data0 = data["@context"];
1748
+ if (Array.isArray(data0)) {
1749
+ if (data0.length < 2) {
1750
+ const err3 = createError(instancePath + "/@context", "#/properties/%40context/minItems", "minItems", { limit: 2 }, 7);
1751
+ vErrors = pushError(vErrors, err3);
1752
+ errors++;
1753
+ }
1754
+ const len0 = data0.length;
1755
+ if (len0 > 0) {
1756
+ if ("https://schema.org" !== data0[0]) {
1757
+ const err4 = createError(instancePath + "/@context/0", "#/properties/%40context/prefixItems/0/const", "const", { allowedValue: "https://schema.org" }, 2);
1758
+ vErrors = pushError(vErrors, err4);
1759
+ errors++;
1760
+ }
1761
+ }
1762
+ if (len0 > 1) {
1763
+ if ("https://schema.3sixty.global/aig/" !== data0[1]) {
1764
+ const err5 = createError(instancePath + "/@context/1", "#/properties/%40context/prefixItems/1/const", "const", { allowedValue: "https://schema.3sixty.global/aig/" }, 2);
1765
+ vErrors = pushError(vErrors, err5);
1766
+ errors++;
1767
+ }
1768
+ }
1769
+ const len1 = data0.length;
1770
+ var valid2 = len1 <= 2;
1771
+ if (!valid2) {
1772
+ for (let i0 = 2; i0 < len1; i0++) {
1773
+ const _errs5 = errors;
1774
+ if (!(keyword1(data0[i0], { instancePath: instancePath + "/@context/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
1775
+ vErrors = vErrors === null ? keyword1.errors : vErrors.concat(keyword1.errors);
1776
+ errors = vErrors.length;
1777
+ }
1778
+ var valid2 = _errs5 === errors;
1779
+ }
1780
+ }
1781
+ }
1782
+ else {
1783
+ const err6 = createError(instancePath + "/@context", "#/properties/%40context/type", "type", { type: "array" }, 4);
1784
+ vErrors = pushError(vErrors, err6);
1785
+ errors++;
1786
+ }
1787
+ }
1788
+ if (data.type !== undefined) {
1789
+ let data4 = data.type;
1790
+ if (Array.isArray(data4)) {
1791
+ if (data4.length > 2) {
1792
+ const err7 = createError(instancePath + "/type", "#/properties/type/maxItems", "maxItems", { limit: 2 }, 9);
1793
+ vErrors = pushError(vErrors, err7);
1794
+ errors++;
1795
+ }
1796
+ if (data4.length < 2) {
1797
+ const err8 = createError(instancePath + "/type", "#/properties/type/minItems", "minItems", { limit: 2 }, 7);
1798
+ vErrors = pushError(vErrors, err8);
1799
+ errors++;
1800
+ }
1801
+ const len2 = data4.length;
1802
+ if (len2 > 0) {
1803
+ if ("ItemList" !== data4[0]) {
1804
+ const err9 = createError(instancePath + "/type/0", "#/properties/type/prefixItems/0/const", "const", { allowedValue: "ItemList" }, 2);
1805
+ vErrors = pushError(vErrors, err9);
1806
+ errors++;
1807
+ }
1808
+ }
1809
+ if (len2 > 1) {
1810
+ if ("AuditableItemGraphVertexVersionList" !== data4[1]) {
1811
+ const err10 = createError(instancePath + "/type/1", "#/properties/type/prefixItems/1/const", "const", { allowedValue: "AuditableItemGraphVertexVersionList" }, 2);
1812
+ vErrors = pushError(vErrors, err10);
1813
+ errors++;
1814
+ }
1815
+ }
1816
+ const len3 = data4.length;
1817
+ if (!(len3 <= 2)) {
1818
+ const err11 = createError(instancePath + "/type", "#/properties/type/items", "items", { limit: 2 }, 9);
1819
+ vErrors = pushError(vErrors, err11);
1820
+ errors++;
1821
+ }
1822
+ }
1823
+ else {
1824
+ const err12 = createError(instancePath + "/type", "#/properties/type/type", "type", { type: "array" }, 4);
1825
+ vErrors = pushError(vErrors, err12);
1826
+ errors++;
1827
+ }
1828
+ }
1829
+ if (data.itemListElement !== undefined) {
1830
+ let data7 = data.itemListElement;
1831
+ if (Array.isArray(data7)) {
1832
+ const len4 = data7.length;
1833
+ for (let i1 = 0; i1 < len4; i1++) {
1834
+ let data8 = data7[i1];
1835
+ if (data8 && typeof data8 == "object" && !Array.isArray(data8)) {
1836
+ if (data8.version === undefined) {
1837
+ const err13 = createError(instancePath + "/itemListElement/" + i1, "#/properties/itemListElement/items/required", "required", { missingProperty: "version" }, "must have required property '" + "version" + "'");
1838
+ vErrors = pushError(vErrors, err13);
1839
+ errors++;
1840
+ }
1841
+ if (data8.dateCreated === undefined) {
1842
+ const err14 = createError(instancePath + "/itemListElement/" + i1, "#/properties/itemListElement/items/required", "required", { missingProperty: "dateCreated" }, "must have required property '" + "dateCreated" + "'");
1843
+ vErrors = pushError(vErrors, err14);
1844
+ errors++;
1845
+ }
1846
+ if (data8.version !== undefined) {
1847
+ let data9 = data8.version;
1848
+ if (!((typeof data9 == "number") && (isFinite(data9)))) {
1849
+ const err15 = createError(instancePath + "/itemListElement/" + i1 + "/version", "#/properties/itemListElement/items/properties/version/type", "type", { type: "number" }, 8);
1850
+ vErrors = pushError(vErrors, err15);
1851
+ errors++;
1852
+ }
1853
+ }
1854
+ if (data8.dateCreated !== undefined) {
1855
+ if (typeof data8.dateCreated !== "string") {
1856
+ const err16 = createError(instancePath + "/itemListElement/" + i1 + "/dateCreated", "#/properties/itemListElement/items/properties/dateCreated/type", "type", { type: "string" }, 0);
1857
+ vErrors = pushError(vErrors, err16);
1858
+ errors++;
1859
+ }
1860
+ }
1861
+ }
1862
+ else {
1863
+ const err17 = createError(instancePath + "/itemListElement/" + i1, "#/properties/itemListElement/items/type", "type", { type: "object" }, 1);
1864
+ vErrors = pushError(vErrors, err17);
1865
+ errors++;
1866
+ }
1867
+ }
1868
+ }
1869
+ else {
1870
+ const err18 = createError(instancePath + "/itemListElement", "#/properties/itemListElement/type", "type", { type: "array" }, 4);
1871
+ vErrors = pushError(vErrors, err18);
1872
+ errors++;
1873
+ }
1874
+ }
1875
+ }
1876
+ else {
1877
+ const err19 = createError(instancePath, "#/type", "type", { type: "object" }, 1);
1878
+ vErrors = pushError(vErrors, err19);
1879
+ errors++;
1880
+ }
1881
+ validate81.errors = vErrors;
1882
+ return errors === 0;
1883
+ }
1884
+ validate81.evaluated = { "props": { "@context": true, "type": true, "itemListElement": true }, "dynamicProps": false, "dynamicItems": false };
1885
+ //# sourceMappingURL=validators.js.map