@ndla/types-taxonomy 1.0.27 → 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.
@@ -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.
@@ -289,21 +286,8 @@ export interface Relevance {
289
286
  * List of language codes supported by translations
290
287
  */
291
288
  supportedLanguages: string[];
292
- /**
293
- * All translations of this relevance
294
- */
295
289
  translations: Translation[];
296
290
  }
297
- export interface RelevancePUT {
298
- /**
299
- * If specified, set the id to this value. Must start with urn:relevance: and be a valid URI. If ommitted, an id will be assigned automatically. Ignored on update
300
- */
301
- id: string;
302
- /**
303
- * The name of the relevance
304
- */
305
- name: string;
306
- }
307
291
  export interface ResolvedOldUrl {
308
292
  /**
309
293
  * URL path for resource
@@ -502,6 +486,10 @@ export interface TaxonomyContext {
502
486
  * Whether a 'standard'-article, 'topic-article'-article or a 'learningpath'
503
487
  */
504
488
  contextType?: string;
489
+ /**
490
+ * The publicId of the node connected via content-uri
491
+ */
492
+ id: string;
505
493
  /**
506
494
  * Whether the parent connection is marked as active
507
495
  */
@@ -522,6 +510,10 @@ export interface TaxonomyContext {
522
510
  * List of all parent ids
523
511
  */
524
512
  parentIds: string[];
513
+ /**
514
+ * List of all parents to this context
515
+ */
516
+ parents: TaxonomyCrumb[];
525
517
  /**
526
518
  * The context path
527
519
  */
@@ -559,6 +551,28 @@ export interface TaxonomyContext {
559
551
  */
560
552
  url?: string;
561
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
+ }
562
576
  export interface TopicPostPut {
563
577
  /**
564
578
  * ID of article introducing this topic. Must be a valid URI, but preferably not a URL.
package/package.json CHANGED
@@ -17,5 +17,5 @@
17
17
  "devDependencies": {
18
18
  "typescript": "^5.0.2"
19
19
  },
20
- "version": "1.0.27"
20
+ "version": "1.0.29"
21
21
  }
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.
@@ -307,23 +304,9 @@ export interface Relevance {
307
304
  * List of language codes supported by translations
308
305
  */
309
306
  supportedLanguages: string[];
310
- /**
311
- * All translations of this relevance
312
- */
313
307
  translations: Translation[];
314
308
  }
315
309
 
316
- export interface RelevancePUT {
317
- /**
318
- * If specified, set the id to this value. Must start with urn:relevance: and be a valid URI. If ommitted, an id will be assigned automatically. Ignored on update
319
- */
320
- id: string;
321
- /**
322
- * The name of the relevance
323
- */
324
- name: string;
325
- }
326
-
327
310
  export interface ResolvedOldUrl {
328
311
  /**
329
312
  * URL path for resource
@@ -536,6 +519,10 @@ export interface TaxonomyContext {
536
519
  * Whether a 'standard'-article, 'topic-article'-article or a 'learningpath'
537
520
  */
538
521
  contextType?: string;
522
+ /**
523
+ * The publicId of the node connected via content-uri
524
+ */
525
+ id: string;
539
526
  /**
540
527
  * Whether the parent connection is marked as active
541
528
  */
@@ -556,6 +543,10 @@ export interface TaxonomyContext {
556
543
  * List of all parent ids
557
544
  */
558
545
  parentIds: string[];
546
+ /**
547
+ * List of all parents to this context
548
+ */
549
+ parents: TaxonomyCrumb[];
559
550
  /**
560
551
  * The context path
561
552
  */
@@ -594,6 +585,29 @@ export interface TaxonomyContext {
594
585
  url?: string;
595
586
  }
596
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
+
597
611
  export interface TopicPostPut {
598
612
  /**
599
613
  * ID of article introducing this topic. Must be a valid URI, but preferably not a URL.