@ndla/types-taxonomy 1.0.34 → 1.0.36
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.
- package/build/taxonomy-api.d.ts +16 -5
- package/package.json +1 -1
- package/taxonomy-api.ts +17 -5
package/build/taxonomy-api.d.ts
CHANGED
|
@@ -71,6 +71,10 @@ export interface NodeConnection {
|
|
|
71
71
|
* Child id
|
|
72
72
|
*/
|
|
73
73
|
childId: string;
|
|
74
|
+
/**
|
|
75
|
+
* Connection type
|
|
76
|
+
*/
|
|
77
|
+
connectionType: NodeConnectionType;
|
|
74
78
|
/**
|
|
75
79
|
* Connection id
|
|
76
80
|
*/
|
|
@@ -101,6 +105,10 @@ export interface NodeConnectionPOST {
|
|
|
101
105
|
* Child id
|
|
102
106
|
*/
|
|
103
107
|
childId: string;
|
|
108
|
+
/**
|
|
109
|
+
* Connection type
|
|
110
|
+
*/
|
|
111
|
+
connectionType?: NodeConnectionType;
|
|
104
112
|
parentId: string;
|
|
105
113
|
/**
|
|
106
114
|
* If this connection is primary.
|
|
@@ -141,7 +149,7 @@ export interface NodePostPut {
|
|
|
141
149
|
/**
|
|
142
150
|
* The language used at create time. Used to set default translation.
|
|
143
151
|
*/
|
|
144
|
-
language
|
|
152
|
+
language: string;
|
|
145
153
|
/**
|
|
146
154
|
* The name of the node. Required on create.
|
|
147
155
|
*/
|
|
@@ -248,11 +256,11 @@ export interface NodeSearchBody {
|
|
|
248
256
|
/**
|
|
249
257
|
* Include all contexts
|
|
250
258
|
*/
|
|
251
|
-
includeContexts
|
|
259
|
+
includeContexts: boolean;
|
|
252
260
|
/**
|
|
253
261
|
* ISO-639-1 language code
|
|
254
262
|
*/
|
|
255
|
-
language
|
|
263
|
+
language: string;
|
|
256
264
|
/**
|
|
257
265
|
* Filter by nodeType
|
|
258
266
|
*/
|
|
@@ -308,6 +316,7 @@ export interface ResolvedOldUrl {
|
|
|
308
316
|
}
|
|
309
317
|
export interface ResolvedUrl {
|
|
310
318
|
contentUri: string;
|
|
319
|
+
exactMatch: boolean;
|
|
311
320
|
id: string;
|
|
312
321
|
name: string;
|
|
313
322
|
parents: string[];
|
|
@@ -405,6 +414,7 @@ export interface SearchResult<T> {
|
|
|
405
414
|
export interface SearchableTaxonomyResourceType {
|
|
406
415
|
id: string;
|
|
407
416
|
name: Record<string, string>;
|
|
417
|
+
parentId?: string;
|
|
408
418
|
}
|
|
409
419
|
export interface SubjectPostPut {
|
|
410
420
|
/**
|
|
@@ -524,7 +534,7 @@ export interface TaxonomyContext {
|
|
|
524
534
|
*/
|
|
525
535
|
parentIds: string[];
|
|
526
536
|
/**
|
|
527
|
-
* List of all parents to this context
|
|
537
|
+
* List of all parents to this context. Empty if node is fetched as child
|
|
528
538
|
*/
|
|
529
539
|
parents: TaxonomyCrumb[];
|
|
530
540
|
/**
|
|
@@ -769,7 +779,7 @@ export interface Version {
|
|
|
769
779
|
}
|
|
770
780
|
export interface VersionPostPut {
|
|
771
781
|
/**
|
|
772
|
-
* If specified, set the id to this value. Must start with urn:
|
|
782
|
+
* If specified, set the id to this value. Must start with urn:version: and be a valid URI. If ommitted, an id will be assigned automatically.
|
|
773
783
|
*/
|
|
774
784
|
id?: string;
|
|
775
785
|
/**
|
|
@@ -783,5 +793,6 @@ export interface VersionPostPut {
|
|
|
783
793
|
}
|
|
784
794
|
export type DateAsString = string;
|
|
785
795
|
export type Grade = 1 | 2 | 3 | 4 | 5;
|
|
796
|
+
export type NodeConnectionType = "BRANCH" | "LINK";
|
|
786
797
|
export type NodeType = "NODE" | "SUBJECT" | "TOPIC" | "RESOURCE" | "PROGRAMME";
|
|
787
798
|
export type VersionType = "BETA" | "PUBLISHED" | "ARCHIVED";
|
package/package.json
CHANGED
package/taxonomy-api.ts
CHANGED
|
@@ -79,6 +79,10 @@ export interface NodeConnection {
|
|
|
79
79
|
* Child id
|
|
80
80
|
*/
|
|
81
81
|
childId: string;
|
|
82
|
+
/**
|
|
83
|
+
* Connection type
|
|
84
|
+
*/
|
|
85
|
+
connectionType: NodeConnectionType;
|
|
82
86
|
/**
|
|
83
87
|
* Connection id
|
|
84
88
|
*/
|
|
@@ -110,6 +114,10 @@ export interface NodeConnectionPOST {
|
|
|
110
114
|
* Child id
|
|
111
115
|
*/
|
|
112
116
|
childId: string;
|
|
117
|
+
/**
|
|
118
|
+
* Connection type
|
|
119
|
+
*/
|
|
120
|
+
connectionType?: NodeConnectionType;
|
|
113
121
|
parentId: string;
|
|
114
122
|
/**
|
|
115
123
|
* If this connection is primary.
|
|
@@ -152,7 +160,7 @@ export interface NodePostPut {
|
|
|
152
160
|
/**
|
|
153
161
|
* The language used at create time. Used to set default translation.
|
|
154
162
|
*/
|
|
155
|
-
language
|
|
163
|
+
language: string;
|
|
156
164
|
/**
|
|
157
165
|
* The name of the node. Required on create.
|
|
158
166
|
*/
|
|
@@ -263,11 +271,11 @@ export interface NodeSearchBody {
|
|
|
263
271
|
/**
|
|
264
272
|
* Include all contexts
|
|
265
273
|
*/
|
|
266
|
-
includeContexts
|
|
274
|
+
includeContexts: boolean;
|
|
267
275
|
/**
|
|
268
276
|
* ISO-639-1 language code
|
|
269
277
|
*/
|
|
270
|
-
language
|
|
278
|
+
language: string;
|
|
271
279
|
/**
|
|
272
280
|
* Filter by nodeType
|
|
273
281
|
*/
|
|
@@ -328,6 +336,7 @@ export interface ResolvedOldUrl {
|
|
|
328
336
|
|
|
329
337
|
export interface ResolvedUrl {
|
|
330
338
|
contentUri: string;
|
|
339
|
+
exactMatch: boolean;
|
|
331
340
|
id: string;
|
|
332
341
|
name: string;
|
|
333
342
|
parents: string[];
|
|
@@ -433,6 +442,7 @@ export interface SearchResult<T> {
|
|
|
433
442
|
export interface SearchableTaxonomyResourceType {
|
|
434
443
|
id: string;
|
|
435
444
|
name: Record<string, string>;
|
|
445
|
+
parentId?: string;
|
|
436
446
|
}
|
|
437
447
|
|
|
438
448
|
export interface SubjectPostPut {
|
|
@@ -557,7 +567,7 @@ export interface TaxonomyContext {
|
|
|
557
567
|
*/
|
|
558
568
|
parentIds: string[];
|
|
559
569
|
/**
|
|
560
|
-
* List of all parents to this context
|
|
570
|
+
* List of all parents to this context. Empty if node is fetched as child
|
|
561
571
|
*/
|
|
562
572
|
parents: TaxonomyCrumb[];
|
|
563
573
|
/**
|
|
@@ -815,7 +825,7 @@ export interface Version {
|
|
|
815
825
|
|
|
816
826
|
export interface VersionPostPut {
|
|
817
827
|
/**
|
|
818
|
-
* If specified, set the id to this value. Must start with urn:
|
|
828
|
+
* If specified, set the id to this value. Must start with urn:version: and be a valid URI. If ommitted, an id will be assigned automatically.
|
|
819
829
|
*/
|
|
820
830
|
id?: string;
|
|
821
831
|
/**
|
|
@@ -832,6 +842,8 @@ export type DateAsString = string;
|
|
|
832
842
|
|
|
833
843
|
export type Grade = 1 | 2 | 3 | 4 | 5;
|
|
834
844
|
|
|
845
|
+
export type NodeConnectionType = "BRANCH" | "LINK";
|
|
846
|
+
|
|
835
847
|
export type NodeType = "NODE" | "SUBJECT" | "TOPIC" | "RESOURCE" | "PROGRAMME";
|
|
836
848
|
|
|
837
849
|
export type VersionType = "BETA" | "PUBLISHED" | "ARCHIVED";
|