@ndla/types-taxonomy 1.0.16 → 1.0.18

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.
@@ -119,6 +119,10 @@ export interface NodePostPut {
119
119
  * ID of content introducing this node. Must be a valid URI, but preferably not a URL.
120
120
  */
121
121
  contentUri?: string;
122
+ /**
123
+ * The node is the root in a context. Default is false. Only used if present.
124
+ */
125
+ context?: boolean;
122
126
  /**
123
127
  * The name of the node. Required on create.
124
128
  */
@@ -130,6 +134,7 @@ export interface NodePostPut {
130
134
  nodeType: NodeType;
131
135
  /**
132
136
  * The node is a root node. Default is false. Only used if present.
137
+ * @deprecated
133
138
  */
134
139
  root?: boolean;
135
140
  /**
@@ -417,11 +422,15 @@ export interface SubjectTopicPUT {
417
422
  }
418
423
  export interface TaxonomyContext {
419
424
  /**
420
- * A breadcrumb of the names of the context's path
425
+ * A breadcrumb of the names of the context's parents
421
426
  */
422
427
  breadcrumbs: Record<string, string[]>;
423
428
  /**
424
- * Unique id of context based on root + connection
429
+ * The id of the parent connection object
430
+ */
431
+ connectionId: string;
432
+ /**
433
+ * Unique id of context based on root + parent connection
425
434
  */
426
435
  contextId: string;
427
436
  /**
@@ -433,11 +442,11 @@ export interface TaxonomyContext {
433
442
  */
434
443
  id?: string;
435
444
  /**
436
- * Whether the base connection is marked as active subject
445
+ * Whether the parent connection is marked as active
437
446
  */
438
447
  isActive: boolean;
439
448
  /**
440
- * Whether the base connection is primary or not
449
+ * Whether the parent connection is primary or not
441
450
  */
442
451
  isPrimary: boolean;
443
452
  /**
@@ -445,11 +454,11 @@ export interface TaxonomyContext {
445
454
  */
446
455
  isPrimaryConnection?: boolean;
447
456
  /**
448
- * Whether the base connection is visible or not
457
+ * Whether the parent connection is visible or not
449
458
  */
450
459
  isVisible: boolean;
451
460
  /**
452
- * List of all parent topic-ids
461
+ * List of all parent ids
453
462
  */
454
463
  parentIds: string[];
455
464
  /**
@@ -465,15 +474,19 @@ export interface TaxonomyContext {
465
474
  */
466
475
  publicId: string;
467
476
  /**
468
- * Name of the relevance of the connection of the base
477
+ * The rank of the parent connection object
478
+ */
479
+ rank: number;
480
+ /**
481
+ * Name of the relevance of the parent connection
469
482
  */
470
483
  relevance: Record<string, string>;
471
484
  /**
472
- * Id of the relevance of the connection of the base
485
+ * Id of the relevance of the parent connection
473
486
  */
474
487
  relevanceId?: string;
475
488
  /**
476
- * Resource-types of the base
489
+ * Resource-types of the node
477
490
  */
478
491
  resourceTypes: SearchableTaxonomyResourceType[];
479
492
  /**
@@ -492,6 +505,10 @@ export interface TaxonomyContext {
492
505
  * @deprecated
493
506
  */
494
507
  subjectId?: string;
508
+ /**
509
+ * Pretty-url of this particular context
510
+ */
511
+ url?: string;
495
512
  }
496
513
  export interface TopicPostPut {
497
514
  /**
@@ -689,5 +706,5 @@ export interface VersionPostPut {
689
706
  name: string;
690
707
  }
691
708
  export type DateAsString = string;
692
- export type NodeType = "NODE" | "SUBJECT" | "TOPIC" | "RESOURCE";
709
+ export type NodeType = "NODE" | "SUBJECT" | "TOPIC" | "RESOURCE" | "PROGRAMME";
693
710
  export type VersionType = "BETA" | "PUBLISHED" | "ARCHIVED";
package/package.json CHANGED
@@ -17,5 +17,5 @@
17
17
  "devDependencies": {
18
18
  "typescript": "^5.0.2"
19
19
  },
20
- "version": "1.0.16"
20
+ "version": "1.0.18"
21
21
  }
package/taxonomy-api.ts CHANGED
@@ -129,6 +129,10 @@ export interface NodePostPut {
129
129
  * ID of content introducing this node. Must be a valid URI, but preferably not a URL.
130
130
  */
131
131
  contentUri?: string;
132
+ /**
133
+ * The node is the root in a context. Default is false. Only used if present.
134
+ */
135
+ context?: boolean;
132
136
  /**
133
137
  * The name of the node. Required on create.
134
138
  */
@@ -140,6 +144,7 @@ export interface NodePostPut {
140
144
  nodeType: NodeType;
141
145
  /**
142
146
  * The node is a root node. Default is false. Only used if present.
147
+ * @deprecated
143
148
  */
144
149
  root?: boolean;
145
150
  /**
@@ -448,11 +453,15 @@ export interface SubjectTopicPUT {
448
453
 
449
454
  export interface TaxonomyContext {
450
455
  /**
451
- * A breadcrumb of the names of the context's path
456
+ * A breadcrumb of the names of the context's parents
452
457
  */
453
458
  breadcrumbs: Record<string, string[]>;
454
459
  /**
455
- * Unique id of context based on root + connection
460
+ * The id of the parent connection object
461
+ */
462
+ connectionId: string;
463
+ /**
464
+ * Unique id of context based on root + parent connection
456
465
  */
457
466
  contextId: string;
458
467
  /**
@@ -464,11 +473,11 @@ export interface TaxonomyContext {
464
473
  */
465
474
  id?: string;
466
475
  /**
467
- * Whether the base connection is marked as active subject
476
+ * Whether the parent connection is marked as active
468
477
  */
469
478
  isActive: boolean;
470
479
  /**
471
- * Whether the base connection is primary or not
480
+ * Whether the parent connection is primary or not
472
481
  */
473
482
  isPrimary: boolean;
474
483
  /**
@@ -476,11 +485,11 @@ export interface TaxonomyContext {
476
485
  */
477
486
  isPrimaryConnection?: boolean;
478
487
  /**
479
- * Whether the base connection is visible or not
488
+ * Whether the parent connection is visible or not
480
489
  */
481
490
  isVisible: boolean;
482
491
  /**
483
- * List of all parent topic-ids
492
+ * List of all parent ids
484
493
  */
485
494
  parentIds: string[];
486
495
  /**
@@ -496,15 +505,19 @@ export interface TaxonomyContext {
496
505
  */
497
506
  publicId: string;
498
507
  /**
499
- * Name of the relevance of the connection of the base
508
+ * The rank of the parent connection object
509
+ */
510
+ rank: number;
511
+ /**
512
+ * Name of the relevance of the parent connection
500
513
  */
501
514
  relevance: Record<string, string>;
502
515
  /**
503
- * Id of the relevance of the connection of the base
516
+ * Id of the relevance of the parent connection
504
517
  */
505
518
  relevanceId?: string;
506
519
  /**
507
- * Resource-types of the base
520
+ * Resource-types of the node
508
521
  */
509
522
  resourceTypes: SearchableTaxonomyResourceType[];
510
523
  /**
@@ -523,6 +536,10 @@ export interface TaxonomyContext {
523
536
  * @deprecated
524
537
  */
525
538
  subjectId?: string;
539
+ /**
540
+ * Pretty-url of this particular context
541
+ */
542
+ url?: string;
526
543
  }
527
544
 
528
545
  export interface TopicPostPut {
@@ -734,6 +751,6 @@ export interface VersionPostPut {
734
751
 
735
752
  export type DateAsString = string;
736
753
 
737
- export type NodeType = "NODE" | "SUBJECT" | "TOPIC" | "RESOURCE";
754
+ export type NodeType = "NODE" | "SUBJECT" | "TOPIC" | "RESOURCE" | "PROGRAMME";
738
755
 
739
756
  export type VersionType = "BETA" | "PUBLISHED" | "ARCHIVED";