@ndla/types-taxonomy 1.0.2 → 1.0.4

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 NodePostPut {
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 ResourcePostPut {
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 SubjectPostPut {
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 TopicPostPut {
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 VersionPostPut {
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;
@@ -511,8 +586,8 @@ export interface TaxonomyContext {
511
586
  contextId: string;
512
587
  id: string;
513
588
  subject: Record<string, string>;
514
- subjectId: string;
515
589
  parentTopicIds: string[];
590
+ subjectId: string;
516
591
  isPrimaryConnection: boolean;
517
592
  }
518
593
  export interface Connection {
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.4"
21
21
  }
package/taxonomy-api.ts CHANGED
@@ -1,4 +1,84 @@
1
1
 
2
+ export interface NodePostPut {
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 ResourcePostPut {
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 SubjectPostPut {
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 TopicPostPut {
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 VersionPostPut {
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;
@@ -539,8 +619,8 @@ export interface TaxonomyContext {
539
619
  contextId: string;
540
620
  id: string;
541
621
  subject: Record<string, string>;
542
- subjectId: string;
543
622
  parentTopicIds: string[];
623
+ subjectId: string;
544
624
  isPrimaryConnection: boolean;
545
625
  }
546
626