@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,45 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@3sixty/data-json-ld";
2
+ import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js";
3
+ import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
4
+ import type { IAuditableItemGraphAlias } from "./IAuditableItemGraphAlias.js";
5
+ import type { IAuditableItemGraphEdge } from "./IAuditableItemGraphEdge.js";
6
+ import type { IAuditableItemGraphListPatch } from "./IAuditableItemGraphListPatch.js";
7
+ import type { IAuditableItemGraphResource } from "./IAuditableItemGraphResource.js";
8
+ import type { IAuditableItemGraphVertex } from "./IAuditableItemGraphVertex.js";
9
+ /**
10
+ * Partial vertex payload for updatePartial.
11
+ * Sub-lists use explicit `{ add, remove }` patches; bare arrays are not supported.
12
+ */
13
+ export interface IAuditableItemGraphPartialVertex extends Omit<IAuditableItemGraphVertex, "type" | "aliases" | "edges" | "resources"> {
14
+ /**
15
+ * The id of the vertex to update.
16
+ */
17
+ id: string;
18
+ /**
19
+ * JSON-LD Context.
20
+ */
21
+ "@context": [
22
+ typeof AuditableItemGraphContexts.Context,
23
+ typeof AuditableItemGraphContexts.ContextCommon,
24
+ ...IJsonLdContextDefinitionElement[]
25
+ ];
26
+ /**
27
+ * JSON-LD Type.
28
+ */
29
+ type?: typeof AuditableItemGraphTypes.Vertex;
30
+ /**
31
+ * Patch operations for aliases.
32
+ * @json-ld id
33
+ */
34
+ aliasPatches?: IAuditableItemGraphListPatch<IAuditableItemGraphAlias>;
35
+ /**
36
+ * Patch operations for resources.
37
+ * @json-ld id
38
+ */
39
+ resourcePatches?: IAuditableItemGraphListPatch<IAuditableItemGraphResource>;
40
+ /**
41
+ * Patch operations for edges.
42
+ * @json-ld id
43
+ */
44
+ edgePatches?: IAuditableItemGraphListPatch<IAuditableItemGraphEdge>;
45
+ }
@@ -0,0 +1,36 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@3sixty/data-json-ld";
2
+ import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js";
3
+ import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
4
+ /**
5
+ * The patch operation for JSON diffs.
6
+ */
7
+ export interface IAuditableItemGraphPatchOperation {
8
+ /**
9
+ * JSON-LD Context.
10
+ */
11
+ "@context"?: typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
12
+ /**
13
+ * JSON-LD Type.
14
+ */
15
+ type: typeof AuditableItemGraphTypes.PatchOperation;
16
+ /**
17
+ * The operation that was performed on the item.
18
+ * @json-ld type:sch:Text
19
+ */
20
+ patchOperation: "add" | "remove" | "replace" | "move" | "copy" | "test";
21
+ /**
22
+ * The path to the object that was changed.
23
+ * @json-ld type:sch:Text
24
+ */
25
+ patchPath: string;
26
+ /**
27
+ * The path the value was copied or moved from.
28
+ * @json-ld type:sch:Text
29
+ */
30
+ patchFrom?: string;
31
+ /**
32
+ * The value to add.
33
+ * @json-ld type:json
34
+ */
35
+ patchValue?: unknown;
36
+ }
@@ -0,0 +1,22 @@
1
+ import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@3sixty/data-json-ld";
2
+ import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js";
3
+ import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
4
+ import type { IAuditableItemGraphAuditedElement } from "./IAuditableItemGraphAuditedElement.js";
5
+ /**
6
+ * Interface describing an auditable item graph vertex resource.
7
+ */
8
+ export interface IAuditableItemGraphResource extends IAuditableItemGraphAuditedElement {
9
+ /**
10
+ * JSON-LD Context.
11
+ */
12
+ "@context"?: typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
13
+ /**
14
+ * JSON-LD Type.
15
+ */
16
+ type: typeof AuditableItemGraphTypes.Resource;
17
+ /**
18
+ * The JSON-LD object for the resource.
19
+ * @json-ld type:json
20
+ */
21
+ resourceObject?: IJsonLdNodeObject;
22
+ }
@@ -0,0 +1,73 @@
1
+ import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@3sixty/data-json-ld";
2
+ import type { AuditableItemGraphAuditMode } from "./auditableItemGraphAuditMode.js";
3
+ import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js";
4
+ import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
5
+ import type { IAuditableItemGraphAlias } from "./IAuditableItemGraphAlias.js";
6
+ import type { IAuditableItemGraphAuditedElement } from "./IAuditableItemGraphAuditedElement.js";
7
+ import type { IAuditableItemGraphEdge } from "./IAuditableItemGraphEdge.js";
8
+ import type { IAuditableItemGraphResource } from "./IAuditableItemGraphResource.js";
9
+ /**
10
+ * Interface describing an auditable item graph vertex.
11
+ */
12
+ export interface IAuditableItemGraphVertex extends Omit<IAuditableItemGraphAuditedElement, "deleted"> {
13
+ /**
14
+ * JSON-LD Context.
15
+ */
16
+ "@context": [
17
+ typeof AuditableItemGraphContexts.Context,
18
+ typeof AuditableItemGraphContexts.ContextCommon,
19
+ ...IJsonLdContextDefinitionElement[]
20
+ ];
21
+ /**
22
+ * The id of the element.
23
+ */
24
+ id: string;
25
+ /**
26
+ * JSON-LD Type.
27
+ */
28
+ type: typeof AuditableItemGraphTypes.Vertex;
29
+ /**
30
+ * The identity of the organization which controls the vertex.
31
+ * @json-ld namespace:twin-common
32
+ */
33
+ organizationIdentity?: string;
34
+ /**
35
+ * How the mutations of the vertex are recorded, when absent the vertex behaves as audited.
36
+ * Once a vertex is set to bypass it can not be returned to audited.
37
+ * @json-ld type:sch:Text
38
+ */
39
+ auditMode?: AuditableItemGraphAuditMode;
40
+ /**
41
+ * The JSON-LD annotation object for the vertex.
42
+ * @json-ld namespace:twin-common
43
+ */
44
+ annotationObject?: IJsonLdNodeObject;
45
+ /**
46
+ * Alternative aliases that can be used to identify the vertex.
47
+ * @json-ld container:set
48
+ */
49
+ aliases?: IAuditableItemGraphAlias[];
50
+ /**
51
+ * The resources attached to the vertex.
52
+ * @json-ld container:set
53
+ */
54
+ resources?: IAuditableItemGraphResource[];
55
+ /**
56
+ * Edges connected to the vertex.
57
+ * @json-ld container:set
58
+ */
59
+ edges?: IAuditableItemGraphEdge[];
60
+ /**
61
+ * Is the vertex verified, will only be populated when verification is requested.
62
+ * Always undefined when the vertex is in bypass mode.
63
+ * @json-ld namespace:twin-common
64
+ */
65
+ verified?: boolean;
66
+ /**
67
+ * The version of the vertex, populated only when getting a specific version.
68
+ * Always undefined when the vertex is in bypass mode.
69
+ * Maps to https://schema.org/version.
70
+ * @json-ld namespace:sch
71
+ */
72
+ version?: number;
73
+ }
@@ -0,0 +1,27 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@3sixty/data-json-ld";
2
+ import type { SchemaOrgContexts, SchemaOrgTypes } from "@3sixty/standards-schema-org";
3
+ import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js";
4
+ import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
5
+ import type { IAuditableItemGraphVertex } from "./IAuditableItemGraphVertex.js";
6
+ /**
7
+ * Interface describing an auditable item graph vertex list.
8
+ */
9
+ export interface IAuditableItemGraphVertexList {
10
+ /**
11
+ * JSON-LD Context.
12
+ */
13
+ "@context": [
14
+ typeof SchemaOrgContexts.Context,
15
+ typeof AuditableItemGraphContexts.Context,
16
+ ...IJsonLdContextDefinitionElement[]
17
+ ];
18
+ /**
19
+ * JSON-LD Type.
20
+ */
21
+ type: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexList];
22
+ /**
23
+ * The list of vertices.
24
+ * @json-ld namespace:sch
25
+ */
26
+ [SchemaOrgTypes.ItemListElement]: IAuditableItemGraphVertex[];
27
+ }
@@ -0,0 +1,29 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@3sixty/data-json-ld";
2
+ import type { SchemaOrgContexts, SchemaOrgTypes } from "@3sixty/standards-schema-org";
3
+ import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js";
4
+ import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
5
+ /**
6
+ * Interface describing a list of auditable item graph vertex version numbers.
7
+ */
8
+ export interface IAuditableItemGraphVertexVersionList {
9
+ /**
10
+ * JSON-LD Context.
11
+ */
12
+ "@context": [
13
+ typeof SchemaOrgContexts.Context,
14
+ typeof AuditableItemGraphContexts.Context,
15
+ ...IJsonLdContextDefinitionElement[]
16
+ ];
17
+ /**
18
+ * JSON-LD Type.
19
+ */
20
+ type: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexVersionList];
21
+ /**
22
+ * The list of versions.
23
+ * @json-ld namespace:sch
24
+ */
25
+ [SchemaOrgTypes.ItemListElement]: {
26
+ version: number;
27
+ dateCreated: string;
28
+ }[];
29
+ }
@@ -0,0 +1,35 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { VerifyDepth } from "../verifyDepth.js";
3
+ /**
4
+ * Get an auditable item graph vertex changeset.
5
+ */
6
+ export interface IAuditableItemGraphChangesetGetRequest {
7
+ /**
8
+ * The headers which can be used to determine the response data type.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ };
13
+ /**
14
+ * The parameters from the path.
15
+ */
16
+ pathParams: {
17
+ /**
18
+ * The id of the vertex to get the changeset from.
19
+ */
20
+ id: string;
21
+ /**
22
+ * The id of the changeset to get.
23
+ */
24
+ changesetId: string;
25
+ };
26
+ /**
27
+ * The query parameters.
28
+ */
29
+ query?: {
30
+ /**
31
+ * How many signatures to verify, none, current or all, defaults to "none".
32
+ */
33
+ verifySignatureDepth?: VerifyDepth;
34
+ };
35
+ }
@@ -0,0 +1,17 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { IAuditableItemGraphChangeset } from "../IAuditableItemGraphChangeset.js";
3
+ /**
4
+ * Response to getting an auditable item graph vertex changeset.
5
+ */
6
+ export interface IAuditableItemGraphChangesetGetResponse {
7
+ /**
8
+ * The headers which can be used to determine the response data type.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ };
13
+ /**
14
+ * The response body.
15
+ */
16
+ body: IAuditableItemGraphChangeset;
17
+ }
@@ -0,0 +1,39 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { VerifyDepth } from "../verifyDepth.js";
3
+ /**
4
+ * Get an auditable item graph changeset.
5
+ */
6
+ export interface IAuditableItemGraphChangesetListRequest {
7
+ /**
8
+ * The headers which can be used to determine the response data type.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ };
13
+ /**
14
+ * The parameters from the path.
15
+ */
16
+ pathParams: {
17
+ /**
18
+ * The id of the changeset to get.
19
+ */
20
+ id: string;
21
+ };
22
+ /**
23
+ * The query parameters.
24
+ */
25
+ query?: {
26
+ /**
27
+ * The optional cursor to get next chunk.
28
+ */
29
+ cursor?: string;
30
+ /**
31
+ * Limit the number of entities to return.
32
+ */
33
+ limit?: string;
34
+ /**
35
+ * How many signatures to verify, none, current or all, defaults to "none".
36
+ */
37
+ verifySignatureDepth?: VerifyDepth;
38
+ };
39
+ }
@@ -0,0 +1,18 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { IAuditableItemGraphChangesetList } from "../IAuditableItemGraphChangesetList.js";
3
+ /**
4
+ * Response to getting an auditable item graph changeset list.
5
+ */
6
+ export interface IAuditableItemGraphChangesetListResponse {
7
+ /**
8
+ * The headers which can be used to determine the response data type.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ [HeaderTypes.Link]?: string | string[];
13
+ };
14
+ /**
15
+ * The response body.
16
+ */
17
+ body: IAuditableItemGraphChangesetList;
18
+ }
@@ -0,0 +1,10 @@
1
+ import type { IAuditableItemGraphVertex } from "../IAuditableItemGraphVertex.js";
2
+ /**
3
+ * Create an auditable item graph vertex.
4
+ */
5
+ export interface IAuditableItemGraphCreateRequest {
6
+ /**
7
+ * The data to be used in the vertex.
8
+ */
9
+ body: Omit<IAuditableItemGraphVertex, "id">;
10
+ }
@@ -0,0 +1,35 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { VerifyDepth } from "../verifyDepth.js";
3
+ /**
4
+ * Get an auditable item graph vertex.
5
+ */
6
+ export interface IAuditableItemGraphGetRequest {
7
+ /**
8
+ * The headers which can be used to determine the response data type.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ };
13
+ /**
14
+ * The parameters from the path.
15
+ */
16
+ pathParams: {
17
+ /**
18
+ * The id of the vertex to get.
19
+ */
20
+ id: string;
21
+ };
22
+ /**
23
+ * The query parameters.
24
+ */
25
+ query?: {
26
+ /**
27
+ * Whether to include deleted aliases, resource, edges, defaults to false.
28
+ */
29
+ includeDeleted?: string;
30
+ /**
31
+ * How many signatures to verify, none, current or all, defaults to "none".
32
+ */
33
+ verifySignatureDepth?: VerifyDepth;
34
+ };
35
+ }
@@ -0,0 +1,17 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { IAuditableItemGraphVertex } from "../IAuditableItemGraphVertex.js";
3
+ /**
4
+ * Response to getting an auditable item graph vertex.
5
+ */
6
+ export interface IAuditableItemGraphGetResponse {
7
+ /**
8
+ * The headers which can be used to determine the response data type.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ };
13
+ /**
14
+ * The response body.
15
+ */
16
+ body: IAuditableItemGraphVertex;
17
+ }
@@ -0,0 +1,60 @@
1
+ import type { SortDirection } from "@3sixty/entity";
2
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
3
+ import type { IAuditableItemGraphVertex } from "../IAuditableItemGraphVertex.js";
4
+ /**
5
+ * Get the a list of the vertices with matching ids or aliases.
6
+ */
7
+ export interface IAuditableItemGraphListRequest {
8
+ /**
9
+ * The headers which can be used to determine the response data type.
10
+ */
11
+ headers?: {
12
+ [HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
13
+ };
14
+ /**
15
+ * The query parameters.
16
+ */
17
+ query?: {
18
+ /**
19
+ * The id or alias to try and find.
20
+ */
21
+ id?: string;
22
+ /**
23
+ * Which field to look in with the id, defaults to both.
24
+ */
25
+ idMode?: "id" | "alias" | "both";
26
+ /**
27
+ * Find only exact matches, default to false meaning partial matching.
28
+ */
29
+ idExact?: string;
30
+ /**
31
+ * Include vertices with specific resource types, comma separated.
32
+ */
33
+ resourceTypes?: string;
34
+ /**
35
+ * The conditions to filter the streams, JSON stringified `EntityCondition<IAuditableItemGraphVertex>`.
36
+ */
37
+ conditions?: string;
38
+ /**
39
+ * The order for the results, default to dateCreated.
40
+ */
41
+ orderBy?: keyof Pick<IAuditableItemGraphVertex, "dateCreated" | "dateModified">;
42
+ /**
43
+ * The direction for the order, defaults to desc.
44
+ */
45
+ orderByDirection?: SortDirection;
46
+ /**
47
+ * The properties to return as a comma separated list, defaults to "id,dateCreated,aliases,annotationObject".
48
+ */
49
+ properties?: string;
50
+ /**
51
+ * The optional cursor to get next chunk.
52
+ */
53
+ cursor?: string;
54
+ /**
55
+ * The maximum number of entities to return, a page can contain fewer so follow the cursor
56
+ * until it is absent to read them all.
57
+ */
58
+ limit?: string;
59
+ };
60
+ }
@@ -0,0 +1,18 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { IAuditableItemGraphVertexList } from "../IAuditableItemGraphVertexList.js";
3
+ /**
4
+ * The response to getting the a list of the vertices with matching ids or aliases.
5
+ */
6
+ export interface IAuditableItemGraphListResponse {
7
+ /**
8
+ * The headers which can be used to determine the response data type.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ [HeaderTypes.Link]?: string | string[];
13
+ };
14
+ /**
15
+ * The response payload.
16
+ */
17
+ body: IAuditableItemGraphVertexList;
18
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Remove the notarization proof from all changesets of a graph vertex.
3
+ */
4
+ export interface IAuditableItemGraphRemoveProofRequest {
5
+ /**
6
+ * The parameters from the path.
7
+ */
8
+ pathParams: {
9
+ /**
10
+ * The id of the vertex whose proof should be removed.
11
+ */
12
+ id: string;
13
+ };
14
+ }
@@ -0,0 +1,20 @@
1
+ import type { IAuditableItemGraphPartialVertex } from "../IAuditableItemGraphPartialVertex.js";
2
+ /**
3
+ * Partially update an auditable item graph vertex (PATCH - explicit list patches).
4
+ */
5
+ export interface IAuditableItemGraphUpdatePartialRequest {
6
+ /**
7
+ * The path parameters.
8
+ */
9
+ pathParams: {
10
+ /**
11
+ * The id of the vertex to update.
12
+ */
13
+ id: string;
14
+ };
15
+ /**
16
+ * Partial vertex data; only defined properties are applied.
17
+ * Sub-lists use `{ add, remove }` patch objects.
18
+ */
19
+ body: Omit<IAuditableItemGraphPartialVertex, "id">;
20
+ }
@@ -0,0 +1,19 @@
1
+ import type { IAuditableItemGraphVertex } from "../IAuditableItemGraphVertex.js";
2
+ /**
3
+ * Update an auditable item graph vertex (PUT - full replacement of vertex state).
4
+ */
5
+ export interface IAuditableItemGraphUpdateRequest {
6
+ /**
7
+ * The path parameters.
8
+ */
9
+ pathParams: {
10
+ /**
11
+ * The id of the vertex to update.
12
+ */
13
+ id: string;
14
+ };
15
+ /**
16
+ * The full vertex payload. Replaces annotation and active sub-lists; omitted collections are cleared.
17
+ */
18
+ body: Omit<IAuditableItemGraphVertex, "id">;
19
+ }
@@ -0,0 +1,25 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ /**
3
+ * Get an auditable item graph vertex at a specific version.
4
+ */
5
+ export interface IAuditableItemGraphVersionGetRequest {
6
+ /**
7
+ * The headers which can be used to determine the response data type.
8
+ */
9
+ headers?: {
10
+ [HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
11
+ };
12
+ /**
13
+ * The parameters from the path.
14
+ */
15
+ pathParams: {
16
+ /**
17
+ * The id of the vertex.
18
+ */
19
+ id: string;
20
+ /**
21
+ * The version number to get.
22
+ */
23
+ version: string;
24
+ };
25
+ }
@@ -0,0 +1,17 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { IAuditableItemGraphVertex } from "../IAuditableItemGraphVertex.js";
3
+ /**
4
+ * Response to getting an auditable item graph vertex at a specific version.
5
+ */
6
+ export interface IAuditableItemGraphVersionGetResponse {
7
+ /**
8
+ * The headers.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ };
13
+ /**
14
+ * The response body.
15
+ */
16
+ body: IAuditableItemGraphVertex;
17
+ }
@@ -0,0 +1,34 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ /**
3
+ * Get all versions of an auditable item graph vertex.
4
+ */
5
+ export interface IAuditableItemGraphVersionListRequest {
6
+ /**
7
+ * The headers which can be used to determine the response data type.
8
+ */
9
+ headers?: {
10
+ [HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
11
+ };
12
+ /**
13
+ * The parameters from the path.
14
+ */
15
+ pathParams: {
16
+ /**
17
+ * The id of the vertex.
18
+ */
19
+ id: string;
20
+ };
21
+ /**
22
+ * The query parameters.
23
+ */
24
+ query?: {
25
+ /**
26
+ * Only return versions created after this ISO 8601 timestamp (exclusive).
27
+ */
28
+ after?: string;
29
+ /**
30
+ * Only return versions created before this ISO 8601 timestamp (exclusive).
31
+ */
32
+ before?: string;
33
+ };
34
+ }
@@ -0,0 +1,17 @@
1
+ import type { HeaderTypes, MimeTypes } from "@3sixty/web";
2
+ import type { IAuditableItemGraphVertexVersionList } from "../IAuditableItemGraphVertexVersionList.js";
3
+ /**
4
+ * Response to getting all versions of an auditable item graph vertex.
5
+ */
6
+ export interface IAuditableItemGraphVersionListResponse {
7
+ /**
8
+ * The headers.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
12
+ };
13
+ /**
14
+ * The response body.
15
+ */
16
+ body: IAuditableItemGraphVertexVersionList;
17
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * How the mutations of a vertex are recorded.
3
+ */
4
+ export declare const AuditableItemGraphAuditMode: {
5
+ /**
6
+ * Every mutation appends a new version entry and maintains a full audit trail.
7
+ */
8
+ readonly Audited: "audited";
9
+ /**
10
+ * Mutations overwrite the stored state in place, with no version chain or audit entries.
11
+ */
12
+ readonly Bypass: "bypass";
13
+ };
14
+ /**
15
+ * How the mutations of a vertex are recorded.
16
+ */
17
+ export type AuditableItemGraphAuditMode = (typeof AuditableItemGraphAuditMode)[keyof typeof AuditableItemGraphAuditMode];