@ndla/types-taxonomy 1.0.28 → 1.0.29
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 +30 -3
- package/package.json +1 -1
- package/taxonomy-api.ts +31 -3
package/build/taxonomy-api.d.ts
CHANGED
|
@@ -26,9 +26,6 @@ export interface Node {
|
|
|
26
26
|
baseName: string;
|
|
27
27
|
breadcrumbs: string[];
|
|
28
28
|
contentUri?: string;
|
|
29
|
-
/**
|
|
30
|
-
* The context object selected when fetching node
|
|
31
|
-
*/
|
|
32
29
|
context?: TaxonomyContext;
|
|
33
30
|
/**
|
|
34
31
|
* An id unique for this context.
|
|
@@ -489,6 +486,10 @@ export interface TaxonomyContext {
|
|
|
489
486
|
* Whether a 'standard'-article, 'topic-article'-article or a 'learningpath'
|
|
490
487
|
*/
|
|
491
488
|
contextType?: string;
|
|
489
|
+
/**
|
|
490
|
+
* The publicId of the node connected via content-uri
|
|
491
|
+
*/
|
|
492
|
+
id: string;
|
|
492
493
|
/**
|
|
493
494
|
* Whether the parent connection is marked as active
|
|
494
495
|
*/
|
|
@@ -509,6 +510,10 @@ export interface TaxonomyContext {
|
|
|
509
510
|
* List of all parent ids
|
|
510
511
|
*/
|
|
511
512
|
parentIds: string[];
|
|
513
|
+
/**
|
|
514
|
+
* List of all parents to this context
|
|
515
|
+
*/
|
|
516
|
+
parents: TaxonomyCrumb[];
|
|
512
517
|
/**
|
|
513
518
|
* The context path
|
|
514
519
|
*/
|
|
@@ -546,6 +551,28 @@ export interface TaxonomyContext {
|
|
|
546
551
|
*/
|
|
547
552
|
url?: string;
|
|
548
553
|
}
|
|
554
|
+
export interface TaxonomyCrumb {
|
|
555
|
+
/**
|
|
556
|
+
* Unique id of context based on root + parent connection
|
|
557
|
+
*/
|
|
558
|
+
contextId: string;
|
|
559
|
+
/**
|
|
560
|
+
* The publicId of the node
|
|
561
|
+
*/
|
|
562
|
+
id: string;
|
|
563
|
+
/**
|
|
564
|
+
* The name of the node
|
|
565
|
+
*/
|
|
566
|
+
name: Record<string, string>;
|
|
567
|
+
/**
|
|
568
|
+
* The context path
|
|
569
|
+
*/
|
|
570
|
+
path: string;
|
|
571
|
+
/**
|
|
572
|
+
* The context url
|
|
573
|
+
*/
|
|
574
|
+
url: string;
|
|
575
|
+
}
|
|
549
576
|
export interface TopicPostPut {
|
|
550
577
|
/**
|
|
551
578
|
* ID of article introducing this topic. Must be a valid URI, but preferably not a URL.
|
package/package.json
CHANGED
package/taxonomy-api.ts
CHANGED
|
@@ -32,9 +32,6 @@ export interface Node {
|
|
|
32
32
|
baseName: string;
|
|
33
33
|
breadcrumbs: string[];
|
|
34
34
|
contentUri?: string;
|
|
35
|
-
/**
|
|
36
|
-
* The context object selected when fetching node
|
|
37
|
-
*/
|
|
38
35
|
context?: TaxonomyContext;
|
|
39
36
|
/**
|
|
40
37
|
* An id unique for this context.
|
|
@@ -522,6 +519,10 @@ export interface TaxonomyContext {
|
|
|
522
519
|
* Whether a 'standard'-article, 'topic-article'-article or a 'learningpath'
|
|
523
520
|
*/
|
|
524
521
|
contextType?: string;
|
|
522
|
+
/**
|
|
523
|
+
* The publicId of the node connected via content-uri
|
|
524
|
+
*/
|
|
525
|
+
id: string;
|
|
525
526
|
/**
|
|
526
527
|
* Whether the parent connection is marked as active
|
|
527
528
|
*/
|
|
@@ -542,6 +543,10 @@ export interface TaxonomyContext {
|
|
|
542
543
|
* List of all parent ids
|
|
543
544
|
*/
|
|
544
545
|
parentIds: string[];
|
|
546
|
+
/**
|
|
547
|
+
* List of all parents to this context
|
|
548
|
+
*/
|
|
549
|
+
parents: TaxonomyCrumb[];
|
|
545
550
|
/**
|
|
546
551
|
* The context path
|
|
547
552
|
*/
|
|
@@ -580,6 +585,29 @@ export interface TaxonomyContext {
|
|
|
580
585
|
url?: string;
|
|
581
586
|
}
|
|
582
587
|
|
|
588
|
+
export interface TaxonomyCrumb {
|
|
589
|
+
/**
|
|
590
|
+
* Unique id of context based on root + parent connection
|
|
591
|
+
*/
|
|
592
|
+
contextId: string;
|
|
593
|
+
/**
|
|
594
|
+
* The publicId of the node
|
|
595
|
+
*/
|
|
596
|
+
id: string;
|
|
597
|
+
/**
|
|
598
|
+
* The name of the node
|
|
599
|
+
*/
|
|
600
|
+
name: Record<string, string>;
|
|
601
|
+
/**
|
|
602
|
+
* The context path
|
|
603
|
+
*/
|
|
604
|
+
path: string;
|
|
605
|
+
/**
|
|
606
|
+
* The context url
|
|
607
|
+
*/
|
|
608
|
+
url: string;
|
|
609
|
+
}
|
|
610
|
+
|
|
583
611
|
export interface TopicPostPut {
|
|
584
612
|
/**
|
|
585
613
|
* ID of article introducing this topic. Must be a valid URI, but preferably not a URL.
|