Skip to content

Commit cd30c28

Browse files
committed
new DocumentMapper methods added
1 parent 2cc643a commit cd30c28

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @code.store/arcxp-sdk-ts
22

3+
## 4.39.0
4+
5+
### Minor Changes
6+
7+
- new DocumentMapper methods added
8+
39
## 4.38.0
410

511
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code.store/arcxp-sdk-ts",
3-
"version": "4.38.0",
3+
"version": "4.39.0",
44
"description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
55
"type": "commonjs",
66
"main": "./dist/index.js",

src/mapper/doc.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export abstract class Document<ANS extends ANSContent> {
134134
}
135135

136136
protected getTags(): MaybePromise<Optional<ArcTypes.Story.Tag[]>> {
137-
return [];
137+
return;
138138
}
139139

140140
protected getSubtype(): MaybePromise<Optional<ArcTypes.Story.SubtypeOrTemplate>> {
@@ -168,4 +168,16 @@ export abstract class Document<ANS extends ANSContent> {
168168
protected getEditorNote(): MaybePromise<Optional<ArcTypes.Story.Editor_Note>> {
169169
return;
170170
}
171+
172+
protected getContentRestrictions(): MaybePromise<Optional<ArcTypes.Story.ContentRestrictions>> {
173+
return;
174+
}
175+
176+
protected getSchedulingInformation(): MaybePromise<Optional<ArcTypes.Story.SchedulingInformation>> {
177+
return;
178+
}
179+
180+
protected getTaxonomy(): MaybePromise<Optional<ArcTypes.Story.Taxonomy>> {
181+
return;
182+
}
171183
}

src/mapper/story.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ export abstract class Story<ANS extends ANSContent = Types.Story.AStory> extends
4747
const source = await this.getSource();
4848
const comments = await this.getComments();
4949
const legacyUrl = await this.legacyUrl();
50+
const contentRestrictions = await this.getContentRestrictions();
51+
const planning = await this.getSchedulingInformation();
52+
const taxonomy = await this.getTaxonomy();
5053

5154
return {
5255
type,
@@ -65,15 +68,18 @@ export abstract class Story<ANS extends ANSContent = Types.Story.AStory> extends
6568
subheadlines,
6669
description,
6770
distributor,
71+
planning,
6872
promo_items: promoItems,
6973
related_content: relatedContent,
74+
content_restrictions: contentRestrictions,
7075
created_date: this.formatDate(new Date()),
7176
first_publish_date: this.formatDate(publicationDate),
7277
publish_date: this.formatDate(publicationDate),
7378
display_date: this.formatDate(this.getDisplayDate()),
7479
source,
7580
comments,
7681
taxonomy: {
82+
...taxonomy,
7783
tags,
7884
},
7985
workflow: {

0 commit comments

Comments
 (0)