@ndla/types-taxonomy 1.0.2 → 1.0.3

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.
@@ -1,3 +1,78 @@
1
+ export interface NodeCommand {
2
+ nodeId?: string;
3
+ /**
4
+ * Type of node. Values are subject, topic. Required on create.
5
+ */
6
+ nodeType: NodeType;
7
+ /**
8
+ * ID of content introducing this node. Must be a valid URI, but preferably not a URL.
9
+ */
10
+ contentUri: string;
11
+ /**
12
+ * The name of the node. Required on create.
13
+ */
14
+ name: string;
15
+ /**
16
+ * The node is a root node. Default is false. Only used if present.
17
+ */
18
+ root: boolean;
19
+ }
20
+ export interface ResourceCommand {
21
+ /**
22
+ * If specified, set the id to this value. Must start with urn:resource: and be a valid URI. If omitted, an id will be assigned automatically.
23
+ */
24
+ id: string;
25
+ /**
26
+ * The ID of this resource in the system where the content is stored. This ID should be of the form 'urn:<system>:<id>', where <system> is a short identifier for the system, and <id> is the id of this content in that system.
27
+ */
28
+ contentUri: string;
29
+ /**
30
+ * The name of the resource
31
+ */
32
+ name: string;
33
+ }
34
+ export interface SubjectCommand {
35
+ /**
36
+ * If specified, set the id to this value. Must start with urn:subject: and be a valid URI. If ommitted, an id will be assigned automatically.
37
+ */
38
+ id: string;
39
+ /**
40
+ * ID of article introducing this subject. Must be a valid URI, but preferably not a URL.
41
+ */
42
+ contentUri: string;
43
+ /**
44
+ * The name of the subject
45
+ */
46
+ name: string;
47
+ }
48
+ export interface TopicCommand {
49
+ /**
50
+ * If specified, set the id to this value. Must start with urn:topic: and be a valid URI. If omitted, an id will be assigned automatically.
51
+ */
52
+ id: string;
53
+ /**
54
+ * ID of article introducing this topic. Must be a valid URI, but preferably not a URL.
55
+ */
56
+ contentUri: string;
57
+ /**
58
+ * The name of the topic
59
+ */
60
+ name: string;
61
+ }
62
+ export interface VersionCommand {
63
+ /**
64
+ * If specified, set the id to this value. Must start with urn:subject: and be a valid URI. If ommitted, an id will be assigned automatically.
65
+ */
66
+ id: string;
67
+ /**
68
+ * If specified, set the name to this value.
69
+ */
70
+ name: string;
71
+ /**
72
+ * If specified, set the locked property to this value.
73
+ */
74
+ locked: boolean;
75
+ }
1
76
  export interface Context {
2
77
  id: string;
3
78
  path: string;
package/package.json CHANGED
@@ -17,5 +17,5 @@
17
17
  "devDependencies": {
18
18
  "typescript": "^5.0.2"
19
19
  },
20
- "version": "1.0.2"
20
+ "version": "1.0.3"
21
21
  }
package/taxonomy-api.ts CHANGED
@@ -1,4 +1,84 @@
1
1
 
2
+ export interface NodeCommand {
3
+ nodeId?: string;
4
+ /**
5
+ * Type of node. Values are subject, topic. Required on create.
6
+ */
7
+ nodeType: NodeType;
8
+ /**
9
+ * ID of content introducing this node. Must be a valid URI, but preferably not a URL.
10
+ */
11
+ contentUri: string;
12
+ /**
13
+ * The name of the node. Required on create.
14
+ */
15
+ name: string;
16
+ /**
17
+ * The node is a root node. Default is false. Only used if present.
18
+ */
19
+ root: boolean;
20
+ }
21
+
22
+ export interface ResourceCommand {
23
+ /**
24
+ * If specified, set the id to this value. Must start with urn:resource: and be a valid URI. If omitted, an id will be assigned automatically.
25
+ */
26
+ id: string;
27
+ /**
28
+ * The ID of this resource in the system where the content is stored. This ID should be of the form 'urn:<system>:<id>', where <system> is a short identifier for the system, and <id> is the id of this content in that system.
29
+ */
30
+ contentUri: string;
31
+ /**
32
+ * The name of the resource
33
+ */
34
+ name: string;
35
+ }
36
+
37
+ export interface SubjectCommand {
38
+ /**
39
+ * If specified, set the id to this value. Must start with urn:subject: and be a valid URI. If ommitted, an id will be assigned automatically.
40
+ */
41
+ id: string;
42
+ /**
43
+ * ID of article introducing this subject. Must be a valid URI, but preferably not a URL.
44
+ */
45
+ contentUri: string;
46
+ /**
47
+ * The name of the subject
48
+ */
49
+ name: string;
50
+ }
51
+
52
+ export interface TopicCommand {
53
+ /**
54
+ * If specified, set the id to this value. Must start with urn:topic: and be a valid URI. If omitted, an id will be assigned automatically.
55
+ */
56
+ id: string;
57
+ /**
58
+ * ID of article introducing this topic. Must be a valid URI, but preferably not a URL.
59
+ */
60
+ contentUri: string;
61
+ /**
62
+ * The name of the topic
63
+ */
64
+ name: string;
65
+ }
66
+
67
+ export interface VersionCommand {
68
+ /**
69
+ * If specified, set the id to this value. Must start with urn:subject: and be a valid URI. If ommitted, an id will be assigned automatically.
70
+ */
71
+ id: string;
72
+ /**
73
+ * If specified, set the name to this value.
74
+ */
75
+ name: string;
76
+ /**
77
+ * If specified, set the locked property to this value.
78
+ */
79
+ locked: boolean;
80
+ }
81
+
2
82
  export interface Context {
3
83
  id: string;
4
84
  path: string;